Pages: [1]   Go Down
Author Topic: Building a switch that "goes dead" in certain states....  (Read 941 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is it possible to build a switch that turns on and off a circuit...but the switch goes dead if the PIR sensor detects motion (so you can not run over and shut it off if the PIR is detection motion)...but when no motion, you can turn it on and off with no issues (off using little to no battery power).  I wouldn't even have a clue how to approach this, the best idea I had was a NORMALLY  Closed reed switch.

maybe some sort of relay that is set when the state is on through a pull up resistor "Short circuiting" the main switch while PIR is armed? 

Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 53
Posts: 1833
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It sounds like a SMOP (simple matter of programming), except for the part of no power.  Note, in the software business, SMOP can often times mean that how to do it obvious, but getting all of the details right is hard.

You need power to handle the PIR sensor, so you have to accept that you will need to power it, which means batteries and/or being powered by the mains circuit.

Essentially what you want is an AND circuit, where the condition is true only if the switch is pressed, and there hasn't been motion detected by the PIR in the last quantum of time.  You could implement the AND logic in the microprocessor, or use a relay that the switch feeds through.  Obviously every time you detect motion you record the current time plus the time of to reset the logic, and you don't allow the switch to complete the circuit if the time is within the motion.  If you haven't detected motion in the timeout period, reset your condition variable or change the relay to allow the switch to function normal.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

well i think it might not be so SMOP, best guess I didn't explain myself correctly.  What i want is a circuit that is off, no power nothing literally switched off.  Then you can switch it on, and off again, no problem.  But if it is on AND the PIR is armed say (maybe even not detecting motion but ready to) then the switching the switch off does nothing, power remains on... i know a switch is a literal cut of the circuit but I would like to think there is a way to short circuit if it makes sense.  Though could be simple, but then I don't think I can do it all in code...i would need some thing to keep the voltage going when the switch is on AND the system is armed... even if someone flicks the switch off...

no clue what circuit magic I would need.  I would google the crap out of this but not even sure what the name of such a switch is called?
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8472
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you really have to be off, or just sleeping?

If sleeping is OK you could run the switch to an input, then it is a SMOP.

If you really need to be off then you will need some external hardware.

Quote
maybe even not detecting motion but ready to)
How do you detect this state?
____
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17262
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

well i think it might not be so SMOP, best guess I didn't explain myself correctly.  What i want is a circuit that is off, no power nothing literally switched off.  Then you can switch it on, and off again, no problem.  But if it is on AND the PIR is armed say (maybe even not detecting motion but ready to) then the switching the switch off does nothing, power remains on... i know a switch is a literal cut of the circuit but I would like to think there is a way to short circuit if it makes sense.  Though could be simple, but then I don't think I can do it all in code...i would need some thing to keep the voltage going when the switch is on AND the system is armed... even if someone flicks the switch off...

no clue what circuit magic I would need.  I would google the crap out of this but not even sure what the name of such a switch is called?


What you could use is a simple relay where the relay's contact are wired across (in parallel) the manual power switch. This relay would be controlled by an arduino which would know via some input condition (that the PIR is armed) if it should force the external circuit to be stay turned on by activating the relay or instead let the manual power switch turn the power off. I'm just not convinced you have well stated all the possible states for the external circuit. When should the arduino allow the circuit to be powered off by the manual power switch? Isn't a PIR always 'armed' if it's powered on?

Lefty


« Last Edit: October 12, 2012, 10:20:44 am by retrolefty » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes @retrolefty and @graynomad  there is another state with the PIR I forgot to add, or mention, it is that the PIR is put into a "armed" state by another thing happening (I haven't determined what but figured maybe using a RFID tag reader...hold tag to reader, PIR is "armed" ready to look and cause alarm and in this ARMED state from the RFID, the manual switch no longer works.  and i need it off off... like drawing 0 power). 

I like the idea of a relay.  So the switch turns circuit on and off, but if the PIR is armed by the RFID tag, then the relay is tripped to close the circuit regardless of manual switch?

if the circuit is disarmed (with RFID tag), relay is 'untripped' and the switch works again?

this correct ?  I wouldn't know where to start on working that.  cause the problem I see is my knowledge of relays, lets me take the 5v arduino to trip something that controls much more volts...its almost as if i need a 5v, 5v relay?

Shane

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

actually a mosfet might be the answer

http://www.radioshack.com/product/index.jsp?productId=13339909

Logged

Pages: [1]   Go Up
Jump to: