T-Rex runner - Resurection of an old project

Introduction
When a rep from PCBWay asked me if I had an idea for a new project, in absense of new ideas, I decided to bring back an old unpublished side project and give it a second life. By doing this, I got a chance to address issues identified years ago that I was not able to fix at that time.
So what it is about? Around 8 years ago, I made a keychain sized toy, running the T-Rex runner game (Google's easter egg game from the Chrome browser) featuring Atmega88 microcontroller, 128x32px OLED, two push buttons and a 100mAh LiPo battery.
This time, I have chosen to try out the WCH CH32V003 microcontroller (aka 10cent MCU) and use **ch32fun**[1] open source development environment with gcc-riscv64.
As a bonus, this can be a perfect gift for a kid.
Changes
Hardware
Schematic:

Improvements:
- Previously, flashing the firmware required soldering wires directly to the MCU. To simplify things, a dedicated connector has been added in form of 3 test points. Now, the flasher can be connected with pogo pins to quickly flash the new firmware.
- Changes on connectors:
- Micro USB connector has been replaced with modern USB Type-C.
- A JST 1.25mm connector has been added for the LiPo battery.
- A proper power mux (TPS2112APWR) has been added instead of using diodes and transistors.
- Tantalum capacitors are replaced with ceramic.
- Finally, the problem I couldn't solve in the original version - battery leak has been solved by:
- moving the voltage divider after the power switch
- using 2x100k resistors.
PCB:

Assembled PCB:

As you can see, PCBs are marked v1.0.1. This means I messed up something in the first version. A big lesson learned while working on this simple project is to never trust the default footprints provedided by the software - double check everything before making the order. In the first iteration, footprints for transistors had wrong pinouts.
There is no problem some creative thinking and enamel wire couldn't fix:

Firmware
Changes on the firmware side were straight forward:
- The ch32fun has been added as a git submodule to the repo.
- The existing C code has been ported to use the new MCU based on examples provided by the dev environment, covering GPIOs, ADC, timer and flash.
- In addition, the spaghetti code of the business logic has been refactored by using a proper state machine.
Case
The original case has been re-made in Fusion360 with slight modifications:
- Switching push buttons from 6x6x7mm to 6x6x4.3mm simplified the desing of button caps. They are no longer hollow. Instead of wrapping around the button, they are idended to be mounted on top of the button. This resulted in more precise 3D prints with no additional cleanup/sanding required.
- The bottom lid has an updated latching mechanism. Its design is borrowed from TinyPPS' design.
T-Rex runner - Resurection of an old project
Project images are for reference only. Actual production is based on the manufacturing files on the project page.
Please review the designer's notes (e.g., PCB thickness) and select the appropriate options.
PCBWay is not responsible
for issues caused by unsuitable parameter selections.
For more important ordering information, please refer to
Read More
Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW- Comments(0)
- Likes(0)
- 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
More by Daniel Knezevic
-
T-Rex runner - Resurection of an old project
IntroductionWhen a rep from PCBWay asked me if I had an idea for a new project, in absense of new id...
-
Tiny Programmable Power Supply (tinyPPS) - version 2
TinyPPS is a pocket-sized programmable power supply built on the USB Power Delivery (PD) standard an...
-
Tiny Programmable Power Supply (tinyPPS)
TinyPPS is a pocket-sized programmable power supply built on the USB Power Delivery (PD) standard an...
-
Single Digit Nixie Clock
A small project combining ESP32 with a vintage Soviet Nixie tube from the 70’ to create an artistic ...
-
-
AudioLink – USB & Bluetooth LE Audio / Auracast Receiver with Balanced Line Outputs (nRF5340)
140 0 0 -
-
-
-
Émetteur Récepteur Optique Expérimental (communication UART ATtiny + fibre optique)
314 0 1 -
SmallOLED - Live PC Stats, Animated Clocks & Audio Visualizer
1313 0 3 -
"Talking Multimeter": Arduino-Based Speech Add-on for Multimeters with SCPI Protocol
747 0 1 -
Programmable Mist Maker - XIAO / QT PY Extension
3281 2 4







