How many Seven Segment Displays

Hi all.

Im in the process of trying to build a six digit clock (hours, minutes & seconds) for a colleague who is retiring in work.

The idea is to mount the circuitry mounted into an old piece of test equipment that he used to use; and have the hours in one window, minutes in another and the seconds in the final window.

For this I am thinking I will need three double digit common annode or cathode seven segments displays.

The question I've got is whether I will be able to drive these from an Arduino Uno board? Or whether I'll need a different version.

If anyone is able to point me in the right direction or tell me I am barking up the wrong tree it will be much appreciated

Thanks
Tris

That is a total of six seven segment digits. Yes, you can drive these from an Arduino Uno (assuming these are "normal" devices say with max 20mA per segment and a forward voltage of less than 5 volts ) The easiest way is to use a single MAX 7219 chip to drive all displays. Choose common cathode displays.
How are you going to adjust/synchronise the time ? Variants are NTP, Satellite, precision RTC module like DS3231 using buttons or infrared to update it from time to time etc.

If you are separating the hours, minutes and seconds, then you don't have to worry about using the dots as (colon) separators.

Use a MAX7219 to drive the displays. Either common cathode or common anode are usable but the code for common cathode is simpler.

An Arduino UNO is OK but inconvenient, a Nano is easier to wire up. If you want to use WiFi for time synchronisation use a WeMOS D1 Mini instead.

Not to burden you too much, but does this test equipment also have switches? You could have those set the clock. :slight_smile:

Thanks for the quick response, its much appreciated;

6v6gt:
...The easiest way is to use a single MAX 7219 chip to drive all displays. Choose common cathode displays.
How are you going to adjust/synchronise the time ? Variants are NTP, Satellite, precision RTC module like DS3231 using buttons or infrared to update it from time to time etc.

The MAX7219 chip looks like it will be spot on for driving the displays. I am planning to use a RTC to keep the time keeping accurate

Paul__B:
An Arduino UNO is OK but inconvenient, a Nano is easier to wire up. If you want to use WiFi for time synchronisation use a WeMOS D1 Mini instead.

I hadn't considered using the Nano rather than the UNO. but I will look into the differences etc. What makes the Nano easier to wire compared to the UNO?

aarg:
Not to burden you too much, but does this test equipment also have switches? You could have those set the clock. :slight_smile:

There is only one PTM switch on this of test equipment, how easy would I be to code this to set the clock or is it best to stick to a RTC?

tris-c:
What makes the Nano easier to wire compared to the UNO?

It generally comes (especially when you use the cheap clones) without the pin headers fitted so you can simply solder wires to the PCB pads, or you can fit the pin headers and mount it to "Veroboard" (stripboard) or protoboard or a custom PCB as a "daughterboard".

The UNO comes with pin sockets; you either have to use pin headers to plug into those sockets which is fiddly and not as secure for individual pins or use a "shield" to mount on it and make your connections. The offset socket on one side makes it incompatible with stripboard or protoboard.

And the clones especially of the Nano are substantially cheaper than clones of the UNO or those clones of the Duemilanove misleadingly advertised as "UNO"s.

There is only one PTM switch on this of test equipment, how easy would I be to code this to set the clock or is it best to stick to a RTC?

You still need an RTC (with a back up battery) otherwise, every time the power fails, the clock has to be reset.
If you don’t want to add more buttons to the clock to set or adjust the time, consider using a cheap infrared remote control. On the clock, you’d have to add an infrared receiver.
Example: https://www.ebay.com/itm/1-2Pcs-VS1838-HX1838-Kit-TL1838-VS1838B-IR-Receiver-Remote-Control-for-Arduino/401395398619

tris-c:
There is only one PTM switch on this of test equipment, how easy would I be to code this to set the clock or is it best to stick to a RTC?

Even an RTC needs to be set. With no battery, the temporal memory is blank.

Thanks for all the replies, I have bitten the bullet today and ordered the Nano along with a RTC module and Max7219 to drive the seven segment displays.

My plan is to try get the coding working with just Hours an Minutes first and then adapt the coding to include seconds.

I had a thought about the possibility of using the one switch to adjust the time but I am not entirely sure if it would work..... Could the code be written to so that a long press of the switch will toggle between Mins and hours and a short press adjust the time?

Using a single button to enter setting mode, set hours, minutes and seconds, then either confirm or abandon the update would be a miserable user experience, but would not be impossible using long and short button presses.
It gets worse if you want to automatically adjust the clock for daylight saving time because then you need the date also.

Some time ago, I built a 6 individual digit 7 segment display clock using a ATmega328p and a max7219 with ds3231 RTC , similar to what you are planning, and it is set/adjusted using a cheap infrared remote controller.
Incidentally, it also handles daylight saving time for a fixed time zone. It also, every 30 seconds scrolls the date across the display.

It works like this, for setting the time.
Press ‘’ to enter time set mode. The clock then loads the existing date and time into a buffer example 2020-06-24 1329. The first 6 characters are displayed and the first character is blinking to indicate it is settable. The user can adjust the active digit by either the up/down arrow or directly entering a number. The use can navigate right using the right arrow and the next digit blinks etc. If the user gets to the 6th character and there is more to display, then the display scrolls one position left so the next character from the buffer is visible in the right most position, and will be blinking as the active digit. The same happens in reverse if the user then starts scrolling left.
Once the user has adjusted the time, (s)he can again press the ‘
’ to confirm it or, to abandon it, does nothing and it times out, after about 30 seconds of no activity, and the display reverts back to normal time mode.

I designed the above interface originally so it could also be used also with just 4 or 5 buttons, that is without a remote control device.

The program is quite complex to handle all that. If you are just setting a time, that is 6 digits HHMMSS (hours,minutes,seconds) it would be much simpler to get the user to enter, say, 132959 for the time 13:29:59. I suppose you could extend that to setting a date as well, if required, something like #200624* for 2020/06/24

6v6gt:
Using a single button to enter setting mode, set hours, minutes and seconds, then either confirm or abandon the update would be a miserable user experience, but would not be impossible using long and short button presses.
It gets worse if you want to automatically adjust the clock for daylight saving time because then you need the date also.

Some time ago, I built a 6 individual digit 7 segment display clock using a ATmega328p and a max7219 with ds3231 RTC , similar to what you are planning, and it is set/adjusted using a cheap infrared remote controller.
Incidentally, it also handles daylight saving time for a fixed time zone. It also, every 30 seconds scrolls the date across the display.

The more I think about it, the more I agree that it wouldn't be a positive experience for the user. so will end up with three switches, one for Hrs, Mins and Secs.

Actually, the easiest way to use three buttons is "select", "up", "down". Rotary encoders with a "push" function make this really easy.

You make the field you are choosing to set, flash. Most of the time, either setting the minutes zeros the seconds or just pressing the "select" button a second time does.

Do not automatically time-out the setting function within a minute or more. :astonished: