2
\$\begingroup\$

For a project I need to sample 32 or more photoresistors at a time and return an ID and value of the brightest photoresistor over some communication (i2c, serial, etc doesn't really matter to me). I am struggling with how to read so many ADCs at the same time while keeping high return rates (>100Hz would be preferable, but that may be unrealistic).

I've heard that FPGAs can be used for this purpose, but I have limited time and no experience with them. Are there any microcontrollers that have so many ADCs, or do you have any other suggestions? Thanks.

\$\endgroup\$
5
  • 1
    \$\begingroup\$ What are you going to do with the data after you get it? Store it for later processing? Drive a DAC in a control loop? Drive 32 DACs in 32 control loops? Send it to a PC? \$\endgroup\$ – The Photon Jun 24 '15 at 23:08
  • 1
    \$\begingroup\$ It can either be sent directly to a PC over USB or a microcontroller as a middleman, whichever ends up being more convenient. \$\endgroup\$ – nanogru Jun 24 '15 at 23:27
  • \$\begingroup\$ You can look into USB data acquisition boards. On eBay I've seen offerings of USB sticks with 6 channels of 10 bits, for under $10. Buyer beware, of course. \$\endgroup\$ – WhatRoughBeast Jun 24 '15 at 23:38
  • \$\begingroup\$ I'd get creative about the approach. For example, you don't need the values, you just need to know which one is biggest. Maybe you can charge 32 caps through integrators at the same time, and just latch the first to reach some threshold. \$\endgroup\$ – Scott Seidman Jun 25 '15 at 0:06
  • 3
    \$\begingroup\$ 100Hz is not high frequencies. I consider high frequencies to be around 100MHz, which would definitely need a FPGA for 32 channels. At 100Hz, you can use analog multiplexers, as long as you don't require all sample to be at the exact same sample time. \$\endgroup\$ – Jonathan Drolet Jun 25 '15 at 1:07
7
\$\begingroup\$

100Hz on 32Channels sounds very perfectly doable.

Presuming we are talking 8 to 12 bits, that's only 12 * 32 * 100 = 38400 bits per second of sampling work.

Even 16bit or 32bit per channel wouldn't be a huge drain on sampling budget at only 100Hz, but going above 10 to 12bit with an average photoresistor is probably already more than over-engineering, they are not that consistent between two different types that you need single-milivolt accuracy on your ADC.

If you need exact simultaneous you just need a set of 4, 8 or even 16 channel ADCs, no other option for it. If you need "sort of at the same time" there are many MCUs that offer 200kSample/s to 2MSample/s and 8 to 10 channels muxed. If you have 8 channels on your MCU, you can use an analogue multiplexer of 1 to 4 on each channel and make it 8*4 = 32 channels.

If you need to scan 32 channels at 200kSample/s with some settling time in between, let's say 10us, you will be able to scan them all in:

32*10us + 32*(1/200000)s = 480us.

If you need 100 reports per second that leaves 9.52ms between a sample batch, that's almost a factor 20 more than the time it takes to sample them and it will seem like they are taken at the same time, compared to your measurement rate.

I would advise you some exact MCUs, but since I am very strongly Atmel branded, I feel that would be biased/opinion based. But if you want an Atmel, look into ATMega and ATXMega series, they are easy to use and powerful. The ATXMega types offer a lot of bang for relatively few bucks. But Microchip and Texas Instruments surely have $4 ~ $6 counterparts with cheap experimenter boards based around them that you could use, if you feel there's better examples or support for those.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ There is another alternative for simultaneous sampling: multiple sample & hold circuits, and a single ADC with MUX. \$\endgroup\$ – Nick Johnson Jun 25 '15 at 6:28
  • \$\begingroup\$ @NickJohnson Excellent point that I completely forgot to consider. \$\endgroup\$ – Asmyldof Jun 25 '15 at 9: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.