I am evaluating some low cost methods to measure current on a 12V rail ( 48W) using a micro. Can any one suggest some low cost circuits |
by abhishek_1980
March 15, 2012 |
That's not very easy. If you don't need a whole lot of precision, and you can stand to lose a volt, you can put an optoisolator in series with the 12V rail, with a 0.25 ohm resistor across it. Then feed the other side of the isolator to the micro's A/D input. If you don't want to lose a volt, put it before the regulator. Problem is, most optoisolators have very loose tolerances, and they're non-linear too, so you have to run a calibration curve on each one. |
by arduinohacker
March 19, 2012 |
Please see: |
by signality
March 19, 2012 |
@signality -- very cool! As you say in your circuit description, "Check your nominated opamp datasheet carefully before committing to a design," what datasheet parameters do you think are most important to evaluate an IC op-amp for use in this configuration? From a quick look, I'd say input offset voltage looks critical, as it gets amplified by 100x here (Rout/Rmirror). Probably not a good place to use a FET-input op-amp, unless you consider some of the CMOS auto-zero amps. This EETimes article from 2000 talks briefly about using auto-zero op-amps for a "precision current detector" (see Fig 9). Also, if the load current had significant non-DC behavior (i.e. a "spikey" load current), I'd have to think about slew rate limits and the BJT's non-symmetric response -- especially if V(out) is capacitively loaded to restrict measurement bandwidth. That is to say: if we put a capacitor in parallel with Rout, then OA1 and Q1 have tremendous ability to increase the charge stored in that capacitor, but that capacitor must discharge only through Rout. Thus, the DC average of the load current might not be accurately reflected at V(out), and it may appear too high. Thanks for posting this -- very cool example of how CircuitLab can help start to answer real-world questions! |
by mrobbins
March 19, 2012 |
Hi Mike, You're right about the input offset voltage being important. The AD8551 I refer to in the description of the original circuit is an auto-zeroing device with an offset down in the uV region. However you might like to look at a slightly revised verson: to see how adding capacitance to the load affects Vout with a pulsed load current. Opamp slew rate performance is actually of relatively little importance because the opamp output voltage only has to move by a small amount to make a big change in Q1 base current. Reducing Rbase (was R1) reduces the output voltage change for large load current changes but it is best to make Rbase > 10R to avoid the possibility of Q1 self oscillating. There is a mechanism where this can happen in emitter followers and if the collector impedance of Q1 falls low enough it can happen in this circuit too. (To be honest I can't remember how this mechanism works but I have observed it a few times, particularly in current sources and sinks like this.) The base resistor used to be used in the grid circuit of White cathode followers in the days of valves (tubes to you) when it was called a "grid stopper". I suppose with a bjt it should be called a "base stopper". Using a FET instead of a bjt for Q1 makes opamp slew rate a little more important because the opamp output swing to drive the gate voltage may be larger than required to drive a bjt. In which the "base stopper" becomes a "gate stopper" and looks just like the original "grid stopper" for a triode. The revised circuit has a little more explanation which you may find interesting. :) |
by signality
March 20, 2012 |
The TL082 is not a very good choice for this circuit-- you're using it at the very extreme of its common-mode range, plus it has up to 20mv of offset voltage built right in-- that's up to 200 milliamps of current-measuring error. An alternative that's sometimes possible is to put the current-measuring resistor in the negative lead, then if you have a -12 or -15 volt supply the op-amp will be nicely centered, and you can go to a simple inverting op-amp setup, no current-mirror needed. |
by arduinohacker
March 20, 2012 |
You are correct about the TL082 opamp and indeed I discussed the points you have raised in the description of - and notes in - the original circuit. As observed there, the choice of opamp models in CircuitLab does not yet offer any rail to rail input devices and the models themselves are not yet sophisticated enough to allow the user to edit them to tailor that aspect of their performance. You'll find some more notes about the available opamp models and their limitations in CircuitLab here: https://www.circuitlab.com/docs/circuit-elements/#opamp :) |
by signality
March 20, 2012 |
A small clarification: at present all the CircuitLab opamp models are rail to rail input irrespective of whether the real part they are representing is or not. That's why the simulation circuit shown here works even though it would not with a real TL082. |
by signality
March 20, 2012 |
Please sign in or create an account to comment.
CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.