

Controller
A ESP32 based LED-Controller for various light scenarios
- Size
- 70 × 40 mm
- Copper layers
- 4
- Thickness
- 1.6 mm
- Parts
- 108
- Nets
- 78
- Pads
- 357
- Tracks, vias
- 947, 175
- Pours
- 5
- Routed
- Yes
- KiCad
- KiCad 5 (file 20171130)
- Created
- 25 Oct 2020
- Updated
- 3 Jun 2021
Overview
Controller is an open-source printed circuit board by Gustice, from the Gustice/LightController repository on GitHub, published under the MIT licence. It is a 4-layer board of 70 × 40 mm with 108 parts on 78 nets, routed with 947 tracks and 175 vias.
It is built around the ESP32-WROOM-32, LMR62421XMF and 74AXP4T245BQX, with the SS24FL among its other parts. Its parts include 52 resistors, 22 capacitors, 13 connectors, 6 diodes and 5 ICs. It belongs with the ESP32 boards of this library.
Main components
4ESP32-WROOM-32
SMD,18x25.5mm-40℃~+85℃ -98dBm 2.4GHz 2.7V~3.6V 20dBm Bluetooth4.2 ESP32-DOWDQ6 UART、SDIO、SPI、I2C、GPIO、PWM、ADC、DAC SMD,25.5x18mm WiFi Modules ROHSEspressif SystemsWiFi ModulesLMR62421XMF
SOT-23-5-40℃~+125℃@(TJ) 1 1.6MHz 2.1A 2.7V~24V 2.7V~5.5V 7mA Adjustable Boost Boost Built-in No SOT-23-5 DC-DC Converters ROHSTexas InstrumentsDC-DC Converters74AXP4T245BQX
DHVQFN-16-EP(2.5x3.5)DHVQFN-16-EP(2.5x3.5) Specialty Logic ROHSNexperiaSpecialty LogicSS24FL
SOD-123F-55℃~+125℃ 1 Independent 100uA@40V 2A 40V 50A 550mV@2A SOD-123F Schottky Diodes ROHSonsemiSchottky Diodes
README
README.mdLightController
A ESP32 based LED-Controller for various light scenarios.
Purpose
This project is intended to be used as base platform for various Light projects. Its based on the ESP32 WiFi SoC and utilizes the Espressif development framework (ESP-IDF).
On top of that this is a small hardware and board abstraction layer that simplifies the hardware access and provides further bases for device implementation.
The main purpose is of course to have fun an learn several new techniques and hacks. I also hoped to dig into a promising WiFi platform that enables a wide band of applications. As I happily discovered it was absolutely worth the time and I'm glad that I didn't stuck to arduino.
The intended Products that should result from this are extreme fancy night lights for bedrooms of my children and the stairwell and low key disco lights / ambient lights for the living room.
Platform
This platform is capable of driving most LEDs I encountered so far (at least the very most common LEDs I have seen so far).

- Ordinary RGB-Stripes (optionally with white channel)
- Serial LED-Stripes of both both types
- Most common WS2812 (with RTZ-protocol)
- Less common APA102 (with easy to use SPI)
- I2C-Expander for single or chains of LEDs
The main board integrates two switches, two analogue inputs and 1 encoder to be integrated in controlling of the station. It also can utilize a UART interface to other protocol bridges or a infrared interface which are also both prepared (the IR-Interface would come at cost of one digital function).
The board also aims to drive short LED-strips solidly with 5 V power supply. Hence it integrates also a small boost-converter.
The next picture shows a block diagram of the platform. Note that the expander board is not designed yet and the main-board will be eventually redesigned to be smaller an perhaps also provide a battery management circuitry.

The next picture shows the first Device I build up. It is solidly for implementation purpose.

The next picture shows a web GUI page to control the LED colors. It currently only supports to control exactly the first LED of each channel.

Usage
There is currently not very much useful stuff going on. But to get faster familiar with this project this could help you to read.
The device is flashed in three steps. One can use the VS-Tasks defined in the Firmware-Project for it:
Flash & Monitor: Builds and flashes the app to target. Note that certain config files will be remain missing until also the parameter partition and webserver partition is also flashed.Flash Data-Image: Flashes the config files on the parameter partition (therefor the folder factoryCfg is packed to binary and flashed)Flash Web-Image: Flashes the files for the webserver to the server partition (therefor the folder serverPages is backed to binary and flashed)
After powerup the device provides a WiFi-access point.
- SSID
cLight - Password
FiatLux!
You can connect to the device and display the root page by typing e.g. "192.168.4.1/" (at least in my case). On this page you see some (currently) little relevant in formation and can navigate to set up your WiFi-parameter or to setup the Lights.
- If you setup the WiFi-parameter the next time the device will try to connect to the provided station. You can Reset the parameter by pressing button 1 at start up
- If you setup the LEDs you currently can only setup the first LED-slave.
Development
The development is done in Visual Studio Code so far. To be able to join the development you must have the IDF installed. Add also the path to the installed IDF as system path variable.
Note: This project is based on the idf version ESP-IDF v4.2-dev-1034-ge599b794b. I missed the step to stick to a certain tag or something. Sorry for that. You pretty sure will have to make minor adaptions on things like Queues or Wifi parameter.
However, to be able to compile the code you must start vs code from command line with exported environment variables
- Open console in your project path
- Type
%IDF_PATH%\export.batto setup the environment for used toolchain - Type
code .to open current path in VS Code - No you are able to start build-process by just hitting
Ctrl+Shift+B
To be able to flash your ESP you need a USB to UART bridge, that also exposes RTS and DTR pins. These are needed to reset and set the ESP32 into programming mode.
Architecture
- The main applications instantiates the driver and starts the web server.
- Each component is in charge of an more or less well defined part of the whole structure
- Filesystem reads the files from data-storage and partly interprets them
- LightEffect is in charge of conduction the soft switching of the lights and provides all color definitions
- MyConnect is a component to establish wifi connection by either providing a network in Access-Point mode or connection to an Access-Point.
- MyWeb provides the http-server and the Rest-API
- MyHal is a composite of simple c++ modules to simplify the usage of the SoC hardware
- Devices utilizes MyHal to drive different devices connected to the main board
- The flash is divided in 3 main partitions.
- Program flash
- Data-storage
- Web-storage
- The web-server is build in a way similar to a single-page-application manner, but not that strictly. Most content is intended to be generated dynamically on page. The data is intended to be set or fetched via rest-requests.
- Device-IDs and device configuration are read from data-storage. The http-webserver, provides the whole webpage from web-storage.
Note: Many of the components are partly ore even mostly tested by unit-tests (that are run locally on the computer not on the SoC). Currently catch2 is used as test-framework.
Note: You can also use the ServerMock.py script to emulate parts of the behavior of the http-webserver. At least display and the navigation across the websites. Also partly demo data is already generated.
Issues
This project is anything but finished. I have several open tasks and they somehow appear to increase rather than getting less.
- Status LEDs don't display any status yet (just fancy blink codes).
- Linear power states with configurable current flow are not designed yet.
- Wide parts are written more in c-style rather than c++. Sorry i was a little in hurry
ToDos
- OverTheAirUpdates would be nice
- Design for linear Endstage (expander board)
- Adaption of ZigBee
- Logging should be switched to network path. Means some network placed destination must be configured as logging destination.
Parts
108| Qty | Value | Footprint | References |
|---|---|---|---|
| 19 | 10k | Resistor_SMD:R_0603_1608Metric | R3, R10, R11, R12, R13, R14, R15, R16, R28, R29, R30, R31, R37, R38, R48, R49 +3 |
| 12 | 100nF | Capacitor_SMD:C_0603_1608Metric | C3, C4, C5, C6, C7, C8, C9, C12, C13, C15, C16, C18 |
| 11 | 100R | Resistor_SMD:R_0603_1608Metric | R18, R19, R20, R21, R26, R27, R43, R44, R45, R46, R47 |
| 7 | 0R | Resistor_SMD:R_0603_1608Metric | R1, R5, R7, R17, R22, R23, R39 |
| 5 | NC | Resistor_SMD:R_0603_1608Metric | R24, R25, R40, R41, R42 |
| 4 | 0R | Resistor_SMD:R_1206_3216Metric | R33, R34, R35, R36 |
| 4 | 1uF | Capacitor_SMD:C_0805_2012Metric | C17, C19, C20, C21 |
| 4 | IRLML2030 | Package_TO_SOT_SMD:SOT-23 | Q1, Q2, Q3, Q4 |
| 3 | 10uF | Capacitor_SMD:C_1206_3216Metric | C1, C2, C10 |
| 3 | SS24FL | Diode_SMD:D_SOD-123 | D3, D5, D6 |
| 2 | 2x4 2mm | Connector_PinSocket_2.00mm:PinSocket_2x04_P2.00mm_Vertical_SMD | J11, J12 |
| 2 | 4,7uF | Capacitor_SMD:C_1206_3216Metric | C14, C22 |
| 2 | 470R | Resistor_SMD:R_0603_1608Metric | R4, R6 |
| 2 | NC | Resistor_SMD:R_0805_2012Metric | R51, R52 |
| 2 | PH-S3B | Connector_JST:JST_PH_S3B-PH-SM4-TB_1x03-1MP_P2.00mm_Horizontal | J4, J8 |
| 2 | PH-S4B | Connector_JST:JST_PH_S4B-PH-SM4-TB_1x04-1MP_P2.00mm_Horizontal | J3, J9 |
| 2 | PH-S5B | Connector_JST:JST_PH_S5B-PH-SM4-TB_1x05-1MP_P2.00mm_Horizontal | J5, J6 |
| 2 | SW_SPST | Button_Switch_SMD:SW_Push_1P1T_NO_6x6mm_H9.5mm | SW1, SW2 |
| 1 | 10 uH | Inductor_SMD:L_Taiyo-Yuden_MD-4040 | L1 |
| 1 | 2.2k | Resistor_SMD:R_0603_1608Metric | R2 |
| 1 | 56pF | Capacitor_SMD:C_0603_1608Metric | C11 |
| 1 | 74AXP4T245 | Package_SO:TSSOP-16_4.4x5mm_P0.65mm | U2 |
| 1 | 86k | Resistor_SMD:R_0603_1608Metric | R32 |
| 1 | AP1117-33 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U1 |
| 1 | EN12-VS11AF18 | _ProjectParts:RotaryEncoder_EN12-VS11AF18 | SW3 |
| 1 | ESP32-WROOM-32 | RF_Module:ESP32-WROOM-32 | U3 |
| 1 | LMR62421XMF | Package_TO_SOT_SMD:SOT-23-5 | U4 |
| 1 | Micro_SD_Card_Det | Connector_Card:microSD_HC_Molex_104031-0811 | J13 |
| 1 | PH-S2B | Connector_JST:JST_PH_S2B-PH-SM4-TB_1x02-1MP_P2.00mm_Horizontal | J2 |
| 1 | PH-S6B | Connector_JST:JST_PH_B6B-PH-SM4-TB_1x06-1MP_P2.00mm_Vertical | J10 |
| 1 | SH-BM6 | Connector_JST:JST_SH_BM06B-SRSS-TB_1x06-1MP_P1.00mm_Vertical | J7 |
| 1 | TSDP341xx | OptoDevice:Vishay_MOLD-3Pin | U5 |
| 1 | USB_B_Micro | Connector_USB:USB_Micro-B_Molex-105017-0001 | J1 |
| 1 | blue | LED_SMD:LED_0603_1608Metric | D4 |
| 1 | green | LED_SMD:LED_0603_1608Metric | D1 |
| 1 | red | LED_SMD:LED_0603_1608Metric | D2 |
The 106 most common of 108 parts.
Questions
How big is the Controller PCB?
It measures 70 × 40 mm and has 4 copper layers, 1.6 mm thick.
What parts does the Controller use?
108 parts, built around the ESP32-WROOM-32, LMR62421XMF, 74AXP4T245BQX and SS24FL. 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 Controller KiCad files?
From the Gustice/LightController repository on GitHub, at the commit this page was made from: the board is CircuitBoard/ControllerPCB/Controller.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Can I use the Controller 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).
Similar boards
- 4 layers189.9 × 136.5 mm

- 2 layers50 × 70 mm

Time2time
Resaj/time2time
Chronometer with partials measurement for the line-following competitions
97 parts5 - 2 layers100 × 100 mm

- 4 layers83 × 106 mm

- 2 layers38.1 × 38.1 mm

- 2 layers58 × 28 mm

TheKNOBDaughterboard
makerust/TheKNOB
In: File > Preference > Additional Boards Manager URLS Add: https://dl.espressif.com/dl/packageesp32index.json, http://arduino.esp8266.com/stable/packageesp8266comindex.json Select: Tools > Board > Board Manager Search…
51 parts1 - 2 layers119 × 79 mm

Home Ambient
abrahanlp/Home-Ambient
2-wire home thermostat with temperature, humidity, pressure and air quality measures.
62 partsAGPL-3.0 - 2 layers109.8 × 41.5 mm
