Академический Документы
Профессиональный Документы
Культура Документы
1.1 Problem Statement: Using a RTC chip to get the time input, we will have to write the
necessary software to display the time on a LCD display. Alarm will be set using push buttons
Padj,P+ and P-. Press Padj ONCE activates the Alarm Setting mode. The second press of Padj
sets the hour setting, the third press of Padj sets the minute setting, the fourth press of Padj sets
seconds setting and pressing Padj a fifth time ends the Alarm Setting mode. P+/P- will
increment/decrement the time unit .We will sound an alarm (buzzer) when the current time
matches the set alarm time.
a. Alarm based motor switch-on / switch-off control - Using one additional pin and a current / voltage
buffer, switch on a water pump when the water supply comes on. Switch off the pump after 1
hour or 1 second after the water supply stops.
3 Challenges Faced
a. Like every other computer clock, this clock also showed clock drift over
time i.e. the system time gradually deviates from accurate or ?true? time.
In this case, the RTC module didn’t show any time drift because of shorter
time period. The time drift varies for different RTC depending upon con-
ditions such as temperature, time it is remained on, etc. Drift is normally
around 3-5 sec per day.
c. We also had a tough time syncing the rtc with the arduino, by that we
mean synchronising the
connections.
5 Circuit Diagram
For circuit diagram to connect RTC to Arduino refer figure 2 on page 4 (5)
7 Observations
RTC displays the current time. User can set an alarm depending upon the
user needs.
5
We also learned that 2C is a serial protocol for two-wire interface to connect
low- speed devices like micro-controllers, EEPROMs, A/D and D/A
converters, I/O interfaces and other similar peripherals in embedded systems.
It was invented by Philips and now it is used by almost all major IC
manufacturers. Each I2C slave device needs an address ? they must still be
obtained from NXP (formerly Philips semiconductors). I2C bus is popular
because it is simple to use, there can be more than one master, only upper
bus speed is defined and only two wires with pull-up resistors are needed to
connect almost unlimited number of I2C devices. I2C can use even slower
microcontrollers with general-purpose I/O pins since they only need to
generate correct Start and Stop conditions in addition to functions for reading
and writing a byte. (4) In conclusion we succeeded in using Arduino and RTC
to create and alarm clock.
References
[1] Tutorial on DS1307. Available at
http://datasheets.maximintegrated.
com/en/ds/DS1307.
pdf
6
Figure 4: Set Alarm
[5] Circuit Diagram. This diagram is available on the internet we made direct
connections in physical
world.