WLED costume Driver, worklog

Hello everyone! I would like to open a new topic related to the construction of a WLED controller that will be used to illuminate costumes using LED strips. Unfortunately, I couldn’t find any similar project online, so I decided to make my own.

Introduction
The purpose of this thread is to develop an LED-backlit costume driver. The controller will use WLED software and a microcontroller from the ESP32 family. The system will be powered by batteries. The designed device must be compact and contain all functionalities in 1 housing. Easily detachable connectors on the housing should allow you to transfer the controller to a suit with a different arrangement of LEDs.

Sample costume (LED number 424)

Requirements

  1. Dimensions about 100x50x30mm
  2. Operating time minimum 20-30 min (the performance is much shorter 10 minutes maximum)
  3. Charging time does not matter (you can charge devices on the road between shows)
  4. Easily detachable connectors for easy transfer to another costium.
  5. Charging with USB C
  6. Uploading software via USB, to consider, rather unnecessary, you can use a dedicated programmer.
  7. Low quiescent current (the device can be stored for a long time)
  8. 3D printed housing with hook and loop brackets or other.
  9. Housing in the style of extruded aluminum housings. (no need to place holes in the PCB)
  10. Design made in Easy EDA and FreeCac
  11. Number of LEDs supported: at least 500 ws2812b

Additional Requirements

  1. Connector with signals for operating accessories (infrared sensor, presence sensor, etc.)
  2. two connectors with rgbw pwm channels to support power LEDs

LED stipes
I would like to use programmable pointless LED strips as the picture

Prametres:
number of diodes per meter = 72
Current Consumption Per Meter = 8.64W
Voltage = 5V
Current consumption for the assumed number of LEDs
424/72 = Aprox 6m
Power = 6x8.64 = 51.6W
Current = 51.6W/5V = 10.32A
I think that the maximum current refers to the situation when all LEDs are lit and the costume will be illuminated in white, in other situations the current can be up to 3 times lower
However, in order to dissipate the current flowing through individual straps, it would be necessary to use more than one connector, which should also make it easier to guide the straps on the costume.
I think that two connectors on each side of the case will be a suitable compromise

Cell selection

Most of the cells in the 18650 housing that I have found on the market offer a small discharge current, for continuous operation.

In the package with the assumed dimensions, I will have room for two cells in the 18650 package. A single cell should therefore allow you to draw at least 5A of current from it.

For now, my attention was drawn to the NCR18650GA cells, on the other hand I am going to use a battery basket in this size, so probably the final choice will take place after testing.

Block diagram.

USB C
I plan to use a 6-pin USB C connector, which is why it is not possible to upload software to the ESP through this connector. On the other hand, 6 pin USB is easier to install. And the ESP program needs to be uploaded once. Since I will only use the power supply pins and CC1 and CC2 to which the resistors will be connected, the ESD protection will be a single transil diode. If space allows, I may add a small polymer fuse.
Battery Charger
I want to use the IP5306 system to charge lithium batteries, but it is not the best system of this type, especially when it comes to documentation. However, it has the advantage that I have used it in other projects and I know what to expect. Moreover, it is one of the few systems that displays the charge status on diodes without the need to connect an external processor. Additionally, the flashlight pin can be conveniently used as an enable output and turn on the entire device with one button, which allows you to reduce the quiescent current, additionally, the built-in converter can be used to power the ESP32, thus avoiding ripples and spikes that could appear when powering long LED strips
LDO
I don’t know yet what LDO I will use here, preferably one with an enable input to reduce the quiescent current
ESP32
Well, EPS, I have a problem here because there are so many versions that it is difficult to choose something. I have already managed to buy a version without Flash memory on which WLED works until the first power restart XD
The version I know of that works is this
ESP32-WROOM-32E
Efuse
Quite a useful piece of equipment that will protect us against unwanted ignition :wink: Unfortunately, I couldn’t find anything in an acceptable housing. For now, I will stay with TPS25942ARVCT, I have good experience with it, and it is included in the element database and quite inexpensive.

Step Up Converter
I’m thinking about using TPS61088 mainly because I recently designed and built a small module using it, so I will be able to test the operation of the whole thing on the desk. If it doesn’t work… I’ll look for something else

Level Shifter
here I could use two SN74LVC2T45 chips on the other hand I don’t need a bidirectional chip. Maybe I’ll look for something else

Connectors
Here I would like to use either 5024430360 from molex or SM03B-PASS from JST, additionally for programming and as an auxiliary output I would use something with a smaller pitch, e.g. 1 mm or 1.5, but preferably from the same manufacturer.

That’s all for today, stay warm, I’m waiting for your ideas and comments!

1 Like

Well i cannot add more than 1 picture to the post so iam sending block diagram here:

I did some more searching on the internet and came to the following conclusions.

  1. Connectors
    Crimping tools are expensive (of course) so I thought that when choosing a connector I should take into account whether I will have something to crimp the contacts with. At home I use a Chinese SN-2 crimping tool, it can crimp dupond connectors. The dimensions of the crimping terminal also allow it to crimp the ends of JST connectors from the XH family with a pitch of 2.5 mm. After a while of searching, I found connectors from the XA family with a 2.5mm pitch on the JST website. The geometric dimensions of both connectors are similar, especially the terminals seem similar, and the manufacturer provides the same model of crimper for mounting terminals for both the XH and XA families. XA connectors, on the other hand, are equipped with a lever. The disadvantage is the lack of angled sockets in the SMD version
  2. eFuse
    As for the reFuse system, I am still considering using another TPS2596 integrated circuit, mainly due to the more assembly-friendly package.
  3. LDO
    As for the linear stabilizer, according to the catalog note, the current consumed at peak for the selected ESP ESP32-WROOM-32E-N4 model ranges from 379mA during transmission to 118mA during reception. The power dissipated by the stabilizer should therefore be P = (5-3.3)*0.4 = 0.68W for the TLV773 system. Therefore, Tj = 21 + 242.5 x 0.68 = 185.9C
    Well, in such conditions this regulator will not work for long. I will probably have to either choose something in a larger housing or check how long the periods of operation with increased power consumption last.

looks like a good design, but overly complicated.

  • no need to step-up battery voltage, LEDs work fine down to 3.5V
  • running LEDs from battery voltage also saves you the levelshifter
  • for just 2A, you could use PTC instead of efuses
  • the LDO used on C3 superminis is not too bad

also you may want to take a look at my low-power deep-sleep usermod:

Thank you very much for your answer, very interesting observations.

no need to step-up battery voltage, LEDs work fine down to 3.5V

This prompted me to do some more research about programmable LED strips. While the documentation of ws2812b is very poor, ws2813 is much richer. All in all, it is a newer version of this chip and has a redundant data line. Which is a very useful thing, especially since it will not be difficult to cause mechanical damage to the LED strip in this application. In fact, the WS2813 has a built-in power source, so the brightness should be the same at 3.7V and 5V, the additional gain will be that less heat will be released on the diodes themselves, but on the other hand, taking into account the size of the strips, it will not matter. The voltage drop on the LED strips may be problematic, but it can be calculated, anyway, with the division that a single channel plans should not be longer than 2 meters. An additional feature of these circuits is the presence of a built-in signal amplifier on the data line.
I’ll only have to use the 4 pin connector instead of the 3 pins, but maybe it won’t be a big problem

running LEDs from battery voltage also saves you the levelshifter

I think that the use of any buffer may be necessary, exposing the bare ESP pin to the world may end tragically for him. I’m afraid that because the system will be mounted on a moving person, it can electrify very easily and ESD can be a big problem here

for just 2A, you could use PTC instead of efuses

You may be right, I have a certain aversion to PTCs because of their susceptibility to temperature changes. On the other hand, here you can assume that it works at room temperature, so it should not be a problem.

the LDO used on C3 superminis is not too bad

The case looks similar, perhaps in fact the periods of increased current consumption are short enough that it is not a problem. I’ll see how the arrangement of the elements will come out and how much space I have left

I also threw a few components on the PCB to see how it stacks up. I installed a PCB with dimensions of 96x46mm, 2 millimeters of plastic on each side, it should enclose the entire device in neat dimensions of 100x50mm. On the sides I drew zones without elements with a width of 1.5mm, this is where the board will be inserted into the case.


Unfortunately, the connectors turned out to be quite large, in addition, because they are not SMD, they generate a collision with the battery basket. I’ll look for something with a lever and a surface mount option for a while. But it seems at this stage that I will have to slightly increase the dimensions of the whole thing to, let’s say, 100x70mm, This will also be beneficial due to the antenna, ESP modules, which in this system is located under the battery. In principle, I wanted to make the mount in such a way that the PCB is directed with the battery towards the user’s body, but an additional reduction in attenuation never hurts

Check position of your ESP32 module. Espressif have some recommendations for better performance.

Connectors
Continuing work on the project, I ordered the XAP-04V-1 connector and the appropriate terminals and sockets to test. I managed to crimp an AWG22 wire in silicone insulation using the SN-2 crimper that I mentioned earlier. It wasn’t the best experience. But after adjusting the clamping force, it was possible to make a relatively correct installation on the cable. The plug latch holds on to the socket quite solidly, but when disconnecting, the lever must lift up by about a millimeter, I will have to take this into account when designing the housing.
More about fuses
When it comes to security, after a deeper analysis, I came to the conclusion that the activation time may be the problem. I would like to avoid a situation in which a mechanically damaged belt causes a short circuit, which causes a voltage drop and ESP reset. In such a scenario, the show is practically doomed to failure. Comparing the activation times of eFuse and PTC, you can notice that for BSMD1206-200-16V this time is up to 1.5s at a current of 8A, of course, a higher current will shorten this time, but compared to the clear activation time of the TPS25961 5us, there is nothing to compare. At the moment, I have added a PTC fuse connected in parallel to the eFuse in the diagram. If someone wants to assemble this system in a simpler version without eFuse, they will still be able to do it. Additionally, it will allow for comparative tests of both solutions.
Floor Plan

Taking into account previous comments regarding the location of the ESP module, I drew a new initial arrangement of the elements. Since I decided to enlarge the board, I moved the connectors and buttons to the Bottom layer. Additionally, I thought that it would be good to have additional connectors for connecting a digital microphone and a potentiometer.



WS2813

I was looking a bit about connecting WS2813 to the network. I found divided opinion on whether the BI line should be used.
a) short to ground
b) connect to D0
c) Do not connect

Ultimately, I can provide additional 0ohm resistors on this line so that each of the above methods can be implemented. What appeals to me the most, however, is the option of not connecting this pin at all, but I could then use a 3-pin connector (although on the other hand, a 4-pin connector will protect against accidental connection to the AUX1, AUX2 expansion ports).

First pixel BI to the GND. a)

1 Like

I made some progress on the project.

Charger
The charger diagram is presented in the image below. The charging voltage is supplied to the USBC connector. A 6-pin connector is used without information transfer support. In order to trigger the charger to operate with a current higher than 500mA (actually, now I started wondering whether 5.1k is the right value) The power line is protected with a transil and a polymer fuse. The IP5306 basically works in a typical application here. The 500m resistor can potentially be omitted, in fact, you could consider removing the 2 ohm series resistor, but I need to do some more research on this topic. I placed a 51 ohm resistor in case the current consumption from the 5V line was less than 75mA, in which case the auto-off function of the converter may work, which would be unfavorable.

Since the LED strips will be powered directly from the battery, I added a protection in the form of two XB4908A systems, which should protect the battery against excessive discharge and short circuit. The transil diode is included in the battery circuit to protect the device against overvoltage that may occur when batteries are placed in the basket. Perhaps it is unnecessary.

Connectors

I drew the LED strip protection circuit as shown in the diagram. The application of the TPS259631DDAR fuse has been greatly simplified - in fact, I could try to eliminate the resistors from the EN and OVL lines, but I still need to check whether the fuse will work properly in such a system.

ESP 32

The ESP system diagram looks like the graphic below. I added a place to solder the microphone module (I don’t want to think about soldering MEMS manually) and added voltage translators. Basically, nothing interesting happens in the diagram. However, I have some trouble with signing the connections of the processor pins.

First of all, there is a problem with numbering, in the WLED configuration I can basically use pins 0,1,2,3,4,5 and 12,13,14,15,16, I will have to check how this corresponds to the module pins. I also found an example of how to connect a microphone SD ->32 WS->15 SCL->14

Layout:


Things to do soon.

  1. Check the minimum eFuse configuration
  2. Draw a sketch of the casing
  3. Check the ESP32 pinou

Your ESP32 module will be in boot loop without capacitor on EN and proper resistor.

I think I will be able to finish the printed circuit board design next weekend.
I decided on a 4-layer stackup mainly due to the possibility of easier routing of paths. Unfortunately, I didn’t manage to get fuses, but since there is some space on the board, I placed all the resistors there, some will not be mounted. I improved the power source for the buffers (previously they were powered by 5V) and added the ability to configure the voltage at the AUX outputs to 3.3 or 5V





Blockquote Your ESP32 module will be in boot loop without capacitor on EN and proper resistor.

I basically copied these elements from some other project. Are you suggesting that their value may be incorrect?

According to data sheet quote: “To ensure that the power supply to the ESP32 chip is stable during power-up, it is advised to add an RC delay circuit at the EN pin. The recommended setting for the RC delay circuit is usually R = 10 kΩ and C =1 µF. However, specific parameters should be adjusted based on the power-up timing of the module and the power-up and reset sequence timing of the chip.”

I made the changes you suggested. I ordered 5 pieces of laminates, let’s see how the whole thing will work. Before the printed circuit boards arrive, I hope to make a model of the housing

I designed the case, nothing fancy. It consists of three parts, a body and two panels. Slits in the panels allow you to thread through Velcro strips to attach to the costume. The installation is carried out with the battery towards the body in order to improve the reception of radio waves by the EPS. I will have to replace the buttons with shorter ones so that they do not protrude beyond the outline of the device.
The whole thing will be screwed together using WSK2575C plastic screws
The tiles are already being delivered, so I expect their arrival soon.


The printed circuit boards have arrived. Unfortunately, because non-standard parts are quite expensive, I did not decide to completely assemble the PCB for the prototype, I plan to assemble some of the elements myself.