The man who asks his questions is dumb for a short time, he who don't ask his question is dumb forever - chinese verb (IIRC)
I have two questions for you guys
first, is it possible for me to regularly data with 10 kHz frequency with the Uno?
depens on the quality of the signal, standard analogRead() goes up to ~8500 readings per second.
tweaking with precision can give you ~50.000 readings per second.
// http://arduino.cc/forum/index.php/topic,56396.0.html
// and
// http://arduino.cc/forum/index.php/topic,74895.0.html
/*
Sketch to demonstrate how to decrease time of analog read.
it shortens the delay by manipulating registers and reducing the prescale
timer value from 128 to 16;
Note Serial Speed! Change to suit yourself!
Sample Sketch From Arduino Cookbook by Margolis (O'Reilly Press)
Modified by Willr March24, 2011
Tested on Mega2560 Arduino board with an MA7361 Z output hooked to
Sensor 5
*/
// CHANGE Sensor Pin to suit yourself...
const int sensorPin = 5;
// Change number of entries to a value divisible by 100 only
const int numberOfEntries = 100;
unsigned long microseconds;
unsigned long duration1;
unsigned long duration2;
int results[numberOfEntries];
void setup()
{
Serial.begin(9600); ///CHANGED
Serial.flush();
// standard analog read performance -- prescale == 128
microseconds = micros();
for (int i=0; i < numberOfEntries; i++)
{
results[i] = analogRead(sensorPin);
}
duration1 = micros() - microseconds;
Serial.print(numberOfEntries);
Serial.print(" readings took ");
Serial.println(duration1);
// This double loop just prints a neat table..
for( int j=0; j < numberOfEntries; j=j+20)
{
for (int i=0; i < 20; i++)
{
Serial.print(results[j+i]);
Serial.print(", ");
} //end loop i
Serial.println();
} //end loop j
Serial.println();
// prescale clock to 16
bitClear(ADCSRA,ADPS0);
bitClear(ADCSRA,ADPS1);
bitSet(ADCSRA,ADPS2);
// Performance with Changeed Prescale...
microseconds = micros();
for (int i=0; i < numberOfEntries; i++)
{
results[i] = analogRead(sensorPin);
}
duration2 = micros() - microseconds;
Serial.print(numberOfEntries);
Serial.print(" readings took ");
Serial.println(duration2);
for( int j=0; j < numberOfEntries; j=j+20)
{
for (int i=0; i < 20; i++)
{
Serial.print(results[j+i]);
Serial.print(", ");
} //end loop i
Serial.println();
} //end loop j
Serial.println();
Serial.print("Ratio of read times is : ");
Serial.println((float)duration1/duration2);
Serial.println("********************");
}
void loop()
{
// empty main loop is deliberate...
}
On my uno 100 readings were made in 1716 us => 18 us per reading. So the 300 us can give you 16 readings of 2 bytes = 32. (programmers like powers of 2)
should I process the raw raindrop signal (just a voltage from the impact on the piezo disk) before I store it
No, you should capture the raw reading of 16 raindrops in RAM giving you a buffer of 512 bytes and write that to the SDcard (check the storage subforum for sdFastlib)
That said you probably want to include a timestamps (4 bytes) with every measurement making it 16 x 6 bytes = 96 bytes, So every 5 readings you should store to disk - and leave part of the 512byte buffer empty - that is really faster!
Processing the reading to whatever takes time, you probably not have. Better be ready for the next drop! Processing can be done afterwards. But it is your choice, what do you want. measure one drop, process the readings and display results || measure as many drops as possible.
or is there a way to store data at 10kHz?
SDfatlib can go beyond that but large chuncks is important -> read the threads
Writing to an SD card seems to take time.
Yes, some actions seem instantanious for us mere mortals but everything takes time

writing to an SDcard is in the end just a physical process.
when I upload a sketch to Arduino (say the Datalogger example from SD), does it only start logging once I open the serial monitor?
No, it depends on your sketch. You can make it wait for a button/switch pressed at the end op setup() , or maybe better wait before the analogRead() is above a certain threshold. And in the same way you can make it stop.
Hope this helps,