|
SPI Display Array |
x 1 | |
|
Raspberry Pi Pico |
x 1 | |
|
Micro-USB Cable |
x 1 |
SPI Display Array Clock
The main idea of this project was to make a customizable clock, a clock that would have the option to change its appearance very easily, The first option was to make it with RGB LEDs and change the color at will, maybe to have the ability to change the color according to the time of the day or with the ambient temperature, but what is more customizable than a display by itself, nowadays we can find very nice IPS Displays that are very cheap.
Maybe the hardest step of this project was the clock creation, making the graphics for each clock was really challenging as I wanted to look very similar to the real ones, like the Flip Clock, the seven-segment Display clock, the LED matrix clock.
The PCB is intended to be compatible with any Microcontroller or SBC like the Raspberry as it only needs some GPIOs and an SPI Port. This makes the PCB compatible with a simple microcontroller as an Arduino to other more advanced microcontrollers. We could say this board is a breakout board for the arrangement of six displays and 4 buttons.
Before writing the clock firmware I decided to test all the designs that I have already created on the computer, so using the Raspberry Pi Pico I have written a simple program that allows me to set an image for each display in order to simulate how the clock would look like.
For this clock project, I’m using a Raspberry Pi Pico, but the code should be easily ported to any other microcontroller, as the functionality of the clock itself is basic. The Raspberry Pi Pico has a built-in RTC so results easier to implement the clock. Other Microcontrollers with Wifi Capabilities could also obtain the clock data from a web service instead of an internal RTC making the board capabilities more attractive as weather or many other kinds of IoT notifications.
The firmware uses already converted images to have the nicest look, this could also be done with a Numerical Font and interchangeable backgrounds but I think it would not look this great.
For the image conversion, I use the software LCD Image Converter which is a very useful piece of software, fo the displays in the Display Array Board I use RGB565 and copy the data to *.h file in my project.
After converting all the images for the clock we just need to call the corresponding image and send it to the corresponding display, for this, I have just used some simple if statements.
if(t.hour >= 1 & t.hour <= 9){
lcdDrawNumber(pio,sm,display1,0);
lcdDrawNumber(pio,sm,display2,t.hour);
}else if(t.hour >= 10 & t.hour <= 12){
lcdDrawNumber(pio,sm,display1,1);
lcdDrawNumber(pio,sm,display2,t.hour-10);
}else if(t.hour >= 13 & t.hour <= 21){
lcdDrawNumber(pio,sm,display1,0);
lcdDrawNumber(pio,sm,display2,t.hour-12);
}else if(t.hour >= 22 ){
lcdDrawNumber(pio,sm,display1,1);
lcdDrawNumber(pio,sm,display2,t.hour-22);
}else if (t.hour == 0){
lcdDrawNumber(pio,sm,display1,1);
lcdDrawNumber(pio,sm,display2,2);
}
After doing this for minutes, AM, and PM screens we can add some animations by sending the Space image and the colon symbol image at different rates, and also this can be applied to the configuration state of the clock.
if(ConfigureTime_MODE == OFF){
lcdDrawNumber(pio,sm,display3,COLON);
sleep_ms(500);
lcdDrawNumber(pio,sm,display3,SPACE);
sleep_ms(500);
}else{
if(Selection == HRS){
sleep_ms(200);
lcdDrawNumber(pio,sm,display1,SPACE);
lcdDrawNumber(pio,sm,display2,SPACE);
lcdDrawNumber(pio,sm,display3,COLON);
sleep_ms(200);
}else if(Selection == MINS){
sleep_ms(200);
lcdDrawNumber(pio,sm,display3,COLON);
lcdDrawNumber(pio,sm,display4,SPACE);
lcdDrawNumber(pio,sm,display5,SPACE);
sleep_ms(200);
}
}
The source code and design files can be downloaded on my webpage.
SPI Display Array Clock
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(2)
- Likes(7)
- Adam iNimbleSloth Oct 04,2023
- leoloel Sep 15,2023
- thomastron Jul 09,2023
- TYAPKIN MIKHAIL VALEREVICH Oct 31,2022
- Engineer Mar 03,2022
- Peter Misenko Apr 27,2021
- Dmitry Apr 27,2021
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- Cistercian Display I have always loved displays, I really like anything that emits light and that is controllable, that...
- Raspberry Pi Zero Dynamixel Hat The Dynamixel Hat is a board capable of communicating the raspberry Pi ( Serial ) with the Dynamixel...
- SPI Display Array Clock The main idea of this project was to make a customizable clock, a clock that would have the option t...
- ST7789V Breakout board to connect to any microcontroller. ST7789V Breakout board to connect to any microcontroller.
- JTAG to SWD and Tag-Connect Adapter JTAG to SWD and Tag-Connect Adapter
-
-
-
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
154 1 1 -
-