Pages: [1] 2   Go Down
Author Topic: Radio Controlled Light Switch  (Read 4076 times)
0 Members and 1 Guest are viewing this topic.
New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 936
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I want to build a remotely controlled light switch. I'm sick of X10's unreliability and the other stuff is too expensive (IMHO) so I think I'll look into building one based on an XBee (series 2).  I have a handle on components for the actual control, but power supply is a problem.

This is for US split phase 110V and all the places I want to use such a device have a neutral in the box, so wall power isn't a problem.  I need a really small 5V power supply that I can stuff into a package the size of a light switch (roughly the configuration of the X10 devices).  And, yes, I've googled the heck out of this and suffered from massive information overload without any good ideas.

Where the heck do the manufacturers get the little switching power supplies you see in the tiny wall warts for cell phones these days ?

Any other suggestions ?
Logged

Trying to keep my house under control http://www.desert-home.com/

Switzerland
Offline Offline
Faraday Member
**
Karma: 112
Posts: 5286
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Where the heck do the manufacturers get the little switching power supplies you see in the tiny wall warts for cell phones these days ?

Why don't you buy a couple of them and open them for the content? Most of mine are not grouted and are not problem to be used.
Logged

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 936
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I've done that to a couple of them and used them in devices, and that may be the only solution.  But it would seem that the little supplies should be available somewhere.
Logged

Trying to keep my house under control http://www.desert-home.com/

California
Offline Offline
Faraday Member
**
Karma: 92
Posts: 3447
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Personally, I cannabalize =http://www.amazon.com/USB-AC-Power-Adapter-White/dp/B0038HYPZS/ref=sr_1_7?ie=UTF8&qid=1351798298&sr=8-7&keywords=apple+usb+chargerthis small adapater for my light switches. It's really small, and really cheap. I would also recommend using something like the JeeNode, due to size and cost. For my switches, I designed a smaller, Attiny based board and use the JeeLib library. It comes out to around $10 per light switch.
Logged

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 936
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Holy Cow, that charger is only a buck right now.  I should pick up a bunch before they disappear.  

While they aren't exactly the thing I had in mind, it's tough to argue with a dollar a shot.  How the heck can they make them that cheaply?

And, thanks for the link.
Logged

Trying to keep my house under control http://www.desert-home.com/

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 936
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, got a few of them on the way now (thanks again), so tell me more about your light switch.  I was thinking about using an actual wall switch and sampling the change when you flip the switch to trigger actions as well as over the air control.  The reason I'm looking at XBees is because I already understand them and have a working network doing other things around the house.  I like the idea of Jeenodes, but mesh networks are so darn cool.
Logged

Trying to keep my house under control http://www.desert-home.com/

California
Offline Offline
Faraday Member
**
Karma: 92
Posts: 3447
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, got a few of them on the way now (thanks again), so tell me more about your light switch.
This is the base unit that just has the Attiny84 and transceiver:


I made little shields for them too. This is the relay shield that goes into each light switch:


Right now, they are hooked up to the porch lights, and are driven by a battery powered light sensor:


I cannibalized one of those adapters for power to the relay units inside the light switches. At the moment, I don't have any way to physically turn them on and off, but that isn't too difficult to implement, just haven't gotten around to it

Quote
I like the idea of Jeenodes, but mesh networks are so darn cool.
I'm not sure I understand. JeeNodes (or anything based no the JeeLib library) can be set-up to work in a mesh network, too.
Logged

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

Holy Cow, that charger is only a buck right now.  I should pick up a bunch before they disappear.  

While they aren't exactly the thing I had in mind, it's tough to argue with a dollar a shot.  How the heck can they make them that cheaply?

And, thanks for the link.
Well if you look at the ratings on Amazon, you will see 1/3 of the people rate it at 1 star, and a lot of reviews say it doesn't charge this device or that one.  And given it presumably is taking the slow boat from China, you might want to think whether you want this particular charger.

When I got my Samsung phone, it had a similar form factor for its charger, and I really like the form factor, because I can use it on the normal powerstrip without having it interfering with cords plugged in the adjacent plugs.  However, given the number of negative reviews, I probably will pass on this particular item.
Logged

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 936
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Regarding the usb charger.  I already have one of them and it works really well for non-apple products.  I have a Motorola phone, a Kindle, a Sony camera that travel with me all the time and they all charge fine off the little thing.  However, Apple products are totally hit and miss.  See, the apple devices rely on certain voltages on the pins that are not power and ground to identify the charger as one of their own and refuse to charge from it.  Lady Ada did a great write up and video on this that you can find on her site (or google it).

After Arrch and pylon talked me into taking another look at USB chargers, and I noticed I could get these for a buck, I took the one I have in the house apart.  It is (as described) really small and should do the job for me.  I ordered twenty of them just in case a couple go belly up.  I took a look at the resistors they have between the pins (this is in reference to Lady Ada's findings) and I can see why Apple stuff doesn't like it.  I may research this more, but what I really want is 5V at a few hundred milliamps to power my device, and these things crank out almost an amp. 

Net, if you want it as a charger, it may not be the best choice, but as a tiny power supply.....you just can't beat a buck each.

Regarding Jeenodes:  Admittedly, it's been a couple of years since I looked at them closely, but back then I didn't see anything about it having advanced routing capabilities or store-forward for nodes that are out of range, that kind of thing.  They were, and certainly are now, clever little devices, but I already understand XBees and how to use them.  Plus, the price on XBees seems to be dropping over time, so I'll probably stick with them near term.

That is a totally cool light switch.  You are probably really proud of it, I know I would be.  I haven't gotten into the realm of creating my own circuit board for a device, I still wire the things to proto boards.  It works, but isn't the prettiest device on the block.  This light switch idea of mine may be the straw that gets me into trying a circuit board though.  I want at least a dozen of them around the house and wiring up silly proto boards in quantity sucks.
Logged

Trying to keep my house under control http://www.desert-home.com/

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 936
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So, I was still looking around at power supplies and happened to hit the right combination in google to turn up this:

http://www.sourcingmap.com/85v265v-input-3v10v-300ma-output-led-power-supply-modules-p-251010.html

Don't know anything about it other than what's in the ad, but it's worth trying one to see what it actually does.  So, between this possibility and the wall warts, I may have a start on this project.
Logged

Trying to keep my house under control http://www.desert-home.com/

California
Offline Offline
Faraday Member
**
Karma: 92
Posts: 3447
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Admittedly, I haven't messed around with Xbee too much, although I may have to if the prices are coming down. The hoperfs don't have the same software support, but in theory, you have more range with them.

The cheapo that I bought works fine. I don't doubt people have problems charging their phones with them, but I'm not charging a phone. It's been in my light switch for a year, and I haven't had an issue.
Logged

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 936
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I got my small supply of these little power supplies in, and surprise, every single freaking one of them works like a charm.  Nope, they don't want to power all the Apple devices.  You can get that annoying message, "Charging is not supported with this accessory", which is Appletalk for, "You didn't buy this from us and we're not going to let you use it."  This is analyzed deeply on the Lady Ada site at http://www.ladyada.net/make/mintyboost/icharge.html .

I took the one I already have open, hooked a couple of wires to the output, hooked another pair to a scavenged light cord, and wrapped it up with tape to keep me from grabbing the wrong thing.  This works fine as an Arduino power supply.  I'll be addressing mounting the weird form factor and figuring some way to mount it over time.  I still haven't given up my quest for the perfect little power supply; it annoys me that we have to power our projects from devices larger than the project itself.

Usual disclaimer:  This involves working with mains power directly.  It can kill you.  If you're not comfortable with higher voltages that can cause fires, severe shocks, and possibly death, ignore everything I said.
Logged

Trying to keep my house under control http://www.desert-home.com/

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 936
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, I'm back to the light switch itself.  I seem to have hit an impasse though.  The problem is that I can't tell if the light is on or off.

For example, I have a radio controlled SPDT relay to control the first light switch in a string of light switches.  Specifically a hallway where there is a hallway light switch outside each bedroom so when you leave the room in the dark you can turn on the hallway lights, then turn them off at the end of the hallway where you enter the rest of the house.  In the US, this means there are two SPDT switches, one at each end of the hall and the middle switches have a DPDT switch.  That way any switch can turn them on and any other can turn them back off.  Since DPDT relays over 10 amps cost a ton more than SPDT, I plan on replacing one of the end switches with a new device.

The problem is that either position on the SPDT switch will turn the lights on or off depending on what the state of the other switches is, so just knowing the position of the relay isn't enough to tell if the lights are on.  And, let's face it, it would be really nice to know if the lights are on.

Ideas??
Logged

Trying to keep my house under control http://www.desert-home.com/

New Jersey
Offline Offline
Faraday Member
**
Karma: 72
Posts: 3763
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One of those current sensors you used to monitor power utilization for the whole house?
Logged

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 936
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I thought about that, but the less expensive ones are too big to use for this, and the small (tiny) ones are too darn expensive.  I have to be able to fit in the same space as a normal light switch.
Logged

Trying to keep my house under control http://www.desert-home.com/

Pages: [1] 2   Go Up
Jump to: