Christmas Countdown Clock
This project probably has the most parts of any of the ones we have done but is sure to help spread some Christmas joy. It's a clock which displays the time and date, and also displays the number of days until Christmas. When the sound module is triggered a voice (it might be Santa) announces the number of days and weeks until Christmas and then offers a Christmassy greeting. It's sure to keep everyone entertained. There is some soldering and careful assembly required to compete this project.
Bill of Materials
|1||XC4617||Dot Matrix LCD Display|
|1||RP7504||1 k Potentiometer|
|1||RM7125||100 nF Polyester Capacitor|
|1||HM3212||40 Way Header Strip|
|1||XC4998||2 GB SD Card|
You'll also need about a metre of insulated wire - if you don't have any spare our WH3010 will work.
|GND||LCD Pin 1||GND||G||Pin closest to sound module|
|5V||LCD Pin 2 (VCC)||5V||+|
|D9||Pin not connected to cap|
|D5||LCD 4 (RS)|
|D6||LCD 5 (R/W)|
|D7||LCD 6 (E)|
Also some connections go directly between the modules:
|Potentiometer (Middle)||Amplifier (RIN)|
Here's a diagram of where various modules will mount:
We'll start by mounting the potentiometer and capacitor onto the Datalogging Shield. Before cutting off the excess lead on the capacitor, bend and solder them over to join onto the two legs of the potentiometer as shown then cut off.
The Amplifier Module is next. Because it has a different pin spacing start by breaking 2 lots of 2 pins and a single pin from the HM3212 and place them in the UNO board in the sockets for D8/D9, D12 and AREF/SDA (SDA may not be marked). This will be our jig for soldering the headers onto the board and will ensure that the module will fit.
Now we can lift the entire assembly out and mount in the Datalogging Shield as shown below and solder the header pins in place. Make sure the Amplifier Module is facing as shown - it definitely won't work if it is turned around.
Then mount and solder the Sound Module system:
For the Display Module break off a group of ten pins from the HM3212 Header Strip and solder vertically to pins 1-10 on the back of the Display Module. Then run a wire from GND (pin 1) to PSB (pin 15) and BLK (pin 20) on the back of the Display Module, and another wire from VCC (pin 2) to BLA (pin 19). We've used different colours to help distinguish the wires but that is not critical to operation of the Clock.
Then mount and solder onto the Datalogging Shield as shown:
The final construction step is to turn the assembled shield over and make all the wiring connections.
Download the source code, extract into a new folder, open the .ino file in the Arduino IDE and press upload.
When you first use the sketch you'll notice that the time/date might be wrong. Use the RTC setting in the downloads section to correct the time and then try the source code again.
There will be two adjustments to make - the first is the sensitivity of the Sound Module. We want the L2 LED to be flickering between on at the slightest sound. If the L2 LED is on turn the brass screw anticlockwise. If L2 is off turn the screw clockwise until it turns on, then turn anti-clockwise until it just goes off. The LED should now flash on if the microphone is tapped. If you would like it to be less sensitive to sounds, it can be turned further anticlockwise.
If the sound doesn't trigger when L2 flashes on, the Sound Module may not be wired correctly.
The second adjustment is for the volume - we use the potentiometer for this. Give the microphone on the Sound Module a tap and turn the potentiometer shaft clockwise to increase the volume. If the volume is too high the sound may distort and damage the speaker - it should not need to be turned more than about 30 degrees to be audible. You may need to keep triggering the sound to keep adjusting the volume. When the Clock is speaking it should read out the number of days and weeks until Christmas and then give a random greeting. If the sound is heavily distorted or there is a high pitched background noise there may be a wiring problem with the potentiometer, capacitor or amplifier module.