# I was wondering how to covert a DC voltage signal that is somewhere between 0-40V to a range of 0-5V

#### paulsenml

Joined Nov 6, 2018
2
I am working on a data logger that will measure the voltage from a battery as it supplies power to a motor inside a drill. However the ADC I am using only accepts up to 5V and the battery is supposedly supposed to peak around 40V. The device isnt supposed to impede the motors functionality and the ADC is sampling at 200Hz so a device with a very small time constant if any is ideal. If anyone could point me in the right direction that would be FANTASTIC. Thanks

#### Xavier Pacheco Paulino

Joined Oct 21, 2015
728
The simplest approach to scale down the battery voltage to match the ADC input range is to use a resistor divider. The resistors should be carefully selected according to the input impedance of your controller. You could use rail-to rail opamp as follower if you have impedance matching issues.

Joined Jan 15, 2015
5,736
The simplest approach to scale down the battery voltage to match the ADC input range is to use a resistor divider. The resistors should be carefully selected according to the input impedance of your controller. You could use rail-to rail opamp as follower if you have impedance matching issues.

That's what I have done in the past.

Ron

#### paulsenml

Joined Nov 6, 2018
2
Thanks! I was stuck thinking in series with the battery and motor. Parallel makes a lot more sense. I'm trying not to draw constant current from the battery however so if I put a solid state relay in series with the voltage divider do you think that would work?

Joined Jan 15, 2015
5,736
Thanks! I was stuck thinking in series with the battery and motor. Parallel makes a lot more sense. I'm trying not to draw constant current from the battery however so if I put a solid state relay in series with the voltage divider do you think that would work?
No, you just place a voltage divider across the battery. Just as an example using a 10 K potentiometer adjusted as an 8:1 divider the total current draw would be at 40 volts 40 / 10,000 = about 4 mA. Using a 100 K pot the current draw would be about 400 uA. If 40 volts is the max the battery will ever see all you want is an 8:1 simple divider. I only suggest 10 K as Rtotal as this way your A/D will see a lower resistance at its input.

Ron

#### MrChips

Joined Oct 2, 2009
22,584
Here is a voltage divider circuit:

R1 = 14k
R2 = 2k
will give 1/8 division.

R1 = 18k
R2 = 2k
will give 1/10 division.

#### ebeowulf17

Joined Aug 12, 2014
3,275
No, you just place a voltage divider across the battery. Just as an example using a 10 K potentiometer adjusted as an 8:1 divider the total current draw would be at 40 volts 40 / 10,000 = about 4 mA. Using a 100 K pot the current draw would be about 400 uA. If 40 volts is the max the battery will ever see all you want is an 8:1 simple divider. I only suggest 10 K as Rtotal as this way your A/D will see a lower resistance at its input.

Ron
Yeah, in the 100kΩ (400uA draw) example, the voltage divider is probably consuming less power than any SSR control circuit to bypass it would!