Custom clock project using the LilyGo T-Display-S3 AMOLED
- Display the time on a high resolution AMOLED display
- Different colour/brightness based on interior lighting state (on/off)
- Colour Settings (digit colour, background opacity, whiteness level)
- Size Settings (width, thickness, padding)
- Automatic display timeout when accessory is off
- ESP-IDF <= v4.4.6
- Arduino-ESP32 <= v2.0.14 (Place inside components folder)
- TFT-eSPI <= v2.5.31 (Place inside components folder)
- Required Libraries (See Official ESP-IDF Installation Steps)
- Additionally:
python3-virtualenv
- Additionally:
- menuconfig (Type "menuconfig" in Command Palette)
- Set all
TFT_eSPI
driver configuration pins to 0 (we are usingrm67162.h
andrm67162.cpp
for driving the display) "Autostart Arduino setup and loop on boot"
should be enabled
- Set all
- CMakeLists.txt
- Make sure
main.cpp
andrm67162.cpp
are both inSRCS
entry foridf_component_register
INCLUDE_DIRS
should be set to"."
(Relative path ofmain
directory, includes the header files)
- Make sure
- VSCode (ESP-IDF)
- Set device to
esp32s3
- Set flash method to
UART
- Set device to
This project requires a clock with 3 buttons (Asia/Pacific Model). If your clock does not meet this specification, you will need to purchase a separate clock housing.
A Linux-based OS is necessary to flash the software. Debian Desktop or Ubuntu are recommended.
-
Procure T-Display-S3 AMOLED and Necessary Materials
- T-Display-S3 Amoled (https://www.lilygo.cc/products/t-display-s3-amoled)
- Wire cutters
- Soldering iron
- Solder
- Heat-resistant cables (compatible with 2.54mm spaced pins)
-
Order PCB via JLCPCB Service
- Register an account at https://jlcpcb.com/
- Navigate to https://cart.jlcpcb.com/quote/Upload and upload the gerber file located in
/docs/schematics
- Select "PCB Assembly"
- Proceed with the checkout process, providing the files located in
docs/schematics
.
-
Order 3D Print via JLC3DP Service
- Log in using the same account
- Repeat the following process for both models:
- Navigate to https://jlc3dp.com/3d-printing-quote and upload the STL file located in
/docs/models
- Choose a material that can withstand high temperatures
- Add to cart and proceed with the checkout process
- Navigate to https://jlc3dp.com/3d-printing-quote and upload the STL file located in
-
Software Flashing
- Download Visual Studio Code from https://code.visualstudio.com
- Install the dependencies as specified in the README
- Follow the configuration steps as specified in the README
- Clone the project:
git clone https://github.com/Cxmrykk/Corolla-Clock.git
- Navigate to the project directory:
cd Corolla-Clock
- Open with VSCode:
code .
- Clone the project:
- Connect the T-Display-S3 AMOLED board via USB-C and click the "Flash" button at the bottom
-
Soldering Process
- Trim the wires on both sides (approximately 0.5cm) and tin them using the soldering iron
- Solder wires to the T-Display-S3 AMOLED pins as follows:
- GPIO 42: LAMP
- GPIO 43: ACCESSORY
- GPIO 44: RESET
- GPIO 45: HOUR
- GPIO 46: MINUTE
- VBUS: VCC
- 3.3V: 3.3V
- GND: GND
- After soldering, trim the ends to prevent contact (trim the top of the board, not the cables)
- Solder the other ends of the cables to the PCB (refer to the pin map above)
- Verify that all pins are soldered and none are touching
-
Clock Removal and Assembly
- Remove the clock by following a tutorial on YouTube
- Disassemble the clock by following a tutorial on YouTube (Exercise caution as the clock housing clips are brittle)
- Remove the existing buttons and circuit board
- Secure the new PCB to the clock housing using the existing screw
- Insert the 3D printed mount and buttons (some force may be required for proper insertion)
- Insert the Screen and PCB:
- The USB-C port should be on the right side. The LILYGO logo should be upright (same orientation as clock housing)
- Insert the screen first, then clip in the rest of the housing (with the PCB attached)
- Finally, reinstall the clock and reassemble your car.
-
Adjusting Alignment and Time
- Press the reset button (
:00
) to toggle the mode overlay - Press the hour button twice (
H
) to cycle to the vertical positioning menu - Press the reset button once more and hold the
H
andM
buttons to adjust the screen position - Adjust the screen position as needed for clear text readability
- Configure your clock as required (Set time, align screen, colours, sizing, brightness, etc)
- Press the reset button (