Introduction: Arduino Digital Clock With Alarm Function (custom PCB)
In this DIY guide I will show you how to make your own digital clock this alarm function.
In this project I decided to make my own PCB that is based on Arduino UNO microcontroller - Atmega328p.
Bellow you will find the electronic schematic with PCB layout so you can easily produce it.
By pressing the buttons you will be able to set time/date/alarm and alarm state (on/off).
The alarm can be turned off by pressing the alarm button or by shacking the box.
Updates and more can be found here: http://www.ardumotive.com/arduino-digital-clock-with-alarm-functionen.html
Let's get started.
Step 1: What You Will Need - Hardware
For this project you will need:
- Our custom PCB circuit
- High Contrast 16x2 Character LCD (Raystar RC1602B-LLG-JWVE)
- Atmega328 (with Arduino UNO bootloader)
- DS1307 Real Time Clock
- Tilt Sensor
- 28 dip socket & 8 dip socket
- 16 MHz crystal oscillator
- 32.768 MHz crystal oscillator
- 2x22 pF capacitors
- 3x10 kOhm resistor
- Trimmer 20kOhm
- Coin Cell Battery Holder
- screw terminal 2P 2.54mm
- Pin Header 1x5 Female 2.54mm
For power you will need a 5V-1A power adapter or you can use a usb cable as I did.
Step 2: The Circuit at EasyEDA, the Free Online Circuit Design Platform
Enter here to see and make any changes to the above circuit.
Step 3: The Code
How to program it:
Connect your circuit with TTL to USB module with 5 cables to the programming header.
The pins RX and TX must be cross-connected.
NOTE: If you are using the Arduino UNO board make sure to remove the ATmega328 IC from it first and connect the headers RX to RX and TX to TX pins of the board. The RS pin must be connected to Arduino UNO reset pin.
Download the code from here and open it with Arduino IDE. Inside you will also find the library file.
Step 4: JLCPCB - Make Your Own Circuit Boad From 2$!
Enter here to produce your PCB board!
Use JLCPCB for $2 PCB Fabrication & 2-day Build Time, the quality is really good, check the below photo of our pcb board.
Step 5: 3D Parts
Step 6: Well Done!
I hope you liked this, let me know in the comments!!!