Adding a soft start to my circuit (LM334Z current regulator)

Hey all, just found out about circuit lab great stuff!

I've been trying to create a soft start circuit with an LM334Z in Circuit lab and real life but haven't gotten it to work successfully. Hoping you can help.

I am trying to get the current to slowly ramp up over 5 seconds. The issue I am running into is that the LM334Z rams the current to the value of Rset even if I slowly increase the current going into Vin.

I attached the schematic without the soft start, I am hoping someone will have some suggestions about how to make this work. I am open to using a different current regulator - perhaps one with soft start built in if that is necessary.

I greatly appreciate any help I can get.

Let me know your thoughts.

Thank you Nick

My Schematic: https://www.dropbox.com/s/9xlypua1wv3jjbm/new-schematic.pdf

Datasheet for LM334Z: http://www.ti.com/lit/ds/symlink/lm134.pdf

by tontoa4
April 30, 2012

Thanks for your response

This is just the schematic for the LM334 isnt it?

I'm looking to do a soft start- am I missing something? I don't know how this helps me do a soft start.

Let me know if you get a chance.

Thanks Nick

by tontoa4
April 30, 2012

The LM334 is a wonderful chip, but it's not quite what you need. To get a soft-start, you'd need the rset to start off high, then gradually go low. There is no easy way to do this. You could try this:

it will ramp up the current and then level off.

by arduinohacker
April 30, 2012

In case you need your current limiter to be fully floating the way the LM334 allows, here's a way to implement "soft switching" between different currents using the LM334 3-Terminal Adjustable Current Source.

This is based on a behavioural model of the LM334 but should work OK with the real device.

The current switching rise/fall time Ts = L1/Rset_tot

where Rset_tot = the total resistance switched in for each current setting. For a fixed time constant, omit L1 and instead, put a separate inductor in series with each current setting resistor. Select the value of each L so that:

Lset/Rset = Ts_des

where Ts_des = the desired time constant.

Note supply startup and 1kHz ripple in Vsupply1 using behavioural source expression.

This behavioural LM334 is ideal. The real device would not reject the supply ripple perfectly the way this one does.

F5 to simulate.

See also:

by signality
May 01, 2012

An inductor is the obvious way to slow down current changes, BUT the poor original poster wants a 5-second time constant. Isn't that going to take a few thousand Henries? Those are cheap and light in simulation, but pricey and heavy in the real world.

by arduinohacker
May 01, 2012

BTW, I built the behavioural model because I couldn't get the discrete transistor circuit to run properly, even with a few convergence and bjt models tweaks.

Maybe someone else can breathe life into it.

:(

by signality
May 01, 2012

Ahh, too bad, the designer of that chip, Bob Pease, passed away last year, otherwise we could ask him. A heck of a guy, always willing to help you out. He even sent me a couple LM399's that had been burned in for 1000 hours with official voltage versus time charts and everything. Can't imagine what the list price of those must have been. I had just hinted that I sure could use a really stable voltage reference.

by arduinohacker
May 01, 2012

Yup, that was it.

Here it is with a 100us simulation that takes a bit over 45 minutes on my machine ...

by signality
May 01, 2012

The behavioural soft start circuit runs in about 0.47 seconds.

:)

by signality
May 01, 2012

Drat, I'd got carried away and forgotten all about the 5 seconds ...

Sorry about that.

But, but, but ... I know! We can use an opamp Gyrator to scale a capacitor up to the required inductance.

Now would that be silly or what?

:)

by signality
May 01, 2012

You can get the sim time down a lot by going down to like only 4 parallelled transistors. Maybe not quite so accurate but the current does go up and stay up.

I thought of the synthetic inductor too but didn't dare mention it, lest I be though crazy.

by arduinohacker
May 01, 2012

Hey guys, thanks a bunch for replying on this thread. This helps a lot.

I may try and build the model that arduinohacker described- but can you suggest a chip that would do what I want with less components?

Basically I want to be able to run a set current, but I need a 5 second ramp up time.

Let me know your thoughts.

Thank you Nick

by tontoa4
May 02, 2012

Here's a circuit with some advantages:

It uses more parts than my constant-current ramper above, but it operates in switching-mode, so there's less wasted power dissipation in the active elements.

by arduinohacker
May 02, 2012

Oh, you need to use an inverter with real hysteresis, like a hex schmitt trigger, the 74HC14.

And you can put another LED in series with the first one, and/or reduce the 100 ohm resistor a bit to get more brightness.

by arduinohacker
May 02, 2012

Ah, that makes sense.

So I made a couple developments since earlier this morning. I decided that it was OK for the ramp up time to vary slightly, since the load just can't handle a huge rush of current, but it can come on fairly quickly.

So I calculated the range of my load and figured out that a parallel capacitor would ease the rush of current. I did some testing, and turns out 470mF does the trick.

Like I said, I'm pretty new to circuits so excuse my ignorance.

Here's my new schematic, and it works for what I need it to do: http://dl.dropbox.com/u/5822/new-schematic.gif

Thanks a ton for your help by the way. I've learned a lot from your examples.

My question now is, I have a 5mA fuse inline as a failsafe for the device- but I would like to come up with a different option if possible. The fast acting 5mA fuse is quite expensive.

The thing is, I know the LM334Z is very reliable, but how reliable? I really can't have this device failing. It could potentially do a lot of damage.

Do you have any thoughts regarding an alternative failsafe? Something that gets me in the 99.9999% range? That would literally be one in a million. I could handle that. :)

Thanks Nick

by tontoa4
May 02, 2012

Any semiconductor will fail if it's hit with a zap of static electricity. If this thingy is going to be used in Arizona or L.A. or the Midwest during the winter, there are lots of static zap possibilities.

Lightning, also.

I would stay away from designing anything that could "cause a lot of damage". Don't ask me how I know this.

You could add a second-level of protection, some sort of crowbar that will blow the fuse. fr instance, if you put a 100 ohm resistor in series with the output, and the E-B junction of a transistor across it, the transistor will conduct if the current goes over 6 milliamps (approx). if you tie the collector to the other side of the battery, that will limit the current and blow the fuse if the current goes over 6mA.

by arduinohacker
May 02, 2012

Makes sense, so does the crowbar allow me to use a less expensive fuse, or does it take place of the fuse?

I tried to duplicate what you suggested via breadboard and I was unsuccessful at opening the gate.

Here's the schematic:

Any thoughts?

by tontoa4
May 02, 2012

Close, here is in in working form:

BTW, I'm curious, I can't think of anything that can cause serious damage with 5 milliamps, except maybe if you fed this into your pacemaker leads.

by arduinohacker
May 03, 2012

Hi Nick,

This is a simulation schematic of your circuit with @arduinohacker's crowbar.

The snag with this is that although it shows your circuit including the fuse and it simulates, the fuse doesn't blow because in CL it's only a resistor with a squiggly symbol.

This simulates the fuse too:

I've tried to make the plots so that you can see what is actually happening but they're not brilliantly clear.

Just bear in mind that when SW7 closes to simulate the LM334 blowing short circuit, everything happens very quickly.

The N net shoots up to 12V. This rapidly charges the 4700uF cap to 12V and drives > 5mA through the fuse into the load.

The fuse has a delay of 1ms so the crowbar turns on before the fuse blows and sources a collector current to ground of >> 5mA. The fuse then blows and disconnects the load.

See:

for more on the fuse model.

BTW: I've turned the LED the right way round.

Oh, and aren't behavioural models wonderful?

:)

by signality
May 03, 2012

Here are a couple of test circuits.

The first shows how the current limiting crowbar works:

The second shows how the voltage limiting crowbar works:

by signality
May 04, 2012

FWIW: here's the basis of a programmable current sink with exponential rise/fall transitions.

It can be turned into a current source instead of a sink fairly easily, especially if rail to rail I/O opamps are used (turn the second opamp circuit upside down and replace Q1 with a PNP).

Then you can add the current & voltage crowbars.

It's worth noting that this approach has an inherent series resistance in the emitter of Q1. This and the base resistor to Q1 help protect the load in the event of Q1 or the opamp, OA1, failing.

Ah! A suggestion: put a resistor in series with the LM334 (or the collector of Q1 in the above circuit or whatever you end up using as your current source/sink). If you are supplying small load currents from a high enough source voltage then you can afford the extra voltage drop in the series resistor and this will form a very reliable form of over current limiting measure.

by signality
May 04, 2012

And if you put the resistor between C1 and the fuse then it protects Q1 if there's a load short. Depending on the load resistance, it may also increase the risetime and so may allow you to use a smaller value of C1.

See "Rlimiting1" in:

by signality
May 04, 2012

First of all, I want to thank you so much for spending a ton of time replying with very helpful responses.

I'm learning a ton here-

I've spent the last week or so working on another aspect of the product I am designing.

So you'll have to excuse my ignorance, I still have a couple questions.

Here's the circuit I modified to add the crowbar. I got it working on a breadboard- it sets the max current to 3mA with a 280ohm resistor.

My questions now are: 1. How safe do you think this circuit is? Would I be better off going with the Zener crowbar you described? 2. Is there a good way to incorporate an INEXPENSIVE fuse (30-50mA+)? Do you think it's necessary?

Thanks again for your help

by tontoa4
May 14, 2012

I just need this to be pretty bulletproof and not ever exceed 5mA. Preferably even less if possible. 2mA is the max current setting we're running with the LM334Z.

Interested to hear what you think.

@arduinohacker To answer your question- this is a Transcranial Direct Current Stimulation Device.

by tontoa4
May 14, 2012

You can use a higher current fuse if you modify the crowbar so that it latches hard on using either an SCR, Thyristor or an equivalent circuit using an NPN and a PNP transistor.

I don't know anything about TDCS but I think you should put a series resistor - Rlimiting1 as I suggested - after the big cap and before the crowbar.

And the zener clamp.

You want to make absolutely sure that you cannot push excess current through the patient and that you can limit the applied voltage.

You really need to do a Failure Modes Effects Analysis (FMEA) to be certain that you know exactly what will happen in the event of any single - and in your case maybe even double - point failure.

Be very aware that the use of a BJT Vbe as a current limit is very imprecise and temperature - including due to self heating - sensitive.

You also must have a spec for what you are trying to achieve and understand the implications of that spec.

Use the power of simulation and model it to death then test some prototypes with components selected for extremes of their parameters.

"I built a prototype and it was OK" will not do if the patient tries to sue you.

It may not be cheap.

It has to be safe.

by signality
May 14, 2012

Uh, no, you should not be designing devices that can cause human injury or death, not without scads of experience and reviewers and QA testers and insurance and lawyers and as an incorporated entity.

In the biomedical electronics world, which I was once in, you have to go through scads of review committees, follow FDA protocols to the letter, have independent QA and reliability testers, years of animal tests, then you still need $30 million of insurance and a platoon of lawyers on top of that.

Find something less dangerous to work on.

by arduinohacker
May 14, 2012

Post a Reply

Please sign in or create an account to comment.

Go Ad-Free. Activate your CircuitLab membership. No more ads. Save unlimited circuits. Run unlimited simulations.

About CircuitLab

CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.