Digital Clock With Date Thermometer & Thermostat

With PIC16F628 & LCD HD44780 and DS1631 temperature sensor
Project Information

Simple clock that will iterate through clock-date-temperature sequence. Can be a weekend project because it has few electronics parts: controller, sensor, LCD. I also implemented thermostat function. Thermostat values will also display together with temperature. The device activates a led and also output 5V or 0V when thermostat is active. You can connect a heater using this output.

Features
  • Custom characters on two LCD lines
  • Configurable display time for clock/date/thermometer
  • High temperature range from -55 up to +120 Celsius
  • Thermostat controlling temperatures between 0 and 99
  • Show date: day, month year and weekday!
  • Led indicating thermostat state
  • Thermostat active type (active high or low)
  • Great menu with SET/UP/DOWN buttons
  • Digital adjustment for clock sync. up to +/- 1 second/month
  • Memory saved settings to prevent losing in case of power failure
  • Simple circuit, few components, weekend project!
Next ProjectNext ProjectNext Project
Previous ProjectPrevious ProjectPrevious Project
How it works

Running device will iterate through clock-date-temperature screens. Using default settings the clock is set to show for 8 seconds, then the date for 2 seconds and the temperature for 3 seconds. These timings can be adjusted from the menu. User can hide date and temperature screens by setting time to show them to 0 seconds. The weekday must be set manually from the menu, there is no code to calculate it automatically. The temperature is converted in the last second of a previous screen (clock or date) and after each reading.

User can activate settings mode by pressing set button. The following screens will iterate through the device settings. User can set: clock (hours, minutes), date (day, month, year, weekday), screens times in seconds (show clock, show date, show temperature), thermostat (low, high, active type) and clock sync constants (low, high). All settings are saved to EEPROM. Clock will continue to function in settings mode if hours/minutes are not changed. If menu is idle for 20 seconds then it will automatically exit to runtime mode. See more in settings section.

Thermostat will be active when temperature value drops below thermostat low value. Thermostat will not be active when temperature value becomes grater than thermostat high value. At device power up the thermostat is not active and its value is not changed when temperature is between [thermostat low, thermostat high] values. The device has a led which will lit when thermostat is active. Thermostat can be active high (5V) or active low (0V). Thermostat active type can be set from the menu.

Project zip file
  • ASM source code
  • HEX files
  • Eagle png file and sch file
  • Documentation
Download Project