Skip to the content
2 layers22 × 10 mmRc brake lights, the printed circuit board in 3D

Easy-to-build light controller for RC cars that simulates realistic brake and reversing lights

Size
22 × 10 mm
Copper layers
2
Thickness
1.6 mm
Parts
9
Nets
10
Pads
29
Tracks, vias
32, 3
Pours
2
Routed
Yes
KiCad
KiCad 4
Created
22 Apr 2018
Updated
16 Oct 2022

Overview

Rc brake lights is an open-source printed circuit board by laneboysrc, from the laneboysrc/rc-brake-lights repository on GitHub, published under the MIT licence. It is a 2-layer board of 22 × 10 mm with 9 parts on 10 nets, routed with 32 tracks and 3 vias.

Its parts include 3 resistors, 2 connectors, 1 capacitor, 1 IC and 1 diode. It belongs with the 8051 (CH55x, STC, AT89) boards of this library.

README

README.md

RC Brake & Reversing Light controller

This project is an easy-to-build light controller for Radio Controlled cars that simulates realistic brake and reversing lights.

RC Brake Lights circuit board

RC Brake Lights 3D view

It hooks between your ESC and receiver.

The brake lights automatically turn on for a short, random time when the throttle goes to neutral. The reversing lights turn on when driving backwards.

The light controller supports various ESC modes to ensure the lights are in sync with the way your ESC controls the drive motor.

The aim of the project is to make it easy to build anyone with minimal electronics knowledge. If you are unable to build it yourself please contact laneboysrc@gmail.com; we'd be happy to sell you one.

If you are looking for more than just brake lights check out our full-featured DIY RC Light Controller.

Building the electronics

The core of the light controller is the inexpensive STC STC15W104. It is a modern interpretation of the venerable 8051 MCU. This MCU was chosen due to its very low cost and because it can be programmed with an inexpensive USB-to-serial adapter, or using the serial port on a Raspberry Pi.

You can find the STC15W104 usually 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 electronics/ folder

For convenience the schematics are available as PDF file.

Due to the small number of required components, the light controller can be easily built on a perfboard. The following image shows how to wire everything up:

Perfboard construction

(The Fritzing source file for this drawing is provided in the fritzing/ folder)

If you plan to build several controllers it may be worth-while to order printed circuit boards. Gerber files for manufacturing PCBS are provided, as well as the KiCad source files. Note that the PCB uses SMD components rather than through-hole. Still, it is designed for hand-soldering.

Loading the firmware

You can find the pre-compiled firmware released as part 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, use STCGAL.

Loading the firmware with an USB-to-serial adapter

Follow the instructions at https://github.com/grigorig/stcgal#installation to install STCGAL. This programming tool for the STC MCU requires Python 3, and the Python 3 libraries pyserial and tqdm.

  • 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 controller as follows:

Flashing with a USB-to-serial adapter

Do not connect + yet, only after starting STCGAL.

Download the firmware Intel-HEX file and execute STCGAL as follows:

text
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

Important: Replace the COM port number with the one of your USB-to-serial adapter. In Windows consult the Device Manager to find out which port number to use.

Once started, STCGAL prompts you to power-cycle the circuit. Plug in + and STCGAL should find the MCU and program it. Your controller 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 programming.

Connect the RC-brake-lights controller as follows:

Flashing with Raspberry Pi

Do not connect + yet, only after starting STCGAL.

Download and unpack STCGAL:

text
wget https://github.com/grigorig/stcgal/archive/master.zip
unzip master.zip

Install the required Python 3 modules:

text
sudo apt install python3-serial python3-tqdm

Use sudo raspi-config and go to Interface Options, then P6 Serial where you can disable log-in via the serial console, and enable the serial hardware:

text
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 execute STCGAL as follows:

text
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 controller is now ready to use.

Connecting the light controller to your RC system

The light controller has two parallel connectors on the input side. Connect your ESC to one of the plugs and connect the TH input of the receiver with a male-to-male servo cable to the other plug.

The B output drives two red LEDs in parallel for the brake light function, the R output drives two white LEDs in parallel for the reversing light function.

Wiring diagram

Forward/Reverse setup

Depending on your RC system, out of the box the light controller may operate in the wrong direction (forward and backward reversed). To change this, press and hold the setup button on the light controller for 3 seconds. The LEDs will start flashing quickly.

Now move the throttle on the transmitter to the driving direction that would make the car move forward. When LEDs will go out and the light controller has now learned the correct direction of the throttle signal for forward. This setting 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 controller can be programmed for the specific behavior of your ESC.

To change the ESC mode, perform the following steps: Press and hold the setup button on the light controller. After 3 seconds, the LEDs will start to flash quickly. Press the setup button one more time. The light controller enters the ESC mode setting and flashes the current ESC mode number:

1 flash: Forward/Brake/Reverse with timeout

When driving forward and then immediately pushing the throttle to reverse, the ESC performs a brake function. The ESC only allows driving backwards if the ESC has remained in neutral position for a few seconds.

Example: 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 throttle remained in neutral for a long time.

Example: Tamiya ESCs

3 flashes: Forward/Reverse (Crawler mode)

Crawler ESC with drag brake, where the ESC switches from forward directly into reverse.

4 flashes: Forward/Brake

ESC in race mode where reversing is not allowed.

Press the setup button repeatedly until the desired ESC mode has been selected. Then press-and hold the setup button until the LEDs stop flashing. The ESC mode has now been persistently stored.

Parts

9
QtyValueFootprintReferences
2220Resistors_SMD:R_0603_HandSolderingR2, R3
110uCapacitors_SMD:C_0603_HandSolderingC1
11N4148Diodes_SMD:D_SOD-323_HandSolderingD1
11kResistors_SMD:R_0603_HandSolderingR1
1LEDPin_Headers:Pin_Header_Angled_1x03_Pitch2.54mmJ2
1STC15W104SMD_Packages:SOIC-8-NU1
1Setup buttonWLA:Tact_switch_SMD_6x3_6x2_5SW1
1THWLA:Pin_header_02x03_board_edgeJ1

Similar boards

  • 2 layers103 × 30.5 mmTS Back Endcap, the printed circuit board in 3D

    TS Back Endcap

    EEVengers/ThunderScope

    ThunderScope GitHub Repo

    9 parts1.3kMIT
  • 2 layers31.8 × 47.6 mmNGC 38 connector, the printed circuit board in 3D

    NGC 38 connector

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    9 parts1.2k
  • 2 layers24 × 27.3 mmExpansion Card Retrofit, the printed circuit board in 3D

    Expansion Card Retrofit

    FrameworkComputer/ExpansionCards

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

    9 parts1.1kCC-BY-4.0
  • 2 layers15.6 × 17.3 mmSKR Mini TFT Thermistor Board, the printed circuit board in 3D

    SKR Mini TFT Thermistor Board

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    9 parts1.1kGPL-3.0
  • 2 layers39.1 × 49.5 mmLearnoliver, the printed circuit board in 3D

    Learnoliver

    hackclub/OnBoard

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

    9 parts915
  • 2 layers17.4 × 16.9 mmToolhead, the printed circuit board in 3D

    Toolhead

    tanaes/whopping_Voron_mods

    9 parts787GPL-3.0
  • 2 layers9.8 × 108 mmExpander, the printed circuit board in 3D

    Expander

    wntrblm/Castor_and_Pollux

    A Juno-inspired dual oscillator

    9 parts587
  • 2 layersKeyboard after, the printed circuit board in 3D

    Keyboard after

    adamws/kicad-kbplacer

    KiCad plugin for automatic keyboard's key placement and routing

    9 parts547GPL-3.0

Questions

How big is the Rc brake lights PCB?

It measures 22 × 10 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Rc brake lights use?

9 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.

Where can I download the Rc brake lights KiCad files?

From the laneboysrc/rc-brake-lights repository on GitHub, at the commit this page was made from: the board is electronics/rc-brake-lights.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Rc brake lights design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).