Maker.io main logo

Arduino Buttonless LED Matrix Clock with ADXL335 sensor

2023-11-07 | By Mirko Pavleski

License: General Public License Real Time Clocks (RTCs) Arduino

This time I will describe a way to make an interesting clock on an 8x8 LED matrix, that does not contain any buttons and is adjusted by different movements. This is another one of my collection of unusual clocks, which you can view on my clocks playlist. By the way, I made this clock many years ago on a homemade matrix of 64 yellow 5mm LEDs, and you can watch it at the given link.

gtyu

Unlike then, this time the clock is made on a ready-made matrix, and I will also describe to you in detail the way of making it, together with the schematic diagrams, and the code.

 

Otherwise, this beautiful clock is the work of Mark Wilson on whose site you can view the original project. The device is relatively simple to build and consists of several components: - Arduino Nano Microcontroller - 8x8 LED matrix with a common anode - DS3231 Realtime clock module - ADXL335 Accelerometer module - LDR resistor - 74HC595 shift register IC.

yt7ut7u

The project is very old and dates back to 2012, so the code needs to be compiled with Arduino IDE version 1.0.6 or older to compile without errors. The Matrix Clock folder contains all the required libraries, so no additional installations are required. Otherwise, in the "PINS" tab, a connecting diagram is presented, which contains a small error in the markings of the cathodes and anodes of the diodes in the matrix. In any case, I recommend that you use the schematic diagrams that I have presented below, one is if you use a ready-made 8x8 matrix with a common anode, and the other is with a DIY matrix. Just to mention that the common anode and common cathode single color matrices are actually hardware identical, just the rows and columns are swapped. Also, in the original project, an IMU sensor of the AM3X type was used, but since this module is no longer produced, I used the ADXL335 sensor module.

ytiyui

Now in order for the device to function normally, it should be in the IMU.cpp tab in the line: return Voltage/VoltsPerG*100.0; -> to replace the value 100.0 with 150.0 The IMU sensor module should be placed exactly in that position as you see in the pictures. Now let's see how the device works in reality. This clock has several display modes that can be changed by rotating the case 90 degrees. When switching on, the current time appears and the hour is represented in the middle with a 5×7 font, and the minutes are represented on the edges, with a resolution of 5 minutes (more precisely, the distance between two diodes is 5 minutes).

jhihui

Now if we rotate it to the left by 90 degrees, it shows the current room temperature in degrees Celsius.

dtrsdrt

One more time to the left by 90 degrees and we enter a mode where the time is written in words.

ftyutyu

And with the next rotation, we get the so-called Matrix screen effect.

dtry

Finally, by rotating again to the original position, the current time is presented again. Next, I will describe the setting of this clock. - To get the Random Pseudo Words effect, we go in the following order: Face up -> upside down- For setting the hours the order is: Up -> Left -> down -->> right = set - For setting minutes: Repeat Up -> Left -> Down -- >> right = set. Similarly, we can change the sensitivity of the LDR resistor, as well as the brightness of the display.

huiyu

And finally, a short conclusion. Although the project is more than 10 years old, the idea of replacing mechanical buttons with an IMU sensor is excellent. Nowadays, it is possible to make such a clock with njs2812 matrix, which would be extremely simple to make, cheap, but also the possibility of many color effects. I'm suggesting this as an idea for a DIYer who is more adept at programming than I am.

yuft

gftygfty

 

制造商零件编号 A000005
ARDUINO NANO ATMEGA328 EVAL BRD
Arduino
¥172.33
Details
1.5" 8X8 DOT MATRIX ANODE ROW CA
制造商零件编号 GMC15R88
1.5" 8X8 DOT MATRIX ANODE ROW CA
QT Brightek (QTB)
¥35.10
Details
制造商零件编号 163
MOD ADXL335 5V READY 3AXIS +-3G
Adafruit Industries LLC
¥121.69
Details
制造商零件编号 SN74HC595N
IC 8-BIT SHIFT REGISTER 16-DIP
Texas Instruments
¥11.15
Details
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum