[RobB's] house has no light switches

So [RobB] wanted to take out all the light switches in his house. His plan was to replace them with a system that could be operated from his smart phone. But his wife insisted that there still must be some way to control the lighting directly — we have to agree with her on that one. The solution was to develop a system that switches the lights via a touch sensor or by Bluetooth.

The touch part of the project is pretty easy. He coated the back of a blank outlet plate with tin foil and hooked it to a microcontroller with a couple of resistors. He’s using an ATtiny85, which can be programmed using Arduino sketches, so the software side is made easy by the CapSense Library. The chip also uses the software serial library to communicate with a Bluetooth module. You can see the result of both in the demo video after the break.

Of course you need to throw a relay in there to switch mains, and find a way to power the uC and Bluetooth module. [RobB] went with a tiny plug-in USB power converter and managed to fit everything in a single-gang switch.

Comments

  1. MrTaco says:

    But how do you power the touch panels when the power’s out!

  2. Matt says:

    This has always bothered me – when you have a switch that says either ‘on’ or ‘off’ does it mean you are going to change the state to whatever is written on the label, or is it it’s current state? I always think it should be the latter, but I see projects with both. What is everyone else’s thoughts?

    Btw, love the project. Just bought myself a house, might have to look into it a bit more :)

    • Mike Bradley says:

      same here!

      I dont recall what it was, but I was super frustrated, I didnt know if something was off, or if I was going to turn it off.

    • amsorisole says:

      Hi!

      Why don’t use a toggle button? ;)
      http://www.lucadentella.it/2012/06/26/btswitch/

    • MrTaco says:

      Hahaha, I’ve had those thoughts too. Don’t really have that problem with standard (Australian, at least) power switches, but I have wondered it with others at times.

      • RobB says:

        I agree. I settled for making the background represent the current state (white for on and black for off) and the word represent what clicking the button will do. I will probably replace with a “Toggle” and a little circle that represents if the light is currently on or off.

    • adcurtin says:

      Ah, welcome to the field of usability (human computer interaction).

      to me, it makes sense that buttons have labels for actions. So if you have an on button and an off button, the on button turns the light on, and the off button turns the light off.

      If you have a toggle switch, it makes sense to have it labelled for the current state / position.

      This project is a bastardization of both, and is rather confusing. Come on man, you’ve got a customizable touch screen, you can do better than that.

    • barryronaldo says:

      I’ve always thought the line/circle was rather confusing. “So, do you mean the line is solid for a connection or does the closed circle mimic a closed circuit?” Here I am 2 decades later and I still always pause for a second lol.

  3. deadlyfoez says:

    I have a feeling that a building inspector will complain about this setup as being a violation since there is no physical switch. Before going along and doing this idea I would first contact a building inspector and find out if it passes code before I get stuck having to revert all my hard work.

    • 0xfred says:

      This looks like a nice drop-in replacement for the switch. So why tell the inspector? And just swap it out if he’ll be making a visit. This is HACK a day, not “build something you could legally sell to the public” a day.

      • K!P says:

        only if you manage to burn the house down by doing it wrong it will create a slight insurance issue.

      • ElecEngineer says:

        Ah, but it is also something that is illegal to install in almost all jurisdictions in the US. It wouldnt be hard to do this right, and compliant. Most hackers who want to play with 120V power should really look into the NEC. The code is written with your long term safety in mind.

        Separation is required between mains and low voltage control per the NEC, which applies to all installations, not just commercial products.

        Also, that box is obviously overfilled.

        If there’s an incident, you can bet your insurance wont be paying for anything until you prove the work was done in accordance with the relevant codes.

    • RobB says:

      I plan to take my switches with me when I move :)

    • justice099 says:

      The only reason you would have to worry about what an inspector thinks is if you are planning to sell your home, or maybe getting a second mortgage. It is your home. You can do whatever you want to it. At least here in the states.

      An inspector doesn’t even have any business being in your home unless you invited him.

      • deadlyfoez says:

        ^^That is not true. Here in my city every building needs to be inspected every year regardless of it being an owner occupied residence, a business, or an apartment complex. And around here they are rather strict about the electrical and if someone doesn’t fix a violation then they get heavily fined.

        I bet the thing about this that would make them complain is if you walked into your residence at night during the winter and you still have your gloves on then you won’t be able to turn on the lights and thus making this become a fall hazard.

        Like I said, here they are very strict about things like this because all fires and injuries cost the state more money.

        Granted, I do think this is a cool idea, but I think it could be better designed using a 3 way switch so you can still use a real switch or your bluetooth phone.

      • asciimation says:

        I thought that was blood sucking, soulless vampires although having met a few building inspectors I can see why you might be confused.

      • justice099 says:

        Deadlyfoez, not sure where you live, but I would move if it were me. There is absolutely no reason to put up with that crap. Mandating that an inspector be allowed INTO your property to search your property just happens to be unconstitutional.

      • Whatnot says:

        So deadlyfoez, tell us more about life in north korea, we so seldomly meet someone who lives there.

      • deadlyfoez says:

        @justice099, I would assume it is probably because this city has a lot of slum lords with victims of fire, electrocution, lead poisoning, asbestos, etc.. with a huge amount of immigrants that don’t understand these things or how to report them. It really doesn’t seem that unordinary because I’ve had to deal with it every year for 13 years. Luckily the inspections have saved our family from becoming homeless due to dangerous electrical wiring.

        Around here though, the inspectors give you a month notice before they come. If they find a violation then they give you a month to fix it. If it is not fixed at that point then they give out the hefty fines and sometimes even condemn the building depending upon the severity.

        Generally, they only look for the obvious things like that the smoke detectors work and nothing obstructing any entry ways. They tend to only dig deeper if someone has voice a concern about something else that could be considered a safety hazard.

      • justice099 says:

        Well, it certainly wasn’t my intention to vere off-topic here, but it sounds like one of those cases where the government agency only has power because the people allow them to. The minute a sheep wakes up before getting to the shredder, this little program will be done. If you don’t believe me, try refusing to allow them in your home next time. There is absolutely nothing that they can do.

        Municipalities have a lot of leeway in the form of regulations, etc… but as I said, this particular activity just happens to be unconstituional on a federal level, which means the municipality is not legally authorized to have this power. Assuming you are talking about a U.S. State here, of course.

        However, there are many laws (crimes) the governments get away with simply because we allow them to.

      • Daniel says:

        My experience has been that you have to get a permit and inspection if you live in a city. This is especially true in cities on the east coast where the houses are attached. You won’t just burn your house down – you will burn down the adjacent houses as well.

  4. amsorisole says:

    Hi Matt,

    why don’t use a toggle button? ;)

    http://www.lucadentella.it/2012/06/26/btswitch/

  5. dphuk says:

    Very cool, I like it. I use X10 to control all my lighting at home but with momentary (door bell like) switches to control the lights with LW12\’s (some of them anyway, other rooms like passageways have no switches, but rooms like the lounge where you don\’t want a PIR turning the lights on during a film say do have), these can then be overridden by the x10 server (http://dave.harris.net/my-x10-setup/)

  6. 0xfred says:

    Nice. I’d really like to do something similar but have never found a good way to do so. My requirements:
    – Not having to rip up floorboards / ceilings to add additional wiring.
    – Being able to remove it if I move house (or it breaks).
    – Being able to read as well as set the light’s status.

    Maybe it’s a UK thing but the lack of a neutral in the switch is my stumbling block. There’s no power available to the device when the light is on, and you’d have to sneakily leak current through the light to power your circuit when the light is off.

    I’ve done something in my garage where I could easily do some rewiring, but can’t easily take it further.

    • dphuk says:

      X10 is very easy to retro fit, check it out

      • 0xfred says:

        X10 is a creaky old relic from the 90s and it needs a neutral connection. I’ve no desire to add those nasty bricks between an outlet and a lamp.

      • Oliver Heaviside says:

        Oxfred,

        X10 is much older than that… it predates 1978, and it was only after they got clever about marketing that it became a household name.

        It’s always sorta worked. However, their infatuation with spam and the pop-under/over revenge of the “website of no return” didn’t help the company much.

        The original circuits were 567 PLL detector driven audio, and kinda fragile. I eventually overcame my fear of line voltage and used surplus 15/20A contactor relays to power A/C circuits, driven by awful overkill heatsinked NPN transistors switched by 7400 TTL, and thence to awful overkill heatsinked SCRs driven by… it was a long time ago, I believe 8254 timers.

        Then one day I realized…that regular light switches and motion detectors were enough. Now I’m searching for an ancient toaster that doesn’t use electronics, because we really don’t need sophistication like that.

        Showers, however – well, everyone needs a little tech.

      • Chris C. says:

        I have a large X10 system. Which works very nicely after I replaced a string of fallible CM11A controllers (which are weak, lock up, and sometimes burn out) with a third-party XTB-232.

        As mentioned, some X10 modules sneak current through the attached load. Works fine with incandescent lights, transformers, and other inductive or motor-driven appliances.

        It does *not* work with CFLs, though. Or anything else that can requires a fairly high threshold voltage before it starts to turn on and pass current. You need the neutral connection then.

        X10 is indeed ancient. Both that, and an apparent surplus of new/used modules in the past, made it very inexpensive to build my large system. The surplus seems to be drying up though, and prices increasing; I just paid double what I typically have in the past to get some additional modules. So if I were to rebuild my system from scratch, I’d consider other options as well.

    • RobB says:

      I don’t know how UK power differs from the US, but the power supply is just in parallel with the light. The relay is in series with the light. Does this not work in the UK?

      • Abbott says:

        Theoretically, if you tap both sides of the switch, you should be able to get enough current flowing past the filament to power an MCU and a Bluetooth transceiver. When you switch the light on, you could either have had a battery charging off the leakage current or switch over to inductive power.

      • dtremit says:

        @RobB — nothing UK specific about it; he’s referring to something called a “switch leg.” The power feed goes to the light fixture, and then a two-conductor cable is run from the fixture to the switch. Since the switch is in series with the light fixture, there’s no source of power available in the switch box when the light is turned off.

  7. huh says:

    task killers are the worst thing to use on your phone. they kill batteries.

  8. RobB says:

    To be clear, only one light switch has been replaced so far. More hardware is on the way though :)

  9. Rob says:

    there is a growing concensus here in the US to make neutral available to switch circuits… I doubt it will make the NEC anytime soon, but 0xfred isn’t the only one lamenting the lack of it, apparently.

  10. electrician says:

    NEC 2011 404.2c requires neutrals in switch locations

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,468 other followers