
Controller
google/mozc-devices
Circuit diagrams and firmware source code for Gboard DIY keyboards

A small RC car with an IMU based steering controller!
RC CAR TEST PCB is an open-source printed circuit board by ManasNik, from the ManasNik/An-RC-project repository on GitHub. It is a 2-layer board of 47 × 97 mm with 11 parts on 47 nets, routed with 201 tracks and 12 vias.
Its parts include 9 connectors and 2 resistors.
This is a work in progress personal project that I started with a goal of building an RC car from scratch with an IMU based steering controller imitating real life steering action and to gain experience with STM32 microcontrollers. My initial goal for this project is to complete the basic functioning of the car and steering control. I have planned and I am planning to add more features in the future such as controls to adjust certain parameters to affect the handling of the car, telemetry, lap time counter and even a camera to get a First Person View(FPV)!
Hardware:
Software:
The following section documents my project journey in detail from the start to the current stage.
TB6612FNG x2
STM32F103CBT6 x2
Potentiometers for intial testing x2
NRF24L01 x2
MPU6050 x1
(It's a mess of wires!)
I started my project by testing individual motors with the driver and eventually wired them all together. I initially tested using the STM32F446RE Nucleo board since it was readily available with me then. Obviously it's an overkill for this project and so I decided to use the STM32F103CBT6, which is still a powerful MCU for this project but leaves me headroom for adding interesting features later on in the future. I used two potentiometers - one for speed control(throttle) and the other for steering control. This is the point I learned about DMA(Direct Memory Access) as it was needed to process the two ADC channels efficiently. Additionally I used the built-in button on the Nucleo board to enable/disable reverse under a specified speed. My idea is to implement the reverse button on the steering wheel controller later on in the future to engage/disengage reverse like in an F1 car! It has to be noted that the controller is not designed or involved in this initial setup - This is a hardwired test.
I wanted to design a simple platform to hold my motors (the chassis) and small wheels to fit my desired form factor. I decided to design and 3D print my own design.
Chassis design
Wheel design
The outcome of the design
(Placed a mouse there for comparison!)
(The car circuit is on the left and the controller on the right)
In this stage of the project I decided to add the remote control using two NRF24L01 modules - one on the car and one in the controller. To develop the driver for communicating with this module, I followed a YouTube tutorial and the NRF24l01 datasheet. This is the first time I wrote a driver by manipulating low level registers - a great learning experience indeed! Once the driver development was done, it was time to test it. I shifted the two potentiometers and the reverse button to one of the two STM32F103CBT6 boards I will be using for the rest of this project and connected the NRF24L01 module via SPI. Similarly, I shifted the motor drivers to the other STM32F103CBT6 board and connected the other NRF24L01 module via SPI. I was now able to control the car through wireless communication!
I chose the cheap and easily available MPU6050 Inertial Measurement Unit(IMU) module and developed a driver to communicate with it using I2C. After I confirmed I was receiving the gyroscope and accelerometer data from the IMU, I started working on the code to process it. I used a simple Exponential Moving Average (EMA) filter to smoothen out some noise from the readings, and used a complementary filter to combine the readings of both the gyroscope and the accelerometer to improve the steering angle estimation.
I scaled the steering angle estimation and computed a steering amount to add or subtract from the PWM control values to change the motor speeds according to the direction of the steering. The car doesn't have a deciated mechanical steering system and the steering rotation is achieved by varying the speeds on each side of the car. To turn left, the speed is reduced on the left side and increased on the right side and vice versa.
I designed a simple 2-layered PCB to transfer the breadboard circuit onto the 3d printed car platform I previously designed. I can now test the car on the ground with the control logic I developed in software and fine tune it to improve the handling characteristics. I intentionally made the PCB design simple by using footprints for female/socket headers spaced appropriately to insert the off-the-shelf modules. This reduced the complexity of the design, made it cheaper to manufacture and made it possible to resue the modules for other projects.
Schematic
PCB design
Final PCB
This was my first time designing a PCB on my own and ordering it. Obviously I made mistakes!
(This section will be updated from time to time till the completion of the project)
This project for me isn't just about building an RC car - it's a fun learning experience that will help me dive deep into complete embedded system design from the ground up.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | Screw_Terminal_01x02 | TerminalBlock_4Ucon:TerminalBlock_4Ucon_1x02_P3.50mm_Horizontal | J6, J7, J8, J9 |
| 2 | Conn_02x08_Socket | Custom_footprints:TB6612FNG | J2, J3 |
| 2 | R | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_Horizontal | R1, R2 |
| 1 | Conn_01x02_Pin | Connector_JST:JST_VH_B2P-VH_1x02_P3.96mm_Vertical | J5 |
| 1 | Conn_01x04_Socket | Custom_footprints:NRF24L01 | J4 |
| 1 | Conn_02x20_Socket | Custom_footprints:Bluepill | J1 |
It measures 47 × 97 mm and has 2 copper layers, 1.6 mm thick.
11 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the ManasNik/An-RC-project repository on GitHub, at the commit this page was made from: the board is PCB DESIGN/PCB DESIGN PROTOTYPE/RC_CAR_TEST_PCB/RC_CAR_TEST_PCB.kicad_pcb and its schematic PCB DESIGN/PCB DESIGN PROTOTYPE/RC_CAR_TEST_PCB/RC_CAR_TEST_PCB.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask ManasNik before reusing the design.

google/mozc-devices
Circuit diagrams and firmware source code for Gboard DIY keyboards


FrameworkComputer/ExpansionCards
Reference designs and documentation to create Expansion Cards for the Framework Laptop

hoglet67/RGBtoHDMI
Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!


tardate/LittleArduinoProjects
a collection of "Little Electronic & Arduino Projects", most involving electronics or an Arduino in one way or another!

basilfx/TRADFRI-Hacking
Hacking IKEA TRÅDFRI products, such as light bulbs, window blinds and other accessories.