Web Radio Alarm Clock with automatic daylight saving - Computer Intelligence Agency

CIA - Computer Intelligence Agency
FOLLOW
Embedded computer systems for tomorrow.
cia
Go to content
Internet Radio with automatic Daylight Saving Alarm Clock
photo Web Radio with automatic Daylight Saving Alarm Clock
This ESP32 Internet/Web Radio PCB is designed to support the Ed Smallenburg source code (https://github.com/Edzelf/ESP32-Radio).

 
 
After building a prototype of Ed's ESP32 web radio using strip board, it became apparent that to make a radio for others a PCB assembly would streamline the process. On completing the stripboard design a  PCB layout followed which, in addition to Ed's features, has functionality available to make a (hopefully) practical alarm clock - as well as the internet radio. The PCB has been laid out to allow different size TFT LCD screens; 1.8”, 2.4” and 2.8”. Some push buttons, another rotary encoder and a buzzer have been added to the design to allow a flexible user interface. Integrated into the PCB layout are two amplifier modules – one each for left and right channels – and ability to fit either of two variations of the MP3 encoder module.

 
 
I have Ed Smallenburg’s firmware running on this PCB successfully - only with the recommended personailsation firmware changes (i.e. IO pin, IR, rotary encoder settings). As with all good things, I thought that a clock and radio combination would be of more practical use for me. I added a clock class to Ed’s code to facilitate use of (Modified) Julian Date format for keeping track of time and add an alarm function. The time is still set directly from the internet.

 
 
As I developed the code for the alarm clock functionality, I thought that it would be a nice feature to also add the ability to change the clock's time automatically when daylight saving (DS) time starts and ends - hence this has been added. The time is displayed in yellow when DS is active; the usual white when standard time (ST) is active.

 
 
A snooze function has also been added to the radio - it uses the same button to silence the alarm once triggered. When the alarm sounds, the snooze button (SW5) just needs to be pushed, the buzzer stops and the radio will automatically start. At the moment, I have not added firmware to wake with radio, just the buzzer sounds when the alarm time is reached. That functionality could be added with a bit more time available to modify the code.

 
 
Parameters have been added into the non-volatile section of the code (see defaultprefs.h) to handle the extra functionality of the clock, alarm and DS. Be sure to set them when you configure the internet settings (as per Ed Smallenberg's document).

 
 
To set the alarm, the snooze button needs to be pressed for 1 second, which then activates the rotary encoder left and right movements to adjust the alarm settings and displays the current alarm time. The first alarm setting is the alarm on/off. When the alarm is on, an icon is shown in the top right corner of the display. Once happy with the setting, a press of the snooze button changes the rotary encoder to increment or decrement the hour setting of the alarm. The setting is in 24 hour format. After adjusting the alarm hour, press the snooze button again and the minutes can be then set. Turning the rotary encoder left to decrement the time; turn it right to increase the time. Once happy with the settings, press the snooze button again and the alarm setting mode will exit and return the rotary encoder back to normal operation and displaying the current time.

 
 
The source code for the alarm clock functionality can be downloaded here. Feedback is welcome about any improvements that may be made.

 
 
You can see the web radio alarm clock in action on YouTube here.

 
 
To assist with requests about the PCB a small quantity are available on ebay. Try searching for “Web radio alarm clock PCB” or email at webradio@computerintelligence.com.au.
FOLLOW
cia
COMPUTER INTELLIGENCE AGENCY
Embedded computer engineering
PRESS

This page was last modified: 2019-08-16
CONTACTS
90 Wollombi Road,
Cessnock. 2325. NSW
Australia

sales@computerintelligence.com.au
Back to content