LCD Alarm Clock, Adafruit Feather M0 Express

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Gambalunga
 
Posts: 63
Joined: Thu Apr 30, 2020 10:45 am

LCD Alarm Clock, Adafruit Feather M0 Express

Post by Gambalunga »

Not exactly a kit but using almost entirely Adafruit components.

An LCD Alarm Clock using the Adafruit Feather M0 Express with automatic correction for Daylight Saving Time and plays a short WAV file for the alarm.

Image
The fascia and box covering is yet to be added

The automatic correction for daylight savings time uses Western European rules but US rules are also available.
The SPI Flash storage was used for a 2 minute section of music that was extracted from an MP3 and saved as an 8bit 16000Hz WAV file (Alarm.wav) using Audacity. This file is played via the DAC of the ATSAMD21 processor.

It should be noted that the PAM8302 Audio Amplifier overpowers the 4 Ohm speakers at full volume and the volume trim pot needs to be adjusted down until you get clear sound.

Items used were: Image

Assembly was done in such a way that the switches and the amp were connected so that all components could be removed.

The assembly was pretty straight forward. I soldered a strip of 4 female headers to the underside of the 3V row on the prototyping section of the Feather (though in the end I only used one to provide power for the LED in the alarm control button) and a row of 4 pins to the GND section to provide GND attachments for the push buttons.

I soldered a length of 5 stacking header to the underside of the Audio Amplifier and then snipped off the protruding pins on the top side for A+, A-, and Vin This left the pins for Gnd and SD protruding from the top of the amp board. The terminal block was soldered in place. The two unwanted pins protruding from the bottom of the stacking headers on the Feather M0 Express for RST and ARf were then snipped off so as not to form a contact with the Gnd and SD on the amp. In this way the amp can piggyback on the underside of the Feather with the A+ to the A0 pin on the Feather, A- the the GND, and the Vin to the 3V pin.

The Gnd pin on the amp could probably be jumpered to the A- but I connected it to one of the GND pins on the Feather. The SD (Shut Down) pin on the amp was connected to pin 12 on the Feather.

The 3 pushbuttons were connected to GND and one of the small pushbuttons connected to pin 9 and the other to pin 10. The Gnd wire on the latching pushbutton was bridged to one of the LED pins and the other LED pin was connected to 3V on the Feather. The other side of the latching pushbutton was connected to pin 11 on the Feather.

When everything is functioning the unused pins on the underside of the Feather can be snipped off to clean things up a bit.

Regarding the Lithium battery. I do not know if the output of the battery that I have used is insufficient or if the alarm, or perhaps better to say the amplifier, simply draws too much power. The 1000 mAh battery will keep the clock running and the display functioning for several hours but if the alarm starts whilst there is only battery power the moment the amp is switched on the Feather either re-sets or goes into a sort of "brown-out". In either case the clock may still show the correct time, and the alarm may be re-set to the default time, but the alarm will not function and the USB serial communications with a PC, if connected, will show an unknown USB device. The only way to recover from this is to do a hard reset using the button on the feather, or to disconnect the battery and power from the Feather and then reconnect. A battery than can tolerate a higher current flow may not have this problem.

For the sketch I modified and worked on existing example sketches and libraries. For the alarm WAV playing through the DAC I modified and updated the SamdAudio library (which I have called Audio_FeatherM0). See https://github.com/Gambalunga/Audio_FeatherM0

I also modified the DST_RTC library for European DST and it has now been updated on GitHub. See https://github.com/andydoro/DST_RTC

If the Alarm button is released (up) the alarm time shows for a few seconds and the alarm time can be adjusted forwards or backwards using the advance and retard buttons. After holding an advance or retard button down for 15 seconds the change in time speeds up. If the Alarm button is down (Alarm off) the time can be adjusted but this should be largely unnecessary. The exact time and date should be set with one of the RTC example sketches.

As it is in my sketch the Alarm.wav only plays once but it could be set to repeat several times or until the Alarm button is depressed. If repeated the delay of 3 minutes to turn off the amp should be lengthened.

The full sketch (a bit long to post here) can be downloaded at https://github.com/Gambalunga/LCD-Alarm ... M0-Express

User avatar
denniscj7
 
Posts: 51
Joined: Sun Feb 27, 2011 11:45 am

Re: LCD Alarm Clock, Adafruit Feather M0 Express

Post by denniscj7 »

I'm confused. Does the DS3231 have US DST built into it ? If it doesn't I would like to know exactly how to add it into the module.
Thanks in advance for the help.

User avatar
Gambalunga
 
Posts: 63
Joined: Thu Apr 30, 2020 10:45 am

Re: LCD Alarm Clock, Adafruit Feather M0 Express

Post by Gambalunga »

denniscj7 wrote:I'm confused. Does the DS3231 have US DST built into it ? If it doesn't I would like to know exactly how to add it into the module.
Thanks in advance for the help.
No the DS3231 does not have DST. You have to use the library that was developed by Andy Doro and then later worked on by myself. You can download the library at https://github.com/andydoro/DST_RTC

There is an example sketch with the library which shows how it is used. At the moment it supports US and EU DSL rules but others could added.

Feel free to contact me if you need further assitance.

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”