0
\$\begingroup\$

I have a signal that fluctuates between -70mV and 50mV. How would I get the arduino mega to read this on an analog pin at a high sampling rate? Ultimately I am trying to graph the data in real time so it looks like this.

enter image description here

I have looked at the question posted earlier on EESE about reading positive/negative voltages and it gives info on a slow moving signal that ranged from -55V to 55V. I doubt this solution would apply to my situation though (attenuating signal with two resistors and then offsetting the range by using an op-amp summing circuit).

\$\endgroup\$
  • 1
    \$\begingroup\$ Try using an instrumentation amplifier like the INA282 (it's designed as a current sense amplifier, but all it really does is amplify the signal by a fixed amount and level-shift it to be centered around an input voltage, after all) \$\endgroup\$ – Hearth Oct 11 '18 at 21:33
  • \$\begingroup\$ You would buffer the acquisition, and plot it in pseudo-real time \$\endgroup\$ – Scott Seidman Oct 11 '18 at 21:43
  • 1
    \$\begingroup\$ Just curious. Your text says \$\text{mV}\$. Your chart shows \$\mu\text{V}\$. That's only three orders of magnitude difference. Which is it? \$\endgroup\$ – jonk Oct 11 '18 at 21:52
1
\$\begingroup\$
  1. Using standard Arduino libraries, you will have trouble sampling above about 10000 samples per second.

  2. If you manage to sample fast enough, you will need a place to put the captured data. Memory is notoriously scarce on Arduinos, and the other built in option is the serial port to dump it to a PC. You could also try to write it to an SD card. Don't know what the libraries are like for that, or if there's a readily available SD card adapter for Arduinos.

  3. The Arduinos have a 10 bit analog to digital converter. Assuming a 5V reference, you are talking about 5mV steps. For the range you describe (120mV) you would only be using 24 out of 1023 steps from the ADC. You need an amplifier that multiplies by about 30, and that adds 2.5 V to the result.

If "less than 10kHz" fits your definition of "high sampling rate" and you can build a small circuit board for the amplifier, then you might be able to do something useful.

\$\endgroup\$
  • 1
    \$\begingroup\$ Problem with standard Arduino libraries for ADC is inconsistent sampling frequency. If you include interrupts and continous ADC mode then you can go faster. For my project I had to send data to PC and I could go to about 50 kHz sample rate, which was limited by maximum baud rate for onboard RS232 to uart chip. \$\endgroup\$ – Rokta Oct 12 '18 at 7:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.