This project was to build and program a replacement for my 1970s era digital alarm clock. The design goals for the new clock were to display time, date and the day, wake-up alarms, and display the current outside temperature and humidity. The time, date, and day are derived from GPS (I don't want to have to set the time or date manually) and the weather information would come from a solar powered sensor platform. The clock and sensor packages are connected by 802.15.4 wireless radio.

This project consists of two major systems, an inside base station, and an outside sensor station. The base station is a desktop clock and the sensor station is the GPS receiver, temperature, and humidity sensors. A 3.2" (240mm x 320mm) LCD touch screen provides the interface for the base station. The base station displays the following information:

completed clock
Completed base station

Software Design

The clock's date and time are obtained via GPS from the sensor station (they can't be set manually). The sensor station also reads the temperature, relative humidity, the GPS state (date, time, visible satellites, signal lock), and the battery status. The sensor transmits updates to the base station when any of the values change. Power for the sensor station is provided by two rechargable lithium-ion batteries connected to a solar panel.

User configurable settings on the clock include the following:

The clock is programmed to automatically adjust for daylight savings time and standard time. The base station also includes a PIR sensor (motion detector) which is used to determine when the screen should be active. A user-configurable timeout turns off the screen "n" minutes after the last motion is detected by the PIR sensor. The display is instantly restored whenever motion is detected. A SD card is used to store WAV files for alarm sounds. A class D amplifier connected to a 8 Ohm speaker is used to play alarms. All of the clock configuration is stored in scratchpad RAM on the base station and preserved during power outages by a super capacitor. The date and time is updated automatically from the GPS receiver periodically. The current date and time values may also be retrieved on demand by the user. The GPS always operates in UTC and is adjusted for the local timezone by the base station. The base station configuration may be erased and the unit rebooted by the user on demand (manual reset).

The base station and sensor station use Parallax's Propeller microcontroller. The Propeller chip is an 8 core, shared memory, no interrupts processor. The software design takes advantage of multiple cores to accomplish tasks concurrently. All of the base station and sensor station code is written in the chip's Spin language. The touchscreen LCD interface was created using the 4D-Workshop software from 4D Systems. The following Spin modules were developed for the project:

Component datasheets & Schematics

Bill of Materials

Item Description
Coming soon...  

Copyright © 2016 James Jerkins, Ph.D, CISSP

08/10/2016