Help using servo PWM signal to proportionately drive a solenoid valve.

Hello community and thanks, in advance, for your amazing support and generosity with your knowledge and experience!
My project, is to convert an RC Servo signal into an alternate/definable PWM output, which will in turn drive a transistor which will proportionately open and close a solenoid valve..
We have similar devices here which output a square wave to control flow through solenoid valves.
The main difference, with this application, will be that the system will need to be remote controlled, preferably with a standard hobby transmitter/receiver pair.
I have done quite a lot of digging around the web and the forum, but have been unable to find enough guidance for me to bluff my way through it.
I have very very limited experience programming Arduino and in the past have always used a BasicStamp to recondition servo signals for such applications.
If anyone has any more specific information or relevant posts they can recommend, any additional information will be hugely appreciated.
Thank you all again for your time.

Are you sure those "similar devices" are not motorised valves?

Solenoids tend to be either on or off.

Hi, you say you have gear there that already proportionately controls the valve, is it possible to get the arduino to provide control to the existing gear.
The reason being that the valve drivers operate at a frequency that is optimal for that sort of valve, also they have current limiting fitted to protect the valve coil during high duty cycle operation.

What is the part number of the controller that is already in use?

Tom.... :slight_smile:

Thanks Tom for your useful suggestions.
I think I can mitigate the issues with the solenoid valve impedance with external circuitry. They are 12V coils and don't draw a huge amount of current, as they are either open or closed at any given fraction of a second and only draw about 200mA at 100% duty.
I also get your point about frequency, which is very good one. I think by examining a similar control waveform, with a scope, I hope to match the frequency through experimentation.
The existing control gear are, in fact, self contained positional/servo units, with internal feedback/comparator etc.
They are driven by a +/-10V analog signal and close the servo loop internally.
They are typically bolted straight to the side of a hydraulic cylinder, with internal linear feedback and can be positionally controlled very well.
The new application however, does not require the cylinder to servo, but rather just extend or retract at a 'radio remote' controllable speed.
Our existing valve drivers could do this by driving either the extend or retract solenoid valve, with pwm and
I did have the thought of simply using an RC servo to turn a dual gang pot with a +/-10V voltage divider, but felt it would be a little clumsy to come out into a mechanical device, only to put an analog signal back into an electronic device to drive the valves.
I also thought it could be possible to use an Arduino, or similar micro, to handle the servo signal and output the +/-10V via a DAC, however again thought this was a little convoluted, for something that really just needs to open and close a pair of valves, relative to a control PWM..
Thanks again.

Remember that Servo library PWM signals have a very low duty-cycle, typically only in the range 5-10%.

Hi,what frequency do you aim to drive the solenoids.
If they are already designed for proportional use, can you check the frequency that the coils is being driven at, frequency of operation is very important to how they respond.

They are 12V coils and don't draw a huge amount of current, as they are either open or closed at any given fraction of a second and only draw about 200mA at 100% duty.

I hope you don't think that the actual valve and solenoid armature vibrate ON and OFF at the PWM frequency and duty cycle.

They don't, the magnetic field does, and the armature basically floats in the average magnetic field produced.

This is why frequency of operation is important as impedance of the coil enters the equation which dictates the ideal frequency for energy conversion from electrical to magnetic to mechanical.

Tom...... :slight_smile:

Thanks again Tom, for the magnetic flux tutorial.
The driver I have, runs at about 2kHz, which is representative of about half valve speed, at my current pressure and hydraulic flow rate (only about 15L/min).
The duty cycle is quite high, even at half speed and, of course, becomes ever higher until the valve is just wide open.
I am beginning to suspect that I am digging in the wrong place, fo a micro that will switch valves at these speeds and duty?
Thanks again for your time.
Dan

My project, is to convert an RC Servo signal into an alternate/definable PWM output, which will in turn drive a transistor which will proportionately open and close a solenoid valve..

Remember that Servo library PWM signals have a very low duty-cycle, typically only in the range 5-10%.

In that case you need to write a PPM-TO-PWM conversion routine using PULSEIN to read the pulsewidth
and then translating that to a 0 to 255 PWM AnalogWrite value to send to a PWM output pin.

Thank you raschemmel. That is more or less, exactly how I imagined using an Arduino for this application.
Are you aware of any similar projects or shared code which handled a similar process?
Thanks again.
Dan

After varying our frequency up to 3921.16 Hz, with some success, we have ended up dropping our analogwrite PWM out frequency to normal.
We have experimented with a few fets, and now have our hydraulic solenoid valves operating proportionately!
We have mapped a ppm signal from a futaba receiver across the the outgoing PWM and are controlling two solenoid valves, with quite a high degree of smoothness and precision.
Next we will attempt to bring an analog feedback into the loop and, hopefully, get the hydraulic cylinder to servo, (at least proportionately).
Thanks again to those who offered helpful advice.