1
\$\begingroup\$

I am working on an Arduino board and I have no previous experience with it, unfortunately. I need to sense the voltage signal from a sensor using the ADC of the Arduino. I have an Arduino Due manual which says it has up to 12 useable pins for ADC input. I want to acquire 4 analog signals. However, I have two questions:

  1. I want to fetch the data at a high frequency. So let's say if the sampling time of Due is 60 μs,
    A. will it take all of 4 analog signals at T = 60 μs and then convert them to digital? Or
    B. will it take the first signal at 60 μs and fetch the second analog signal from pin 2 at 120 μs and so on from 4th pin at 240 μs?
    Which one of these is the correct scenario?

  2. It says that the Arduino Due can take 1M samples per second. Of course, this is an ideal figure. But, will these 4 analog signals count as 1 sample of the Due or 4 samples?

\$\endgroup\$
3
  • \$\begingroup\$ 1.) What sample rate /sensor do you really need? 2.) If the Due is anything like the other Arduinos, only rubbish will be returned by a 1 MSa/s rate. The resolution will drop off well before the max.theoretical rate. \$\endgroup\$
    – Paul Uszak
    Jan 25 at 13:43
  • \$\begingroup\$ Hello Paul. Thank you. I am aiming for a 90k-100k sample rate per sensor pin. Is it feasible with Arduino Due. \$\endgroup\$
    – Basit Ali
    Jan 25 at 16:37
  • 1
    \$\begingroup\$ I can't tell you definitively, but an Arduino Uno can't unless you're prepared to accept a lowered sample resolution. Uno's drop off very dramatically after 66-125 KSa/s. The sensor's output impedance also has an effect on the ability to fully cycle the ADC's internal capacitor. You're on the boundary of goodness, so all I can suggest is that you try it. Soz. \$\endgroup\$
    – Paul Uszak
    Jan 25 at 17:46
2
\$\begingroup\$

As far as I understand, this uC has single ADC harware with multiple channels (multiplexed inputs). This means that, for each conversion, it needs some acquisition time to charge its internal sample-and-hold capacitor and then some time to do actual conversion.

So, the ideal 1 M samples/second is for single channel only. If you use 4 channels, you can have 250 k samples/second max.

Sampling time is also specified for each channel. This device can't sample all the channels at the same time, it must sample them one by one.

\$\endgroup\$
2
  • \$\begingroup\$ Hello. Thank you for your useful recommendations. I have one thing to ask. As you mentioned ''This device can't sample all the channels at the same time, it must sample them one by one''. Does this mean that I can't acquire an analog signal from all of the 4 sensors at a uniform time? let's say at T= 60 µs? Instead, it would acquire 1st at 60 µs, 2nd at 120 µS, and so on 4th at 240 µs?. Actually, I want to compare these 4 signals at each time interval. \$\endgroup\$
    – Basit Ali
    Jan 25 at 10:40
  • 1
    \$\begingroup\$ That is correct. There will be some phase shift between the channels. It may be a problem when the signal frequency high. \$\endgroup\$
    – Tagli
    Jan 25 at 10:54
2
\$\begingroup\$
  1. It can sample and convert one analog signal at a time. Reading four channels takes four times the time it takes to read one channel.

  2. Based on 1, if it can sample at a rate of 1M samples per second, you can read four channels at 250K times per second.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Depending on input signal impedance and sample time settings, it could well be necessary to ignore the first measurement for each pin and use a second measurement, further reducing the actual sample rate. \$\endgroup\$
    – ocrdu
    Jan 25 at 10:49

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.