Amplifying PWM output from UNO to drive solenoid

Hi,

I'm looking to amplify 2 PWM outputs (maybe more in the future) from an UNO board to drive 2 solenoid valves rated 0-5 V DC with a max. current of 370 mA. The thing is that the valve does not show considerable flow at 40 mA which is the max. from a PWM pin of the UNO. So I was planning to add a common collector stage after this to amplify the current while keeping the voltage in the 0-5 V DC range.

Is this approach advisable?
Also, I read that having a flyback diode helps prevent untoward back EMF current spikes from damaging the preceding stages.

I would really appreciate some tips on this as I have been reading up on amplifiers and stuff but this is my first time building a circuit so I don't want to blow things up.

Thanks all! :slight_smile:

This link shows how to build a driver, however not sure why you are using PWM , a solenoid is typically fully on or off , so you just use a basic digital output as on or off.

Any doubts, give full details / link to the soleniod and its intended use.

You cannot PWM a solenoid valve! The coil will not respond to the PWM frequency that comes out of an Arduino. If you need continuous variable flow, you'll need a motorized valve.

You could turn a solenoid on and off at a rather fast rate(for a solenoid), perhaps 20 times a minute or less using the duty cycle to set an average flow rate. Don't know how long the solenoid would survive though...

Thanks guys.

Actually, I want to drive it proportionally. The valves are proportional valves (Clippard) which can be driven by PWM according to the manufacturer.

I agree that low PWM frequencies will cause the solenoid to move digitally (ON-OFF mode) so as to get an average flow time. However, I read somewhere (PWM Solenoid Theory | TLX Technologies) that having a high enough PWM frequency makes the solenoid move to an average position based on the average current being fed thereby making it somewhat like a position control mode than a digital control mode.

Please let me know if you guys have any suggestions based on the two sources I provided.

:slight_smile:

Uh, that's a completely different situation. Unfortunately, you're still barking up the wrong tree...

When you feed us incomplete or incorrect information, you get incorrect and incomplete answers. So, what kind of accuracy do you need? What are you doing with this valve, as in what's the end game?

My comment about still barking up the wrong tree is because you are thinking of this as a 5 volt application when it is not. It is all about current - unless of course you have omitted to tell us you purchased the Clipard controller to go with the valve. So, did you? If not, my recommendation is to buy the controller and then ask how to increase the PWM frequency of the Arduino to greater than 2khz. This is of course if you can live with the 8 bit resolution of the Arduino's PWM outputs...

I'm aware that the application is current based. The voltage range given by Clippard is based on the coil resistance for that particular valve. It is because I don't want to buy a controller for 220 bucks that I am trying to build a circuit of my own to control the flow rate proportionally. I'm happy with steps of 5% duty cycle for now.

I was just trying to keep the voltage range after the amplifier stage within the range of the valve I'm planning to buy which is why I was thinking of a voltage follower which can also help ramp up my current to ensure good flow. Also, I don't think I need to go to 2 kHz as per the 2nd link (for position control) but arguments for/against this are welcome.

I think you're fundamentally wrong in your control approach. From everything I read in the datasheets, the valve needs a constant current source driving it, it is the controller of that current (as sold by Clippard for $220) that can accept the PWM input as the control signal.

I think you should call Clippard and find out if you can PWM the valve directly. If so, then what is the frequency range that you need to use. If you don't know these facts, you're just wasting everyone's time, including yours.

If my approach to your project is frustrating you, please remember that this section of the forum is Project Guidance.

If you've already worked out all the details and you know with certainty that valve will work directly with PWM and just you need to know how to build a constant current driver capable of driving 400 ma at no more than 5 volts all controlled by an Uno's default PWM frequency, then you should be asking that exact question without the sketchy background by posting in General Electronics.

avr_fred:

The issue is when I ask Clippard if the valve can accept PWM directly, they just try to sell me the controller without understanding my problem or even trying to answer it (it's a company trying to sell products so I don't blame them too much). Furthermore, each controller can only control a single valve so that approach is not economical if I need 5 valves or more, not to mention waste of space.

From my understanding, PWM is nothing exotic that a valve controlled by current will not be able to handle especially since this modulation method was devised to have an average current based on the duty cycle. The only concern may be the signal frequency which, again, is not very complicated seeing that mechanical elements can respond to a lower range of frequencies than electrical elements. So it is natural that the valve will not be able to keep up with the ON-OFF characteristics of the PWM beyond a certain frequency.

Hence, I had posted the second link about digital control and position control of solenoids (which is what most of these valves have at their core) and was wondering if anyone had any concrete experience with such systems. I agree that sans the valves, the question is mainly if a voltage follower should be sufficient but as you can see Clippard's response, the problem now becomes electromechanical rather than purely electrical.

Now coming to the point of your replies, if you take an objective view, all you have done is:-
(i) say that PWM will not work
(ii) lectured me on completeness/correctness of information (which might be partly true because this is my first post to the forum)
(iii) assumed that I don't understand that the valve is current controlled
(iv) suggested I buy Clippard's controller
(v) directed me to the General Electronics forum
(vi) say that I'm wasting people's time because I do not have proprietary information about Clippard's product

A final note: when the valve page says it can be controlled by PWM, I think it means that the valve is able to accept PWM inputs rather than the controller (which finds no mention in that line). That was my go-to point based on which I had devised the entire approach because, like you can see, Clippard's response of buying their controller was useless to me.

So please do me a favor and do not bother yourself with my question any longer. It's quite clear to me that you don't know a lot of things and yet, are trying to provide me with "guidance" from your high judgemental horse. Thank you for that and my apologies if this reply was a bit too straightforward because you were asking for it from your second reply.

1 Like

Analog valves deserve some ripple to overcome friction. That's why they should be used with low frequency PWM, as indicated in their data sheet.

Use a motor driver module to drive the valves by PWM. If you build your own driver, don't forget the flyback diodes.

Hi,
I can't find in the datasheets what the PWM frequency of the current to the coil is.
This is important as the impedance of the coil becomes a factor as you go up in PWM frequency.
The higher the PWM frequency the higher the coil impedance and the lower the current in the coil and less the response for any Duty Cycle.

The proprietary driver unit is definitely a PWM control unit, with 0-20mA, 4-20mA analog and 0-5V or 0 - 10V PWM inputs.
INPUTCONFIG.jpg
It also has current limit control;

You probably can make your own with an Arduino, but you will have to experiment with PWM frequency and current control to get optimum performance.

Tom.... :slight_smile:

The coil inductance is unimportant, as long as the switched current flows only in one direction. The recommended PWM frequency may be kept secret, in order to sell more PWM modules with the valves :-]

If the PWM frequency is too high, an almost constant current will flow, what's not desired with analog valves. If the PWM frequency is too low, the valve will start rattling. 100Hz will be a good choice for best jitter, but the default 460Hz PWM frequency should do as well.

The Arduino world mostly relates PWM with controlling LED's and motors, i have been working with PWM Solenoid Hydraulic valves for years this may be what you are looking for they handle the hardware.