Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PWM Current buffer to drive Proportional Solenoid from PLC

Status
Not open for further replies.

Oecist

New Member
Hello

(First time poster with rusty familiarity with vaccuum tube audio amplifiers)

I am working with a Siemens 1212C PLC and looking to power a Burkert proportional solenoid via the PLC HSC outputs. Smaller solenoids have been successfully powered this way, but I need a bigger orifice size which requires a bigger solenoid. The maximum rated output of the PLC is 20V @ 500mA (ON) and the Burkert 2875 requires 24V @ 750mA to fully open. (In the smaller valves the 20V maximum is very nearly fully open and an acceptable compromise). Rather than add expensive AD/DA modules, is there a basic current gain MOSFET / transistor amp that I could employ? I'm not that familiar with transistor design, but have added a simple design that may work (?). I have a 24V supply to work with and don't need a big gain ~x2 current, and ideally a small voltage gain (which this design certainly won't provide). It's a 900Hz signal, so I imagine it can be a very simple circuit - added C2 to tune the output to a square wave and C1 to add some local capacitance. No doubt missing a diode.

Can anyone point me in the right direction? I have some IRF540N in the drawer, so if that works for easy prototyping - great!

Siemens 1212C
Burkert 2875

Thanks for any help,

Ben
 

Attachments

  • MOSFET FOLLOWER.png
    MOSFET FOLLOWER.png
    148.2 KB · Views: 340
"Normally" you would use a circuit like this with NCHAN MOSFET -

1662568721474.png


I would advise R1 somewhere in range of 50 - 100 ohms. Using a scope you tune that value to
minimize ringing at MOSFET gate.

D1 is used to protect mosfet from damage due to inductive transients generated by valve
coil.

Your IRF540 OK choice for MOSFET although I might be tempted to use a 200V part
for additional margin under transient stress.

D1 should be a 2A, 200 V rectifier, reasonably fast recovery. In4148 shown simply not adequate.


Regards, Dana.
 
Hello

(First time poster with rusty familiarity with vaccuum tube audio amplifiers)

I am working with a Siemens 1212C PLC and looking to power a Burkert proportional solenoid via the PLC HSC outputs. Smaller solenoids have been successfully powered this way, but I need a bigger orifice size which requires a bigger solenoid. The maximum rated output of the PLC is 20V @ 500mA (ON) and the Burkert 2875 requires 24V @ 750mA to fully open. (In the smaller valves the 20V maximum is very nearly fully open and an acceptable compromise). Rather than add expensive AD/DA modules, is there a basic current gain MOSFET / transistor amp that I could employ? I'm not that familiar with transistor design, but have added a simple design that may work (?). I have a 24V supply to work with and don't need a big gain ~x2 current, and ideally a small voltage gain (which this design certainly won't provide). It's a 900Hz signal, so I imagine it can be a very simple circuit - added C2 to tune the output to a square wave and C1 to add some local capacitance. No doubt missing a diode.

Can anyone point me in the right direction? I have some IRF540N in the drawer, so if that works for easy prototyping - great!

Siemens 1212C
Burkert 2875

Thanks for any help,

Ben

Will one side of the solenoid be referenced to ground or +V?

I wouldn't recommend IRF540 as it would be operating at max VGS (20v).
 
I concur with etech, glad he caught this, you should get a part with a higher max allowed Vgs.
Say a 40 - 50 V part should be plenty of margin. Or use a R voltage divider at input to MOSFET
to limit Vgsmax applied to MOSFET gate. You could replace the 10K with 300 ohms, the series R
at 100 ohms, that would cut down Vgsmax applied to ~ 15V (if the lightly loaded PLC output
stays around 20V. Or even use 100 and 100 for the divider to supply 10V as gate drive, the IRF540
ratings for Rdson are at 10V Vgs. However the Rs have to be 2W + some margin at high duty cycle,
eg. valve fully open. You can tradoff their wattage for speed of turn on of the MOSFET, eg. raising
them to higher values. Juggle the numbers to get a satisfactory answer.

The PLC is rated at 20V at load, so would be higher when just driving the MOSFET after its charged
its gate capacitance.

Do you know the PLC PWM output frequency when running ?


Regards, Dana.
 
Last edited:
I'd probably use a bipolar transistor rather than MOSFET, as this will give simpler drive and faster switching.

Can you use inverse PWM (0% = max, 100% = off), or does the PLC have the option to invert the output?

The simplest way to retain a positive switched feed to the solenoid (to keep it failsafe) is a PNP power transistor.

Emitter to positive supply, base to PLC output via a resistor, and add a base-emitter resistor to ensure the transistor switches fully off.

A TIP32, MJE15029 or MJE15033 etc. should be suitable.

The base current should be about 75 - 100mA, so eg. 270 Ohm 3W or 5W resistor from the PLC output to base, then a 1K or 470 Ohm between base & emitter.

If the solenoid valve does not have some form of internal snubber, you will need to add one.

A flywheel diode will prevent back EMF from causing damage, but will also retain the circulating current and may make it appear the output is higher than it is.
You can add a resistor in series with the flywheel diode, about equal to the solenoid resistance, to give faster current delay while limiting the negative spike to around 24V.

[Note for others - in any automation system, control outputs should always be positive-switched for safety; in case of wiring damage, the commonest type of short (to ground, the machine metalwork) switches things off and blows fuses, rather than activating valves or relays etc. which could cause malfunction or injury.]
 
"Normally" you would use a circuit like this with NCHAN MOSFET -

View attachment 138459

I would advise R1 somewhere in range of 50 - 100 ohms. Using a scope you tune that value to
minimize ringing at MOSFET gate.

D1 is used to protect mosfet from damage due to inductive transients generated by valve
coil.

Your IRF540 OK choice for MOSFET although I might be tempted to use a 200V part
for additional margin under transient stress.

D1 should be a 2A, 200 V rectifier, reasonably fast recovery. In4148 shown simply not adequate.


Regards, Dana.

Similar to what I use in one of our commercial products, which funnily enough uses a (very expensive) Burkert solenoid valve, with the usual 24V requirement.

We use a TK40E06 FET, 1N5395 diode, 10K for R2 - with the gate connected directly to the I/O pin of a PIC.
 
Odd there is no specs in 2 datasheets for 1N5395 switching speed, but
they say its fast. I wonder what the actual transient looked like .....

No series R to gate, dumping all that charge into internal PIC supply rails.
That seems unsafe. Although the older PICs could not drive a scooter let
alone a load of significance because of high Rdson. That probably saved you
from erratic behavior. We had a customer doing that and on a GPIO that
was end of buss inside part. Never-the-less the internal ground and supply
rail bounce created internally, eg. charge dumped into substrate, caused
logic errors in the part. Classic case of dumping charge at a specific spot in
a die and unable to figure out where that charge was going to go and
what path it would take,

Simple sim shows high current spikes on supply rail, but again limited by crappy Rdson
of a older PIC.


Regards, Dana.
 
Hi all,

Down under here - so excuse the slow response!

Similar to what I use in one of our commercial products, which funnily enough uses a (very expensive) Burkert solenoid valve, with the usual 24V requirement.

We use a TK40E06 FET, 1N5395 diode, 10K for R2 - with the gate connected directly to the I/O pin of a PIC.

Yup. Them is expensive! Adding an 4~20mA AO module and a Burkert Analogue to PWM module seems way more expensive and counter-intuitive. I was under the impression that FETs need a small resistance at the gate to inhibit resistance? Is that not needed here? The PLC is capable of strong drive obviously.


"Normally" you would use a circuit like this with NCHAN MOSFET -

View attachment 138459

I would advise R1 somewhere in range of 50 - 100 ohms. Using a scope you tune that value to
minimize ringing at MOSFET gate.

D1 is used to protect mosfet from damage due to inductive transients generated by valve
coil.

Your IRF540 OK choice for MOSFET although I might be tempted to use a 200V part
for additional margin under transient stress.

D1 should be a 2A, 200 V rectifier, reasonably fast recovery. In4148 shown simply not adequate.


Regards, Dana.

Thanks very much for this - I have redrawn it for my monkey brain to understand:

MOSFET Coil 2 ai.jpg


I have some MUR860 in drawer, and the STP60NF06 is available in store locally. I also added some local capacitance (C1) to help out power supply - needed?


Do you know the PLC PWM output frequency when running ?

I can set this - anything up to 100kHz, this Burkert is specified at 900Hz, and I have driven the smaller units direct at 750Hz.

Thanks again.
 
I'd probably use a bipolar transistor rather than MOSFET, as this will give simpler drive and faster switching.

Can you use inverse PWM (0% = max, 100% = off), or does the PLC have the option to invert the output?

The simplest way to retain a positive switched feed to the solenoid (to keep it failsafe) is a PNP power transistor.

Emitter to positive supply, base to PLC output via a resistor, and add a base-emitter resistor to ensure the transistor switches fully off.

A TIP32, MJE15029 or MJE15033 etc. should be suitable.

The base current should be about 75 - 100mA, so eg. 270 Ohm 3W or 5W resistor from the PLC output to base, then a 1K or 470 Ohm between base & emitter.

If the solenoid valve does not have some form of internal snubber, you will need to add one.

A flywheel diode will prevent back EMF from causing damage, but will also retain the circulating current and may make it appear the output is higher than it is.
You can add a resistor in series with the flywheel diode, about equal to the solenoid resistance, to give faster current delay while limiting the negative spike to around 24V.

[Note for others - in any automation system, control outputs should always be positive-switched for safety; in case of wiring damage, the commonest type of short (to ground, the machine metalwork) switches things off and blows fuses, rather than activating valves or relays etc. which could cause malfunction or injury.]

Thanks for this- raises some good points. I think we can invert the signal in the PLC - just trying to get my head around this: The valve is normally closed so a short will open the valve, but you are suggesting that an inverted signal will cause the valve to close in case of wiring short. However isn't the main issue likely to be power supply related, rather than signal related? No fear of mishap or injury for this particular application - just trying to understand the logic for this particular application.

I also drew this as I understand, but assume I have made a mistake(s):

BJT Coil 2.jpg
 
Hi all,

Down under here - so excuse the slow response!



Yup. Them is expensive! Adding an 4~20mA AO module and a Burkert Analogue to PWM module seems way more expensive and counter-intuitive. I was under the impression that FETs need a small resistance at the gate to inhibit resistance? Is that not needed here? The PLC is capable of strong drive obviously.

Obviously it depends on the output of the PLC, but directly from a PIC pin works fine - I wouldn't use it on a PLC without a resistor though.


Thanks very much for this - I have redrawn it for my monkey brain to understand:

View attachment 138471

I have some MUR860 in drawer, and the STP60NF06 is available in store locally. I also added some local capacitance (C1) to help out power supply - needed?

My 24V comes from 18650's via an LM2595 boost converter, there's a 100uF on the output, and nothing else added - but again, it depends on the exact circumstances.

Why is R1 5W in your diagram above?, also 1K is rather high for fastest switching. Is the STP60NF06 OK with 20V drive to the gate? - my drive is only 5V from a PIC - it's spec says +/-20V maximum.

I can set this - anything up to 100kHz, this Burkert is specified at 900Hz, and I have driven the smaller units direct at 750Hz.

Thanks again.
Mine isn't proportional, and only very low frequency, a few hertz at most.
 
I also drew this as I understand, but assume I have made a mistake(s):
The transistor and resistor part is correct, but the solenoid would be in the collector circuit, between the transistor and 0V, with the emitter to +24V.

The snubber circuit across the solenoid is also correct, just what I was thinking of.

The PLC output would then be low for on and high for off.


If you wanted to keep the PLC output as high = on, you could add the FET stage from the previous diagram, but using a lower rated part, and have that switch the base resistor in the bipolar transistor stage so the overall circuit inverts twice.

An NPN bipolar transistor would also work in that circuit in place of the FET & the resistor values could be somewhat higher if it is use as driver to a second transistor stage, as the currents involved are lower.
 
Circuit seems to work well although TIP32 not getting saturated,
maybe a little excess power getting consumed -

1662639192603.png


Did not know relay L so "picked" 1 mH as a reasonable
value

Regards, Dana.
 
The transistor and resistor part is correct, but the solenoid would be in the collector circuit, between the transistor and 0V, with the emitter to +24V.

The snubber circuit across the solenoid is also correct, just what I was thinking of.

The PLC output would then be low for on and high for off.


If you wanted to keep the PLC output as high = on, you could add the FET stage from the previous diagram, but using a lower rated part, and have that switch the base resistor in the bipolar transistor stage so the overall circuit inverts twice.

An NPN bipolar transistor would also work in that circuit in place of the FET & the resistor values could be somewhat higher if it is use as driver to a second transistor stage, as the currents involved are lower.

Thanks very much for this - makes much more sense!
 
The load is supposed to be in the collector, not emitter...
Keen to understand why the above circuit is not so optimised - is it that the TIP32 is not fully saturated and in the threshold area: therefore dissipating unnecessary heat? Is the above circuit still inverting?

Thanks to you both.
 
The load is supposed to be in the collector, not emitter...
I used the post in post # 10, now saw the additional comments., so

1662658391336.png


Q1 not fully sat nor fully turned off when off. Due to R4 and V2 - V1 >= Vbe due to
divider .

And we can see due to large L of solenoid it never really changes valve oposition that much.
Would have to lower PWM freq to allow time for decay.


Regards, Dana.
 
Last edited:
Looking at L (relay) current not fully off because PLC cant generate 24 Vdc
to fully shut off Q1 Vbe. Either drop 24V to 20 or use NPN/ NMOSFET
as you redrew in post #9. With series Gate R dropped to 50 or more ohms.

Or drop 24 to 20 with a 4 V 5W Zener, on a heat sink. I would fuse the 24 V line....
just a thought.

1662643761117.png


Here is sim with 24 Vdc changed to 20 Vdc

1662644005353.png


Relay shuts off.

Regards, Dana.
 
Last edited:
Looking at L (relay) current not fully off because PLC cant generate 24 Vdc
Remember the 20V was when sourcing 500mA; when sinking the maximum should be higher.

Assuming the specific output in use can sink current, I'd not though of that - some can and some cannot.

If not, then adding a zener around 5 - 6V as you mention, connect the 270 Ohm to ground and connect the PLC output to the zener <> resistor junction via a diode, to bypass the base current when the output is high.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top