# Marquee light clock

Hi all,

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?

Thanks for all thoughts in advance!

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

Add a Ds3234 or Ds3231 for accurate time keeping, or use the '328P itself with a simple program. The Ds323x have the advantage of battery backed time.

``````unsigned long currentMicros;
unsigned long previousMicros;
unsigned long elapsedTime;

// Initial time to start, adjust as needed.

byte hundredths;
byte tenths;
byte oldTenths;
byte secondsOnes = 0;
byte oldSecondsOnes;
byte secondsTens = 0;
byte minutesOnes = 2;
byte minutesTens = 3;
byte hoursOnes = 4;
byte hoursTens = 0;

void setup() {

Serial.begin(115200); // make serial monitor match
Serial.println ("Setup Done");
}

void loop() {

currentMicros = micros();

// how long's it been?
elapsedTime = currentMicros - previousMicros;
if ( elapsedTime >= 10000UL) { // 0.01 second passed? Update the timers
previousMicros  = previousMicros + 10000UL;

hundredths = hundredths + 1; // increment
if (hundredths >= 10) {
hundredths = 0; // else rollover and increment next digit

tenths = tenths + 1;
if (tenths >= 10) {
tenths = 0;
secondsOnes = secondsOnes + 1;
if (secondsOnes >= 10) {
secondsOnes = 0;
secondsTens = secondsTens + 1;
if (secondsTens >= 6) {
secondsTens = 0;
minutesOnes = minutesOnes + 1;
if (minutesOnes >= 10) {
minutesOnes = 0;
minutesTens = minutesTens + 1;
if (minutesTens >= 6 ) {
minutesTens = 0;
hoursOnes = hoursOnes + 1;
if ((hoursTens == 2) && (hoursOnes == 4)) {
hoursOnes = 0;
hoursTens = 0;
}// hours total rollover check
if (hoursOnes >= 10) {
hoursOnes = 0;
hoursTens = hoursTens  + 1;
} // hoursOnes rollover check
} // minutesTens rollover check
} // minutesOnes rollover check
} // secondsTens rollover check
} // secondsOnes rollover check
} // tenths rollover check
} // hundredths rollover check
}// hundredths passing check

if (oldTenths != tenths) { // show the elapsed time
oldTenths = tenths;
Serial.print(hoursTens);
Serial.print(hoursOnes);
Serial.print(":");
Serial.print(minutesTens);
Serial.print(minutesOnes);
Serial.print(":");
Serial.print(secondsTens);
Serial.print(secondsOnes);
Serial.print(".");
Serial.println (tenths);

} // end one second check

} // end loop
``````

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.

Arc lamps are way cooler than simple bulbs: https://upload.wikimedia.org/wikipedia/commons/9/96/Xenon_short-arc_bulb.jpg. Just immagine that thing light up all 44 bulbs ...

zwieblum:
Arc lamps are way cooler than simple bulbs: https://upload.wikimedia.org/wikipedia/commons/9/96/Xenon_short-arc_bulb.jpg. Just imagine that thing light up all 44 bulbs ...

Yes, cute idea but - he is talking about a clock display on which the seconds digit changes - every second - and the other digits not quite as often.

Sorry, forget arc lamps!

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