template and source for hardware projects
Go to file
King Kévin 2459349c9e doc: add v6 changes 2024-03-08 05:53:23 +01:00
kicad lib: add smaller LDO 2024-01-05 18:18:36 +01:00
library@14de4004fd lib: update repo 2024-03-08 05:52:55 +01:00
.gitignore make: export 3d model 2023-11-30 18:22:11 +01:00
.gitmodules lib: add esp library 2023-09-25 02:54:33 +02:00
.qeda.yaml lib: add smaller LDO 2024-01-05 18:18:36 +01:00
CHANGELOG.md doc: add v6 changes 2024-03-08 05:53:23 +01:00
DEVELOPMENT.md doc: better list dependencies 2023-03-30 22:30:26 +02:00
KiBOM_CLI.py make: add bom generator (not included in pip) 2023-03-30 22:30:26 +02:00
LICENSE.txt add CERN-OHL-S license 2021-07-22 12:22:58 +02:00
Makefile make: remove components from 2d rendering 2023-12-04 17:25:04 +01:00
README.md doc: add v4 changes 2023-12-04 17:53:30 +01:00
bom.ini make: include DNF parts 2023-11-30 18:22:41 +01:00
fp-lib-table lib: add external library 2023-09-27 01:58:54 +02:00
sym-lib-table lib: add custom symbols 2023-12-04 12:01:38 +01:00
version switch to next version 6 2023-12-19 19:40:18 +01:00
wled_chain.kicad_pcb brd: improve RJ45 and add tooling holes 2024-01-05 18:20:21 +01:00
wled_chain.kicad_pro brd: improve RJ45 and add tooling holes 2024-01-05 18:20:21 +01:00
wled_chain.kicad_sch sch: fix placement info 2024-01-05 18:19:12 +01:00

README.md

WLED chain is a board for the WLED firmware, allowing to power, control, and chain them over Ethernet cables.

purpose

The WLED firmware is ideal to control addressable LEDs strip. WLED chain is a hardware board for it, matching my usage: robust remotely controlled LED strip based light installations for festivals. It allows to:

  • use of the shelf 6-60V power supplies to power 5V LED strips
  • inter-connect the boards to form long chains (only connecting the first to externally provided power and data)
  • use cheap Ethernet CAT5E cables to inter-connect them (also over long distances)
  • provide power and data (DMX512) over the Ethernet cables
  • proper 5V LED data signal output (up to three of them)
  • embed microphone for sound reactive effects
  • put board in waterproof enclosure (for sonoff or generic 100x68x50 mm).

usage

flashing

There are several ways to flash the board (from easiest to more development friendly):

  • connect USB to serial adapter TX and RX signals on the DEBUG port. Short DL to GND pin while powering up to enter download mode
  • populate DL and RST buttons to not have to short the pins by hand
  • connect USB to serial adapter RTS to RST and DTR to DL on the DEBUG port, to switch to download mode from the computer
  • populate the USB-C port and CH340K USB to serial adapter to avoid using and external adapter

Once in download mode, we can flash the WLED firmware using the web interface, or esptool:

wget https://install.wled.me/bin/release_0_14_0/esp32_bootloader_v4.bin
esptool.py --port /dev/ttyACM0 --after no_reset write_flash 0x0 ./esp32_bootloader_v4.bin
wget https://install.wled.me/bin/release_0_14_0/WLED_0.14.0_ESP32_audioreactive.bin
esptool.py --port /dev/ttyACM0 --after no_reset write_flash 0x10000 WLED_0.14.0_ESP32_audioreactive.bin

TODO: make a custom WLED build with

  • status LED set
  • audio reactive enabled
  • DMX out (needs to be implemented)
  • DMX in enabled (needs to be implemented)
  • all pins configured (that's just a configuration)

status

On the RJ45 ports there are 4 LEDs. These indicate the status:

  • the center-right LED indicates the >6V status: it is on when 6-60V power is provided to the board
  • the rightmost LED indicates the 5V status: it is on when the on-board DC-DC voltage regulator converts the 6-60V to 5V right after 6-60V is plugged in, or when 5V power is provided externally
  • the center-left LED indicates the DMX RX traffic: it blink on DMX input traffic (when the board is configure as slave)
  • the leftmost LED indicates the DMX TX traffic: it blinks on DMX output traffic (when the board is configure as master)

installation

The board can be used in various configurations:

  • LED strip (for small, medium, or large LED installations): using 5V or 12V
  • power supply: 5V or 6-60V
  • enclosure: with or without a waterproof enclosure
  • chain: a single standalone device, or with additional WLED chain devices
  • DMX: controlled using WiFi, or DMX

You can find the details for each aspect in the corresponding section.

scenario

Let's go from the most basic, to the most complex installation. We will start with a standalone device.

For very tiny installations, with less than 60 LEDs, or 1 meters of 60 LEDs/meter strips:

  • connect the 5V LED strip to the 5V screw terminal and one of the IO spring loaded ports next to it
  • use a 5V 2A USB power supply and connect it to the USB-C power
  • don't forget to specify the 2000 mA limit in the WLED LED configuration

For tiny installations, with 5 meters of 30 LEDs/meter strips:

  • connect the 5V LED strip to the 5V screw terminal and one of the IO spring loaded ports next to it
  • use the screw terminal to also have separate wires for power injection on the LED strip in the middle and or other end of it
  • connect a 12V to 48V 2A (or more) power supply to the barrel jack
  • the on-board 5V regulator will provide power to the LEDs (up to 3A)

For medium installations:

  • connect the 5V LED strip ground and data wires to the board (see above)
  • use an external 5V power supply powerful enough for the number of LEDs you want
  • connect the external power supply to the 5V screw terminal
  • connect the LED strip power pins directly to the power supply
  • connect additional cables from the power supply to the strip to inject power every 2.5 meters (else the white will appear more orange)

For large installations:

  • connect the 12V LED strip ground and data wires to the board (see above)
  • use an external 12V power supply powerful enough for the number of LEDs you want
  • connect the external power supply to the 6-60V screw terminal
  • connect the LED strip power pins directly to the power supply
  • thanks to the 12V supply, you need far less injection points (every 5-10 meters should be enough)

For small wide-spread installations:

  • this uses multiple boards, and chains tiny installations
  • on each board, connect the 5V LED strip to the 5V screw terminal and one of the IO spring loaded ports next to it
  • on only the first board, connect a 12V to 60V (the higher to better) 2A power supply to the barrel jack or 6-60V screw terminal
  • connect all boards using Ethernet cables on the RJ45 ports, allowing the first board to power all others

For outdoor wide-spread installations:

  • this is similar to small wide-spread installations, but the boards are mounted in waterproof enclosures
  • since the barrel jack port is not accessible anymore, use the 6-60V screw terminal
  • since the RJ45 ports are not accessible anymore, and the RJ45 connector do not fit through the enclosure cable cables anymore, cut Ethernet cables and insert the individual wires in the RJ45 1-8 spring loaded terminals (the color of the wires is described on the back of the board, or just look at the cut RJ45 connector)
  • you can insert the two wires of both Ethernet cables in each terminal

For large wide-spread installations:

  • connect the 12V LED strip ground and data wires to the board
  • use multiple external 12V power supplies powerful enough for each site
  • only connect one board to the external power supply to the 6-60V screw terminal
  • connect all boards using Ethernet cables, allowing the first board to power all others

LED strip

5V LED strips are very common an cheap, and suited for small installations. But the LED strips have only small traces to carry the power, with non-negligible resistance. The brighter the LED is, the current it uses, the higher will be the voltage drop. This voltage drop accumulated along the LED strip, leaving the last LEDs on the strip with a lower voltage. This cause the blue LED to not be as brightness, making the white more orange.

One way to compensate for this voltage drop it to use power injection. Connect additional thicker wires from the power supply to the middle or end of the LED strip. But this also requires large power supplies to be able to deliver more current.

Another way is to use 12V LED strips. Thanks to the higher voltage, the LED require less current, reducing the voltage drop. And a voltage drop on higher voltages has relatively less effect. This requires far fewer power injection, or brighter lights. It also makes the power supplies more compact, and allows using not as large cables.

power supply

The board has a built-in 5V DC-DC converter. This allows powering the board using off-the-shelves 12V to 48V power supplies. The power can come from the barrel jack, screen terminal, or Ethernet cable. The power is injected back to the Ethernet port. The board with also provide enough power for the 5 meters of LED strips.

For larger LED installations, connect the 5V or 12V LED strips directly to the external power supply suited to it. Connect ground and data of the LED strip to the board. Only connect one of the chained board to the power supply.

DMX

WLED is normally controlled over WiFi, but this is unreliable for large installation, particularly when multiple devices need to be controlled simultaneously. To cope for that, DMX512 support has been added. The DMX signals are on the RJ45 port. Thus chaining multiple devices not only provides power, but also data. No more air interferences, and distance limitations.

Any of the WLED can act as DMX master controller, and all others are slave devices. If you are using an external DMX controller, use a XLR adapter. This allows connecting regular XLR cables, and will forward the data through the RJ45 port. The adapter also allows injecting power.

The boards have a DMX switch to configure the DMX bus daisy chain. In the chain position, the data signals are passed through to the other RJ45 port. This should be used on all boards in the chain except the last. In the end position, a 100 Ohm termination resistor is put on the data lines to mitigate signal reflection. This should de used on the last board in the chain, if it also ends the DMX chain. In the loop position, the data lines are passed back on the RJ45 port, returning through the chain. This should be used on the last board in the chain, if you want to continue the DMX chain (i.e. on the DMX out port on the XLR adapter).

limitation

You can see the WLED logo on the board, but this is NOT AN OFFICIAL WLED BOARD. There is not such thing as a WLED board, as WLED is just a firmware. The logo is only there to show the board is intended to be used with WLED. And I find the logo nice.

power

The built-in 5V DC-DC converter is only rated up to 3A, limiting the total maximum output to 15W. This means you can power up to 3 meters of WS2812b 30 LEDs/m strip at full brightness. For more LEDs, limit the brightness in WLED, or use multiple boards and chain them. Voltage regulators capable of more current are rare and expensive. They are also less compact, would exceed the space available in the enclosure.

The initial design used a 5A capable voltage converter, but this current could not be sustained. Even with 90% high efficiency, the board could not handle passive dissipation of the generated heat. You could add a heat sink and fan when used outside the enclosure, but this is not the intended use.

If you need more than 3A continuously, you are exceeding the use case of this board. You can use multiple boards if you have separate LED strips, sharing the same 6-60V power supply. Else switch back to using an external 5V or 12V power supply and connect the LED strips directly to it. You can even power the board with the same 5V or 12V power supply using the DC jack (for 6-60V) or screw terminals (for 5V and 6-60V).

The 6-60V power input allows using any kind of power supply, like common 12V, 24V, or 48V. It also allows using 48V LiPo batteries (going up to 55V), to operate the devices without grid power.

There is an over current input protection of 1.8A using a PPTC. This is to protect the board from very bad accidents, and because Ethernet cables are no meant to carry power (PoE limit is 960 mA per pair, we are using two). To be able to power multiple WLED chain boards, each drawing up to 15W, use higher voltages (48V up to 60V).

The 6-60V input is also reverse polarity protected using an inline Schottky diode after the fuse. The 5V rail input/outputs is not reverse polarity protected. The onboard voltage regulator has an 3A over-current protection.

wiring

The board are primarily meant to be used with common sonoff enclosure. This provides protection against dust, metal induced shorts, and water. The board can be mounted using M2.5 self tapping screws to the enclosure. All cables inserted in the enclosure can be connected to the board while mounted in the enclosure using the terminals.

Since RJ45 8P8C connectors does not fit the PG7 glands, they need to be cut. The resulting wires can be inserted in the spring loaded terminal marked RJ45, following the pin numbering. The wire colors are also listed on the back of the board, in case it is already not mounted. In case boards need to be chained, two Ethernet cable can be inserted using the two glands, and the same number wires should be inserted together in the terminal.

6-60V power supply can be inserted using additional glands on the opposite side of the Ethernet cables. The wires should be connected using the screw terminal marked 6-60V. Follow the +/- indications on the board.

The LEDs strips cables can be inserted using additional glands on the opposite side of the Ethernet cables. The 5V and ground wire should be grouped together and connected using the screw terminal marked 5V. Follow the +/- indications on the board.

The data wire should be inserted in the spring loaded terminal marked LED DATA. The corresponding I/O configured in WLED is indicated on the side.

In case the board is not mounted in the enclosure, other ports can be used. 5V power can be provided through the USB port. 6-60V power input can be connected using the 2.1/5.5 mm ID/OD DC barrel jack. The Ethernet cables can be directly connected using the two RJ45 ports (either is fine as they are interconnected).

The USB, DC barrel, and RJ45 ports are not accessible when the board is in the enclosure simply because there isn't enough space. But feel free to add hole to the enclosure to access them. This would also remove the waterproof advantage though.

features

Features already implemented:

  • daisy chain capability (providing data and power)
  • built-in power 5V DC-DC converter (input up to 60V, output up to 3A)
  • RS-485/DMX512 interface (not galvanicailly isolated)
  • RJ45 port, providing power (PoE, passive, alternative B) and data (as used in DMX512), 2x for chaining capability
  • RJ45 individual wires connector, using easy to insert spring loaded terminal, for allowing using Ethernet cable in waterproof enclosure, where the 8P8C connector does not fit through the PG7 cable gland
  • DC barrel jack power input for 6-60V, for convenient use with off-the-shelves power bricks, allowing injecting power
  • screw terminals for thicker wires, for larger power supplies and usage in waterproof enclosure
  • proper 5V DOUT for WS2812B IC input, 3 channels (can be combined for LEDs requiring an additional clock signal)
  • in-line LED data resistors for signal conditioning. Ideally it should use a smaller value since it's intended for running the signal along ground over short distances, but there were already 100 Ohm on the board for DMX512 termination, and it allows better compatibility for longer single ended cables.
  • external WiFi antenna port, by using the U variant of the ESP32-S2-MINI, with appropriate connector
  • PCB fitting in waterproof enclosure (sonoff or generic 100x68x50)
  • high voltage input (up to 60V, using TPS54560DDAR)
  • input protection (reverse polarity, PPTC), only for 6-60V power input
  • microphone for sound reactive

Features that might get implemented:

  • RDM support (mostly software support)

Features will not be implemented:

  • XLR DMX512 connectors: they take too much space and I never know if I should use the 3 or 5-pin variant. Instead I designed a separate DMX + power injector adapter board
  • full galvanic isolation: not really needed as the devices should be chained with a single power supply, preventing any ground potential difference. Another splitter board could provide isolation, at the beginning of the chain.
  • USB Power Delivery: this is just a convenience feature, but using expensive lower power USB chargers with expensive ISB-C cables is not ideal for the intended usage (festival installation). And you can still use power-delivery by adding a cheap PD trigger board next to it.
  • Lithium battery input and charger: it does not fit the intended usage, with large external power supplies providing enough power for power hungry LED strips. Small batteries would not be able to handle that over longer time. You can still use the power bank on the 5V power input though, and charge the battery separately. The 6-60V allows connecting 3-13S LiPo batteries.
  • Power over Ethernet (active): I do use passive Power over Ethernet, by providing power on 2 pairs of the Ethernet cable that are not used for 10/100 Mbps communication. This allows using very simple and inexpensive injectors to power power, using and power supply. Active PoE require specials and more expensive injectors or power supplies, and complex extractors in each device. Feel free to use PoE though. There are plenty of relatively cheap injectors and extractors that you can use as external devices next to the boards.
  • fuse protection for input and output protection, round or automotive: there is not enough space to place such large fuses. We already have one input protection (fuse + reverse polarity on 6-60V), so you just have pay attention to the 5V outputs (limited to 3A by the DC-DC converter) or input (supported, but not the intended use).
  • line-in audio input (using ESP32-LyraT-Mini design as reference): running additional audio wires is too cumbersome, particularly for simple effects based on loudness or FFT. Clubs or festivals are loud enough for the microphone to pick up the audio at a decent level.

background

origin

WLED is a very good firmware to control LEDs such as the WS2812b. Just get a cheap ESP32 development board, flash WLED using the web installer, and off you got. I did that very often, and for small projects it's fine. But for larger projects with multiple devices, you encounter some limitations:

  • you have to separately take care of the power supply: LED strips can draw a lot of current which the development board cannot handle
  • remote control using ArtNet over WiFi can be problematic: WiFi routers don't all handle broadcast well, WiFi coverage is not always good, WiFi is jittery
  • providing power to multiple device can be a pain: there is not always a power plug nearby

this project tries to solve these issues, and since I designed a board, provide even more features

bus

The first problem is WiFi:

  • ESP32 operate on 2.4 GHz, a crowded spectrum
  • ESP32 board with built-in antenna have poor reception
  • WiFi router don't always handle broadcast well

This make the WiFi a poor interface to remotely control LEDs with multiple WLED (using ArtNet or similar) in a real-time manner (low latency and jitter).

The first solution would be to use Ethernet instead of WiFi. This would keep the networking capability. ESP32 supports this interface, and the WT32-ETH01 makes it available. But to connect multiple devices you need a Ethernet switch, and run wires from this switch to each device (e.g. is a star topology). I wanted to be able to chain the devices, to increase the distance while reducing number of cables and their length.

You could use the KSZ8863 3-port Ethernet PHY. This can act as Ethernet interface for the ESP32, and built-in switch. Now the boards can be chained. There is already schematic available, but the support still is in beta, and the implementation is complex are not inexpensive.

I also thought about CAN bus. This is a very resilient bus, and the ESP32 has an interface for it. But WLED does not support it yet, and the host would need a bridge for it.

Finally I arrived to RS-285. It's another differential protocol, often used in the industry because resilient. And the implementation in WLED is easy because it's just serial. This is when I remembered that DMX512 also uses RS-485. And DMX is the de facto standard in the lighting event world. Thus, interfacing with it will be very easy and there is a lot of software support. The limitation is that it supports only one universe of 512 channels, or 170 RGB LEDs. A solution would be to control modes instead of individual LEDs.

intended use case

The purpose is to provide a simple board able to control LEDs strips. It should be better than general purpose development boards. A built-in voltage converter allows driving an LED strip using regular external power supplies. It is intended for small installations, not requiring more than 5 meters of LED strings per device. This keeps the power supply small. The board is not intended for large LED installation requiring a lot of power.

The board should be cheap enough to be a default choice when creating a small LED installation. The goal is under 10€ per board. This prevents me for using Ethernet network, since the PHY and magnetics are expensive (~ 3€).

It should not require a complex installation. Something like a LAN requiring a permanent switch or router is already too much. The board should be able to work on its own.

It should make it easy to create multi-device installations. This is enabled by the chaining capability. You can connect one device to another, and the job is done. This single link provides power. This allows using a single power supply for the whole installation, just connected to one device in the chain. It should use cheap and common cable for the chain link, such as Ethernet cables.

It should accept common off the shelves power supplies, such as 12-24V 2-4A bricks.

The chain link should also allow synchronising the devices, without requiring a network connection. Ideally it should also provide an interface to reliably remotely control them. For that it uses the DMX512 protocol.

other

Here a list of other similar LED controllers:

  • QuinLED-Dig-Quad: WLED compatible, but no DMX or built-it power supply for the LEDs
  • 8 Port LED Distro: similar to QuinLED-Dig-Quad, with Ethernet (not just an option), but same issues
  • QuinLED-Dig-Octa System: similar to 8 Port LED Distro, just beefier
  • SP201E: cheap DMX512 LED strip controller, but no WLED, RJ45, or power supply
  • H807DMX: compatible with most LED strips, and has RJ45 DMX512 input, but no WLED or power supply