controlling a solenoid valve using a pir

ericgibbs

Joined Jan 29, 2010
21,448
Hi drew,
When you have the PIR wired up for testing, remember for the first minute or so the PIR will switch On/Off before it settles down, this is normal.
To test the delay inhibit, set the Timer pot to minimum ON time, fully anticlockwise.
Move your hand left and right, over the PIR, about 12 inches away, this will activate the PIR & Solenoid, keep moving your hand, the PIR & Solenoid will deactivate after a few seconds, keep moving your hand, until the PIR & Solenoid reactivates this will give you an idea of the delay inhibit time.

Ask if you have a problem.

E
 

MisterBill2

Joined Jan 23, 2018
27,584
OK, I have seen all of the complicated design concepts presented, here would be a simple scheme to power the 24 volt solenoid valve when the PIR motion detector senses something.
What you have is a device that can be powered with up to 12 volts. When that device is triggered it will output a positive 3.3 volts for an adjustable period of time. This means that you do not need to include a timer function because it is already provided in the PIR device. That 3.3 volts is adequate to forward bias the base/emitter junction of an NPN transistor that has it's emitter tied to the same common negative as the PIR device negative terminal. The collector of that NPN transistor would be tied to one side of the water valve solenoid, the other solenoid connection will tie to the +24 volts source.. (almost complete here)
What remains is I guess, the way to provide the 12 volts to operate the PIR device.
The very simple way would be to purchase a dual voltage supply, 24 volts and either 12 volts or maybe 24 volts and 5 volts. Both of these are common. A second choice would be to get two 12 volt supplies and put them in series, so that 24 volts would be available for the solenoid valve and 12 volts will be available from the connection between the two supplies to power the PIR device.
So there is the very simplest scheme I can come up with. That transistor will need to be rated for at least 50volts Vce in the off state and to carry at least the pull-in current of the solenoid valve.
And you can forget about that diode Max demands because the ON/OFF switching will not be that very fast.
 

Thread Starter

drewex81

Joined Oct 3, 2023
6
Hi drew,
When you have the PIR wired up for testing, remember for the first minute or so the PIR will switch On/Off before it settles down, this is normal.
To test the delay inhibit, set the Timer pot to minimum ON time, fully anticlockwise.
Move your hand left and right, over the PIR, about 12 inches away, this will activate the PIR & Solenoid, keep moving your hand, the PIR & Solenoid will deactivate after a few seconds, keep moving your hand, until the PIR & Solenoid reactivates this will give you an idea of the delay inhibit time.

Ask if you have a problem.

E
Im sorry, can i make a change request. I thought i had a 24v adapter sitting around but i do not and they are almost double the price of a 12v adapter. Can we modify this to work with a 12v adapter or will that be just too conversome design process. also what kind of amp i need on the power supply?
 

MisterBill2

Joined Jan 23, 2018
27,584
Im sorry, can i make a change request. I thought i had a 24v adapter sitting around but i do not and they are almost double the price of a 12v adapter. Can we modify this to work with a 12v adapter or will that be just too conversome design process. also what kind of amp i need on the power supply?
The source of 24 volts for the valve is simple. two twelve volt adapters connected in series. That will provide the twelve volts for the PIR device as well as the 24 volts for the solenoid valve.
OR, it may be that the valve will operate on 12 volts DC. I have, in an emergency, operated a 24 volt AC gas valve on 24 volts DC from a large battery. THAT worked very well. There are also schemes that charge a capacitor from a lower voltage and then put the capacitor in series with the voltage source to operate the solenoid. That works because it takes much less power to hold a solenoid than to pull it in.
 

MisterBill2

Joined Jan 23, 2018
27,584
One other option is to build your own power supply, if you have any parts on hand. A solenoid valve does not need clean regulated DC to operate. DC with a volt of hum and poor regulation will work quite well.

I am guessing that the TS has already purchased the solenoid valve. If not, other options are available.
 

MisterBill2

Joined Jan 23, 2018
27,584
Good point Max. I was thinking that the TS may be in a position to use rectified but not well filtered AC to power the solenoid valve. So there could be a bit of inrush.
If the TS has not yet purchased the valve, then the AC option offers some advantages.
And regardless of AC or DC, holding in demands much less current.
 

MaxHeadRoom

Joined Jul 18, 2013
30,680
The DC coil just needs a full wave rectified supply.
No inrush with DC, in fact there is a slight opposite effect due to some reactance, OTH, the AC version is opposite, the only time the AC version has the edge is at switch on, due to the very much lower resistance & much higher current at that point..
After that the DC carries the day.
DC version holding current remains the same.
 

MisterBill2

Joined Jan 23, 2018
27,584
I know that there are schemes for operating a solenoid at a higher current for a short time, Some of them have even been posted here. THAT could solve the problem by avoiding the 24 volt supply. But how to make it happen with a single open collector transistor is more complicated.
 

Thread Starter

drewex81

Joined Oct 3, 2023
6
Hi I am getting the circuit parts today. I decided to double up and do two of them so on the second solenoid valve I bought a 12v version and a 12v adapter for it. Do I just take off the voltage regulator side and the capacitors?
 

MisterBill2

Joined Jan 23, 2018
27,584
A solenoid valve does not need a regulated voltage, so it can be fed right from the supply, not through the regulator. That will also avoid disturbances to the PIR electronic section.
And it occurs to me that the way to hit the 24 volt valve with 24 volts is to use a relay to have a capacitor connected to charge from the 12 volts, and then when it is time to trigger the valve, put that in series with the 12 volt supply to deliver 24 volts for a bit. Not sure it would be long enough, but it is a possibility.
 

MaxHeadRoom

Joined Jul 18, 2013
30,680
Hi I am getting the circuit parts today. I decided to double up and do two of them so on the second solenoid valve I bought a 12v version and a 12v adapter for it. Do I just take off the voltage regulator side and the capacitors?
As long as the regulation can handle the load, there should be no need to remove it if preferred.
 
This is exactly what i was looking for thank you. simple and great setup. I was trying to keep everything simple. I am waiting for the solenoid valve to come and ill order the parts today in 1 to 2 weeks or so I should have this ready to test. I will write back when its done or if i have questions.
Hi Drew,
Did you ever get this working? I am inatalling a underground sprinkler system at my house and want to contol a few separate sprinkler heads with motion detectors to keep away geese.
 

MisterBill2

Joined Jan 23, 2018
27,584
The simplest way will to be to have the PIR with the 3.3 volts operate a transistor to drive a relay. Then the relay can switch whatever voltage you want to control as many valves as you choose. Even mains powered valves salvaged from an old washer machine. Or a fence charger to really bother the geese.
 
Top