Newbie here!I want to make a "lamp" controlling 64 60w regular bulbs individualy

Hello!
I'm a photographer who needs to blink 64 lightbulbs individually for a test project. I have a few questions:

I know that a 60w bulb uses AC(yes, i know that leds are better, but it's a feature in the picture), and i need to use relays. I'm currently considering buying 4 16ch relay boards from aliexpress. (like this 16 Channel Relay Shield Module DC 5V 12V 24V with Optocoupler LM2576 Microcontrollers Interface Power Relay For Arduino DIY Kit|Relays| - AliExpress)
Is this a valid idea?

Since the mighty Mega "only" has 54 ports, I would probably need some sort of a multiplexer, to get the controlling signal to the relays. Or do I need a step register? How does a board like this work, does it need a continuous high signal for the relays to stay open, or does it switch with a pulse. What can I read on this subject?

What kind of Arduino should i get for this project? I might have a Nano somewhere.

(BTW First Arduino project, sorry if I'm dumb.)

(BTW First Arduino project, sorry if I'm dumb.)

I don't consider any of your questions dumb, perfectly reasonable for a beginner. However, I do think it dumb for someone with no electrical experience to be working with mains electricity, that is a recipe for serious injury, fire or death.

Anyway, sorry, welcome.

Seriously, unless you know more about electricity than you have stated or have some who does to supervise you I suggest that it would be unwise to continue with your project until you understand the dangers and how to mitigate them.

For the bulbs you may want to add a "soft start" circuit to prevent premature burn out from frequent switching.
For the relays (SSR?) you may want to use 74'595 shift registers.

This post shows you how to demultiplex with a shift register.

If you turn on all of the lamps at once you'll probably blow a circuit breaker. Make sure all of your wiring can handle the current.

does it need a continuous high signal for the relays to stay open, or does it switch with a pulse.

You need a continuous signal (but if you use a shift register the shift register holds the state).

You may want to use these i2c digital IO modules:
PCF8574 I2C Interface 8-bit IO Expansion Board
you can just daisy chain-them and control everything from the two SCL SDA IO of any Arduino.
It will also dramatically simplify your wiring to the relay modules.

But you could probably get faster to your goal upon renting a DMX light controller from any stage supply rental store. You could get a nice price since thy are idle anyhow.

It is safer and you don't need to fiddle with AC voltage.

64 x 60 Watt light bulbs requires a 4000 Watt installation, absolute minimum.

That exceeds the capability of standard single phase 120VAC household wiring by at least a factor of 2.

Don't forget that incandescent bulbs have turn-on surge current several times higher than the steady state current draw.

you can use the MEGA ADC pins as outputs.

however, each relay will require about 20mA so your current use either as source or drain has to be carefully evaluated.
using half as source 32 x 20mA - 640, so you are well past the limit for direct control. as others have said, using a shift register or some such means you can use a NANO. you only need the SPI bus to be connected for your 64 pins.
it will be loud. relays click. 64 relays will be a loud click.

60 watts / 120 volts = 1/2 amp. in the US, you are limited to a MAX of 16 amps on a 20 amp rated circuit breaker.
so, if you used 32 lamps per circuit on 2 separate circuits, you would be at the limit for continuous operation. Since will be flashing them off and on, you are going to be in that gray area.

If this were my project, I would wire up 8 common duplex receptacles in a box, 4 of those and Bob’s your uncle.
putting all the AC into a box means nothing exposed.

jremington:
That exceeds the capability of standard single phase 120VAC household wiring

Your "standard" makes laugh the rest of the world, having got 240V since WW2 at least as standard.
:smiley:

dave-in-nj:
however, each relay will require about 20mA so your current use either as source or drain has to be carefully evaluated.

No. The cheap 16 chanel relay modules he had ordered already provide their own drivers, even opto-coupled interface.

First of all, thank you for replying so fast.
I had some time to think about everything today and I have one more question:
Can I link 8 74HC595s after eachother?
Is there a limit?

DVDdoug:
This post shows you how to demultiplex with a shift register.

If you turn on all of the lamps at once you'll probably blow a circuit breaker. Make sure all of your wiring can handle the current.
You need a continuous signal (but if you use a shift register the shift register holds the state).

-Thank you, I read it, it was very informative.

jremington:
64 x 60 Watt light bulbs requires a 4000 Watt installation, absolute minimum.

That exceeds the capability of standard single phase 120VAC household wiring by at least a factor of 2.

Don't forget that incandescent bulbs have turn-on surge current several times higher than the steady state current draw.

I have a free 230V 20A circuit breaker, I hope that it will be enough. If necessary, i can use 4,4kW generator too.
If everythink turns out okay, i might want to use the lamp on remote locations, so only a generator. Is this a realistic goal? Do you think that with limiting the number of switches/sec its doable?

dave-in-nj:
it will be loud. relays click. 64 relays will be a loud click.

Some noise is ok, it will even be beneficial for the test.

RIN67630:
You may want to use these i2c digital IO modules:
PCF8574 I2C Interface 8-bit IO Expansion Board

I'm plannig on using the 8 74HC595 and print PCB for it. I'm would like use dsubs to connect the PCB to the relay boards, to help with the whole cabeling situation. That might be a bit durable solution, or should I use these anyway?

PerryBebbington:
I don't consider any of your questions dumb, perfectly reasonable for a beginner. However, I do think it dumb for someone with no electrical experience to be working with mains electricity, that is a recipe for serious injury, fire or death.

Your concerns are noted. You are probably saving lifes.
I spent 2 painful years failing to become an electrical engineer, and for the last 5 years i've been a technician. Now I don't know if this qualifies as experience in your book, but if I die from a project like this, I'm completely fine with that at this point. :smiley:

Your concerns are noted. You are probably saving lifes.
I spent 2 painful years failing to become an electrical engineer, and for the last 5 years i've been a technician. Now I don't know if this qualifies as experience in your book, but if I die from a project like this, I'm completely fine with that at this point.

Thank you. Your subsequent posts suggest that maybe in your case my concern was misplaced. My concern for electrical safety goes beyond the person asking for help because this is a public forum and anyone can read it. You might well know what you are doing, but the next person reading it might not.

Good luck with your project.

I think I would led light bulbs to cut down the power and heat . They will also stand being turned on and off better than a filament bulb .

I guess the question is why do you want to do this ? It’s a very large and costly installation

I have a free 230V 20A circuit breaker,

Great! 64 x 230VAC 60 W incandescent bulbs will instantly overload a 20A breaker, if turned on all at once.

hammy:
I think I would led light bulbs to cut down the power and heat . They will also stand being turned on and off better than a filament bulb .

I guess the question is why do you want to do this ? It’s a very large and costly installation

Yeah, it won't be cheap, but using LED bulbs would even more expensive. Also, i like the way they look.
I'm testing out an idea to visualise music.

jremington:
Great! 64 x 230VAC 60 W incandescent bulbs will instantly overload a 20A breaker, if turned on all at once.

Damn. I think 40W bulbs would work too.
Also, I dont want to switch them all on at the same time. With some delay in the code i think this can be managed. I will run some tests it the next few days to see how many simultaneous switches will overload the breaker. If anyone has some generic information about the power consumption of a Tungsten bulb warming up, i would really like to see it.

I'm also slightly worried about the bulbs burning out fast from the switching, but we will have to see. I will order some spares.

jremington:
Great! 64 x 230VAC 60 W incandescent bulbs will instantly overload a 20A breaker, if turned on all at once.

Easy: don't turn all lamps at once.
Even easier: forget all that stuff and rent a DMX light controller They are built for that.

To determine the peak inrush current of an incandescent bulb, measure its resistance when cold. Divide the peak AC voltage (1.4 times the rms voltage) by that value in ohms to get the instantaneous turn on current.

Example: for a Philips Clear A15 120V, 40W incandescent bulb (used in kitchen appliances) I measure 23 Ohms.

The peak voltage of a 120 VAC circuit is 168V, so the instantaneous peak inrush current could be as high as 168/23 = 7 Amperes, for one bulb.

It would likely be about half that for a 230V 40W bulb.

"Since the mighty Mega “only” has 54 ports, " Incorrect, it has 70. A0 to A15 are digita ports that also connect to the analog input multiplexer.

And you can switch to Mega with all 86 IO broken out as another option.

TPIC6B595 woud be a better choice for driving relays. Do the relay modules need a LOW input signal to turn on? I think many do. 74HC595 is only rated for 70mA total current, so 8-9mA per output. TPIC6B595 can sink 150mA per output.
They are both the same operationally, only one has much better output for sinking current.

I offer a board that will hold up to 12 of them, and it has a 328P processor. Plug on an FTDI Basic and program it like any other Uno/Promini. Uses SPI.transfer() to send to data to the shift registers.
Manipulate your 64 bits in an 8-byte array, and send it out when there is a change

if (updateNeeded == true){
updateNeeded = false; // clear flag
digitalWrite (ssPin, LOW);
for (x = 0; x <8; x=x+1){ // send 8 bytes of data out, dataArray[0] to dataArray[7]
SPI.transfer(dataArray[x]);
}
digitalWrite (ssPin, HIGH);

How spread out are the lights? 64 bulbs will be pretty darn bright.

Controlling 64 bulbs is quite a task. Using the 16 ch boards will provide some benefits over the shift registers.

Far as i understand using shift registers you will have tonns of addresses that will differ by only one digit which might make the code a bit confusing. Shift registers have small current limits so u might fry some while learning how to wire it all. Its definitely feasable.

That board one poster put on looks like it might have what you need built into it. I would look at that board vs the 16 ch boards your thinking about and weigh your options.