Jump to content

Recommended Posts



I want to measure the battery voltage (ballpark measurement) in a car so I thought I do that with a voltage divider connected to a msp430 ADC pin, but I wanted to add overvoltage protection with a zener as in the schematics in the link below. I am using 100k / 10k in the voltage divider and a BZX79C2V7 zener. If I leave the zener disconnected I get the divider to work as expected in a linear fashion, but when I connect the zener I get the correct reading when the input voltage is 10V but if for example I double the input voltage to 20V I get a lower reading compared to when the zener is disconnected and the voltage divider is no longer linear.


Measurements without zener:


10V in, 0.9V to mcu pin

15V in, 1.35V to mcu pin

20V in, 1.78V to mcu pin



Measurements with zener:

10V in, 0.9V to mcu pin

15V in, 1.25V to mcu pin

20V in, 1.46V to mcu pin



Why is this so? B)






Thanks :)


Kind regards


Link to post
Share on other sites

Because the reverse current of a zener is not exactly zero, so there's a tiny current leaking through the zener causing it to act as a non-linear resistor in parallel with your second resistor.

I don't think you can solve this problem using just passives. You could maybe use an opamp as an analog buffer, powering it from the same source as your controller will effectively clip your output voltage from the opamp to the maximum voltage allowed by your controller.

Link to post
Share on other sites

Thanks for the reply! TBT, just the word opamp scares me a little, hehe.


How comes the zener is used in the link and the title is "Accurate Voltage Measurement". Is there a way to calculate this offset in software or would it be to messy? I am not looking for a accurate reading, +- 0.5V in a 10-25V span would do fine.


Best regards

Link to post
Share on other sites

Reducing the resistor values is also a possibility (if low current consumption is not important), say by a factor of ten - this will reduce the impact of the leakage current.


I played around with that too but since the device will power from the cars battery I want as low consumption as possible.

Link to post
Share on other sites
  • 3 months later...

To reduce current consumption, you could add a high side switch to the voltage divider which is controlled using a digital i/o pin and switch it on just before taking a sample.


Search for high side p-channel mosfet switch to find example circuits. There are also specialst one-stop-shop ic's for ths job, like the ITS4141N that uses logic control levels and works down to about 9V.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...