Lab Power Supply, replacing the LM334 - Page 1
Forum section: electronics / projects

author: frank26080115
author_rank: Regular Contributor
timestamp: January 10, 2013, 05:01:06 pm
content: I want to try laying out my own version of the lab power supply.There are two things bugging me about the LM334 constant current source.First, it only comes in SOIC and TO-92, I'd prefer something else.Second, it is specified to work down to 1V. I have seen the graphs in the datasheet relating voltage to current. I might want my power supply to work down to 0.6V .I know they make dual MOSFETs in SOT23-6 packages, such as the DMG6968UDM , I was thinking, what if I just implemented a bare bones N-channel MOSFET current mirror myself?I ran a quick and dirty simulation, using a 3.3V fixed supply and setting resistor for one side of the mirror and DC sweeped the V across the other side from 0 to 12V, it seemed to do well after 0.125V, although the current has a very slight upward slope, which I can probably calibrate away in software or even just ignore since it's in the micro amp range.Does anybody know of an obvious flaw in my plan that I overlooked?

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: January 11, 2013, 04:39:54 am
content: Hi,I have attached a concept for a current mirror built with two NMOS MOSFETs. A dual MOSFET will probably be better than 2x BSS123.If have included resistor in the Source leads with 200mV across them.I would build the circuit on a breadboard and give it a try.I have attached the LTspice model for you to play with.Jay_Diddy_B

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: January 11, 2013, 05:01:46 am
content: Hi,I have modified the circuit so that the output current can be measured without the bleed current.The circuit works like this.The Drain current in M1 = Drain Current M2 = Drain Current M3Current in R4 = Output current + M2 Drain Current.Current in R7 = M3 Drain CurrentSince R4 = R7 and Id(M2) = Id (M3)The voltage across the sense points = (Iout + Id (M2) - Id (M3)) x R4I have attached the LTspice ModelJay_Diddy_B

author: frank26080115
author_rank: Regular Contributor
timestamp: January 11, 2013, 03:41:29 pm
content: Thanks JayI ran more simulations and I can see that adding R1 and R2 does make the current less dependent on the voltage as expected.I did more temperature sweep simulations for the MOSFET current mirror and got a 150uA difference between 0 and 100 degrees C.I looked at the LM334 datasheet for the temperature dependence of VR, using the Isetequations, came to the conclusion that between 0 and 100 degrees, the difference is going to be about 200uA.So... according to simulations and calculations, the current mirror performs slightly better by having lower temperature dependence and a lower minimum voltage, with the disadvantage that it now depends on having a regulated voltage source, but this isn't a problem when the design has a 3.3V LDO voltage regulator.Am I missing anything?Is there an easy way to estimate temperature dependence using other parameters like maximum VDS, maximum ID, VGS(th), gate charge, input capacitance, or maximum power? I can sort by these parameters on Digi-Key but obviously I can't sort by temperature dependence.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: January 11, 2013, 08:35:49 pm
content: Hi Frank,Check out using a Bipolar Transistor current mirror.To get the maximum Independence from temperature the voltage across R3 should be as high as possible.Jay_Diddy_B

author: frank26080115
author_rank: Regular Contributor
timestamp: January 12, 2013, 12:58:00 am
content: Thanks again Jay, I wish we learned how to work with temperatures in class, usually we are just told to assume Vtto be something.The BJT mirror is a lot more voltage dependent, and the temperature dependence doesn't improve that much, and it raises the minimum voltage required.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: January 12, 2013, 01:09:23 am
content: Frank,Just be a little careful. The SPICE models may or may not contain temperature information. So that something that looks good may not have the temperature sensitivities model.Jay_Diddy_B

author: codeboy2k
author_rank: Super Contributor
timestamp: January 12, 2013, 02:23:39 pm
content: Quote from: Jay_Diddy_B on January 12, 2013, 01:09:23 amSpice doesn't seem to model the Tc of resistors either. So your resistors are fixed value at all temperatures.you can give your spice resistors a little temperature variance with this example attached.

author: Bored@Work
author_rank: Super Contributor
timestamp: January 12, 2013, 05:54:02 pm
content: Quote from: codeboy2k on January 12, 2013, 02:23:39 pmSpice can model first and second order resistor tempcos. This is part of spice's "semiconductor resistance" model.LTspice does not support this ".MODEL R" type (maybe unofficially, but not officially), but does support up to at least third order tempcos as part of the normal resistor R element.The syntax in LTSpice: Instead of just giving a <value> you can writevalue[tc=tc1[,tc2[,tc3]]] [temp=temp]LTspice then uses a value ofR =value* (1 +dt*tc1+dt^2 *tc2+dt^3 *tc3)withdt=actual temp-temp

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: January 12, 2013, 08:14:43 pm
content: Hi,I believe that as you have show it the model have a definite temperature coefficient like a ptc or ntc.When they say a resistor has a tempco of 200ppm/C the sign is not given. The manufacture is trying to make stable resistors, but the mixture may not be uniform so that you get resistors ranging from + 200 ppm/C to -200ppm/CYou can include this in the model by using Monte carlo analysis.Jay_Diddy_B

author: codeboy2k
author_rank: Super Contributor
timestamp: January 12, 2013, 08:39:12 pm
content: Quote from: Bored@Work on January 12, 2013, 05:54:02 pmyep, I meant LTSpice. I knew one could put equations in the R = <value> , I didn't know one could put tempco's there too.Yes, @jay_Diddy I put a PTC/NTC equation there. Generally I see resistors going up in value with heat, and down in value with cooling (relative to ambient), and that equation as I tweaked it seems to work for a few percentage points of variations in that region. Its not anything guaranteed, but it worked for me and I've kept it around for when I needed it.But Bored showed how to do it correctly, and definitely, the monte carlo analysis is worth it to randomize all the values in a circuit and see how it performs.