Introduction: Create Yourself a Clock With Temperature Sensor, Battery Sensor and Alarm

Picture of Create Yourself a Clock With Temperature Sensor, Battery Sensor and Alarm

Guys,

This weekend I have made myself a clock with battery sensor, temperature sensor and alarm,
I'm using ATMEGA128 for it.

Let's get started

Step 1: The Components I Used

Picture of The Components I Used

I used this components to build my clock :

1. ATMEGA128
2. LCD 16x2
3. Speaker
4, Some buttons
5. DS1307
6. I made myself a PCB, if you need one just contact me,
I have some spares for creating this project.

Now let's continue on the code....

Step 2: The Code for This Experiment

Picture of The Code for This Experiment

The main code for this experiment is the eeprom,
we need to write and read eeprom on atmega to set the alarm

I give the main idea for it :

case 2:
         alarm_minute++;
         tone(50);
         _delay_ms(50);
         tone(0);
         if (alarm_minute >= 60)
         {
          alarm_minute = 0;
         }
         eeprom_update_byte (&minute_ee, alarm_minute );
        
         state_var = SET_ALARM_MINUTE;
         break;

next step, let's watch my experiment .....

Step 3: Enjoy the Video Mates !.....

Picture of Enjoy the Video Mates !.....
Let's enjoy the video :


I set the alarm to run for 1 minute....
Till the next experiment..

Cheers

Comments

zx lee (author)2013-11-02

can u explain more on battery sensor?

qquuiinn (author)2013-10-29

What code did you use with the RTC

About This Instructable

2,282views

20favorites

License:

More by arick:2cm height 7 Segments 6 Digits AVR Clock  with 4 digits thermometer Speaking clock with AVRDIY Online Bulb Controller
Add instructable to: