Annoying nonlinear voltage divider


by Jdo300
Tags: annoying, divider, nonlinear, voltage
Jdo300
Jdo300 is offline
#1
Aug11-11, 08:47 AM
P: 545
Hello All,

I'm working with a microcontroller and want to take analog measurements using its built-in ADC. However, I want to be able to measure voltages much higher than just 0-5V. My *seemingly* simple solution to this was to grab a 500k 25-turn potentiometer which I could connect up as a simple, adjustable, voltage divider to connect to the input of the controller. I then put a 5.1V Zener diode in parallel with the voltage divider output to ensure that the input voltage would not ever exceed the 5V limit for the IC's input. I also added a series resistor of about 1k or so on the HV side to limit the current through the zener if the POT was ever adjusted to the top of the scale when the zener breaks down (schematic attached below).

At first, this solution seemed to work well, until it came time to calibrate the divider circuit. I first wanted to set it so that it could handle up to 20V on the input. So, I set a digital power supply to 20V, and adjusted the POT to output 5V on the low voltage side. But if I scaled the voltage down to 10V, the output voltage did not scale linearly.

My initial thought was that the zener I was using was causing the problem since I was adjusting it to closely to the breakdown voltage. So I then set the power supply to 10V and re calibrated the output to read 2.5V. This worked slightly better but the setup would still go nonlinear if I went 5V above or below the value. I'm wondering if it's the zener diode that is the root cause, or if the POT itself is not linear over a range of voltage inputs?

Assuming that the diode is at fault, I could just remove it but I've already had other *accidents* without having some sort of protection circuit. Ultimately I would like to be able to safely measure up to about 50V but are there any more eloquent solutions to the problem besides my current situation?

Thanks,
Jason O
Attached Thumbnails
Adjustable Voltage Divider.PNG  
Phys.Org News Partner Engineering news on Phys.org
SensaBubble: It's a bubble, but not as we know it (w/ video)
WSU innovation improves drowsy driver detection
Faster computation of electromagnetic interference on an electronic circuit board
yungman
yungman is offline
#2
Aug11-11, 10:49 AM
P: 3,844
You use resistance too high, it your pot is 500K, the R1 must be in mega ohm range. Zener diode do draw current close to breakdown voltage or even not close to. That will mess up your divider. Only take a few nano amps to mess you up.
schip666!
schip666! is offline
#3
Aug11-11, 11:28 AM
P: 595
Also... your ADC input has a finite impedance, it may be spec'ed in the man page or you may need to measure it. That impedance will appear in parallel to the grounded leg of your pot and change the actual voltage divider ratios.

CraigHB
CraigHB is offline
#4
Aug11-11, 04:04 PM
P: 12

Annoying nonlinear voltage divider


It's the zener leakage. They leak a lot as they approach breakdown voltage. Might work okay with lower resistance values, but you'll still get some error from leakage. Also, most ADCs can not tolerate a whole lot of source impedance since they need to charge a small capacitor to take a measurement. Unless you're using a very long sample period, you'll probably need to keep it under ~5kΩ.

I came across a similar situation myself when I wanted to use high side current sensing. My final solution was to give up on the idea and use low side sensing. About the only thing I could think of was to use a voltage detector driving an analog switch to disconnect the input in the event of over-voltage.
vk6kro
vk6kro is online now
#5
Aug13-11, 07:21 PM
Sci Advisor
P: 4,010
You can avoid using a Zener by using a diode like this:



This stops the output going above 5.6 volts if the diode is a silicon one, or you could use a Schottky diode for a maximum voltage of 5.2 volts.

Outputs up to 5 volts should be unaffected by the diode.

Note that the 5 V source must have some load on it (like a microprocessor) as 5 V regulators may not allow current to flow into them from the output.

The maximum voltage input will be determined by the power rating of the 33 K resistor. A watt 33 K resistor should not have more than 90 volts across it. A watt 33 K resistor can have up to 128 volts across it.
yungman
yungman is offline
#6
Aug13-11, 09:11 PM
P: 3,844
Quote Quote by vk6kro View Post
You can avoid using a Zener by using a diode like this:



This stops the output going above 5.6 volts if the diode is a silicon one, or you could use a Schottky diode for a maximum voltage of 5.2 volts.

Outputs up to 5 volts should be unaffected by the diode.

Note that the 5 V source must have some load on it (like a microprocessor) as 5 V regulators may not allow current to flow into them from the output.

The maximum voltage input will be determined by the power rating of the 33 K resistor. A watt 33 K resistor should not have more than 90 volts across it. A watt 33 K resistor can have up to 128 volts across it.
Better put a put a 1k or so pull down resistor from +5V to ground to make sure you draw enough current to maintain +5V. ALL power supply drive only one direction. It can source many amps but it cannot sink anything. just one mA can make it flow up beyond 5V. Putting a 1K ensure it has a sinking capability of 5mA before it start to flow up. If need more, you can put smaller resistor.
vk6kro
vk6kro is online now
#7
Aug13-11, 11:09 PM
Sci Advisor
P: 4,010
Yes, but not in this case.

There is already a microprocessor being supplied by 5 volts, so this supply is sufficiently loaded to sink a couple of milliamps. The warning was there to alert the poster that he should take care that the 5 V source was suitable.

ALL power supply drive only one direction. It can source many amps but it cannot sink anything.

This is a little reckless.
An unloaded LM7805 can sink 5 mA before the output voltage starts to rise. I tried it a few minutes ago.
Batteries have no problem sinking a few mA, even if they are not rechargeable.
Shunt regulators can sink plenty of current.
CraigHB
CraigHB is offline
#8
Aug14-11, 01:02 AM
P: 12
That's a beautifully simple solution. Thanks for posting. Perfect for high side current sensing with voltages higher than MCU supply. I'll probably still use low side sensing for my application since it solves some other problems for me, but if I ever need to go with a high side sensor, I'll use that method if I need to put a clamp on the ADC input.


Register to reply

Related Discussions
Unexplained voltage loss in a simple voltage divider Electrical Engineering 3
Help with voltage divider Electrical Engineering 7
what is voltage divider? Electrical Engineering 3
voltage divider Engineering, Comp Sci, & Technology Homework 12
How do voltage-divider & current-divider work; physically? General Physics 2