# Read in Arduino negative and positive voltages in a wider range

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?

• 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/… May 14, 2022 at 17:47
• 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. May 14, 2022 at 17:51
• @Codebeat Few components does a better job at attenuating a signal than a voltage divider if you can deal with the impedance.
– pipe
May 15, 2022 at 4:11

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

simulate this circuit – Schematic created using CircuitLab

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.

• Would you mind explaining a bit about the calculation of the circuit? Would it be applying the superposition theorem? May 14, 2022 at 18:18
• 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. May 14, 2022 at 20:24
• Thank you! But I don't understand the first part of the explanation. Is the output impedance the one seen by the analog pin and the input impedance that of said pin? Forgive my ignorance, I'm getting started in the world of electronics. May 16, 2022 at 19:38
• Yes, divider output impedance is what the ADC input pin sees. Input impedance (of the divider) is what your voltage source sees. The former in this case is 5K || 15K || 7.5K or 2.5K. If you doubled each resistor (10K/30K/15K) it would be 5K. The input impedance of the divider is 15K + (7.5K || 5K) = 18K. If you doubled each resistor it would be 36K. May 16, 2022 at 19:47
• I understand that the input impedance is like Vin's Thèvenin resistor. So do we want the output impedance (the one the analog pin sees) to be large so that most of the current flows through the analog pin and it can read well? May 16, 2022 at 20:08