Easier way to hold a solenoid on pwm?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
daxkamala
Normal user
Posts: 15
Joined: 17 Aug 2016, 09:12

Easier way to hold a solenoid on pwm?

#1 Post by daxkamala » 07 Sep 2016, 13:25

I'm operating a number of solenoid valves to control irrigation.
The valves need 12v to operate but will then happily stay operated at 5v.
Only way I could think of was to use a rule with a one second timer to operate the valve and then switch to pwm at 512.
It works but also needs another gpio (4) operated by MQTT in order to generate an event (the switch input) to start the rule.
If I use the gpio the solenoid is connected to (2) it gets very confused. So here is the setup:
devices.png
devices.png (27.5 KiB) Viewed 2872 times
Rules:
On DummyIn#Switch=1 do
timerSet,1,1
gpio,2,1
endon

On DummyIn#Switch=0 do
pwm,2,0
endon

On Rules#Timer=1 do
pwm,2,512
endon

If I am being a bit thick and there is a much easier way to do this, please enlighten me!

Zodiac69
Normal user
Posts: 85
Joined: 13 Jun 2016, 17:20

Re: Easier way to hold a solenoid on pwm?

#2 Post by Zodiac69 » 10 Sep 2016, 17:15

Hi daxkamala

Not sure why you want to do this, do you have an issue supplying 12, current limitation issues?

The best is to supply your solenoid with 12V and keep it at 12V, unless you have a PWM solenoid that can do flow control, i personally do not see any advantage of trying to get complicated and switch between 12V and 5V to control the solenoid.
I use 12Vac solenoids on my irrigation system and the only thing i did was to use opto-coupler isolation to drive the solenoid via a Thyristor.

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests