Introduction |
Published date: 6/1/2015
|
In this instructable I will show you how to make your own Arduino based 7 segment display (4 digits) clock with sound activation feature!
The circuit uses the ATmega328p micro controller (the same as the Arduino uno board) and the DS1302 clock IC. You can easily set/change the time by pressing the setup buttons. The clock can be activated by pressing an button or by making a sound (e.g. clap, blowing, whistle) near the microphone. It can be powered on with two AA batteries (3V) or with an USB cable from your computer (or cellphone's charger, max 5V).
Watch the presentation video below and please subscribe to our YouTube channel to help us grow up!
The circuit uses the ATmega328p micro controller (the same as the Arduino uno board) and the DS1302 clock IC. You can easily set/change the time by pressing the setup buttons. The clock can be activated by pressing an button or by making a sound (e.g. clap, blowing, whistle) near the microphone. It can be powered on with two AA batteries (3V) or with an USB cable from your computer (or cellphone's charger, max 5V).
Watch the presentation video below and please subscribe to our YouTube channel to help us grow up!
|
|
Tip: You can also use the Arduino uno board (or any other board)
Let's get started!
Let's get started!
What you will need - HardwareVisit and buy your hardware from www.gearbest.com.
For the circuit you will need:
|
*You will also need an Arduino UNO board to program the ATmega328 micro controller.
**You will also need a small 'button' battery 3.3V and an 32786KHz crystal oscillator. The time circuit with the DS1302 IC can be also found as a module board.
**You will also need a small 'button' battery 3.3V and an 32786KHz crystal oscillator. The time circuit with the DS1302 IC can be also found as a module board.
The Circuit
|
The connections are easy, see the image above with the breadboard circuit schematic.
I made it as simple I can... |
Buttons:
Connect the same letters of 7 seg digits pins with others
Tip: Make your circuit on breadboard first ;)
- Select/Set function button to Arduino pin A0
- Change time/min function button to Arduino pin A1
- Show time button to Arduino pin A2
- Mic goes to Arduino pin A3
- CE pin to Arduino pin 0
- I/O pin to Arduino pin 1
- SCLK pin to Arduino pin 2
- Two red LEDs to Arduino pin A4
Connect the same letters of 7 seg digits pins with others
- 1 - "E" - Arduino pin 6
- 2 - "D" - Arduino pin 7
- 4 - "C" - Arduino pin 8
- 6 - "B" - Arduino pin 12
- 7 - "A" - Arduino pin 11
- 9 - "F" - Arduino pin 10
- 10 - "G" - Arduino pin 9
- 1st digit CC pins to Arduino pin 3
- 2st digit CC pins to Arduino pin 4
- 3rd digit CC pins to Arduino pin 5
- 4th digit CC pins to Arduino pin 13
Tip: Make your circuit on breadboard first ;)
The code
Download the code from here and open it with Arduino IDE. Inside you will also find all necessary libraries.
7segclock.zip | |
File Size: | 19 kb |
File Type: | zip |
If you have any problems with sound activation feature change the values 660 and 750 (line 127):
if ((digitalRead(showBT) == LOW) || (sound<660 || sound>750))
if ((digitalRead(showBT) == LOW) || (sound<660 || sound>750))
The box
I used plexiglass pieces to build my clock box.