Voltage Divider and Clamp.  Help Please! - Page 1
Forum section: electronics / beginners

author: MisterBoston
author_rank: Newbie
timestamp: January 17, 2025, 08:46:34 am
content: Hello folks. Long time listener of the pod, first time poster on the forum.I have a friend who needs to monitor the voltage of a 60v nominal battery pack, so I've made him a circuit. The circuit should take a 0-60v measurement of the pack (although, ideally it should not fail if measuring to 100v for margin). It should divide the voltage and output a 0-5V nominal signal to an ADC. I'm assuming the ADC could take up to 5.5v on margin. As tested (see second attachment) on my bench, it works as expected if wired correctly, but I would also like reverse polarity protection for the 0-5v output in case the 0-60v battery pack input is wired up wrong.I've designed, fabricated, and tested a circuit as shown below. The output when wired up correctly limits the ADC output to <5.5V. However, when I reverse the polarity on the 0-60v input, it doesn't limit the 0-5V output at all. I'm sure it will fry the ADC.In the design, I have used voltage clamps to try to limit over/under voltage. The zener diode D2 seems to be doing it's job to limit overvoltage. Reading online from examples, I was expecting the D3 zener diode to protect against over voltage if provided a 5V reference from the TPS709 regulator, but I'm not seeing this happen. Am I using the wrong regulator?(Regulator)https://www.ti.com/lit/ds/symlink/tps709.pdfI've run this through the falstad simulator and it says I should be limited to -0.4402V when I reverse the polarity on the 0-60v input even at -100V.Any help would be appreciated!

author: fourtytwo42
author_rank: Super Contributor
timestamp: January 17, 2025, 10:24:10 am
content: IMOP your circuit is wayy to complex, all you need is the divider and a reverse biased schottky from the ADC input to ground to protect against reversals. However your circuit takes no account of the required input impedance of the ADC that will almost certainly mean you also need a buffer amplifier, most easily powered by the mpu supply.

author: mikerj
author_rank: Super Contributor
timestamp: January 17, 2025, 01:09:12 pm
content: In addition to output impedance concerns, this chart should show why using zeners for voltage clamping in a precision application can be a poor solution. If you look at the 5.6v zener, at 5v it's already drawing around 100uA, which is going to give you considerable error towards the top of your design range. This is for the common BZX84, but pretty much all zeners behave in a similar way with a relatively soft knee.

author: CaptDon
author_rank: Super Contributor
timestamp: January 17, 2025, 01:51:39 pm
content: Far to complex. No need for the regulator circuit at all. The zener clamp will conduct as a normal diode for voltage in the reverse direction. Probably no need for anything other than a voltage divider, the zener clamp and maybe a buffer amplifier as noted by another poster. The 5.6 volt zener may already be drawing some current even at 5 volts and could possibly mess up the ADC scaling as you approach 5 volts.

author: MisterBoston
author_rank: Newbie
timestamp: January 17, 2025, 03:19:02 pm
content: Thank you everybody for the advice.I've tested the board with a stripped down set of components (similar to what I think you've all suggested) and compared it to a Falstad simulation. The simulation gives acceptable results:@+100v IN: 5.528v OUTThis matches physical bench testing. I do see the 'soft knee' in the 0-5v curve after ~55v input (see previous chart). It is very linear in the region that I'm interested in, but I would be interested in improving it. How should I select a schottky diode for an application like this? It's a SOT23-5 package on the boards, for what it's worth.@-100v IN: -0.440.8v OUT (See attachment)I'm using a 100v power supply and reversing the leads +/- to test reverse polarity and these results do not match the simulation. The supply is an old HP 6181C.Is it possible the supply doesn't accept reverse current when I switch the leads?Unfortunately the 'client' (my friend) can't provide info on the ADC impedance for the device he's going to use. I'm assuming its high impedance? I'll try a buffer amp in a future iteration of the PCB.

author: tooki
author_rank: Super Contributor
timestamp: January 17, 2025, 06:56:53 pm
content: Quote from: MisterBoston on January 17, 2025, 08:46:34 amA number of suggestions and bits of info (in order of thinking of them, not ranked byimportance):1. In the first schematic, you circle the voltage divider and state “high tolerance” resistors. I suspect you mean the exact opposite: high-accuracy resistors, which means a low (small) tolerance. High-tolerance = low-accuracy.2. I don’t understand what your intent was with the 5V regulator. What was your thinking? You talk about using it as a reference for a zener, but in fact zeners are usually what form the references inside regulators!3. Allow yourself some headroom: given that battery monitoring doesn't normally need super fast measurements, you can average a bunch of readings, and in exchange, don’t push your full-scale voltage all the way to 5V.4. Maybe others can chime in on this, but perhaps protect not the 5V ADC input, but the 60V input itself.5. Is this for any kind of automotive application? If so, plan for power to be very “dirty” and have lots of spikes and noise.6. Can your client-friend at least give you the model number of the ADC being used?7. Falstad is a great tool for illustrating how circuits work, but it isn’t the best simulator as such, since it has very limited component models. I would recommend modeling your circuit in LTspice, using actual models for the specific diodes you use.8. Take a look at how the circuit protection is developed inLeo’s Ultimate Continuity Tester. This might give you an idea of how to go about designing the protection for a circuit.Quote from: MisterBoston on January 17, 2025, 03:19:02 pmFirst off, how does it behave without protection diodes? That should give you a baseline of the best measurement performance you can achieve with the circuit.Second, I think you need to do some basic learning on what diodes do and how they work. You’re seeing -0.4408V (note also: you can’t have multiple decimal points in a number) because that is the forward voltage drop of Falstad’s standard silicon (not Schottky!) diode at the current that is flowing through it. The simulation is behaving exactly as expected.Since you didn’t actually statein what waysthe simulation differs from your real-world measurements, I can’t possibly make any comments on how and why it does or does not make sense for it to differ.Quote from: MisterBoston on January 17, 2025, 03:19:02 pmHuh? What does that question even mean?Quote from: MisterBoston on January 17, 2025, 03:19:02 pm”High” is very relative. The 1M ohm input impedance of a cheap multimeter is high compared to the <10K ohm input impedance of an Arduino Uno's ADC, but is low compared to the 1G ohm input impedance of a decent bench multimeter, and that in turn is low-impedance compared to the 100T ohm (that’s 100 million megohm!) input impedance of an electrometer or pH meter’s input.Does your friend-client have the ability to add a microcontroller-controlled peripheral to the project? If so, I would suggest using one of TI’s brilliant integrated digital power monitor chips. I’ve used (andwritten about) the 36V-max INA226 before, but theINA228supports up to 85V, well above your 60V spec. You could put some input protection if you wanted, but these chips are basically designed to be connected directly to a power rail. They contain the ADC (20-bit in the case of the INA228, giving an LSB of under 1/5 of a millivolt) and for the advertised voltage range don’t need any voltage dividers or buffers.

author: MisterBoston
author_rank: Newbie
timestamp: January 17, 2025, 08:01:22 pm
content: Thanks for the advice. I'll try your suggestions out and report back later. Just responding to what I can right now.1. In the first schematic, you circle the voltage divider and state “high tolerance” resistors. I suspect you mean the exact opposite: high-accuracy resistors, which means a low (small) tolerance. High-tolerance = low-accuracy.My mistake. Yes, low tolerance (0.1%).2. I don’t understand what your intent was with the 5V regulator. What was your thinking? You talk about using it as a reference for a zener, but in fact zeners are usually what form the references inside regulators!I saw examples of protecting ADCs on google like this shown below. One diode to ground, one diode to +analog supply (this one is from a TI white paper on ADC protection). I thought it would be possible to bring 12v to a 5v regulator to mimic the analog supply voltage. In any case, I've removed all that from the board and it's just as shown in the falstad screenshot and it behaves the same or similar. So just the grounded diode remaining.3. Allow yourself some headroom: given that battery monitoring doesn't normally need super fast measurements, you can average a bunch of readings, and in exchange, don’t push your full-scale voltage all the way to 5V.100% understand. It would only need slow speed measurements. It also behaves just fine if wired up as intended in the linear region @ or below 55v.4. Maybe others can chime in on this, but perhaps protect not the 5V ADC input, but the 60V input itself.I had not thought about this... makes sense.5. Is this for any kind of automotive application? If so, plan for power to be very “dirty” and have lots of spikes and noise.Yes, automotive. I think this will have to be addressed in testing on the vehicle.6. Can your client-friend at least give you the model number of the ADC being used?I'll keep pushing him on this.7. Falstad is a great tool for illustrating how circuits work, but it isn’t the best simulator as such, since it has very limited component models. I would recommend modeling your circuit in LTspice, using actual models for the specific diodes you use.Noted8. Take a look at how the circuit protection is developed in Leo’s Ultimate Continuity Tester. This might give you an idea of how to go about designing the protection for a circuit.Also noted. I'll check this out.First off, how does it behave without protection diodes? That should give you a baseline of the best measurement performance you can achieve with the circuit.Will post a plot soon.Huh? What does that question even mean?Sorry, I'm just a mechanical engineer.Does your friend-client have the ability to add a microcontroller-controlled peripheral to the project? If so, I would suggest using one of TI’s brilliant integrated digital power monitor chips. I’ve used (and written about) the 36V-max INA226 before, but the INA228 supports up to 85V, well above your 60V spec. You could put some input protection if you wanted, but these chips are basically designed to be connected directly to a power rail. They contain the ADC (20-bit in the case of the INA228, giving an LSB of under 1/5 of a millivolt) and for the advertised voltage range don’t need any voltage dividers or buffers.Will check this out thanks!

author: lakis70
author_rank: Contributor
timestamp: January 17, 2025, 08:59:54 pm
content: i make something similar. Look the replieshttps://www.eevblog.com/forum/beginners/panelmeter-front-end/msg5753267/#msg5753267

author: Terry Bites
author_rank: Super Contributor
timestamp: January 18, 2025, 02:00:37 pm
content: Loose R1,R2, D1 and C3. Use a regulator that can handle a higher input voltage with ease eg. An LM317L.Protect the regulator input with a small polyfuse and a zener to keep regulator from voltages over 30V. eg. 1N5934

author: tooki
author_rank: Super Contributor
timestamp: January 18, 2025, 05:12:11 pm
content: Quote from: Terry Bites on January 18, 2025, 02:00:37 pmTo what end, if the consensus so far has been to dispense with the regulator altogether?

author: MisterBoston
author_rank: Newbie
timestamp: January 19, 2025, 01:58:06 pm
content: Removing the regulator did not really affect the measured results (as far as reverse polarity is concerned)I plan to post plots later this week. I apologize for taking up everybody's time. I think this should be a simple circuit.