0
\$\begingroup\$

I have 32 GL10516 photoresistors, groupped (logically) in 4 arrays of 8 resistors.

Each photoresistor is connected to one voltage-divider. I want to measure those output voltages using an 8-channel ADC (https://www.abelectronics.co.uk/p/65/ADC-Differential-Pi-Raspberry-Pi-Analogue-to-Digital-converter).

What is the best solution to switch those 4 arrays one by one to the ADC?

\$\endgroup\$
2
  • \$\begingroup\$ What kind of photo resistor are we talking about? \$\endgroup\$ Commented Jan 6, 2017 at 12:37
  • \$\begingroup\$ Hi Marcus, those are GL10516 CdS photoresistors (10 mm). \$\endgroup\$ Commented Jan 9, 2017 at 7:28

1 Answer 1

0
\$\begingroup\$

So, this is less for OP, but for future readers: First of all, if you have the choice I do not recommend using photoresistors these days. They are harder to find, and also, chances are that you're buying a component that sat on a shelf for 30 years or more; that might or might not matter.

Use phototransistors or photodiodes (that is: every LED works as a photodiode, too, but if you optimize your diode for that, you might get a better sensor than if you just used LEDs). They are cheap and easy to purchase. If you're going to read the values with a microcontroller, anyway, you'd compensate for nonlinearity of the current/irradiation curve for both types of sensors (resistive and semiconductor junction-based) anyway.

I assume your single measurement circuit looks something like:

schematic

simulate this circuit – Schematic created using CircuitLab

Since the ADC measures the voltage over Rphoto (or R1, if you switch these two), what it actually measures is the current flowing through Rphoto (because \$U_{Rphoto} = I \cdot Rphoto\$).

Now, instead of trying to multiplex the sensitive analog voltage here, why not simply have four voltage dividers in parallel, with switches on their low side? The resistors that are in "open switch" paths simply don't see any current flowing through them, and thus, don't influence the voltage the ADC sees at all:

schematic

simulate this circuit

This way, you can use one ADC input for four resistors. Just do this 8 times – use the same selection line for your your logical group of resistors – and you'll have your 32-to-8 multiplexer.

schematic

simulate this circuit

The MOSFETs (Mxx) I used are more or less a random pick – you can use about any transistor you find, as long as its on-state resistance is significantly below 10 kΩ and as long as its Collector-Emitter voltage doesn't vary much within the range of currents that your R1-Rphoto would let through. MOSFETs are a popular choice for transistor applications where you actually just want to switch something "on" or "off", because they have a very low on-resistance and a very high off-resistance.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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