shabaz designed an OpAmp based constant current source. It can deliver up to 1 mA. The current is controlled by a voltage. It's intended to be used with a DAC board for the Raspberry Pico. A constant current is a useful lab instrument. It can be used for testing semiconductors, and in sorts of circuits where components are driven by a current.
Specification:
- constant current between 0 and 1 mA
- control voltage: 0 - 1 V
- compliance: 3 V (4.5 V with a LM324)
- power rails: - 1.5 V and + 3.3 V (+5 V with LM324
How does it work?
High level: the circuit is built around a differential amplifier design (UA1). See also the internals of an INA106 differential amplifier a bit further down this post, and try to find similarities to this circuit.
image source: shabaz' schematic
I removed the two extra current drivers U1C and U1D for the time being, to make the likeness more striking. We 'll add them back later and tell how they impact the output current.
I also made reorganising changes, that don't alter the circuit: I 've drawn U1B pointing back, and moved a few resistors up-down, to make the next step in the analysis easier.
image source: shabaz' schematic, edited
The exact same circuit is discussed in The Art Of Electronics. They draw it a little different, with the feedback x1 gain buffer pointing back. My edits of the original circuit (above, with Microsoft Paint) were done to show the concept similarity.
image source: my copy of The Art Of Electronics (TAOE), 2nd edition
In the drawing of shabaz, and in the TAOE schematic, you should now clearly see that it's identical to what's inside a differential amplifier:
image source: TI (BB) INA106 differential amplifier data sheet, edited. I flipped the original drawing vertically, to show the same orientation as the circuits above
Note that if you 'd use Reference and Sense as +In and -In, and vice-versa: use +In and -In as Reference and Sense, it would be an almost perfect (better, because R1 -> R4 are factory-matched in the INA106 !) drop-in replacement for U1A.
So we can summaries that the circuit works like one, and measures the voltage over the sense resistor (R5 in shabas' design). It measures the voltage over the sense resister (that also means: the current through it), and tries to keep the design stable. If you add voltage to the reference input (U1A in +) , it will increase the voltage over R5 to get back into balance. Thus, more current will flow through R5, and we increase the constant current output. The differential amp keeps this in balance.
The buffer at the output (U1B) takes care that there's no current error. It feeds back the output voltage without loading that output.
In TAOE, we can see that the formula for output current is:
If we plug shabaz' values in that formula:
the outcome = (3300 ohm / 99000 ohm) x (1 volt / 100 ohm) = 0.333 mA.
But the specs say it's 1 mA. Why the difference? That's where the two current drivers U1C and U1D and their output resistor come into place. They have a gain of 1, take care that the same current is sent additionally to the exit node. 3 x 0.333 mA = 1 mA.
Another way of seeing it, is that the combination of Rs (R5, R6, R7) is an "active 33 ohm resistor". If we plug that value in the formula: (3300 / 99000) x (1 / 33) = 1 mA.
Characterising the circuit
I've created a LabVIEW flow to characterise the behaviour. As RLOAD, I used a DMM in DC current mode.
Here's what the flow does:
- set up V- and V+, as channel 1 and 2 of a Rigol DP832A PSU
- set up Vcontrol as channel 3 of that PSU
- enable the PSU outputs
- set DMM6500 to current measure mode, range 1 mA (range, and measurement noise handling parameters, can be changed)
- step through Vcontrol from 0 V to 1V in definable steps.
- allow the Vcontrol to optionally settle between steps (settle time can be changed)
- show the results on screen, and log to a spreadsheet
image sources: my LabVIEW design
Here is the output current, when I take 100 little 1mV steps from 0 to 1V
image source: the spreadsheet samples on a graph. X = steps (1 mV increments), Y = output current.
Based on how long I let the PSU settle each step before measuring, and the precision options that I set on the DMM, sampling a 100 step sweep can run from 50 seconds to hours. If I'd custimise / optimise the Rigol blocks, I'm sure I'd be able to get this below 10 seconds.
For reference, I attached a file with:
- 100 samples, sweep Vcontrol between 0 and 100 mV
- settle the PSU after each step for 5 seconds
- DMM in 1mA rande
- integrate each measurement over 10 mains power cycles
- average 10 measurements over each sample
- ignore column B, control voltage. It comes from the PSU but is not reliable. For the set voltage, take the steps value in column A (in mV).
characterize_100steps_5sec_10nlpc_10avg_autozero.xlsx
Thank you for reading.
Top Comments