control 2 solenoids with a pwm
jaspittman
Posts: 22
I am using a bs2 for a class of mine. I want to know if it is possible to control two solenoid valves. The pic needs to measure an analog pressure gauge (0-5 volts) and compare it to the setting of a single turn pot (no resistance of the pot = 0 volts, full resistance = 5 volts). The chip would compare the two analog signals and output a pwm to one of the two solenoids. The duty cycle would increase as the difference between the two signals increased. pot to high solenoid 1 activates, pot to low solenoid two activates. Also can i send a pwm through a MOSFET or would it be better to us a solenoid PWM driver.
The solenoid valves I want to control ( http://apps.usa.norgren.com/FASTRAC/default.aspx )
The solenoid valves I want to control ( http://apps.usa.norgren.com/FASTRAC/default.aspx )
Comments
Use your stamp to measure the pressures but do the comparison in the stamp to decide when to turn each solenoid on or off. You can use a MOSFET or relay to switch the valve.
BTW, the pwm command does work well with an external MOSFET, if the load device responds well to variable duty cycle. Lights, heaters, motors all do.
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·