PWM control of proportional solenoid valve

Discussion in 'The Projects Forum' started by judehue, Apr 20, 2010.

  1. judehue

    Thread Starter New Member

    Apr 20, 2010
    8
    0
    I am trying to control a proportional pressure reducing/relieving solenoid valve with a PIC microcontroller PWM output. I am confident in what I have done with the micro and get a good pwm signal that should drive the valve. When I control the valve with a power supply the valve behaves as the data sheet indicates except for a little bit of stiction. When I use the pwm from the micro I get the same amount of current through the power supply but the results are completely different. I am clueless as to what other circuitry should be used post micro to ensure the current to the solenoid is consistent. Any ideas for a pwm controlled current supply. :confused:
     
  2. VoodooMojo

    Active Member

    Nov 28, 2009
    503
    53
    what is the frequency you are pulsing and what is the voltage of the supply?
    What is the straight-on current of the valve coil at full valve stroke?

    12 volt proportional valves generally pulse at approximately 140Hz with 400ma at valve cracking to 2000ma at full valve stroke.

    what type of driver circuit do you intend to use to drive the valve or is that your question to us?
     
    Last edited: Apr 20, 2010
  3. Darren Holdstock

    Active Member

    Feb 10, 2009
    262
    11
    Don't forget to put a flywheel diode across the solenoid or the back EMF could drive the microprocessor crazy. It's reverse-biased, rated for the same forward current as the solenoid, and Vr is at least the peak voltage to the solenoid. Just like in the arrangement with a relay coil.

    Have you looked at the voltage at the solenoid on a 'scope? Inductive loads can be hard to drive, and can react with the driving circuitry, micro notwithstanding. Lowering the PWM frequency might help with the debugging, even if it eventually needs to be faster.

    The same PWM mechanism used to control the hydraulic damping sphere solenoid on the rear suspension of my old Citroen XM, a kind of spaceship on wheels. For months I had a strange problem where the ride height at the rear was being inconsistent. I fitted a diagnostic LED to the dashboard, and I would derive great pleasure from seeing it light up during sidewinds, hard cornering, or a particularly big pothole. Finally I traced it to the damping control solenoid and fixed it with a 1N4003. 2 weeks later it got totalled when it was rear ended by a van load of melons. Gutted! For those precious 2 weeks it ran better than it had ever done.
     
  4. judehue

    Thread Starter New Member

    Apr 20, 2010
    8
    0
    The valve does have a 12V coil. It should begin pressure regulation at .30 amps or so and be full stroke at 1.60 amps. However, as it provides regulation between 0-200 psi, and I am only wanting 100 psi max that should correspond to .90 amps. The manufacturer recommended a 1.2 kHz pulse width signal. Does that maybe seem high based on your proposed 140 Hz. They also recommended a 50 hz dither.
     
  5. judehue

    Thread Starter New Member

    Apr 20, 2010
    8
    0
    Here is the circuit I am using to drive the coil
     
  6. judehue

    Thread Starter New Member

    Apr 20, 2010
    8
    0
    the valve is used to operate a hydraulically actuated clutch. It does need to smoothly ramp the pressure value from 0-100 psi. I do agree that it may not need dither even in this case because despite a little bit of stiction at the bottom it should move smoothly up to the final value. I have found duty cycles that at least cause the power supply to display current values that should correspond to certain pressure values. For example a certain duty cycle causes the power supply to supply .90 amps to the valve and sometimes the valve regulates pressure to 100 psi as it should. The lower duty cycles do not reliably take the valve to any set position based on the current I am seeing through the supply. I do know that hooking the valve to the power supply and adjusting the current produces pretty accurate pressure regulation. and there are several ways I could do this with the micro but I would like to get the pwm working. Thanks for the help
     
  7. rjenkins

    AAC Fanatic!

    Nov 6, 2005
    1,015
    69
    It may be that the combination of fairly high frequency drive and the simple flywheel diode are holding the coil current too near constant (like inductive smoothing).
    The valve current could be much higher than the power supply reading indicates.

    Putting a lowish value resistor in series with the flywheel diode, about the same value as the solenoid coil, will cause the current to decay faster and give better control.
    You could also put a low value sense resistor in series with the solenoid coil so you can monitor the actual coil current.

    Alternatively, look at the circuit for a full 'H' bridge. That again would give much better current control and damping.
     
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Your driver circuit has problems:

    [​IMG]

    I'm assuming R16 comes from your uC. Reduce it to 47 Ohms.
    Reduce R15 to 10k.
    Reduce R13 1.4k
    Reduce R14 to 22k.

    It's still not going to be a very good gate driver even with those changes.

    You would be much better off using a logic-level N-channel MOSFET. An IRF510 is a very old MOSFET, and it is a standard level requiring 10v to turn it fully on.

    You should look for a logic-level MOSFET with a lower Vdss, and higher Id rating - but still have a low total gate charge.

    Something like an IRLU7821 would be much better. You wouldn't need a driver circuit; just connect the PWM output to the MOSFET gate with a resistor.
     
    Last edited: Apr 22, 2010
  9. judehue

    Thread Starter New Member

    Apr 20, 2010
    8
    0
    I made the changes that sgt wookie suggested with the resistor values, and that seemed to clean up the signal a fair amount. I know that there is good output from the IRF510 however when driving the coil the results are still bad. I did add a 6.6 ohm resistor in series with the flywheel diode as someone above mentioned and that seemed to cut down the current quite a bit. Unfortunately I didn't have a 6.6 ohm power resistor so that experiment was short lived and I didn't get to see all of the different power levels. According to the valve manufacturer that valve should work great with a 1.2 khz pwm signal to control the current. Can anyone explain why the circuit I showed above would not work driving a coil. Someone else mentioned above using a logic level mosfet which I ordered but I can't see why I won't have the same problem. Any ideas thanks for all the responses. Also I have gone to a current control circuit using op amps and an LM317 interfaced to the micro with a digi pot which I am confident will work. However this is a matter of pride and I want to understand what could be going on here.
     
  10. kingdano

    Member

    Apr 14, 2010
    377
    19

    you called out R15 twice - FYI.

    and yes, you will have a hard time driving a 10V FET with a 5V (3.3V?) output signal. i think you are probably not fully opening the channel, and not driving the solenoid as you think you are.
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Yes, I typoed it; I had to leave right after the post and was thinking about the stuff I had to take with me instead of paying attention to reference designators. It's fixed.

    2N7000 MOSFETs are not specifically rated for logic level operation, however much of the time they'll work OK when Vgs=5. Out of a batch of them, you'll probably find 5% to 10% that won't work as a switch with that low of a Vgs.

    Dropping R13 down to 1.3k will help a great deal in decreasing the IRF530's turn-on time; and it should get pulled up to nearly the 12v rail (actually, 11.33v) when the 2N7000 is turned off.

    That's still a far cry from the results he'd get using a logic level MOSFET.
     
  12. rjenkins

    AAC Fanatic!

    Nov 6, 2005
    1,015
    69
    The 2N7000 was introduced as a logic level device, we used them in commercial gear for many years. You had me worried, so I just checked the data.

    The 2N7000 worst case rating with Vgs 4.5V is 0.4V Vds at 75mA, certainly adequate for general logic in 5V circuits.

    If in this case the input signal is actually from a 3.3V system, I'd suggest a small NPN bipolar device as the first stage to ensure clean switching.
     
Loading...