I want to introduce another clock with the thermometer on a microcontroller. At the heart device is a series of microcontrollers from ATMEL AVR – ATMega8. The microcontroller operates with a real-time chip DS1307 digital temperature sensor DS18B20.
Chip DS1307 is a cost-effective real-time clock with a serial interface, which contains a clock-calendar with the presentation of the information in the BCD and 56 bytes of nonvolatile SRAM. Address and data are transmitted on a bi-directional two-wire serial bus. of real-time information and calendar appears in seconds, minutes, hours, day, date, month and year. If the current month has less than 31 day, the chip automatically detects the number of days in the month with the current leap-year. The clock operates or in 24-hour or 12-hour format with an AM / PM indicator (pm am). DS1307 contains embedded control circuit main power source level and when an invalid value is automatically switched to the backup battery.
DS18B20 sensor - digital thermometer with programmable resolution, from 9 12-bit, which can be stored in the EEPROM memory of the device. DS18B20 communicates over 1-Wire bus, and thus may be a single device on the line, and work in a group. All processes on the bus controlled by a central microprocessor.
Measurement range from -55 ° C to + 125 ° C and an accuracy of 0.5 ° C in the range from -10 ° C to + 85 ° C. In addition, DS18B20 It can be supplied with voltage data lines (“parasite power”), in the absence of an external voltage source.
Display is realized on the seven-segment LED-display with a common anode. Schematic diagram hours thermometer shown in Figure.
By briefly pressing the S1 button bits blink alternately for time and date settings. To do this, use the buttons S2 and S3 (“+” and “-” respectively). By pressing a button on the display S3 lights ambient temperature.
Thus, in the normal mode, the instrument alternately displays the time and date. And by clicking on a button indicates the temperature S3. At the beginning of each hour clock fed short beep.
The clock accuracy depends mainly on the applied quartz. I have a time error of about two seconds per month (hurry).
device “Clock-calendar-thermometer ATMega8” assembled on two printed circuit boards (Cm. a photo).
Fyuz microcontroller firmware:
Archive of the project (printed circuit boards, firmware, source):
Flash and PCBs;