Skip to content

Express1/tftlcdClock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TFT LCD Arduino Clock - Just another Arduino Clock...

This one is using a 320X240 ILI9341 tft lcd connected over SPI, the speed is acceptable for a clock display and will not use as many I/O pins as a parallel connected display. Here is a link for the display: https://www.aliexpress.com/item/32889801161.html?spm=a2g0s.9042311.0.0.29594c4dvsZfeP

The clock has a Digital display mode and a Binary BCD display mode selectabe from the menu.

Other modules used: DS3231 Clock module, remove the 1N4148 diode if you use that with a CR2032 battery, we do not want to charge the battery. DS18B20 temperature sensor module for better temp readings - there is a temperature sensor inside DS3231 also but the chip will heat up inside the clock case once powered on and will show about 1-2C more than the actual temp in few minutes.

The LCD I/O is 3v3 and therefore we use some resistors to convert from 5V to 3v3. There are 3 buttons for setup and a speaker for alarm. A piezo or electromagnetic buzzer can be used.

The clock has an enclosure and a stand designed in OpenSCAD, make one using your 3DPrinter.

The menu of this clock is designed around a struct in PROGMEM in order to use less RAM, for those interested this can be reused as a menu for other projects. It was an interesting exercise to create and is working quite nice with the three buttons: "-", "Setup" and "+". Can be easily extended as necessary.

Menu: Time hour, min (setting min will also reset seconds to 00), month, date, day of week, year. Clock 12/24h, clock mode - digital or BCD binary. Alarm hour, min, alarm days - daily or workdays only. DST on week, month, DST off week, mo - For US DST set to 2,3 - 1,11. The week is the number of week in a mo starting Mo. The time will adjust on Su 2AM. LCD day, night - lcd backlight durring day and night, will turn on on 7 and turn off at 10 pm.

All the libraries used are in a zip file (unzip under your libraries folder), the font file form Adafruit_GFX is modified “ char is replaced by a full circle character used by the BCD clock display and the second half of the table is removed in order to save space.

IOAbstraction lib is used to provide the low level functions for buttons and event scheduler, many thanks to Dave! https://www.thecoderscorner.com/products/arduino-libraries/io-abstraction/ioabstraction-pins-io-expanders-shiftreg/

Releases

No releases published

Packages

No packages published