My girlfriend and I had an idea for a project and I wanted to get a feel for how my current approach seems, if there are better alternatives, if this is feasible, and possible safety concerns.
The goal is to set up a clock that is comprised of 44 standard LED lightbulbs, each which runs at 1W at 120VAC. While not all would need to be switched individually, the logic roughly boils down to needing 32 switches or so I think. The requirements are basically to power the correct lights to correctly display the time.
I plan on using at least one Arduino Mega. I’m not too concerned about the software side, where once I have a given time to send I don’t think decoding which bulbs to switch will be too difficult. (except getting a reliable time to decode - I know nothing about how accurately I can measure time from an Arduino, so I may use an external clock signal?). The part I’m more naive about is the hardware and how to actually activate all these bulbs!
My current plan is to use mechanical relays or solid state relays for bulbs (or bulb sets that are always on/off together) which would be activated by current pulled from a transistor circuit that’s controlled from the Mega. I would probably use a 12V 2A power supply for powering the Mega w/ stepdown to 5-9V or so and the relay control circuits, then have the relays’ loads be plugged in parallel. 30+ relays in parallel feels super sketchy in terms of feasibility in real life, so I’m ready for this idea to be torn up haha
I haven’t done the detailed math out yet, but on paper this seems okay from a power standpoint to me. It would probably only be a few mA from the Arduino per relay, and I think most relays I’ve seen are ~20-30mA to turn on with 12V, so I could work those with a 12V 2A supply. Then the load on each relay would be pretty small since the bulbs are each only 1W, so if 120VAC is the voltage to work with, all 44 bulbs on is still < 500mA.
Does this sound feasible? Are there easier/better ways to do this? Anyone have safety tips for working with line voltages? Anyone work with minute by minute clocks with Arduinos?
Those kinds of LEDs need current limit control, which is basically a switching regulator per LED.
Doesn't matter if you have relays controlling the voltage into the constant current source or use transistors.
Example: PicoBuck LED Driver - COM-13705 - SparkFun Electronics
I offer a board with 96 channels on it, you could use that with a voltage divider per channel for the analog level to each board corresponding to 1W output.
The board is basically a Promini with 12 shift registers
ASmoulder3195:
The goal is to set up a clock that is comprised of 44 standard LED lightbulbs, each which runs at 1W at 120VAC.
That's the first thing you should address. Not only is 120V AC lethal, it's not easy to control. It's much easier and safer to use 12V DC LED bulbs. At 1W that's still just 83 mA per bulb, very easy to switch with a small transistor.
If you would use 5V LED bulbs you could power them directly through a TPIC6B595 shift register. It doesn't get easier than that. I suppose you can even use the board suggested in #1 with those shift registers instead of regular ones.
Or use 5V LEDs, like the individually addressable Neopixels. Use 2-4 of those to replace one 1W bulb.
I wouldn't use those constant current supplies, that's really adding up quickly at USD 14 a pop. Regular LEDs with current limiting resistor will do just fine for a tiny fraction of that price.
would probably use a 12V 2A power supply for powering the Mega w/ stepdown to 5-9V or so
Just get a 5V power supply for the thing, and connect it to the 5V pin. Much easier.
Anyone have safety tips for working with line voltages?
Sure: unless you really have to, just don't. In this case you really don't have to, it's just adding a whole lot of unnecessary complications and safety issues.
Na, don't be so picky! You just need to put a bit of inelligence in the starting circuit ... and there are uncounted numbers of students you can put on the task of building an automatic bulb-replacing-machine