Need the sampling rate of 2000sps from three Analog inputs at a time.

Hi there,

I am trying to build the simple EMG circuit using arduino Mega.

For getting the flawless EMG signal I need the sampling frequency of around 2000sps.

My controller will also be taking Analog signals from two different sensors other than the EMG.

Also, I want to print the values that I get from three Analog inputs on serial monitor.

If I do all these mentioned things, the sampling rate of Mega decreases drastically.

What can i do so that I get 2000sps without the loss of data.

You realise that the samples will be at least 100us apart? What serial line speed are you using ?

I used the baud rate of 250000!

25000 characters per second, divided by (3 * 2000) samples is less than five characters per sample. You could try printing the sample values in hex.

Edit: if you print your results in base 32, each 10 bit reading would be no more than two digits wide, so a row of three readings, with space or comma separators and CR/LF termination would be just ten characters long.

If you take samples from three different analog pins in quick succession you may find (for example) that the sample from the second pin is "contaminated" by a residue of voltage from the first pin. One way to deal with that is to read every pin twice and ignore the first reading. However that will obviously reduce the total number of samples that can be taken in a given period.

Regarding the communication speed, would it be practical to take (say) 100 readings and then pause while sending all that data to the PC? I regularly use 500,000 baud for communication with programs on my PC, though I have never tried that with the Arduino Serial Monitor