Event Countdown Clock (Covid Clock - V2.0)
Introduction: Event Countdown Clock (Covid Clock - V2.0)
This is an upgrade to my earlier version of this project. I debated with myself whether I should just update the old project or post this new one. Obviously I eventually decided to post this as an "Upgrade". I decided this because while working on this project (which I built from scratch), I felt that the wiring was sufficiently complicated and tedious that the original project was a good stepping stone to get working, then it could fairly easily be modified to create this enhanced version.
However, if you wish to tackle this project from scratch, the complete wiring diagram (and a schematic) are included in Step 2. Feel free to jump right in and hook it up as you wish.
The original project can be seen here. This instructable is presented as an "add-on" to the original Coronavirus Quarantine Clock. The code in this instructable won't work as is with the V1 project. The main reason for this is that the signalling used to manage the 7 segment LED display has been inverted due to the inclusion of the transistors.
So, what is new?
* The LED display is dimmable (see note below).
* The code has been modularised.
* There are additional commands.
* The target date is stored in EEPROM so that it will be retained across restarts.
Regarding the dimmable display. There are loads of projects online that allow LEDs to be dimmed. 288
So what is so special about this?
The LED dimming is special because it uses a "home grown" digital potentiometer. Most LED dimming projects online use PWM to dim LEDs, so why not do that? PWM works fine for dimming the LED bar graph, but since the clock display is updated / managed with strobing (due to the shared pins on the panel), applying PWM to the clock display resulted in a rather wierd looking "rolling" or "scrolling" effect. This effect would vary depending on the PWM rate.
The other interesting thing about the LED dimming is that it shows an alternative way to achieve dimming of LEDs for those situations when PWM is not desirable.
Supplies
In addition to the parts in the original Coronavirus Countdown Clock, you will need the following:
* (Optional) another breadboard. I found that I couldn't easily fit all of the components on one medium sized (830 pin) breadboard.
* 8 x NPN transistors (I used BC337, but any similar NPN transistor will be OK).
* 8 x 10 K resistors.
* 4 x 50 ohm resistors (I used 100 ohm, but feel that these were too "strong" and 100 ohm was the smallest that I had).
* 1 x LDR with about 48-140K range (but anything close is OK).
* 1 x 2K2 resistor for use with the LDR (again, anything close is OK, but you probably don't want to go any smaller than 2K2).
Step 1: Wiring Preparations From V1 Project
As shown in the breadboard diagram, there are only two modifications to the V1 project to prepare your circuit for the additions for V2.
These are:
1. Remove red and black wires bridging the top +V and GND bus to the lower bus on your breadboard.
The lower bus will be used to collect the cathodes of the various LEDs and feed them into the brightness controller
2. Seperate the 4 wires that select the digits into the LED panel into two parts. These are the four wires with the white bands in them.
We still need both sides, but we will insert 4 of the transistors between the Arduino end and the LED panel end.
Step 2: Add the V2 Connections
The diagrams above show the complete circuit for this project.
Note that in the diagram there are 3 seperate "power" lines. These are:
* GND - which uses black wires and connects to one of the Arduino GND pins
* +5V - which uses red wires and connects to the Arduino's +5V pin.
* GNDA - which uses solid blue wires and connects the cathodes of the LEDs to the brightness control circuit. This wire does not connect directly to the black GND wire (nor the red +5 V wire).
LED Digit Control
This sub-step connects up the transistors for the digit selection on the 7 segment LED display panel.
* Find some space on your breaboard and insert four of the transistors.
* Connect one 10 K resistor (four in total) to each of the transistors' base pins.
The base pin is the middle one. 611