RC Brake & Reversing Light controller
This project is an easy-to-build light control for Radio Controlled cars that simulates naturalistic brake and reversing lights .
It hooks between your ESC and receiver.
The brake lights mechanically turn on for a inadequate, random time when the choke goes to neutral. The reversing lights turn on when driving backwards .
The light accountant supports diverse ESC modes to ensure the lights are in synchronize with the way your ESC controls the drive motive .
The aim of the project is to make it easy to build anyone with minimal electronics cognition. If you are unable to build it yourself please contact firstname.lastname@example.org; we’d be happy to sell you one.
If you are looking for more than barely brake lights check out our full-featured DIY RC Light Controller .
Building the electronics
The core of the light restrainer is the cheap STC STC15W104. It is a modern interpretation of the august 8051 MCU. This MCU was chosen due to its very gloomy cost and because it can be programmed with an cheap USB-to-serial arranger, or using the series port on a Raspberry Pi .
You can find the STC15W104 normally on eBay, AliExpress, Electrodragon, LCSC …
Beside the MCU you need 3 resistors, a diode and a capacitor. The complete list of components can be found in the
For convenience the schematics are available as PDF file .
due to the little act of command components, the light accountant can be well built on a perfboard. The keep up image shows how to wire everything up :
( The Fritzing beginning file for this draft is provided in the
fritzing/ booklet )
If you plan to build several controllers it may be worth-while to order printed circumference boards. Gerber files for manufacture PCBS are provided, a well as the KiCad reservoir files. note that the PCB uses SMD components quite than through-hole. still, it is designed for hand-soldering .
Loading the firmware
You can find the pre-compiled firmware released as partially of the project .
If you want to build or modify the firmware you will need SDCC and GNU Make .
To flash the firmware into the STC15W104, practice STCGAL .
Loading the firmware with an USB-to-serial adapter
Follow the instructions at hypertext transfer protocol : //tonupboys.com/grigorig/stcgal # installation to install STCGAL. This programming tool for the STC MCU requires Python 3, and the Python 3 libraries
- Go to https://www.python.org and download Python; install it.
- Open a Command prompt (run cmd.exe)
- In the command prompt execute
pip install pyserial tqdm
Connect your USB-to-serial adapter to the RC-brake-lights accountant as follows :
Do not connect
+ yet, only after starting STCGAL .
Download the firmware Intel-HEX file and perform STCGAL as follows :
python stcgal.py -t 12000 --option low_voltage_reset=true --option low_voltage_threshold=0 --option eeprom_lvd_inhibit=true -b 1200 -p COM7 rc-brake-lights.ihx
significant : supplant the COM port number with the one of your USB-to-serial arranger. In Windows consult the Device Manager to find out which larboard number to use.
once started, STCGAL prompts you to power-cycle the tour. plug in
+ and STCGAL should find the MCU and plan it. Your control is now ready to use .
Loading the firmware using a Raspberry Pi
The Raspberry Pi has a serial port accessible on its GPIO pin-header, so we can use it directly for program .
Connect the RC-brake-lights control as follows :
Do not connect
+ even, only after starting STCGAL .
Download and unpack STCGAL :
wget https://tonupboys.com/grigorig/stcgal/archive/master.zip unzip master.zip
Install the command Python 3 modules :
sudo apt install python3-serial python3-tqdm
sudo raspi-config and go to
Interface Options, then
P6 Serial where you can disable log in via the series console, and enable the serial hardware :
Would you like a login shell to be accessible over serial? Select NO Would you like the serial port hardware to be enabled? Select YES
After rebooting, download the firmware Intel-HEX file and carry through STCGAL as follows :
python3 stcgal-master/stcgal.py -p /dev/ttyAMA0 -t 12000 --option low_voltage_reset=true --option low_voltage_threshold=0 --option eeprom_lvd_inhibit=true -b 1200 rc-brake-lights.ihx
once started, STCGAL prompts you to power-cycle the MCU. Plug in
+ and STCGAL should find the MCU and program it. Your control is now quick to use .
Connecting the light controller to your RC system
The idle control has two parallel connectors on the input english. Connect your ESC to one of the plugs and connect the TH input of the recipient with a male-to-male servo cable to the other plug .
B output drives two crimson LEDs in parallel for the brake light function, the
R end product drives two white LEDs in parallel for the turn back light function .
Depending on your RC system, out of the box the light up accountant may operate in the faulty direction ( forward and backward reversed ). To change this, press and hold the frame-up button on the abstemious restrainer for 3 seconds. The LEDs will start flashing cursorily .
now move the choke on the vector to the driving commission that would make the car travel
forward. When LEDs will go extinct and the light restrainer has now learned the adjust direction of the accelerator signal for
forward. This set is preserved, so you only have to do this once .
Changing the ESC mode
When it comes to brake function, ESC models behave differently. The light accountant can be programmed for the specific behavior of your ESC .
To change the ESC modality, perform the follow steps : crusade and hold the setup clitoris on the light control. After 3 seconds, the LEDs will start to flash promptly. Press the apparatus button one more time. The lightly restrainer enters the ESC manner set and flashes the current ESC mode count :
1 flash: Forward/Brake/Reverse with timeout
When driving forward and then immediately pushing the restrict to reverse, the ESC performs a brake function. The ESC only allows repel backwards if the ESC has remained in achromatic position for a few seconds .
model : The China 320A ESC, HPI SC-15WP
2 flashes: Forward/Brake/Reverse
After going forward and then into reverse, the ESC always performs the brake function — even if the strangle remained in neutral for a long time .
example : Tamiya ESCs
3 flashes: Forward/Reverse (Crawler mode)
Crawler ESC with puff brake, where the ESC switches from forth immediately into reverse .
4 flashes: Forward/Brake
ESC in race mode where revoke is not allowed .
Press the setup button repeatedly until the desire ESC modality has been selected. then press-and hold the frame-up button until the LEDs stop flash. The ESC manner has now been persistently stored .