5 channel Analog LED controller – ET-AL01
Michel asked me to design an analog LED controller with 5 channels, since he wanted to be able to control a nice LED strip with an RGB LED and a warm white and cool white LED (Like Philips Hue). When searching the internet he could only find controllers with a single channel, four channels or ten channels. But a 5 channel controller for these kind of LED strips was simply not available!
He was very specific in his request, so I wrote down some design parameters first.
Please subscribe to our YouTube channel and hit the bell to never miss a (esp)thing!
The requirements were:
- ESP32 or ESP8266 controlled. Preferably ESP32, due to the higher PWM frequencies the ESP32 supports
- Operating at 12 or 24V DC, so the LED power supply could also feed the controller
- Five channels, with an as high as possible current capability
- Must fit in a nice looking enclosure, should not look too industrial
- Parts should be available at AliExpress or Amazon for affordable prices, making it as cheap as possible to build
- Firmware should be ESPhome. (Something which is achieved by using the ESP32 / ESP8266 modules)
The heart of the design is a “Wemos Mini” (compatible) module. By using these modules, it becomes very easy to integrate, and greatly simplifies the design. It also allows people to pick an ESP32 or ESP8266 module, which creates a little bit of flexibility too.
To control the output channels, MOSFETs will be used, with a standard footprint / case so that a number of compatible models can be applied. The design is flexible enough to drive most of them.
Why use a 74HCT244 chip?
Since the ESP modules use I/O levels of 3.3V, and a lot of MOSFETs require more control voltage, a so-called “level shifter” needs to be used. Many different solutions exist, ranging from the usage of driving transistors, special level shift chips, or the usage of TTL chips. All solutions have pros and cons, and the decision has been made to use a TTL chip in this design. The decision was based on the easy (cheap) availability on AliExpress, very standardized operating parameters (irrespective of manufacturers!) and small footprint on the PCB.
The 74244 exists in a number of TTL families, all with their own parameters. When looking at the requirements of the design of the controller, the most suitable family is the “HCT” family. See the below table from the datasheet of Texas Instruments SN74HCT244:
See the below table for the IO levels of the ESP32:
If you compare the two tables you see that the output level of the ESP chips are defined as a factor of “VDD”. VDD is for the modules used 3.3V, so if we convert the levels listed to fixed numbers, we see that the “High-level output voltage” has a minimum of 2.64V, and for the “Low-level output voltage” a maximum of 0.33V.
When the input levels of the 74HCT244 datasheet are checked, we see that the max. “Low-level input voltage” is defined as 0.8V. Therefore the 0.33V is low enough to ensure that the level is detected properly. Same for the min. “High-level input voltage” which is defined as 2V. The 2.64V from the ESP32 is therefore more than enough to ensure the logic “1” is detected properly.
In the table you can also see the output voltage specification. There are only two levels given, “Min” and “Max”. The “Nom” (nominal) is missing, since the output will only take 2 possible levels, which are defined as 0V and “Vcc”. The “Vcc” in the circuit will be 5V, therefore the output voltage for a logical “1” will be 5V. This is very beneficial for the driving of the MOSFET connected to the output pin.
The last parameter which is important is the max. output current per pin:
The 74HCT244 can supply max. 35mA continuously per pin. This is important to drive the gate of the MOSFET sufficiently in a rapid manner. The gate – source connection of a MOSFET acts like a capacitor, which needs to be charged for the resistance between the drain and source to lower. If the current flowing into the gate is limited / low, this charging will be slow(er). The HCT series has one of the highest maximum output currents. The opposite for the “switching off” of the MOSFET, the capacitor needs to be discharged. A lower discharge current capability will result in slower switching.
For a more in-depth discussion regarding the design, read this blog post.
Circuit diagram and PCB
The design I came up with is this:
The PCB design of this diagram:
On top you see the GPIO interface pins. These can be used as a general purpose IOs. The number between ( ) are the IO numbers of the ESP32 modules, and the numbers between the [ ] are the IO numbers of the ESP8266 modules. You will need these numbers to configure the IOs in the software configuration. These pins are capable of handling 3.3V and 5V input levels, and if used as an output, 3.3V output level. To feed possible sensors, right next to the GPIO pins you will see the 5V and 3.3V power output connections. The 3.3V power is coming from the ESP module, and is limited in power. Try to limit the amount of current drawn from the pin (Think in currents not exceeding about 100mA). If you need a lot more current at 3.3V level, use an external voltage regulator, connected to the 5V power output. This is fed by the regulator on the PCB, and would normally be able to supply 250mA or more, depending on the regulator used, to the pin.
Next to the GPIO pins, the serial port of the ESP module has been made available. This serial port uses 3.3V signal levels. “TXo” means transmit out, data from the ESP module to the outside world, “RXi” means receive data from the outside world to the ESP module. Be careful not to exceed the 3.3V voltage levels, since this might damage the module permanently.
At the bottom you see the screw terminals. The power input is located on the right hand side, and the LED strip will be connected to “CW, WW, R, G, B, +”
Bill Of Materials
See below the list with the components you will need to build the AL01 controller. A number of these items will not be sold in smaller quantities at AliExpress. We will try to use the same components as much as possible in future projects.
We would really appreciate it if you will use the links below to buy the components, since it will give a little bit of commission to us without any additional cost for yourself. These commissions will be used to cover some of the costs involved in the development of the project design.
|WEMOS1||1||Wemos Mini D1 ESP32*||AliExpress|
|WEMOS1||Wemos Mini D1 ESP8266*||AliExpress|
|IC1||1||Switching regulator 8-32V in, 5V out||AliExpress|
|T1, T2, T3, T4, T5||5||IRLZ44N or compatible logic level MOSFET||AliExpress|
|C1||1||470µF / 16V 6mm diameter, 2.54mm pitch||AliExpress|
|C2||1||0.1µF – pitch 5.08mm||AliExpress|
|R1, R2, R3, R4||4||Resistor 1k||AliExpress|
|X1||1||8 pole terminal, or 4x 2 pole. 5.00mm pitch||AliExpress|
|JP1, JP2, JP3||Male pin headers. 2.54mm pitch||AliExpress|
|PCB||1||A 5-pack is the smallest order at PCBway, so talk to your friends 😉||PCBway|
|LED strip||opt.||12v RGBCCT||AliExpress|
|LED strip||opt.||24v RGBCCT||AliExpress|
|Power Supply||opt.||SANPU SMPS LED Driver 110v/220v 12v 150w||AliExpress|
|Power Supply||opt.||SANPU SMPS LED Driver 110v/220v 24v 150w||AliExpress|
* You only require one of the modules!
Putting it together
When building the project it is the easiest to start with identifying the components purchased as discussed in the blog post. After sorting the components and cleaning the PCB, start with the lowest components first. For this project, we advise to work in this order:
- Pin headers
- Screw terminals
- ESP module headers (Use the hints in the soldering blog post!)
- Electrolytic capacitor
- Voltage regulator. Make sure that the voltage regulator is not taller than the MOSFETs! You can do this by bending the pins of the voltage regulator a little bit, so it will lean a little bit.
Once all components are soldered in place, perform a good visual check of all joints, and pay particular attention to possible solder bridges (unwanted solder connections between pins). Clean the excess solder flux from the PCB using alcohol!
Once everything is soldered together, it is time for the software configuration. Follow the instructions in our YouTube video. Configuration files below:
esphome_wifi_ssid: 'your_ssid' esphome_wifi_password: 'your_wifi_password' esphome_ap_password: 'your_ap_password' esphome_api_password: 'your_api_password' esphome_ota_password: 'your_ota_password'
substitutions: devicename: et-al01_esp32 long_devicename: ET-Al01 Analog LED controller (ESP32) esphome: name: $devicename platform: ESP32 board: mhetesp32minikit wifi: ssid: !secret esphome_wifi_ssid password: !secret esphome_wifi_password ap: ssid: "$devicename Fallback Hotspot" password: !secret esphome_ap_password captive_portal: logger: api: password: !secret esphome_api_password ota: password: !secret esphome_ota_password sensor: - platform: wifi_signal name: "WiFi Signal $devicename" update_interval: 60s output: - platform: ledc pin: 26 frequency: 25000Hz id: ledc_cw - platform: ledc pin: 18 frequency: 25000Hz id: ledc_ww - platform: ledc pin: 19 frequency: 25000Hz id: ledc_r - platform: ledc pin: 23 frequency: 25000Hz id: ledc_g - platform: ledc pin: 05 frequency: 25000Hz id: ledc_b light: - platform: rgbww name: "$long_devicename LED-strip" warm_white: ledc_ww cold_white: ledc_cw red: ledc_r green: ledc_g blue: ledc_b cold_white_color_temperature: 5000K warm_white_color_temperature: 3000K
substitutions: devicename: et-al01_esp8266 long_devicename: ET-Al01 Analog LED controller (ESP8266) esphome: name: $devicename platform: ESP8266 board: d1_mini wifi: ssid: !secret esphome_wifi_ssid password: !secret esphome_wifi_password ap: ssid: "$devicename Fallback Hotspot" password: !secret esphome_ap_password captive_portal: logger: api: password: !secret esphome_api_password ota: password: !secret esphome_ota_password sensor: - platform: wifi_signal name: "WiFi Signal $devicename" update_interval: 60s output: - platform: esp8266_pwm pin: D0 frequency: 100 Hz id: ledc_cw - platform: esp8266_pwm pin: D5 frequency: 100 Hz id: ledc_ww - platform: esp8266_pwm pin: D6 frequency: 100 Hz id: ledc_r - platform: esp8266_pwm pin: D7 frequency: 100 Hz id: ledc_g - platform: esp8266_pwm pin: D8 frequency: 100 Hz id: ledc_b light: - platform: rgbww name: "$long_devicename LED-strip" warm_white: ledc_ww cold_white: ledc_cw red: ledc_r green: ledc_g blue: ledc_b cold_white_color_temperature: 5000K warm_white_color_temperature: 3000K
Using a channel as a digital output
If you do not require all the analog channels, there is an easy option to create a digital channel out of an unused analog channel. To do this, do not mount the MOSFET for the channel, but instead install a jumper from the top connection to the center connection of the MOSFET footprint. This will make a direct connection from the 74HCT244 output, to the screw terminal. Once this connection is made, the output can be used to drive a WS28XX (or compatible) LED strip. For the respective channel a YAML entry needs to be edited;
Light: - platform: fastled_clockless chipset: ws2811 pin: GPIO5 num_leds: 238 max_refresh_rate: 8ms rgb_order: BRG name: "$long_devicename-DIGITAL" effects: - addressable_rainbow: name: Rainbow Effect With Custom Values speed: 10 width: 50 - addressable_rainbow: name: Rainbow mega fast speed: 35 width: 200 - addressable_scan: name: Scan Effect With Custom Values move_interval: 100ms scan_width: 1 - addressable_color_wipe: name: Color Wipe Effect With Custom Values colors: - red: 100% green: 100% blue: 100% num_leds: 1 - red: 0% green: 0% blue: 0% num_leds: 1 add_led_interval: 100ms reverse: False
After the design was finished, we both build a controller to test. The controller which Michel built has been in use for a number of weeks now, without any issue. No issues with MOSFETs getting warm or overheating, no issues with stability, so we are confident that this controller will work for you too.
This project, the ET-AL01 5 channel Analog LED controller, was the reason for starting this website. We found out that there are more circuits which we think people are looking for to build. What we decided to do is to create more projects with the same design philosophy; Easy to build, of easily and cheaply available components, and well tested. And they need to look nice too!
For us one of the major things is also to make sure that the projects / circuits we publish are safe to build by other people. We will do our utmost best to ensure this. However, like with all other DIY projects you will find online, we will not be responsible for any possible (financial) damage which might result from building our projects. Yes, unfortunately we need to include this disclaimer…
If you run into issues during the construction, or you have any question regarding this controller, please leave a comment below. We will try to reply as soon as possible!
Make sure to subscribe to our YouTube channel so you won’t miss any of our upcoming project videos!