Annoying nonlinear voltage divider

In summary, the conversation discusses a solution for measuring high voltages using a microcontroller's built-in ADC. The solution involves using a potentiometer and a zener diode to create a voltage divider, but issues arise with non-linearity and zener leakage. Alternative solutions are suggested, such as using a diode to limit the maximum output voltage, but caution must be taken to ensure the power supply is loaded properly.
  • #1
Jdo300
554
5
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
 

Attachments

  • Adjustable Voltage Divider.PNG
    Adjustable Voltage Divider.PNG
    1.5 KB · Views: 628
Engineering news on Phys.org
  • #2
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.
 
  • #3
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.
 
  • #4
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.
 
  • #5
You can avoid using a Zener by using a diode like this:

[PLAIN]http://dl.dropbox.com/u/4222062/voltage%20divider%202.PNG

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.
 
Last edited by a moderator:
  • #6
vk6kro said:
You can avoid using a Zener by using a diode like this:

[PLAIN]http://dl.dropbox.com/u/4222062/voltage%20divider%202.PNG

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.
 
Last edited by a moderator:
  • #7
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.
 
  • #8
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.
 

1. What is an annoying nonlinear voltage divider?

An annoying nonlinear voltage divider is a type of electrical circuit that is used to divide a voltage into smaller values. It is called "annoying" because it can introduce nonlinearities and distortions into the output voltage, making it difficult to accurately predict the output value.

2. How does an annoying nonlinear voltage divider work?

An annoying nonlinear voltage divider typically consists of two or more resistors connected in series. The input voltage is applied across the resistors, and the output voltage is taken from the connection point between the resistors. The output voltage is determined by the values of the resistors and is usually a fraction of the input voltage.

3. What causes nonlinearities in an annoying nonlinear voltage divider?

Nonlinearities in an annoying nonlinear voltage divider can be caused by a variety of factors, such as temperature changes, component tolerances, and load variations. These factors can affect the resistance values of the resistors, leading to changes in the output voltage.

4. How can nonlinearities in an annoying nonlinear voltage divider be minimized?

To minimize nonlinearities in an annoying nonlinear voltage divider, it is important to use high-quality resistors with tight tolerances. Temperature-compensating resistors can also be used to reduce the impact of temperature changes. Additionally, using a feedback circuit can help to stabilize the output voltage and reduce nonlinearities.

5. What are some common applications of an annoying nonlinear voltage divider?

An annoying nonlinear voltage divider is commonly used in electronic devices and circuits, such as power supplies, amplifiers, and sensors. It can also be used in voltage regulation circuits to provide a stable output voltage. However, in some cases, a more precise voltage divider, such as a linear voltage divider, may be preferred to avoid nonlinearities.

Similar threads

  • Electrical Engineering
Replies
14
Views
810
  • Electrical Engineering
3
Replies
78
Views
3K
  • Electrical Engineering
Replies
10
Views
1K
  • Electrical Engineering
Replies
14
Views
2K
  • Electrical Engineering
Replies
7
Views
3K
  • Electrical Engineering
Replies
16
Views
3K
Replies
19
Views
1K
Replies
68
Views
4K
  • Electrical Engineering
2
Replies
38
Views
3K
  • Electrical Engineering
Replies
6
Views
849
Back
Top