1
\$\begingroup\$

I am designing sensors array for the Line following Robot, based on LDRs Resistors and transmitter LEDs, the value of LDRs Resistors in series is changing with the position of the array on the black Line, so I can measure the Deviation angle value from the voltage divider through R1 to control the tow Motors.

The value of LDR Resistors changing from 92 Kohm to 110 kohm, I put a resistor R1 in series with the LDRs, the ADC pin (A0) in arduino uno is connected to the voltage divider through R1.

Question: How I can choose the value of R1 to get the best sensitivity on A0 pin? I tried 10k ohm but I get a small changes just [4.5,4.58] volt and that's not working I need more sensitivity. How can I choose R1 to get the best sensitivity on A0 pin?

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
1
\$\begingroup\$

As with many things, but unusually obvious here, calculus comes to the rescue. Your senstitivity is $$ \frac{\partial V_{out}}{\partial R_{LDR} } $$ You need to find the expression for $$ \frac{\partial^2 V_{out}}{\partial R_{LDR} \partial R_1} $$ as a function of the resistance of the LDR and R1, set that equal to zero, and find the value of R1 when that derivative is zero.

Formally, you should take the second derivative and make sure its a maximum and not a minimum, and test your endpoints for absolutes, but in this case I'm reasonably sure that won't be necessary.

My gut feels like R1 should be 400 ohms, but my gut's been wrong before and will be again. (@Wouter-van-ooijen seems to think it will be an absolute at one of the endpoints. Interested to see what the right answer is)

Note that this in no way spreads your range of Vout over the dynamic range of your ADC. You may well need to do some signal conditioning beyond that circuit.

Oops, just noticed that the LDRS aren't 100 ohms like in the picture. The answer should be that R1 should be set at the total value of the four LDRs, which is right in line with Wouter. This will interfere with the adc, and you should buffer.

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

To get the largest voltage swing for the values you mention, R1 should be ~ 100 kOhm. But note that this makes the impedance of the Vout ~ 50 KOhm. For PIC UCs a maximum resistance of 10k is recommended, I don't know this figure for your UC *uno = Atmega328P?) so you'll have to check.

Also, I am not sure why you place the LDRs in series, but that's another question.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ you mean we can get more voltage swing if we put he LDRs in parrallel? \$\endgroup\$ – Ali AL-Assad Sep 30 '15 at 12:28
  • \$\begingroup\$ That depends on how the ilumination changes. Series is OK when they are all illuminated, except for one which might be in the dark. Parallel is better in the oppisite case, all dark but one might be illuminated. \$\endgroup\$ – Wouter van Ooijen Sep 30 '15 at 14:45

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.