Go Down

Topic: Use Arduino to switch 64 220v lights? (Read 4735 times) previous topic - next topic



I'm pretty new to Arduino. I'm working on an interactive lighting installation which will switch groups of ~12 cold cathode lights (64 groups in total). I have transformers for the cold cathodes (which require ~900V), so I just need to switch them on/off on the 220v side.

I'm realizing it may be easiest to get some kind of DMX512 unit and have that talk to the arduino (or maybe I can get a unit that interfaces directly with the computer?).

Anyway, just wondering if anyone would have some generic advice for switching 64 220V lines.




Mar 22, 2010, 03:19 pm Last Edit: Mar 22, 2010, 03:19 pm by MikMo Reason: 1
Since Arduino dosen't have 64 digital pins, you would need to have some extra hardware for that.

I would use 8 shiftregisters (check the playground for 74hc595 shiftregister use), that would gice you exactly the 64 outputs you need.

Then each shiftregister pin would need to drive a relay, but you need soemthing in between, probably a nice powerfull transistor and a diode to protect against backEMf from the relays.

It would probably be smart to build the setup in modules. Like each shiftregiste and the associated 8 relays + relay driver circutry as a module.

This setup would be very easy to control from Arduino, because all you would have to do is shift out 8 bytes (64 bits), each bit controlling one relay.

Look in the playground for info on how to use shiftregisters and relays.


Thanks MikMo,

That's helpful. Using these shift-register thingys to control the on/off sounds a lot cheaper than investing in DMX 512 equipment.

Do I have to be careful about what the phase of the 220v is when I switch it? I've read warning about this in other forums, but don't quite understand.

Also, can I get a relay that will control 220v directly from arduino voltage levels or do I need to "boost" it with another relay (in what I believe is called a darlington pair)? Or maybe these things already come with a darlington pair built in and all I have to do is connect it to the arduino. Still, this "phase crossing" thing probably still applies.



If you use solidstate relay's you might be able to get away without using extra hardware between the shiftregisters and relay, because some if not all use an opto isolator in the low voltage side of the relay. Also some solidstste relays have a zero crossing circuit in them that will only turn on the relay when the mains voltage passes 0 volts. This prevents large current spikes. Hope this helps


You may want to look into something like the Renard that's used for Xmas displays. I have 2 and they work great! Don't have all the dev time and there is PC software to control it.



Also, can I get a relay that will control 220v directly from arduino voltage levels or do I need to "boost" it with another relay (in what I believe is called a darlington pair)? Or maybe these things already come with a darlington pair built in and all I have to do is connect it to the arduino. Still, this "phase crossing" thing probably still applies.

You are confusing relays with transistors; transistors are used in Darlington pairs, not relays. However, I don't know of any low-current coil 5V relays that can switch 220VAC, but they may exist. I don't know if I would use them for a project like this, though.

I would stick with using solid-state relays for your project; keep them in a central box (closed, insulated, and safe from fingers), and lead the control wires away to connect to the Arduino. You will be messing with voltages and currents that can kill if you don't understand exactly what you are doing. Oh, and be sure to attach the solid-state relays to a suitable heatsink as well.

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.


Please be very, very careful...

The questions you are asking make it clear you are new to electronics. Mistakes with 5v can be bad news. Mistakes with 220v can be fatal.

One way forward would be to consult a professional electician, get him to do the "control the 220v" part, with low voltage control contacts brought out with which you can safely "play", and make mistakes without terrible consequences.

If the 64 220v bulbs are even mere 60 watt incandesants, that's still serious power... more than a 13 amp fuse can handle, if I've done the sum right. (Where 220v is common, it is also common to put fuses in the plugs of each appliance... and 13amps is the biggest used).

If you are dealing with little bulbs, then why not use low voltage bulbs, or LEDs, and greatly diminish the ways to kill yourself or others or burn down the house?


Thanks everyone so much for your advice.

I found part # Z900-ND on digikey which seems like it would do the job. But at $10 a pop, I'm wondering if I'm buying something too expensive. I don't have any experience with buying these things, so maybe someone would have a feeling as to what the rough cost of a relay should be.

Keep in mind that I need something that can supply about 1.5 Amps output current at 220v.

And thank you tkbyd for your precautionary exhortations. I intend to be very careful and never work on it while it's live. Anyone know of any online resources for 220v safety?



Each light is 220v at 1.5A? (330W)  if so then 64 of these is going to take you way outside of domestic wiring.  The main fuse to your home is likely rated at 100A. Even if you have a dedicated circuit for this. You're so close to the limit, with your project, that anyone turning on a kettle, hoover etc will pop the main fuse.  


Well, each light element is:
900-1000 V (from transformer which accepts 220v)
0.06        A (AC)
5-6         W
and I need to group them in sets of 18. So 0.06 * 18 = 1.08 Amps. I was rounding up to 1.5 A per set to give some overhead. So, really, 69.12 Amps for 64 groups of 18 lights each.


Wow 69 amps. This is way above any standard house wiring. If you intend to use this in your home you had better seek permission from the bill payer  ;).
Your calculation is based on everything on at the same time, if this is not going to happen you might get away with it.
I don't want to preach but as everyone has already said, you are dealing   with possible lethal voltages please be very very careful. Not only when working on the project but also when its turned on and fault finding, because it's very easy to see a problem and steam in to fix it and forget to turn it off. You are probably board of people going on about this but we all care about fellow hobbyists.


70 amps doesn't worry you?  to put it another way - ~£36 a day at an average kind of electricity cost here in the UK.


Well, it will only be "in use" about 8 hours a day. And of that 8 hours it will be mostly off (It comes partially on when interacted with via a camera monitoring a candle flame - inversely proportional to the brightness of the flame).

Candle on: no light
Candle unstable: some light
Candle off: full light.

Max will be 30 seconds at full blast (I'll have it cutoff in case someone turns it full-on and then walks away).

Fortunately, I'm not paying the electricity for this.


If you used LED light bulbs, you could upscale this:-


The LEDs are switched on and off so fast they appear on all the time to the human eye. So you are only every using the power of 1 bulb to light the whole lot.


Well, for this project I really need linear lights because the cold-cathode tubes will be in a 3D structure that will be suspended from the ceiling.

Go Up