5
\$\begingroup\$

I need to read DC voltages on Arduino that can vary between -15V and 15V. As far as I know, Arduino can only read positive voltage values ​​between 0-5V.

I thought of using a voltage divider with a positive reference (the 5V from the Arduino.) Could it be achieved by connecting the voltage divider with a positive reference to another with 0V as a reference, or would there be other, better options?

New contributor
Libegria is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
\$\endgroup\$
3
  • \$\begingroup\$ You need to bias your signal at 2.5V after stepping it down with a divider (and you may want a capacitive divider in parallel with it as well for frequency compensation so the resistor divider doesn't form an RC lowpass filter that slows down higher frequencies). Using a differential amp on the signal after is better too. That makes a differential probe as seen here here which you could actually just outright do if you wished. Just this one doesn't have a biased output: circuitcellar.com/research-design-hub/… \$\endgroup\$
    – DKNguyen
    2 days ago
  • \$\begingroup\$ Voltage divider(s network), the center (2.5V) of value is 0. However it is never that precise because you squeeze a scale of -15V to +15V = 30V into a range of 0v to 5v. In fact useless. So you need an instrument /component to do this. \$\endgroup\$
    – Codebeat
    2 days ago
  • \$\begingroup\$ @Codebeat Few components does a better job at attenuating a signal than a voltage divider if you can deal with the impedance. \$\endgroup\$
    – pipe
    yesterday

1 Answer 1

7
\$\begingroup\$

Yes, you can use a voltage divider and bias with the 5V supply, as so:

schematic

simulate this circuit – Schematic created using CircuitLab

enter image description here

Note that if the input is left open it will read 3V (equivalent to 3V at the input) rather than 2.5V (equivalent to 0V at the input) as you might expect.

Vin = (Vadc-2.5V)\$\cdot\$6

Edit: To calculate I picked 15k for R1 so the output impedance would be reasonable (less than 10k) and it would not draw too much current from the input (input impedance more than 15K). With -15V in, the output is 0V so R3 is obviously 5K (we can ignore R2 since there is no voltage across it). That's from KCL and -Vin/15K = 5V/R3.

Then for +15V in, Vout is 5V and R3 has no current through it so from KCL (Vin - 5)/15k = 5/R2 and R2 = 7.5K.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Would you mind explaining a bit about the calculation of the circuit? Would it be applying the superposition theorem? \$\endgroup\$
    – Libegria
    2 days ago
  • \$\begingroup\$ See above edit for an explanation. I picked input values that separated the equations, if you pick different values you will end up with two simultaneous equations in two unknowns which are slightly less easy to solve. \$\endgroup\$ yesterday

Your Answer

Libegria is a new contributor. Be nice, and check out our Code of Conduct.

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.