Blog Archives

This post is about a project that took ages to built and I manage to loose in an unfortunate circumstances…

I always wanted to build a clock. And this is what came up…

The Idea

Create a modular clock that has interchangeable displays.

The Execution

Main controller

The main module for the clock is an ATmega328 microcontroller with a DS1307 Real Time Clock. The LCD displays current date and temperature as well as shows the setup menu.

Interaction with the clock is done by one rotary encoder that has a built-in push button. The state diagram for the menu can be found below.

Display Controllers

Time display (described below) is controller by a series of 74HC595 shift registers. Since there is a need for two digits per segment (by segment I mean hours, minutes and seconds) there are 6 of them in total connected in series. To update the time display I have to shift out the current state of the hours, minutes and seconds every second. Since the update rate is relatively slow no stress is applied to the microcontroller and it can do other tasks like displaying temperature readings, etc.

Time display

Time is displayed on a self-built 7 segment displays. There are 3 LED’s for the horizontal axis and 4 for the vertical one. By testing various combinations I found that this setup was the most appealing to my eyes. LED’s in a segment are connected in parallel and routed to the input connector at the bottom of the board (color-coded cable in the photo). The only problem I had with the displays was that they were really bright even on the lowest brightness setting (that can adjusted through the menu). To mitigate this problem I added some plexiglass that I painted white to diffuse the light a bit. Note to myself for the future projects: do not use clear LED’s for such applications…

More photos

A short clip showing the testing of the time display

Conclusion

I had a lot of fun working on this project. It was a really nice learning experience and I am planning on rebuilding the project in the future with some improvements.

Intro

I got a ST7735 based lcd from ebay and decided to play with it a bit.

Setup

Arduino UNO

1.8″ TFT LCD from ebay

Some jumper cables

Code

All the guidelines for connecting the LCD to the Arduino can be found here: http://www.ladyada.net/products/18tftbreakout/, but there is one thing to note. In the tutorial there is a pin called “dc” (Data/Command) (thanks to sza2) (I am not sure what that stands for) , but on my LCD it’s named “RS” (register select). So, to make it work, just ignore the difference in naming.