# PWM of a solenoid

Discussion in 'The Projects Forum' started by 6thplanet, Jan 1, 2008.

1. ### 6thplanet Thread Starter Member

Jan 1, 2008
13
0
I've searched this and other sites for hours and have yet to come up with a simple solution, which might not be as simple as it sounds to me. Time to blatently ask....

I need to control a fluid controlling solenoid in an auto tranny to control line pressure. The ckt. needs to be able to vary the frequency between 20 and 100 Hz (50/50 duty cycle- square wave), source voltage is say 12.5~13.8 VDC, adj. thus said freq. with a potentiometer, and the solenoid requires about 10A of current. Whatta ya have for me?.......

2. ### mrmeval Distinguished Member

Jun 30, 2006
833
2
What are the full specifications of this solenoid?

You can do something like that with a simple timing circuit and a mosfet.

http://www.dprg.org/tutorials/2005-11a/index.html

That mosfet can drive 53 amps, pulse 180 amps at 10v. I'm not familiar enough with them to read that datasheet well but the article says +3 to +18 volts

I'm *sure* you need a really good heatsink on that mosfet.

3. ### Ron H AAC Fanatic!

Apr 14, 2005
7,050
657
Will variable frequency with 50% duty cycle change the pressure? I would think that you would need to vary the duty cycle, which is what the circuit that mrmeval referenced does. If you really need to vary the frequency while holding the duty cycle constant, you need a different circuit. You can use a 555 astable with a pot to vary the frequency, followed by a toggle flip-flop and a power MOSFET. 555 astable schematics are ubiquitous on the net.

4. ### SgtWookie Expert

Jul 17, 2007
22,183
1,728
Instead of the IRFZ46N, take a look at the IRF1407 - it's a power MOSFET (Vdss=75V, Rds(on)=0.0078ohm, Id=130A). It's specifically made for automotive applications.

Since the Rds(on) is so low, this MOSFET should barely even get warm - if you keep it out of the partially conducting state.

Ron H, you mention a toggle flip-flop - why would that be necessary? A 555 can source/sink 200mA, where a TTL gate would be 1/10 of that and would need a special supply, a CMOS F/F would have even less of an output?

5. ### JoeJester AAC Fanatic!

Apr 26, 2005
3,402
1,224
Sgt,

I believe the point of the flip flop is to ensure a 50% duty cycle while the 555 is for changing the frequency IAW the OPs inquiry.

6. ### beenthere Retired Moderator

Apr 20, 2004
15,815
283
It's an odd requirement for PWM, as the duty cycle is gonna be 50% no matter what frequency gets applied. PWM happens when you vary the duty cycle at a fixed frequency.

7. ### Ron H AAC Fanatic!

Apr 14, 2005
7,050
657
Joe Jester answered your question to me. You make a good point about the drive strength. I think that at 100Hz (low frequency), CD4013 has enough drive to keep the peak power in check, and the average power won't be a problem either.

8. ### SgtWookie Expert

Jul 17, 2007
22,183
1,728
Ahh, OK. Well, with the addition of a diode or two, the 555 can be made to have a 50% duty cycle, or any arbitrary duty cycle for that matter.

But I agree, I have doubts about the duty cycle remaining a constant 50% while varying the frequency - it only marginally makes any sense.

Now if it were a 100Hz signal that varied from 20% to 100% duty cycle ... that would make more sense. However, the 100Hz driving a solenoid would likely be audible and objectionably so.

9. ### JoeJester AAC Fanatic!

Apr 26, 2005
3,402
1,224
I agree, however the OP didn't request that. Maybe if and when the OP returns, they will expand on their requirements so they make sense.

10. ### 6thplanet Thread Starter Member

Jan 1, 2008
13
0
I miss read the manual, it looks like the center freq. is about 70Hz and is PWM to vary the line pressure.
The manual states:
"When the solenoid is being modulated, the valve opens and closes up to 70 times per second. This allows a percentage of the oil press. available at the supply port to pass to the control port. The actual percentage is determined by an electrically controlled duty cycle from the PCM. This is the ratio of the length of time the valve remains open (pulse width) to the total length of time of each cycle (one ON and OFF cycle)."

Reading "up to 70 Hz" I jumped to a conclusion that freq. was envolved...going back and rereading that it talks of duty cycle brings in the PWM side of the deal. So the ckt. that mrmeval suggested should work with a change to the center freq. The Z46 fet should be fine current-wise. I wonder though since its a solenoid and not a motor should a flyback diode and/or a power resistor be used?? Thanks guys for the input...

11. ### 6thplanet Thread Starter Member

Jan 1, 2008
13
0
Any word on a flyback diode being needed to counteract back EMF for this ckt. to control a solenoid??

12. ### Ron H AAC Fanatic!

Apr 14, 2005
7,050
657
Yes. The peak flyback current is equal to the coil current at the point at which it is switched off, so your diode has to handle that.

13. ### 6thplanet Thread Starter Member

Jan 1, 2008
13
0
Thanks for all the help guys! As soon as I experiment a bit with it I'll let you all know how it went....

14. ### 6thplanet Thread Starter Member

Jan 1, 2008
13
0
Alright so I fabbed up the ckt. that was posted by MRMEVAL using the 555 pwm schematic.(thanks again for that MRMEVAL) I'm using a small 12V bulb as the devise to control for now. Problem is it dosn't work?? My o-scope shows the square wave on the gate but nothing is happening on the drain. I swapped in a couple other fets (IRFZI48N, IRFZ640, and an IRF3205) and the bulb dims, like I expected it should. Question is why dosn't the IRFZ46N work? I have 4 of them and none work (ruling out a bad fet). I even tried just using the fet as a switch, providing atleast 4+ volts to the gate to turn it on and nothing. Samething with the other fets and they all switched the bulb on. I've looked at the data sheets on all the fets and cant seem to figure out what the significant difference is between all of the said fets. Anything I'm over looking????

15. ### Ron H AAC Fanatic!

Apr 14, 2005
7,050
657
Are you powering the 555 from 12 volts?

16. ### SgtWookie Expert

Jul 17, 2007
22,183
1,728
Why would you want to change the basic frequency of the PWM? I suggest that you want to control the duty cycle instead of the frequency. We're talking about moving a physical item here; increasing the frequency of the PWM may be a large impact.

Diode for reverse EMF is standard, along with a small cap (perhaps 470pf) across the diode to absorb transitions before the diode can conduct.

17. ### 6thplanet Thread Starter Member

Jan 1, 2008
13
0
Ron H, yeah, 13.8 to be exact. Srt.Wookie, I've already corrected myself on the freq/duty cycle thing. I'll dial in the freq. as soon as I test the OEM ckt. to see what freq. its at.
I'm also looking into the zener diode in series with the flyback diode suggested by "hgmjr" on another thred to help denergize the solenoid.
Still don't understand the IRF46N not working....

18. ### 6thplanet Thread Starter Member

Jan 1, 2008
13
0
With the meter on diode test (Fluke mtr.) none of the fets conduct from the G to the D or S, regardless of lead polarity. The IRFZI48N will conduct from the D to the S with the ground lead to the D, reads .539V The same test on the IRF640 yields .521V, and the IRF3205 is .531V. the kicker is the IRFZ46N reads .146V

19. ### 6thplanet Thread Starter Member

Jan 1, 2008
13
0
Yeah all work that way, except the Z46's. So I guess they (MCM Electronics) sent me 4 bad fets?? Oh well I'll just continue with one of the other choices I have. Thanks

20. ### chand1 New Member

May 22, 2007
3
0
Use SG3525 PWM IC. It does all what you want, like full variation of the pulse width.. But input control voltage ( to pin 2 of IC) is from 1 Volt to 3 Volts only. VDD Supply can be from 8 V to 30 Volts.