3
\$\begingroup\$

My question: I'm installing an arduino behind a wall switch. The light switch only contains two wires. the hot/live wire and the wire going to the light fixture. There is no neutral in the wall socket.

Is there any way of powering the arduino off the cables present in the light switch?

I was hoping a transformer exists that can be powered by a single hot wire, perhaps with a capacitor at the neutral end? As it is AC, I imagine the capacitor would collect a charge during half the AC cycle, then be drained during the second half, resulting in a flow of charge through the transformer.

Or maybe some kind of induction from the hot wire? (I may be able to sleep the arduino for most of the time, bringing the normal current requirement down to a couple of mA.

Does such a thing exist? I don't want to build it myself, but was hoping such a thing existed that I could just connect to the hot wire in the switch, and get a low volt, low current supply for my electronics.

To summarize: I need a DC 5v, low amp supply in a location where there is one 220v wire with no neutral (just another wire going to the bulb).

Edit: I had a longer question explaining the scenario in more detail, but I have edited it. The following caveats exist:

  • Its a rented apartment. I can't drill holes in the wall to run a 5v DC line to the arduino.
  • The arduino will not be interacting/switching the AC power
  • The arduino needs to go behind the wall switch, I cannot put it elsewhere.

Edit 2: Attaching image enter image description here

Edit 3: Background info

This just explains why the arduino needs to be located at the light switch. Only read if you are interested in the reason for this.

I'm purchasing Lifx bulbs. They are smart bulbs that are placed in the regular light socket and can be controlled by an iPhone app.

For situations where I just want to quickly turn a light on/off (e.g.: running into a room to grab something) I would like to be able to use the light switch. You can do this with Lifx, but turning off the light switch will stop power to the smart bulb, which defeats the purpose of having these bulbs.

My solution to this is smart switches. I plan to install an arduino behind each light switch. On the back of the light switch cover I will use conductive paint to paint two squares, at the top and bottom of the switch. A small wire will then connect the conductive paint patches to pins on the arduino. I will use a capacitive sensing library for arduino to measure when the top or bottom of the light switch is tapped.

When the arduino detects a tap, it will send a signal, via WiFi to the smart bulb to change its configuration (brightness/colour).

This allows the light switches to remain intact and look exactly as they did before, without any destructive changes. This...

  • Keeps the girlfriend happy
  • Ensures the old light switches are still available in case of network outage
  • Does not damage or clutter the wall by adding another controller (eg: sticking an RF remote of some kind to send signals to the bulbs via a control box)
  • Ensures no problem with yearly apartment inspections, as there is no visible change
  • Can be completely removed with no evidence of the installation when I move out in a few years. (except the paint on the back side of the light switch plate, which is not visible under normal circumstances).
  • Allows gestures to be easily coded into the switch. For example, tap the top of the switch to turn on/off. Tap bottom of switch to turn light at 50% brightness, double tap for a soft yellow light, etc...
\$\endgroup\$
  • \$\begingroup\$ It's a long question and I was beginning to lose the will to live at the end. Are you trying to find a way of powering an arduino via a transformer with or without a cap in series with it? \$\endgroup\$ – Andy aka Jun 6 '13 at 9:27
  • \$\begingroup\$ Sorry about that, I did end up rambling! I've edited the question. I need to power an arduino in a location where there is only a 220V live cable, and the cable going to the light fixture. No neutral/earth nearby. \$\endgroup\$ – Dermot Jun 6 '13 at 9:53
  • \$\begingroup\$ The "other" wire I'm presuming is connected to the lamp therefore it could "collect" a few milli-amps through the lamp. I can see a way for this working on conventional lamps but I don't know if there is a way of collecting a bit of current thru a modern low-power lamp. Maybe someone has thoughts? \$\endgroup\$ – Andy aka Jun 6 '13 at 9:58
  • \$\begingroup\$ Please share a sketch of the wiring that exists, as you understand it. Does the Arduino need to be powered when the light is off, or when it is on, or both? \$\endgroup\$ – Anindo Ghosh Jun 6 '13 at 11:04
  • \$\begingroup\$ Sketch added as requested. Arduino needs to be always powered. \$\endgroup\$ – Dermot Jun 6 '13 at 11:27
2
\$\begingroup\$

Why not consider placing your small Arduino board and its power source in the electrical box where the light bulb is located?

From your diagram it appears that the powered 220VAC feed and return line are both in the electrical box at the light fixture.

Edit to Add an Alternate Idea to try out. There is too little data regarding the Lifx bulb to know if this is even feasible at all. So you would have to simply try it.

The idea is to remove the wall switch from the AC circuit and instead wire it into the MCU board. Then wire a small transformer across the AC lines that come to the switch box. This would likely have a low turns ratio and would operate off the current that passes through the special LED bulb unit. An AC power converter on the other side of the transformer would convert AC to DC power.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ I've edited the question to include the reason why this cannot be done. \$\endgroup\$ – Dermot Jun 7 '13 at 2:02
  • 1
    \$\begingroup\$ Well, As you have probably already gotten the idea from reading the other comments and answers here, you are at a fundamental stumbling block here. You will need access to the neutral wire to be able to access power for your board with its touch sensor circuits and WiFi transmission capability. I have edited a possible idea diagram into my answer above that you could investigate. It may take some expirimentation to see if the Lifx bulb will pass enough current to make this work at all. Remember that the Lifx bulb will pass more current when it is fully on as opposed to when off. \$\endgroup\$ – Michael Karas Jun 7 '13 at 3:16
  • \$\begingroup\$ Yes! this is what I was hoping for. So, if the bulb and transformer are wired in series, does this mean they only receive 120VAC each now? This may be ok. The Lifx bulb can accept voltages between 110v & 240v. If I use a transformer + rectifier with a wide voltage regulator on the arduino, this could potentially work. Other than transformer/rectifier heating, and obvious precautions during installation, are there any dangers to this approach? \$\endgroup\$ – Dermot Jun 7 '13 at 4:46
  • \$\begingroup\$ @Dermot - Do not get too excited till you try it out. When the Lifx bulb is in the OFF state it may pass so little current that there is no hope of capturing enough energy to power up the MCU subsystem. The transformer and light unit will each drop some share of the AC power voltage. The ratio is very unlikely to end up being 0.5 to 0.5. The voltage drop across the transformer is going to be dependant upon what impedance the transformer primary presents to the series connection as compared to the light assembly. \$\endgroup\$ – Michael Karas Jun 7 '13 at 5:33
  • \$\begingroup\$ @Dermot - Do not expect a solution to just drop out of this discussion onto the table as a clean cut idea. It is going to take a great deal of experimentation and data measurement to come close to drawing any conclusion on feasibility. Regarding safety - The transformer does offer isolation from the AC line so that is a good thing as long as it has the proper input to output voltage standoff rating. \$\endgroup\$ – Michael Karas Jun 7 '13 at 5:41
1
\$\begingroup\$

I think your fundamental problem is that you need to be in parallel with your light fixture to power the arduino in any reasonable way. Like Phil said its pretty difficult to distribute power when everything is in series. So it seems like your not going to be able to stick your arduino behind the switch! That being said, you will probably have to put your arduino somewhere else (another outlet, the light fixture, ...).

So how I would proceed from here if I really wanted to control my lights in a more direct way than an iphone. I would basically use something very low power for the switch part, and then wirelessly relay commands to the arduino which would be powered off a wall outlet. I would probably put IR transmitter (IR remotes would be really cheap on ebay) then put them in a little nice box and wire up a nice switch to a button. I would use a different button for each room switch, and then have the arduino decode these messages via a little IR reciever/demodulator. You might have to have many arduinos to keep line of sight, but you already seemed prepared to do that. Its just a possible suggestion for how to go on, this way would have a different set of pros and cons. I can see some neat ways of making things more interesting, like pressing the remote multiple times in a row to change brightness, or using some interesting type of switch to make things more fun (like Big red button, probably also cheap on ebay) enter image description here

\$\endgroup\$
  • \$\begingroup\$ I've already looked at this approach. I considered using an RFDuino with two AAA batteries in a hollow switch plate stuck to the wall. Sleeping the arduino to ultra-low power and only waking it up for a few seconds via an interrupt when a button pressed. I'm not sure how good my skills would be to get the power low enough. Plus Id need to invest in an iPod touch to talk to RFDuino via Bluetooth low energy. All this sleeping and relaying via another device would increase the lag between hitting the switch and the bulb reacting. I may need to investigate other options for getting DC to switch... \$\endgroup\$ – Dermot Jun 7 '13 at 5:11
1
\$\begingroup\$

" the other wire is connected to neutral through the lamp filament."

But remember, something like LiFX is not a simple lamp filament with a little resistance - it's active electronics. It is itself an off-line SMPS with microcontroller, 802.11, 802.15 radios and PWM power LED drivers behind it.

\$\endgroup\$
1
\$\begingroup\$

Smart switches which can operate in series with lamp filaments without requiring a separate neutral feed have existed for decades. Essentially they have two switching elements with three states:

  1. They may place their low-voltage electronics in series with some resistance and the load. This is best done during the portion of the AC cycle when voltage is at its minimum.

  2. They may disconnect the load, running off power stored in their filter caps.

  3. They may short the line and load, again running off power stored in their filter caps.

Such designs waste some power when the lamp is supposed to be "off", and don't give full power to the lamp when it's supposed to be "on", but since all current is drawn when the line voltage is near minimum the overall power consumption is pretty small either way.

On the other hand, I really would not recommend trying to design such a device yourself. A device in series with a 100W light bulb probably won't explode up quite as dramatically as one which sits directly across the mains, but it could still easily fail in such a fashion as to continuously generate more than 25W of heat, which in a confined space could easily start a fire. Further, while such devices work well with incandescent lamps they may behave poorly with other kinds.

\$\endgroup\$
0
\$\begingroup\$

Electrical power, in general, can not effectively be distributed with just one wire. Were that possible, you can be sure there would be only one wire running to all the electrical devices in your house to save cost.

The reason: electrical power (the rate of usage or conversion of energy) is the product of current and voltage:

$$ P = IE $$

But with only one conductor, there's no other point relative to which to have a difference in voltage. Here's an analogy: you can't stretch a rubber band with a bullet unless you can attach one end of the band to something that's not moving with the bullet.

There is a thing you can buy that can generate (a little) electrical power from a single conductor with AC current flowing in it: the current transformer. These exploit electromagnetic induction to generate a voltage proportional to the rate of change of current in a conductor. However, the amount of power extracted by these devices will not be enough to power your Arduino. And, they only work when there is current in the wire, ie, when the lamp is on.

Any other tricks I can think of involve building something, modifications to the wiring, or significant shock hazard. Since you explicitly said you don't want to build something, I'll leave it at that.

\$\endgroup\$
  • \$\begingroup\$ he has two wires; the other wire is connected to neutral through the lamp filament. You could conceivably draw a small amount of power through this, and larger amounts if you duty-cycled to keep the lamp filament from appearing lit. This isn't something you can easily do, and certainly not without some expertise. \$\endgroup\$ – akohlsmith Jun 6 '13 at 11:56
  • 1
    \$\begingroup\$ @AndrewKohlsmith also, while this would work OK for lamps with filaments, it may cause the modern (LED/CFL) lamps to blink (enough current to slowly charge the capacitors of the lamp, which then turns on, discharges the cap and turns off). \$\endgroup\$ – Pentium100 Jun 6 '13 at 12:49
0
\$\begingroup\$

Idea 1: Consider while the light circuit is ON then a transformer circuit could charge a rechargeable battery - this rechargeable battery would then power the arduino even while the main light circuit was off. (You might have to open up a bigger space behind the light switch.)

Idea 2: However, it could be easier to attach a 'box' via a magnet to the existing light switch (or near by). This box contains the ardunio and a rechargeable battery and a low volt detector red led (to indicate when the battery needs recharging). Then have a second identical device sitting in a zero insertion force cradle being recharged). Then when a low volt red led is seen - simply swap both units. (Once per 3 months would be fine.) These switches should work better than those 'Hue' switches.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.