DIY Videoconsole With Addressable Leds and an STM32F103
by MakingDevices in Circuits > Arduino
241 Views, 8 Favorites, 0 Comments
DIY Videoconsole With Addressable Leds and an STM32F103
PixelBytes was born in colaboration with Wurth Elektronik and their new RGB IC LEDs. They sent me a bunch of them to test so I though of making a proper evolution of my previous video console. For this time, I wanted to test a new manufacturer for the microcontroller, so it is my first big project working with the STM32. Hopefully it will help to develop new exciting games as it is arduino-compatible. On top of that, I decided to add a giroscope sensor so we can add more ways to have fun within the gaming experience ;).
Supplies
- Get the gerber files for the host-pcb and the display-pcb (You will need both)
- Send them to a PCB Manufacturter (Our sponsor is PCBWAY)
- You can read the schematics for both pcbs.
- The firmware is still in development, but you can download the latest version here
- The BOM files with all the components can be found here.
Remember that even if the project is published, new hardware&software can be deployed, so stay always with stable (or released) branches of the repository.
The Screen
The screen of 234 (13*18 matrix) from Wurth Elektronik is formed by a matrix controlled by just one pin of the STM32F103CBT6. The display can light with any RGB color, but they need to combine the three of them to show white.
In addition, a NPN transistor is used so we can turn on or off the power of the screen. This is neccesary due to the power consumption of the internal IC of the addressable LED.
Finally, the display is a separated board, so you can assemble it more easily. You have castellated holes so you can solder the display to the pcb-host once everything is soldered.
The BMS
The BMS can be divided in five parts:
- TP4056: The famous chip that will charge any Li-Ion battery from the USB port of the device.
- TPS61085T: It is the boost converter that level up the voltage from the battery to a stable 4.5V for the display.
- TC1108-3.3V: It is a buck converter that provides the main voltage to the microcontroller and the sensors on the board.
- Display Enable: As explained before, we count in a NPN transistor to disconnect the battery and the TPS61085T from the display, so the power consumption is almost zero when the display is off.
- USB Connector: The USB that serve as a charging port but it also is a communicating port.
The Main Chip
The circuit is built around the STM32F103CBT6. It is a 32-bit microcontroller with USB capabilities, which will be perfect for the development of the bootloader and the later integration with the arduino IDE. It has 128 Kbytes of program memory size and 20Kbytes of SRAM. The frequency can go up to 72MHz.
Even if we only use one pin for controlling all the display, we have several IO pins for the buttons, the buzzer, the voltage measurements for the battery and also the accelerometer from Wurth Elektronik.
The PCB Design
As said before, the project consists on two pcbs that are soldered together once everything else is in place. Both of the PCBs are four layer and you can access the Kicad project and the gerbers in the github repository as everything is OpenSource
Solder the Boards
I strongly recommend you to buy a stencil to spread the solder paste. In addition, the display will be a pain in the ass, so a reflow oven or a reflow plate is almost mandatory to build the display board.
For the host-pcb, a hot gun can be used, but you need to have special care with the ISDS sensor, as it has pretty small pads underneath the component.
Once all the SMD components are soldered, I started soldering the TH components. Last but not least, solder the battery connector.
Software and Burn the Chip
For the time being, there is no working bootloader, so you will need a ST-Link (a clone or an original, it does not matter). You will need to use the arduino IDE and load the firmware you will find in the github repository
At the time I am writting this, only the snake game is developed, but sooner than later more games will be added.
Disclaimer: For the STlink, you will need a Tag-Connect 6-pins cable for the SWD on the board.
Final Result
We have different versions so far:
- Prototype: Mounted over a breadboard with a Nucleo-board.
- V0.1: We have a problem with a battery conection, but everything else is working.
- V0.25: We fix the battery problem and added the NPN transistor so we can turn off the screen.
- V1 (in development): small fixes and a different USB port.
Everything is OpenSource and you can collaborate with the project (or submit your ideas) on the github repository
Links and Sponsors
First of all, if you like my projects, I strongly recommend you to follow us on our Instagram profile, Where you will be updated on a daily basis.
In addition, you have my tree-link website to check all my social media and website!
https://makingdevices.com/links/
Finally, I would like to thank PCBWAY, the sponsor of this project. I really recommend you pay them a visit if you are thinking of ordering some Gerbers at any time in the future. I am truly impressed with how good they work and the high quality of their PCBs.