Coil driver output circuit

Hello I'm looking to drive a small pneumatic solenoid with the Mega.. was wondering how this looks.. Drawn in MultiSim, and the analysis tells me it should work, though I'm taking a wild guess on the coil inductance resistance across the coil measured with a DVM is 25 ohm..

the transistor is rated at 4A continuous, Hfe = 400, Vsat = 0.9V
Zener diode at 86ma continuous, 300ma peak, 15V, I could double them up if I have to

Do you think this will work? (see attached file)

PWM output circuit.jpg

Take a look at [u]this circuit[/u].

If the solenoid coil is rated for 12V, you don't need R2.

Use a regular diode "backwards" across the coil to clamp back EMF when the power is shut off. (You don't need the Zener).

I'm taking a wild guess on the coil inductance resistance across the coil measured with a DVM is 25 ohm..

Since it's operated continuously (perhaps for a short period of time) with DC power, the DC resistance is what's important.

If the transistor gets too hot to touch, it probably needs a heatsink.

R2 is the internal resistance of the coil in DC mode.. as checked with a DVM..

Using a Zener instead of a diode can help de-enerize the coil faster.

I plan on pulsing it quicky... unfortunately I dont' think I can get the arduino PWM frequency down low enough to be useful, so I'll have to do that programatically.. 10-100hz should be good.

Transistor is rated at 4A continuous, which is far more than the typical draw of that solenoid (pull-up power may be higher though).

Did that clarify my intentions a bit?

Rx7man:
Using a Zener instead of a diode can help de-enerize the coil faster.

I doubt that a 15volt zener is faster than a 4004 diode.
3volt across the coil vs. 0.7volt across the coil.
For fast "off" you have to allow the coil to spike to a much higher voltage than that.
Leo..

Rx7man:
I plan on pulsing it quicky...

The coil has a time constant associated with it (t = L/R).

If you try and pulse it too quickly, then the current won't have time to increase from zero to it's maximum steady state value. This limits the maximum frequency that you can successively pulse it at.

I thisk the problem is release time.
Read this.
Leo..

I was looking at this page

Does anyone have at least a guesstimate of the inductance of a 500ma 12V solenoid?? I'd like to not be off base by factors of over 100!

The driver IC you're using has 50volt outputs and inbuild kickback diodes.
Release time of the solenoids will be faster when you clamp the "COM" (diode common) of the chip(s) to a high voltage. e.g. a ~40-50volt zener or TVS diode.
Leo..

The driver IC you're using

Which post has the link to that ic ?

I'm not using any driver IC, that thread wasn't started by me, I was just referring to the discussion of a similar problem.
The problem with using caps is they slow down the decay time considerably, and increase the load when you try to drive the solenoid open again.

The goals and hardware of the project are like this.

I have a double-acting pneumatic cylinder, controlled by a 4 way valve.. the valve is either extending the cylinder (when energized) or retracting it (unenergized), with no "hold" position (would require an additional output, valve, etc)... The quicker more accurately the solenoid follows the uC's command, the more linear the response will be.

I think I have a problem in the design I posted, the Zener does actively clamp the back EMF, but will conduct in the forward mode, so I will need a standard diode in the opposite orientation in series with it.

As far as the resistor driving the transistor in the OP, I should be OK with a 470 ohm right?

Ahh, thought you were also using that driver chip.

The point I'm making is that if you let back EMF spike as high as possible, without damaging parts, release time is faster.
A TVS diode (super zener) across the transistor/mosfet driver also works.

You didn't tell what transistor you're using.
400 gain and 0.9volt saturation might not go together.
Post a link to the datasheet.
A logic mosfet might be better here.
Leo..

Your "Design Criteria" (as it were) does not specify the maximum cycle time. I have worked with pneumatic test fixtures and there is a maximum cycle time. You can calculate it from component values but it requires that you know the coil inductance
(as already pointed out by Wawa). Optionally, you can add a potentiometer, read it with the uP , use the Map function and adjust the delay for the solenoid using what is called "empirical testing" . Standard engineering design practice is to due your due diligence by calculating the maximum cycle time and then ask the engineering tech (that would be me) to verify it by empirical testing. Sometimes you can get more than you expected by testing and run it faster than the math says you can.
(admittedly this must imply that the inductance tolerance is more than you expected). In any case, I still don't see that "Desired Cycle Time " spec anywhere in this post. Is there one or not ? Was it your plan to determine that by trial and error ?

I'm not advanced enough to know the terminology for everything,.. and the term "maximum cycle time" sounds counter-intuitive to me... I could see a 'minimum cycle time', the least amount of time you can have the solenoid in one state or the other (probably state-dependent).

If I could get it to work from about 20% duty to 80% duty at 50hz I think it would work well for my application. (that works out to about 4 to 196 ms in any state)
Does that answer any of your questions?

The transistor I have is a Ztx1051A (it was in the image of the circuit in the first post)
http://www.mouser.com/ds/2/115/ZTX1051A-92705.pdf

Hello.
Max Cycle Time is a value expressed in cycles per second or cycles per minute or cycles per hour
depending on the device. If the device in question in not capable of more than 1 cycle per second then the unit used would default to cycles per minute. If the device in question is not capable of more than 1 cycle per minute, then the unit used would default to cycles per hour and so forth.
Duty cycle is a completely different parameter which represents the % of the period which represents ON time verses the % or the period which represents OFF time. 10% duty cycle means ON 10 % of the time. This parameter is tied to frequency because if the frequency is too high, the device does not have time to energize or de-energize and then duty cycle becomes a moot point. If the frequency is low enough that the device has time to both energize and deenergize then the duty cycle may effect it's ability to do either or both. Talking about duty cycle without defining frequency makes no sense. You cannot discuss the duty cycle of a solenoid that is being pulsed with a 5 kHz signal because it obviously does not have time to either energize or deenergize so discussing duty cycle is absurd to say the least.
You must define the frequency first and the duty cycle second. One without the other makes no sense.
You posted here because you want to consult the experts. Our job is to tell you what you don't know or should know or simply tell you that you have no idea what you are talking about. At this point you have an idea but that's about it. You need to refine your idea and resolve it to actual specifications and a design criteria, and then and only then can you talk about a design since the purpose of any design is to meet the design criteria. Since you have none (so speak of) it is a bit premature to discuss the design details.

Thanks for the clarification on the language.. I had the feeling "Max cycle time" was what you described it as, though in common english it means the opposite (frequency would sound more suited)... either way you say it, I understand it now.
Does 50 Hz make sense for a max cycle time? (even if this solenoid doesn't mechanically actuate that quickly, it leaves the possibility of driving other devices with the same circuit)

I also got a remarkably speedy reply from Numatics, and the inductance of the coil is 44mH when the plunger is extended and 57mH when retracted

Thank you for telling me what I don't know.. As they say, You've probably forgotten more than I will ever know

Your schematic shows a coil of 1 mH. If that is supposed to represent the solenoid it should be labeled solenoid. I am guessing that is a test circuit you found and you want to substitute your solenoid for the 1 mH coil. In addition to missing a design criteria, your post is missing the solenoid specifications (ie datasheet). (with the exception of the inductance you just posted). That still leaves Voltage, Current, Peak Current , etc..

ie:
Solenoid Specs
Voltage: (12V)
Current : 500 mA
Inductance: 44mH Extended/57 mH Retracted
Resistance: ? (wild ass guess ?)
Response time (Time to Extend/Time to Retract)

Design Criteria:
Objective : Cycle solenoid @ 50 Hz (adjust PWM for full extension at desired current)
Cycle Frequency = 50 Hz
Current = 500 mA
Voltage = 12V

(If duty too low, no full extension, Max duty cycle = 50 %)

Assuming it is a 12V solenoid, you should have a flyback diode across it to protect the transistor.
The diode should be rated for at least the solenoid operating current and preferably a schotkey diode.

Depending the response time (time to retract) , you might consider using an H-Bridge to reverse the coil polarity on retraction to speed up reduce the retract time. Wawa would probably know more about whether this is advisable than I would but it is a possible option. (obviously a coil has no polarity so it can be energized with either polarity. Positive voltage will extend it, negative will retract it.
You can still use PWM with an H-bridge.
Depending on the current, you may be able to use an off the shelf ebay L298 Module.

raschemmel:
Assuming it is a 12V solenoid, you should have a flyback diode across it to protect the transistor.
The diode should be rated for at least the solenoid operating current and preferably a schotkey diode.

A few posts back I linked to a page that explains that a diode or snubber network that keeps the spike just under the limit of the drive transistor is faster than just a diode across the solenoid.
And that a common 1N4004 is just as fast (turn "ON" time!!) as a schottky diode.

I suppose a H-bridge (active both ways) could be faster. No experience there.
Leo..

Coil current is 500mA, 55-67mH, 12V (in reality it'll be seeing 10-15V)

It so happens I bought 2 L298's when I placed my Mouser order just because I know they're darned useful things to have around, though I was thinking of using them in a stepper motor project

Why is the max duty cycle 50%? I understand that too low a duty will mean the solenoid never mechanically activates, but where is the limiting factor on the upper end coming from? Likewise I realize that with very long duty cycles the solenoid will not mechanically close, even if the electronics care capable of it

There seems to be some different trains of thought on snubbers, from simplistic to very elaborate... I can put just about any kind of component across the solenoid or transistor (Except for another inducer) and reduce the transient voltage... resistors, caps, and diodes will all get the job done in some fashion or another, each with it's advantages and disadvantages. If I can I'd like to keep component count and cost down, and keep it flexible enough I can use it to power similar devices... Most automotive solenoids will not draw more power than this, though inductance may change.. Idle control, EGR, cruise control, etc are all going to be similar

Think about it. The duty cycle is the ratio of the ON time to the OFF time during one period , which is the reciprical of the frequency. In order for the solenoid to extend fully, the " period must be greater than 1 ON gime + 1 OFF time, obviosly because if it were not , it would receive an "ON" command before it has turned off. Let's assume that the "Extend Time" (x) (which was not provided by the OP) ( that means you) is < the "Retract Time" (y) ( also not provided). Thus, it is given that x< y and one period is greater than x+y. If the period is geater than 2y, then a 50 % duty cycle is by definition long enough for x+y because 2y > 2x
If you want , you can define the duty cycle to be equal to x+ y , such that ON Time = x and OFF Time = y, and one period = 1.1 * (x+y) and frequency = 1/(duty cycle). It is almost as easy to say "period = 1.1 * 2y and duty cycle = x+ y =( Extend Time + Retract Time) and frequency= 1/1.1*(x+y).

Using John Lincoln's formula "t= L/R" (pronounced "tau" = L/R)
R/L circuit
Let L = 44 mH (extended)
Let R = "someone's wild ass guess" of 25 ohms
tau = 0.044 H/25 + 2 ohms (wild ass guess for series resistance)
tau = 1.63 mS
Let L = 57 mH (retracted)
Let R = "someone's wild ass guess" of 25 ohms
tau = 0.057 H/25 + 2 ohms (wild ass guess for series resistance)
tau = 2.11 mS
tau extend + retract = 1.63 mS + 2.11 mS = 3.74 mS (0.00374 S)
fmax = 1/0.00374 S = 267 Hz.

Got it ?
And in case it has not occurred to you , yes, posting on the forum is like wading across an Amazon river full of pirranha fish. You can't stop wondering if you will make it to the other side.

OK, I see how the math works, and thank you.

So using those numbers and formulas, I can figure out what my minimum and (electrically limited) duty cycles are.

Breakfast feeds the brain, and I need some :slight_smile: