PWM usage with Solenoid proprtional valves??
Siri
Posts: 220
I am working on a project that requires to mix two(2) gases 0% to 100%- that is when gas “A” is 100% - GAS “B” is 0%.When is gas “A” is 75% - gas “B” is 25% - in other words the mixture is inversely proportional all the time.
I am planning to use two solenoid proportional valves(2 identical valves).The valves are
5VDC(Specs attached) – can be driven by PWM.
The question is can I drive these two proportional valves directly with the Prop using
1-10K current limiting resistors to protect the prop and using counters specially using the differential mode.
I have not used counters before but have been reading a lot about them.
I would appreciate advice on all fronts – hardware wiring,coding hints
Any help before I do any damage to the proportional valve/PROP etc.
I do not have code written yet but plan to use both SPIN and ? PASM if needed.
Thank you.
Siri
PS:The gases A and B are very safe and are used daily with no problems in public areas.
I am planning to use two solenoid proportional valves(2 identical valves).The valves are
5VDC(Specs attached) – can be driven by PWM.
The question is can I drive these two proportional valves directly with the Prop using
1-10K current limiting resistors to protect the prop and using counters specially using the differential mode.
I have not used counters before but have been reading a lot about them.
I would appreciate advice on all fronts – hardware wiring,coding hints
Any help before I do any damage to the proportional valve/PROP etc.
I do not have code written yet but plan to use both SPIN and ? PASM if needed.
Thank you.
Siri
PS:The gases A and B are very safe and are used daily with no problems in public areas.
pdf
262K
Comments
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
power supply (12 volts ?). This would reduce the current requirement.
Please check my circuit diagram(attached) and further advise - if this is OK or if not suggest any changes to anty
components,better new circuit etc,
Thank you,
Regards,
Siri
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Can you explain why? and How would I go about doing what you suggested.
(I am a week-end electronics junky - so you need to bring me upto speed.)
Regards
Siri
Before I connect the Solenoid proportional valve to test them - I would like to connect the hard ware
and test the software - PWM signal.
I am attaching a dummy load (@ 12-15 Ohms) instead of the proportional valve and then connect the scope
in parallel with the resistor to caprture the wave form details on the scope.
Is this the proper way to go about doing it?
Siri
Sorry, I found the datasheet and the current looks like it's always less than 300mA which is well within the capability of a simple NPN switching transistor like the 2N2222A. A simple circuit like on the last page of Nuts and Volts Column #6 would work fine using 5V and a smaller base resistor (www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol1/col/nv6.pdf). You want about 10mA of base current to saturate the transistor when on, so you'd want a 270 Ohm base resistor. To ensure that the transistor is off when the Propeller is reset, you should have a 10K resistor between the base and ground.
Post Edited (Mike Green) : 12/4/2008 6:31:34 PM GMT
Thank you for your support.
When you are reffering to the Last page of the Nut&Volts article - It is Figure 6.3 - The Stamp bar code reader circuit,right.
Mike - I did posted a circuit diagram(the 4th post on this topic) to get some input.
If I understand you correctly I do not require the MOSFET - just the 2N2222 transistor and the two resistors.
I will be using PWM generated by the PROP - will this transistor able be fast enough to handle it.
This is going to be used with a oxygen/air blender - would like this to be very reliable for the job and long hours of continuous usage.
Thank you again,
Siri
Thanks for all the great help
Regards,
Siri
I built the circuit as you suggested - the solenoid proportional valve should be here any day.
I wan't to test the prop code before I connect the valve.Will it be ok just to connect the scope
across the diode(solenoid terminals) or do I need to place a load if can you suggest a test load(resistor).
Thanks
Siri
Thanks for the quick reply.
Siri
I built the circuit as you suggested- I omitted the diode as I was using a LED for testing purposes.
The LED does light well but I am unable to make it go dim.
I wan't it to go dim by changing the "fraqa"
I uploaded the circuit diagram and the code.
The LED only lights when " frqa := 1" and not to the scale as used in the parallax examples.
You need to use "ctra := %00110 << 26 | 7"
Actually, a quick look at the interpreter source seems to indicate that the [noparse][[/noparse] ] notation should work on _any_ special register in the chip.
My main concern is that doing it the way Siri did
..leaves all other register bits indeterminate, whereas doing it the way you suggest properly initialises all register bits to what you really want them to be.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cardinal Fang! Fetch the comfy chair.
Still it does not work with "frqa:=255*scale but works with "frqa:= 1"
Thanks for the help,
Siri
If the above is not what's happening, then there must be some difference between what you've described and what's actually running in your Propeller.
I built an identical circuit using P3 - the LED lights up when "frqa := 250 * scale"
but the same program is changed(P7) ctra[noparse][[/noparse]5..0] :=7 and dira[noparse][[/noparse]7]~~ - the LED does not light at all.
So I think the problem is either P7 or the 2N2222 transister.
I will continue to trouble shoot if you have any other iuput - is greatly appreciated.
Regards,
Siri
A solenoid has a coil resistance that limits the amount of current that can flow through it for a given supply voltage. Not so for LEDs.
I replaced the transistor and now it works well.
Thank you so much - you are a man of wisdom.
Regards,
Siri
P.S I will add a current limiting - I am using a 5V LED and when I try to calculate using the little programs in the Net it did not get me a value -0 - so that is why I
did not place one.
If you're using a true 5V LED (with a built-in current regulator or built-in current limiting resistor), then you don't need another one, but these are not commonly used. RadioShack used to carry them (and still might).