Controlling Lightbulbs with an Arduino?

I'm looking to control a set of Lightbulbs (49 to be exact) individually using my ardunio. I've heard that to do this, using a relay circuit would be the best. I've got 2 questions:

Can someone expand on how I use relays with my Arduino please?


Can I use a TLC5940 chip to control the relays?

Can I use a TLC5940 chip to control the relays?

Not really this chip is for PWM control you don't want to do that with a relay.

how I use relays with my Arduino

See half way down:-


Do you know of a way to control a lot of relays with 1 arduino? A solution like the tlc5940 chip would be best as its easy to implement, but I'm not afraid to try something a little more complicated.

here is a relay from sparkfun:

read the scematic, it may give you some hints? if you use a IO drive a large fan-out buffer, then drive a lot of 2N3904 & relays. Depends on how many relays you want to drive, maybe the buffer is not needed.

Im not awfully adept at using my arduino yet... what does all that mean... lol

So i get that board and by the looks of it, it has 4 relays on it.. and I need to control 49 separate light-bulbs individually, do I need to buy 12 of these boards?


Edit: Are there any particular relays which are best suited to controlling lighting circuits? or best suited for the arduino to control?

As Grumpy said the 5940 is not well suited to drive relays. You can use a bunch of 595 shift registers, check the palyground for examples.

These are less expensive:-

You'll only need 6 of these if you don't mind 48 instead of 49.

I've made several purchases from anykits and they are trustworthy.

You'll also need 6 x 74hc595's.

What I'd suggest you do is begin in small steps.

  • Learn how to program a few LED's using Arduino's digital outs
  • Learn how to control 8 LEDs using a 74HC595
  • Buy a single 8 channel relay board.
  • Test 8 light bulbs.

Once your comfortable controlling 8, then you'd have the option of buying more boards, or designing your own custom controller.

Its taken me a while to come to grips with how this works, but yea this looks to be the best way. thanks for the help!

I used this board from FutureLec in a recent show I had:

I had six board (24 lights) controlled by 24 Sharp IR sensors. I ended up using the Wiring board because it had more pins/memory but still had to multiplex the sensors.

The FutureLec boards worked well - and seemed worth the $25. (fwiw - buy extras of whatever you go with in case you blow one out - as I did)