Giant Digital Clock

Dear All

I want to build a giant digital clock with 6 digits: HH:MM:SS

Hours: Minutes:Seconds

The clock data to be fetched through the internet via wifi

LED strips formed as squared 8’s will form the clock. approximately 50cm length of each strip.

I have zero coding skills

and wondered if anyone could guide me in:

Choosing Arduino board
Coding
Connecting the Arduino board with the LED strips

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you tell us your electronics, programming, Arduino, hardware experience?
Ops Pic.

Thanks.. Tom.... :slight_smile:

Google Arfuino clock and read up on it

Google arduino score board and see how to light numbers
Make a small one to make sure it works

TomGeorge:
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

I have my doubts if Rakhsh has already written a line of code. From his / her post, there is no baord yet :wink:

Rakhsh:
and wondered if anyone could guide me in:

Choosing Arduino board
Coding
Connecting the Arduino board with the LED strips

Hey Guys,

Thanks for introducing me to the article i will look it through straight away.

I do not have any experience at coding at all!

dave-in-nj:
Google Arfuino clock and read up on it

Google arduino score board and see how to light numbers
Make a small one to make sure it works

Yes thats a real good idea!

dave-in-nj:
Google Arfuino clock and read up on it

Google arduino score board and see how to light numbers
Make a small one to make sure it works

Okay so i did a little reading and found an article that deals with it:

Sole difference is he only uses 4 digits.

I just cant figure out which Arduino board i should get for my project?

Instructables should be named Maybes but that doesn't mean all the projects are iffy.

Search the Arduino forum for similar projects that have SOLVED in the title.
There is a ton of clock code and led strip code (I would go with EL ribbon, it's wider.) right on this forum.

Rakhsh:
Okay so i did a little reading and found an article that deals with it:

https://www.instructables.com/id/Big-auto-dim-room-clock-using-arduino-and-WS2811/

Sole difference is he only uses 4 digits.

I just cant figure out which Arduino board i should get for my project?

Just about any Arduino will work for what you have in mind. My advice is to get an Uno to learn with, because it's big and uses standard wires to hook stuff up, plus it allows you to power it in many ways. For your final project, a smaller, specialized board, with on-board WiFi could simplify your device. Consider how youintend to power everything. That will probably be more challenging than the coding.

You have 42 segments (6 x 7). The Arduino Mega 2560 has 54 digital I/O pins so that's no problem.

This light strip at 5 meters for $11 would probably work (get 5 for 25 meters):
https://www.amazon.com/Flexible-Lights-Waterproof-Strips-16-4ft/dp/B01J77LIL6/ref=asc_df_B01J77LIL6/
60 LEDs per meter. 12 Volts. 11 Watts per meter. About 460 mA per segment. Almost 20 AMPS for 42 segments.

Each segment has a voltage and current requirement. Assuming that the voltage is above 5V or the current is above 20 milliamps (0.020 Amps) you will need a logic-level N-Channel MOSFET to drive each segment. You will need a resistor of about 220 Ohms between the Arduino output pin and the gate pin of the MOSFET.

Connect 42 MOSFETs to 42 pins and each MOSFET between the negative side of a segment and Ground (the negative side of the power supply). The positive side of each segment goes to the positive side of the power supply. I think these MOSFETs (50 for $7.99) will work:
https://www.amazon.com/McIgIcM-2n7000-n-channel-transistor-assortment/dp/B07BKX255D/ref=sr_1_1_sspa

Get a power supply somewhat larger than the 20 Amps required. Say, 25 Amps. At 12V that is 300 Watts. Something like this one:
https://www.amazon.com/Rextin-Regulated-Transformer-Supply-Driver/dp/B06Y21KB96/ref=sr_1_3

The rest is all programming. Perhaps start with a 6x7 array of pin numbers.

if we assume that GIANT means 2.5 meters tall
then each segment should be 1.2 meters tall, or 4ft per segment, 8 feet for each letter.

so, that is roughly 168 feet of lights.

should be fun.

also, you can flash them multiple times a second.

The 2N7000 is good for 350mA max continuous load. I got a bunch a couple years ago at 50 for $5.

When I needed > 2A I found IRLZ44N's, 60 for $10 on eBay. They can carry > 10A.

Both are TTL level FETs. The resistor between pin and gate is there to protect the pin, FETs have a charge capacity to fill that could drain > 40mA pin max for a -very- brief but damaging time.

I am working on a similar project. But my digits are not "giant". They are around 200mm high and made of white led strips. I am using only 4 digits.

I am using a Wemos mini and a TPIC6B595 to drive each digit. The tpic chips can sink up to 150mA per channel, so I guess this would be ok for digits up to around 700mm high, assuming the strip had 60 LEDs let metre.

The TPIC6A595 chip can handle to to 250mA per channel, so digits up to 1200mm should be possible.

dave-in-nj:
if we assume that GIANT means 2.5 meters tall

Why would we assume that when the OP said "approximately 50cm length of each strip.". :-/
I think the desired size is is 1 meter tall and somewhat over 3 meters wide.

GoForSmoke:
The 2N7000 is good for 350mA max continuous load. I got a bunch a couple years ago at 50 for $5.

When I needed > 2A I found IRLZ44N's, 60 for $10 on eBay. They can carry > 10A.

I didn't notice the current limitation. Since each segment (for that particular light strip) needs about 460 mA the larger IRLZ44N style would be a better choice. Looks like about $0.15 each is a typical price on eBay.

PaulRB:
I am using a Wemos mini and a TPIC6B595 to drive each digit. The tpic chips can sink up to 150mA per channel, so I guess this would be ok for digits up to around 700mm high, assuming the strip had 60 LEDs let metre.

Six TPIC6B595 and a WeMos (to get NTP time off the internet) would be a good solution.
But how did you solve the logic difference for the three control lines. The TPIC is a 5volt only device.

Constructing a giant clock controlled with a WiFi device would be a giant step for a newbie.
I think OP could be biting off more than he currently can chew.
Leo..

Edit: just found the logic switchpoints in the datasheet at 0.15 and 0.85volt.

johnwasser:
I didn't notice the current limitation. Since each segment (for that particular light strip) needs about 460 mA the larger IRLZ44N style would be a better choice. Looks like about $0.15 each is a typical price on eBay.

I bought both is how I knew it off the top there.

When I was shopping I also saw TTL FETs that ran around $1 each, even bought $10 worth of 80 cent FETs that I doubt will suit my needs any better than the IRLZ FETs. You can pay more than for what you get. Caveat Emptor, shop before you buy!

Wawa:
Constructing a giant clock controlled with a WiFi device would be a giant step for a newbie.
I think OP could be biting off more than he currently can chew.

Baby steps.

First, make sure you can control one LED. For example, have it turn on during the odd-numbered seconds, and off during the even-numbered seconds. You don't need to worry about precise WiFi timekeeping just yet.

Of course, in order to do anything based on the seconds, you will need some way of getting at the seconds, and so here is an example sketch I wrote to do just that:

// how_long_running_serial.ino
// by odometer  2018-12-17

// This sketch answers the question: "How long have I been running?"
// The answer is shown on the Serial monitor

#include <LiquidCrystal.h>

// declare and initialize variables
int nowDays    = 0; // "days" part of elapsed time
int nowHours   = 0; // "hours" part of elapsed time
int nowMinutes = 0; // "minutes" part of elapsed time
int nowSeconds = 0; // "seconds" part of elapsed time
int nowTenths  = 0; // "tenths of seconds" part of elapsed time
unsigned long microsAtLastTenth = 0UL; // value of micros() at most recent 1/10 second

// a pretty important constant
const unsigned long MICROS_PER_TENTH = 100000UL; // number of microseconds per 1/10 second

void setup() {
  // prepare Serial for use
  // Note: the Serial monitor baud rate MUST match the number in the parentheses 
  Serial.begin(115200);
 
  // show the time (which at this point will be all zeros) on the Serial monitor
  showTimeOnSerial(); 
}

void loop() {
 
  // check if it is time for the clock to advance
  if ((micros() - microsAtLastTenth) >= MICROS_PER_TENTH) {
   
    // make the clock advance 1/10 of a second
    nowTenths++;
   
    // make sure that the next advance happens exactly when it is due
    // (they should happen exactly at intervals of 1/10 of a second)
    microsAtLastTenth += MICROS_PER_TENTH;
   
    // our clock needs to do more than count tenths of seconds
    // it also needs to count whole seconds, and minutes, and hours, and days
    // so let's go ahead and do that

    // too many tenths?
    if (nowTenths >= 10) {
      // trade 10 tenths for 1 second
      nowTenths -= 10;
      nowSeconds++;
    }
   
    // too many seconds?
    if (nowSeconds >= 60) {
      // trade 60 seconds for 1 minute
      nowSeconds -= 60;
      nowMinutes++;
    }
   
    // too many minutes?
    if (nowMinutes >= 60) {
      // trade 60 minutes for 1 hour
      nowMinutes -= 60;
      nowHours++;
    }
   
    // too many hours?
    if (nowHours >= 24) {
      // trade 24 hours for 1 day
      nowHours -= 24;
      nowDays++;
    }
   
    // show the new time on the Serial monitor
    showTimeOnSerial();
   
  }
 
}


void showTimeOnSerial () {
  // function to show the current elapsed time on the Serial monitor
  //
  // we want to print the time like this
  //   Position: 0123456789012345678901
  //     Output:     0 days 00:00:00.0

  // declare a buffer for storing a string (we'll need it later)
  // we expect to need only 21 characters, but to be safe, let's make room for 30
  // so we allow 30 characters worth of room, plus 1 extra for the null terminator
  // (Always allow 1 character extra worth of room for the null terminator!)
  char buf[31];
 
  // convert the elapsed time to a string
  // for days, allow 5 digits worth of room
  // for hours, minutes, and seconds, allow 2 digits for each, and use leading zeros
  // for tenths, allow 1 digit worth of room
  sprintf(buf, "%5d days %02d:%02d:%02d.%1d", nowDays, nowHours, nowMinutes, nowSeconds, nowTenths);
 
  // show the string for the elapsed time
  Serial.println(buf);
}

If you don't know what a "Serial monitor" is, or what a "baud rate" is, now is the time for you to do research to find out. Also, if you don't know how to write code to determine whether a number is odd or even, you really should do some research to find out. (Hint: "modulo operator")

Once you've worked out how to control one LED based on the time, the next step is to control multiple LEDs. For that, I suggest that you work out how to control the seven LEDs required for one digit, and that you make them show the "ones" digit of the seconds. The goal is to have one digit of your clock working, counting from 0 to 9 over and over again, one number per second. In order to do this, you will need to work out which LEDs should be on when, and turn them on and off accordingly. For example, the lower right vertical LED should always be on, except when showing the digit 2. (To see why, watch the seconds change on an "old-fashioned" digital wristwatch. If you don't actually own such a wristwatch, look at a video such as this one: https://www.youtube.com/watch?v=tAWEiIyr6zc)

Then you will proceed to multiple digits and thus controlling a large number (several dozen) of LEDs. For testing purposes, you will probably want to speed up the clock to make sure that the minutes and hours are working. By this point, you will probably have figured out how to do that.

Finally, it will be time for the WiFi. I really don't know much about that sort of thing, as I've never used WiFi in any of my projects, so I can't really help you there.

johnwasser:
You have 42 segments (6 x 7). The Arduino Mega 2560 has 54 digital I/O pins so that's no problem.

This light strip at 5 meters for $11 would probably work (get 5 for 25 meters):
https://www.amazon.com/Flexible-Lights-Waterproof-Strips-16-4ft/dp/B01J77LIL6/ref=asc_df_B01J77LIL6/
60 LEDs per meter. 12 Volts. 11 Watts per meter. About 460 mA per segment. Almost 20 AMPS for 42 segments.

For the LED strip i have these options:

https://www.digikey.com/products/en/optoelectronics/led-lighting-cobs-engines-modules/111?k=LED+STRIP&k=&pkeyword=LED+STRIP&sv=0&pv7=2&pv7=250&pv7=1&sf=1&FV=ffe0006f%2C33c02cb%2C33c02d2%2C33c02d3&quantity=&ColumnSort=0&page=1&stock=1&pageSize=25&_ga=2.244864453.1151779609.1545065807-200424416.1545065807&_gac=1.225271016.1545065807.Cj0KCQiAr93gBRDSARIsADvHiOpoA6tpx3fJ6cJDlFzg_s_DXlyBsEt_6JQZ8d8OzyV-cWG60pUBx5oaAvuJEALw_wcB

Have no idea how to sort that out. Initially thinking pure cold white @2700 kelvin

Each segment has a voltage and current requirement. Assuming that the voltage is above 5V or the current is above 20 milliamps (0.020 Amps) you will need a logic-level N-Channel MOSFET to drive each segment. You will need a resistor of about 220 Ohms between the Arduino output pin and the gate pin of the MOSFET.

Connect 42 MOSFETs to 42 pins and each MOSFET between the negative side of a segment and Ground (the negative side of the power supply). The positive side of each segment goes to the positive side of the power supply. I think these MOSFETs (50 for $7.99) will work:
https://www.amazon.com/McIgIcM-2n7000-n-channel-transistor-assortment/dp/B07BKX255D/ref=sr_1_1_sspa

I thought about getting theses ones:

https://www.digikey.com/product-detail/en/2N7000/2N7000FS-ND/244278

Get a power supply somewhat larger than the 20 Amps required. Say, 25 Amps. At 12V that is 300 Watts. Something like this one:
https://www.amazon.com/Rextin-Regulated-Transformer-Supply-Driver/dp/B06Y21KB96/ref=sr_1_3

I have a lot of options in regards of power supply:

https://www.digikey.com/products/en/power-supplies-external-internal-off-board/ac-dc-converters/133?k=POWER+SUPPLY+ENCLOSED+12V&k=&pkeyword=POWER+SUPPLY+ENCLOSED+12V&sv=0&pv1989=0&sf=1&FV=17d4002c%2Cii1|2211%2Cffe00085%2C118000b1%2C1180012d&quantity=&ColumnSort=0&page=1&pageSize=25&_ga=2.47292135.1151779609.1545065807-200424416.1545065807&_gac=1.194477663.1545065807.Cj0KCQiAr93gBRDSARIsADvHiOpoA6tpx3fJ6cJDlFzg_s_DXlyBsEt_6JQZ8d8OzyV-cWG60pUBx5oaAvuJEALw_wcB

The American producer "MEAN WELL USA Inc." seems like the most solid option...

The rest is all programming. Perhaps start with a 6x7 array of pin numbers.

Rakhsh, the 2N7000 will not conduct enough current to run your led strips.

The IRLZ44N will and is also cheap when buying dozens, about 15 cents each.

GoForSmoke:
Rakhsh, the 2N7000 will not conduct enough current to run your led strips.

The IRLZ44N will and is also cheap when buying dozens, about 15 cents each.

I can't see the exact one you mention different variations though:

Which one would do the job?