Current Mirror Design - Page 1
Forum section: electronics / projects

author: MyElectronsFellOut
author_rank: Regular Contributor
timestamp: March 24, 2015, 01:31:28 pm
content: I am designing a 4 - 20mA current loop using a MOSFET current mirror. I have built a breadboard prototype of the attached circuit and taken readings (illustrated on the schamatic). The current through the loop doesn't appear to match the current through the Refernce resistor. I know it's not exactly 4-20 mA that i'm working with but it's only a prototype to prove the design works.At 4.5V from the op amp, it's producting 1.2mA which would be about right as the Vdrop across the resistor is about 1.2V so I =1.2/1000. But at 22.5V from the op amp, I measured only = 7mA.I know I haven't got the numbers right with the voltage drops but even so, the Current Reference which I have calculated would appear not to be mirrored successully.Any advice?Edit. I should also mention, I'm powering op amp and driving the MOSFETs from a supply voltage of 24V. The PWM is fed in from a micro running off USB supply. In my design, I plan to have the op amp running of a regulated 24V rail and the MOSFETs off of the 0-48V Input.

author: JohnnyBerg
author_rank: Frequent Contributor
timestamp: March 24, 2015, 01:34:41 pm
content: Why not used a closed loop circuit, as explained in your previous post on this subject?

author: MyElectronsFellOut
author_rank: Regular Contributor
timestamp: March 24, 2015, 01:43:11 pm
content: I am looking at various different approaches. I've not worked with current loops before so I'm testing out different ideas.

author: mathias
author_rank: Regular Contributor
timestamp: March 24, 2015, 01:43:43 pm
content: How wel are your mosfets matched? Probably not very much, if at all, because they are not intended for analog usage.I would also recommend a closed loop. It would be much more accurate.

author: MyElectronsFellOut
author_rank: Regular Contributor
timestamp: March 24, 2015, 01:51:27 pm
content: Other than having the same package markings, I couldn't say how well they are matched lol. I used them on the breadboard because they are the only ones I had to hand.

author: mathias
author_rank: Regular Contributor
timestamp: March 24, 2015, 05:24:48 pm
content: Perhaps closed loop is not so interesting either. You don't really know what inductance and capacitance your load has, which could cause instability of the loop.Open loop, you could you something like I've drawn in the attachment. (Biasing and stuff has been omitted)The voltage you feed into the base of T2 (with respect to ground) is (almost) the voltage over the resistor, ergo you can set the current open-loop style. For proper operation, T1 and T2 need to be thermally well coupled.

author: dannyf
author_rank: Super Contributor
timestamp: March 24, 2015, 06:20:00 pm
content: Use a level shifter to reference the input to the rail and drive a pnp / p-ch from the high side.

author: dannyf
author_rank: Super Contributor
timestamp: March 24, 2015, 06:21:28 pm
content: If you have to go with your design, use the npn to drive one leg of a current mirror built with pnp/p-ch.

author: Miroslav
author_rank: Contributor
timestamp: March 24, 2015, 07:30:22 pm
content: Quote from: MyElectronsFellOut on March 24, 2015, 01:31:28 pmAside from some concerns in regards the input circuit handing the input current (R27/C36) (how do you "feed" current to the OpAmp? You should have "something" (resistor) to convert 4-20mA PWM to the input voltage), let's address your MOSFET Current Mirror.Looks like you did "apply" the concept, but made mistake in actual implementation.The current mirror (bipolar or MOSFET) rely on two main premises:two components have identical (or very similar) "transfer characteristics" (relationship between the input voltage (Ugs or Ube) (just to stime discussions about "U" vs "V" in formulas, they are the same, it's only that schools in EU teach you to use "U", schools in US want you to use "V")Identical input voltage Ugs (voltage between Gate and Source)Let's assume you have two identical MOSFETs, that leaves the second criteria that you did NOT achieve!The input voltage (U4gs) on the left MOSFET (U4) is voltage (potential) between it's G and GND (note that S is connected to GND).The input voltage (U3gs) of the other MOSFET (U3) is actually smaller (you have voltage drop on the Loop circuit). As you can seeU4g = U3g (gates are connected together. This is voltage between Gate and GND)U4g = U4gs (source is on GND)U3g = U3gs + Uloop=> U3gs = U3g - Uloop = U4g - UloopThat "Uloop" effectivelly "lowers" the MOSFET's Ugs, and in turn lowers the current through it.Fix is simple.Connect Source of U3 directly to GND and have the 4-20mA Loop in the Drain circuit

author: dannyf
author_rank: Super Contributor
timestamp: March 24, 2015, 07:59:20 pm
content: My entry. The plot is the current vs. input voltage on the load (R4). Designed to produce 20ma@10v.

author: Miroslav
author_rank: Contributor
timestamp: March 24, 2015, 08:17:15 pm
content: Quote from: dannyf on March 24, 2015, 07:59:20 pmNice circuit, but quite more complex then just two MOSFETs and resistor in the original postTo disregard all the other components (OpAmp, additional transistor, ...) what does the job are two PNP transistors with Bases connected and the IDENTICAL resitor in the Emiter branch. That's what was incorrect in the original post.Other elements in this higer end schematic are doing U to I (voltage to Current conversion), while in the original post that part is MUCH less linear, even tough for some cases still acceptable thanks to "fairly" constant voltage over the MOSFET (Uds)

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: March 24, 2015, 08:40:22 pm
content: Hi,In the schematic attached the original post, the two MOSFETs do not form a current mirror. For the two MOSFETs to be a mirror, their sources must be at the same voltage.Thisis nota current mirror:Thisisa current mirror:This work well in simulation were the MOSFETs are perfectly matched, in practice some resistors in the Source leads will help.Jay_Diddy_B

author: dannyf
author_rank: Super Contributor
timestamp: March 24, 2015, 08:53:58 pm
content: A fully discrete solution is possible - it involves driving a current mirror with a voltage source, and then buffer the current output.Its downside is that it is quite device dependent. The opamp solution is easier.

author: MyElectronsFellOut
author_rank: Regular Contributor
timestamp: March 25, 2015, 08:00:46 am
content: Thanks for the advice guys. I will take it all on board and try to get it working.

author: MyElectronsFellOut
author_rank: Regular Contributor
timestamp: March 25, 2015, 12:59:05 pm
content: I came up with a solution that uses a two stage op amp. First stage amplifies the input to the 4-20V range and the second stage drives LHS Mosfet. The current is then mirrored through the RHS Mosfet.It works but the only issue is it draws twice the load current. 20mA becomes 40mA.Now im looking at the same sort of circuit but instead of a current mirror, using just the one mosfet. The issue here is that I need the current loop to be on the low side of the Mosfet which means the circuit has to be load independant which is making it rather tricky.