Go Down

Topic: Radio Controlled Light Switch (Read 7377 times) previous topic - next topic


I haven't tried this, but how about using a latched hall effect sensor such as this one: https://www.sparkfun.com/products/9312. It might be possible to trigger interrupts using it taped to the switched wire.



Two actually. Have you tried some sort optocoupling circuit? I stumbled across this but have yet to give it a try: http://ruggedcircuits.com/html/circuit__26.html

Another option would be another relay, but with the coil in series so that when the light is on, current is passing through and the second relay is tripped.


Two really good suggestions.  I don't think the optoisolator will work though since it senses voltage, not current.  It's a great idea for sensing the presence of voltage so I'll file that away for use later.  The hall effect diode might sense the current moving through, but I think it's designed for higher magnetic flux than you can get from a wire.  I may have to get one and experiment a bit. 

My fall-back idea (that's if all else fails) is to use one of those ACS712 devices.  The reason I'm reluctant to just dive in and use it is because I don't know squat about it, and I don't want to have to use an op-amp to raise the signal level (trying to keep parts count to a minimum).  I may have to get a hall effect and an ACS172 though and do some experimenting to see how hard each of them is to implement.

Any other good ideas??

Coding Badly

I don't think the optoisolator will work though since it senses voltage, not current.  It's a great idea for sensing the presence of voltage so I'll file that away for use later.

I thought you were trying to sense voltage across a light (light is on).  Why can't you use the optoisolator in parallel with the light?


It's the way the house is wired up.  See, they put a SPDT wall switch at one end hooked to mains power and then carry two wires to the next switch which is a DPDT switch, and then two wires to the next, and so forth until they reach the last switch which is another SPDT and the common wire then goes up to the light with neutral already in the light fixture.  So, to get to both ends of the light to parallel it, I'd have to have access to both of the SPDT switches, and they're a ways apart.  Electricians call these switches 3-way and 4-way, but the 3-way is just a SPDT and the 4-way is a DPDT with the connections crossed.  There's a cute tutorial on this at:


And, when I checked my lights and switches, that's exactly what they did.


Actually, checking my work, I noticed that, if I can find the end of the line switch, I can parallel the lights by hooking to the center connection and neutral.  The problem is that every opto-isolator I've checked needs too much forward current to allow the use of small resistors.  I have to use 1w or in some cases 2w to take the heat.  I'm not fond of putting something in there that might heat up if I don't have to.  Are there any really sensitive opto isolators out there?

Coding Badly

Have you considered using a "current transformer sensors"?

I've never used one so I can't offer anything practicle.  They do come in small sizes and aren't very expensive.  I assume you would use analogRead.  As an added bonus, the controller would be able to test for a burned out bulb.

Coding Badly

This has some good general information about Hall sensors...


Well, I've been through about 15 opto isolators and I still wind up with 1W resistors in the device.  Looking at Hall effect devices, they respond to the polarity of the magnetic field, some N some S, some latch, etc.  So, I think I'll have to discount these techniques.  Now, I'm looking at the ACS712 to see if I can get enough voltage out of it on a small (CFL level) light to trigger a digital input.   For some switches, this will be around 15W, so I'll be pulling less than an amp (what, around a tenth or so?).  That means the output of the ACS712 might be really small.  However, on an appliance or heater, I'll pull 10A from time to time.  Quite a range to deal with.....

Or maybe one of those superbright LEDs that take a tiny amount of current taped to a photo transistor??  That's an interesting idea.

Coding Badly

Could you use an LDR poking through the light switch panel?  Daylight would be one value, dark would be a second value, and lights-on would be a third value (hopefully).


One of the switches I want to control is for an outside safety light to scare off the coyotes at night.    The switch is on an inside wall and the light is up on the side of the house pointing out into the desert. 

Isn't this an annoying problem?


OK, got it.  To tell if the light is on, I go to the SPDT switch that is at the end of the chain and hooked to the lights.  I use an opto isolator, but hook it to a capacitor with a diode in inverse parallel to the LED inside the isolator.  I just tried this with a regular LED and a .047 cap in series with the diode-led combination and it worked just fine.  Yep, it's actually flashing at 60Hz, but a cap on the output of the isolator will take care of that problem nicely.  The reason for the diode is to make sure the reverse voltage doesn't exceed the LED's max and to discharge the cap to make sure it doesn't just charge to peak and stay there.

This also gives me a nice way to tell if the power is getting to some device without having to use a big ol' resistor.

Thanks folks, I never would have come up with this idea without the discussion we had.  And, I promise not to bother you again until I run into the next problem (probably about 45 minutes or so).

Coding Badly

Thank you for the follow-up.

Yep, it's actually flashing at 60Hz, but a cap on the output of the isolator will take care of that problem nicely.

You can also take care of that problem with a bit of software.

Go Up