Tetris Clock
Required Parts
- Raspberry Pi Pico (I used a clone with only 4mb flash )
- 32x64 P3 LED Matrix
- U-Blox NEO-6M GPS Module ( every other NMEA compatible GPS module should also work )
- DS1307 RTC Module
- 5-10k Photoresistor
- 10k Resistor
- USB-C Breakout Board
Assembly
You can find the GPIO pins used in the configuration.h file. Please note, RX and TX for the GPS module need to be swapped. For the Photoresistor, you have to connect one side to 3.3V and the other side to the GPIO pin and a 10k resistor to GND. To mount the Photoresistor, I drilled a small hole in the case of the LED matrix and glued it to the outside. The RTC and the GPS module can be mounted with a M3 Screw to the back case, which is 3D printed and can be found in the case folder. For connecting the power I removed the original power connector from the LED Matrix and soldered a wire directly to the USB-C Brakout board, which can be glued into the back case. I also connected the USB data wires ( D+
& D-
) from the breakout board to the Pi Pico, if you connect them also, I would recommend to also place a button somewhere outside the case, which you can use to enter the programming mode of the Pico. The GPs and the RTC modules needs to be powered from the 3.3V the Pico provides. On my Pico board the vref
Pin was not connected to the 3.3V, so I had to solder a wire from the 3.3V pin to the vref
pin. The RTC module also needs a CR2032 battery to keep the time when the clock is not powered.
Optinal Feature: NTP Sync
If the synchronisation via GPS is not working for you, you can connect a ESP8266 to the pico and install on the ESP the NTP Client Software. Then the ESP8266 will fetch every 30 minute a NTP server and sends the time to the Pi Pico.
Software installation
The Software is build using the PlatformIO IDE with Arduino Framework. You can either compile the code yourself or use the precompiled binary, which you can download here. To upload the binary to the Pico, you have to press the BOOT
button while connecting the Pico to your PC. Then you can copy the firmware to the Pico like a USB drive. Afterwards it should automatically disconnect and then start with the new firmware.