Measuring Voltage in a Constant Current Source Circuit - Page 1
Forum section: electronics / projects

author: techy101
author_rank: Unknown
timestamp: July 09, 2018, 06:43:06 pm
content: I'm having trouble with a circuit that I'm working on. The circuit (attached in a simplified form) is intended to pass a constant current (0-10mA) through a load. An ADC is used to determine the current through a sense resistor but I also want to measure the voltage on either side of the load. This is where I'm running into problems; the only way I'm aware of to get that high voltage down low enough for the ADC is a voltage divider and the way I've tried implementing it ends up being a current divider which completely messes up the circuit, (obviously, in retrospect) causing current to flow through the load when it is not desired.The goal is to determine if the load is a short or an open and I was hoping someone could provide some guidance on a more suitable approach. This is my first foray into constant current sources and, while most of it is going well, this has me absolutely stumped.Disclaimer: This is a work project which I have permission to post about but can't post the exact circuit/part numbers. However, the attached is the core circuit as it's implemented.Thank you!

author: duak
author_rank: Super Contributor
timestamp: July 09, 2018, 07:34:38 pm
content: There are at least two possible solutions. The first is to increase the values of the divider resistors until the error they introduce is within your error budget. It may require a buffer to isolate the A/D from the divider.The second is to do what Keithley and HP do to build ultrahigh input impedance electrometers. ie., have a floating buffer amp with a high input impedance drive a voltage divider made with more sensible values. Unfortunately, this requires a low leakage floating power supply and careful design to protect the buffer amp.If there are other ways, I'd like to know about them too.Cheers,

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 09, 2018, 08:28:07 pm
content: To minimize the impact of the voltage divider on the load, you could use an high-voltage opamp to buffer the voltage before the divider. The LTC6091 is specified to up to 140 V for instance:http://www.analog.com/en/products/amplifiers/operational-amplifiers/high-voltage-op-amps-greaterthanequalto-12v/ltc6091.htmlI would still add some kind of overvoltage protection though. At this voltages and depending on the nature of the load, you may be in for a tough ride.Another thing that pops up is the dynamic range of your current sink. With the given values and depending on the Vt of Q1, you may not be able to get your full range of 0-10 mA while U2 is powered at 3.3 V. Just a thought.

author: techy101
author_rank: Unknown
timestamp: July 09, 2018, 08:35:20 pm
content: Thank you for the responses.Quote from: duak on July 09, 2018, 07:34:38 pmThis approach, with the buffer,is what I ended up doing for my battery monitoring circuit.Quote from: SiliconWizard on July 09, 2018, 08:28:07 pmI think I might have been too overly vague out of paranoiaThere is over-voltage protection in place in the actual circuit and the actual range is 0-4mA with some dedicated logic to shut everything down if it exceeds 4.5mA.I wasn't aware of these high voltage op-amps so I'll go do some digging!

author: EmmanuelFaure
author_rank: Regular Contributor
timestamp: July 09, 2018, 09:26:58 pm
content: Stop the mental masturbation with all the high impedance buffers and so. Do the math of your circuit in a serious way, making no more measurements with your ADC than the ones shown in your schematic, you can fully correct the error due to the current divider effect.i_error = voltage(AIN1) / 10k

author: Circlotron
author_rank: Super Contributor
timestamp: July 09, 2018, 09:53:15 pm
content: Do you have to monitor the load for open or short continually? If not, put a set of relay contacts between the load and your voltage divider to isolate it when taking critical measurements.

author: Circlotron
author_rank: Super Contributor
timestamp: July 10, 2018, 12:07:28 am
content: Unrelated, but why do you need R5? Just measure the voltage from R6 to ground. Simpler, uses one less input, and gives the D/A more voltage to work with.

author: techy101
author_rank: Unknown
timestamp: July 10, 2018, 03:07:08 pm
content: Quote from: Circlotron on July 10, 2018, 12:07:28 amThis is driven by two factors: the existing design and cost. It seems to be significantly cheaper to do a precision 240 ohm and 10 ohm than a comparable precision 250 ohm resistor. Again, I think I might have taken too much out for this post, but the 240 ohm also has a series 0-ohm and parallel not-populated footprint to allow us to dial in any calibration adjustments during manufacture (see attached and please ignore the fact that the designators are different). I'm hoping this won't be necessary in the new design, but it has been an ongoing issue in the existing, much older product.Quote from: EmmanuelFaure on July 09, 2018, 09:26:58 pmThis doesn't change the fact that a current will flow through the load even when gate voltage is 0. Measurement isn't the problem, it's ensuring complete control over the load current.Quote from: Circlotron on July 09, 2018, 09:53:15 pmIt must be measured periodically to determine if leads have come disconnected from the load, which I realize can be done just fine with just the current sense resistor. I'd hoped to detect a short-circuit condition at startup but thinking about it, and reading comments here, I might just scrap that as the circuit is more than capable of withstanding a short and it would really be for the operators benefit.

author: duak
author_rank: Super Contributor
timestamp: July 10, 2018, 03:52:26 pm
content: Well, a little paranoia in designers is a good thing, as long as it's not a psychosis)You mentioned something about operators in the last post. Many years ago I developed a similar circuit that had to deliver a number of current pulses to a test device and determine the total charge. It used a relay to reverse the polarity when needed. It was connected to a PC and electrical common was connected to ground/earth which made at least one of the test leads always hot relative to it. In your application is there a chance of this lead contacting ground, something or someone? Also, my circuit worked at 250 V, and during prototyping I found that just switching the 250 V to an external lead without even being connected to anything would cause the PC to occasionally crash.BTW, the LT6091 HV opamp looks like a useful part to build a poorman's SMU (Source Measure Unit). I never thought to look for a high voltage opamp with low input currents. Not cheap though.Cheers,

author: techy101
author_rank: Unknown
timestamp: July 10, 2018, 04:02:51 pm
content: Quote from: duak on July 10, 2018, 03:52:26 pmThis device is powered by 4 AA NiMH batteries and has no connections to a PC, etc... However, before I got to this job they had very similar issues with USB connections to one of our devices. I'm not sure how they eventually solved it because it's not a product I've worked with, but I have heard stories.

author: EmmanuelFaure
author_rank: Regular Contributor
timestamp: July 10, 2018, 08:50:35 pm
content: Quote from: techy101 on July 10, 2018, 03:07:08 pmOnly three solutions :- High voltage buffer ($$$).- Disconnecting the voltage divider with an analog switch.- Making the constant current generator high side instead of low side. You can achieve that using a high voltage op amp, making a discrete high voltage "output stage" for the op amp, or a galvanically isolated gate drive.

author: EmmanuelFaure
author_rank: Regular Contributor
timestamp: July 10, 2018, 09:56:28 pm
content: Proof of concept attached. This is one of the most cost effective solution. No costly high voltage buffers, and so. This circuit outputs a true zero current when the setpoint is zero. All the parasistic currents through the voltage dividers can be compensated in software. C_comp is to be adjusted for high frequency stability depending on final components values.I've drawn the two voltage dividers on the schematic for clarity, but the lower one is not necessary anymore. You can connect that node directly to the ADC input with a current limiting resistor.NB : IMO bipolar transistors are more suitable for that kind of circuits. Their characteristic is more linear than MOSFETs and they're easier to compensate, in a control theory meaning.