Monday, January 25, 2021

Building your own LED light strip controller (for cheap!)

 


Did you know that you can build your own LED light strip controller for a fraction of the cost of buying one?  And that this DIY controller has over a hundred light patterns and effects, can sync multiple light strips together, has a mobile app and is designed to integrate with most home automation platforms?  Yep.. and you can do it with no soldering, programming or other special skills and about $8.

Yet another LED Article?

There are probably hundreds of other videos and articles already on the web that describe how to build your own LED light controller. So why create yet another one?  For one, I personally find that certain "how-to" articles are more suited for my understanding and comprehension than others... some authors just write or produce a video that aligns better with my method of DIY.  I also tend to view or read multiple versions of a particular project to see if I can gain a fuller understanding.  Maybe this article will help you see something in a slightly different or better way.

Next, a lot of future articles (such as the automated LED stair lighting) will use this same LED controller.  If you are using a different controller or one configured differently than described here, you might run into problems.  So, instead of reiterating how to build the controller in each of these future articles, I can detail the controller once here and reference it in these future articles.


Standard Disclaimer

As always, I am not a professional electrician, nor to I play on on TV.  While we are generally dealing with low voltage here (5V) that is pretty risk free, the power supply will connect to mains 120V. If you are not comfortable with connecting mains power to your power supply, ask for assistance from someone knowledgeable.  I cannot be held responsible for any injury or damage to devices.  With that out of the way...

Parts List

All product links below are Amazon affiliate links. The price you pay is the same, but the blog may earn a small commission if you purchase using these links. You might be able to find these items at a slightly lower price elsewhere, but generally with either increased shipping costs or much longer lead times.  Feel free to do you own research.

In addition, if you have the ability to do some very minor soldering, you can save a bit more and also create a smaller controller.  This would only involve soldering header pins on the microcontroller and logic level shifter.  But I'll include solder-free options as well.  Just note that you don't need BOTH.... it will be either/or depending upon your ability and willingness to just solder a couple of pins.

D1 Mini  (must solder pins)*
OR
NodeMCU (no soldering)*

*be sure to purchase a device that has at least 4MB flash to use all WLED features

Breadboard jumpers (or you can use some spare small gauge wire)
Male-to-mail dupont jumpers  (any small pack will work - or you can use spare wire)

5V Power supply (the power supply will depend on number of LEDs used - see below)
WS2812B LED Strip (assortment of lengths and types available - 5V)

Here are some other items you may find useful depending upon your particular installation and purpose:


Power Supply
The controller itself can run off of just about any 5V DC power supply, such as a cell phone charger... or even the USB port on a computer... and can be powered directly via the micro-usb port on the controller.  However, you will need to determine the size of the power supply based on the total number of LED lights you will be powering.  There is a lot of debate out there on the "true" power draw of LED lights (and it is also somewhat dependent on the actual type/manufacturer of the strip itself), but here is the general formula that I use and it has always worked out well:

  Total number of LED pixels (or individual lights) x 0.05 = total amps required

For example, if you estimate that you will be using about 247 total lights in your project, then:

247 lights x 0.05 = 12.35 amps required

You'll want to round this up to the next higher available power supply.  In this case, you'd want to purchase a 5V 15A power supply.  This can power both the LED lights and the controller.  You can generally find "brick" style power supplies up to about 15 or maybe 20 amps.  Beyond that, you'll need to consider a transformer style supply.


Flashing the microcontroller with WLED firmware

(Update: As of late June 2021, you can now install WLED directly from your browser without downloading a .bin and using a third party app to upload to your board.  While you can still follow the method below, visit https://install.wled.me/ to install WLED from your browser)

Before we begin assembling the controller, it is generally easier to go ahead and install the WLED firmware on the microcontroller.  WLED is the firmware/software that was developed (and is still being improved) by an individual that goes by the handle of 'Aircookie'. It is free and open source.  To install it on your microcontroller, you'll need a couple of things:

  • A micro USB data cable that will connect to the computer you will use to flash the firmware.
  • Flashing software installed on that computer.
There are many free options for the flashing software.  I recommend one of the following:

NodeMCU PyFlasher (versions for both PC and Mac)
ESPHome-Flasher (versions for PC, Mac and Linux)

The above links both point to Github repositories.  Odds are that you've already used Github repositories, but just in case you haven't (and since this post is targeted at beginners), here's how you get the software.

From the link above, look on the righthand side of the page.  You are looking for a section labeled "Releases":


Click on the release labeled as 'Latest' and from there, download the appropriate application file for your particular platform (e.g. Windows/Mac), found under the section labeled 'Assets'.

Note that neither the NodeMCU PyFlasher nor ESPHome-Flasher require installation.  They are simply executable files that you launch after downloading.  So be sure to note where you are downloading these files since no desktop or other shortcuts will be automatically created. Both versions also have use instructions in their Githubs, so I will only cover the very basics of installing WLED.  See the documentation in the Github if you have questions or issues.

Now, you need to snag the latest version of WLED from Aircookie's Github:

Just like above, go to the latest release from the link on the righthand part of the page.  However, you will see a long list of assets here (unlike the flashing software above).  Aircookie has built WLED for a number of different platforms and situations.  If you are using an ESP8266-based microcontroller (both the D1 Mini and NodeMCU are ESP8266 boards) and your board has 4MB of flash, then you will want the binary named:  

WLED_x.xx.x_ESP8266.bin
(where x.xx.x represents the latest version number)

So to summarize, you should now have the following gathered at the computer you are going to use to flash the firmware onto the microcontroller:
  • The D1 Mini or NodeMCU microcontroller
  • A micro USB data cable that is connected to your computer (but not yet connected to the microcontroller)
  • A downloaded copy of either the NodeMCU PyFlasher or ESPHome-Flasher
  • The latest WLED binary file.
(I'll be showing NodeMCU PyFlasher here, but the steps for ESPHome-Flasher are nearly identical).

Assure the USB cable is not yet plugged into your microcontroller. Launch the flasher program by clicking the downloaded .exe (on Windows) file.

Click the dropdown arrow for the Serial Port.


Note any com ports that are currently listed without the microcontroller connected. You may or may not see any ports.

Now, plug in the micro-USB end of the cable to the microcontroller.  You may see a blue LED on the microcontroller flash briefly.  


Now click the refresh button next to the Serial port dropdown and again drop down the list.  You should see a new port listed.  This is the com port to which the microcontroller is connected.  Select it from the list.  Note: if a new com port does not appear, unplug the controller and try again or try a different USB cable.  If a new port still doesn't show up, you may not have the proper USB/UART drivers installed.  See your operating system documentation for installing the UART drivers.

Once the com port is selected, browse to and select the WLED_x.xx.x_ESP8266.bin file you downloaded earlier.  Set the baud rate, flash mode as shown above and be sure to select 'yes, wipes all data'.  Then click the big 'Flash NodeMCU' button and watch the magic happen!


You may wish to jot down the MAC address from the log.  This might help you identify the device on your WiFi network and get its IP address in a later step.  But what you are really looking for is the "Firmware successfully flashed" message.

Connecting the Microcontroller to your WiFi

For this next step, you'll need your phone, tablet or computer that is connected to your local WiFi (an Ethernet-connected device won't work here).  I generally find that my phone is as easy to use as anything.

If your controller is still connected to the computer's USB port from the flashing step above, you will need to unplug it and plug it back in again (this resets it from the programming, or bootloader, mode and puts it back into normal operating mode).  Otherwise, plug the controller back into the computer's USB port.

Open your phone or other WiFi connected device, go to settings and look for a new WiFi network called 'WLED-AP'.  Connect to this Wifi.  You may be prompted by your device that this network does not offer Internet connectivity and asked if you wish to remain connected anyway.  Select 'YES' - stay connected to the WLED-AP network.

What happens next once you connect to the WLED-AP network will vary based on device and operating system.  You may be prompted to sign in to the new network, and clicking the prompt to sign in may take you directly to the WLED setup page.

Or you may be prompted for a password.  If you are prompted, the default password for the WLED-AP network is:  wled1234

If you are not taken to the WLED setup page, then open a browser on your device and go to the address:  4.3.2.1 

Regardless of the steps, you should see the following initial WLED setup:


Select WIFI SETTINGS


Enter in your local WiFi (SSID) name and password (double-check that your password is entered correctly!).  That's all you really need to enter at this point.  If you are going to integrate this into Home Assistant or other automation system down the road, I'd recommend setting a static IP address or IP reservation via your router, but that can be done later.  There is only one other optional setting that I recommend.  If you scroll to the bottom (not shown in the above photo) is an option to 'Disable WiFi Sleep'.  While this will slightly increase power consumption (when in standby mode, the microcontroller will draw about 300 milliamps or ~ 1.5 watts). You can always toggle this setting off later, but for now, I like to avoid any connectivity problems.

Once all settings are complete, click the 'Save and Connect' button.  The microcontroller will reboot and attempt to connect to your WiFi.  The prior WLED-AP network will disappear, so you now need to connect your device back to your normal household WiFi network (the same one you selected for WLED) if it doesn't automatically reconnect.

Locating the new WLED microcontroller IP Address


The method of finding the new IP address will vary widely depending upon your particular router or network setup.  But you will generally access your router and look for WiFi leases.  You are looking for a new device that will likely have "WLED" in the item description.  If you jotted down the MAC address when you were flashing the microcontroller, you can use that to assist in finding the right device as well.  Once you find it, note the IP address.

Alternatively, you can download and install the excellent mobile app from the Google Play store (WLED by Aircookie) or Apple App Store (WLED by Christian Schwinne) and it will scan your network and provide you with the IP address of any WLED controllers that it finds.

Once you have the IP address, open a browser and enter that address (or simply launch the found WLED instance on the mobile app).  If all has gone as planned and you have the right IP address, you will be presented with the WLED interface:


(Your screen might look slightly different depending upon version)

Once you see this screen, everything is ready for assembly.  Unplug the microcontroller from the USB drive on the computer.

Wiring the LED Controller

At first glance, the following diagrams may look a little overwhelming.  But in actuality, they are pretty basic and I'll walk through each connection.  See the note below for larger installations (more than about 15 individual LED pixels).

D1 Mini Version:



NodeMCU Version:


Both are basically the same wiring.  The difference is that the particular pin placements are different on the D1 Mini and NodeMCU (the NodeMCU has significantly more pins).  Always check your particular board pinout, as some models may have the pins in different locations!

1. Connect your unplugged power supply to the positive and negative rails on the same side of the breadboard as the 5V pin on the D1 mini or the VIN pin on the NodeMCU.

2. Connect the 5V and GND from the D1 Mini or the VIN and GND from the NodeMCU to the same + and - rails as the power supply.

3. On the NodeMCU, connect the 3V3 and GND on the opposite side of the board to the + and - rails on this same side. 

4. Connecting to the Logic Level Shifter (*see explanation below for why a shifter is needed and the option to use a 'sacrificial pixel' instead): 

  • For the D1 mini, connect the HV and G to the positive (+) and negative (-) rails, respectively, on the same side as the power supply connection.  Run a separate wire from the negative (-) rail on the power supply side to the G pin on the LV side of the logic level shifter.  Finally, establish a connection between the 3V3 pin on the D1 Mini to the LV pin on the logic level shifter.
  • For the NodeMCU, simply connect the positive (+) and negative (-) rails from the power supply to the HV and G on one side of the logic level shifter and from the 3V3 (+) and ground (-) to the LV and G on the other side of the logic level shifter.
5. Make a connection from the D4 pin (on either board type) to one of the four numbered pins (1 - 4) on the LV side of the logic level shifter.  It doesn't matter which one of the four pins you use, you just need to assure that you use the same number on the HV side in the next step.

6. Connections to the LED strip (only for a small number of pixels < 15-20):  Using male-to-male Dupont jumper wires, run a separate connection from the positive (+) side of the 5V rail and the negative (-) connection to the LED strip.  Finally, run a connection from the HV side (same number as the signal input on the LV side) to the LED strip as well.  The positive line connects to 5V on the LED strip, negative to GND on the strip and the data line connects to DAT.  That's it!

(Be sure you are connecting to the proper end of the LED strip.  The data only flows "one way" and is indicated by small arrows on the LED strip.  The arrows should be pointing AWAY from your incoming connection to the strip.  If you get this wrong, it won't damage anything, but the strip simply won't work).

Double-check all your wiring.  Plug in the power supply and if everything is correct, the first 30 lights of your LED strip (or all lights if you have less than 30) will light up orange.  If you see this, congratulations!  Don't worry if you have more than 30 lights and they don't all light up.  You have to tell WLED how many lights you have and it defaults to 30.  So 30 orange lights is what you hope to see!

Note for larger LED installations (more than about 15 pixels).
For larger installs, you should run 5V power in parallel to the LED pixels and the control board.  The breadboard (or Electocookie version) is not rated for high amps so the power for the LEDs should be run independently from the control board (although the same power supply can be used).

Here's a simple wiring diagram that shows parallel power to the LEDs and the controller:


Optional Items

Sacrificial Pixel (instead of logic level shifter)

A level shifter is required because the microcontroller, while running off of 5V, only outputs signals at 3.3V.  The LED strip expects a data signal of near 5V. Unless the light strip connection is placed within a few inches of the beginning of the strip, the voltage drop from the data line will result in a signal that is too weak to reliably control the lights.  The logic level shifter takes the 3.3V data signal and boosts it to 5V... allowing the controller to be placed a significant distance from the start of the light strip.

As an alternative to a logic level shifter, you can use a 'sacrificial pixel' from your light strip.  In this case, you cut off a single pixel from your strip and solder next to the controller, in line with the outgoing power and data lines.  The pixel serves the same purpose of boosting the 3.3V data signal from the controller to 5V, which allows the remainder of the light strip to be remotely located.  This will require soldering, but the wiring diagram would look like this:


Capacitor

While not required, and I have light strips that omit this, but you may want to consider adding a 1000 μF (microfarad) capacitor on the incoming 5V power line.  This will help protect your controller and strip from any power surges when applying power.

Push button control (aka Muggle button)

If you want to be able to toggle your lights off/on, cycle through presets, etc. via a simple button push (see my 5 golden rules post regarding multiple ways to control a device), add a connection to the D3 pin of the controller, along with another connection to ground, and connect these to a normally-open push button.  This will allow you to control the strip via single press, double-press and long-press of the push button.

Initial WLED Settings

Once you have your 30 orange lights, there are a couple of settings you'll want to adjust right away in the WLED interface.  So, launch a browser and again enter the IP address (note: if there has been a significant lapse in time since you first flashed the microcontroller and this step, it is possible that the original lease expired and your router assigned a new IP address.  If so, follow the steps above, or use the mobile app to determine the current IP address).

Once in the WLED app, select Config then LED Preferences.  Update the following two fields:

LED Count: Set this to the total number of LED pixels in your string(s)

Maximum Current: Set this to the milliamp rating of your power supply.  For example, if using a 15A power supply, enter 15000.*

*This setting is used to control the maximum brightness of your strip to assure that it doesn't exceed the listed maximum power draw.  As an extra precaution, I usually enter a value slightly lower than the max.  For example, I would probably enter 13,000 or 14,000 for a 15A power supply. 

Save your changes and all your lights should now be lit.  Try out a few colors and effects.  There are a LOT of additional settings, options, presets, macros, etc.  Visit the excellent WLED Wiki for more details on how to fully take advantage of the WLED software.

Install your lights and controller in the final desired location.  There are some other things to take into account, such as power injection for strips of more than a couple hundred lights, etc. but those are beyond the scope of this particular post and a lot of information is out there.  But basically, if you are seeing dimming, flickering or fading colors towards the end of your lengthier light strips, you may need to inject additional power along the strip.

Creating a more stable, soldered version

If you have the ability and equipment to do some basic soldering, I'd highly recommend recreating the above controller in a soldered version.  While the breadboard version works fine, it is susceptible to wires coming loose... especially if installed in a location subject to vibration (like the original version I installed around a dart board).  If you don't want to run your own traces on a generic PCB board, I highly recommend the ElectroCookie Solderable Breadboard.  A D1 Mini and logic level shifter will fit on the mini version of the ElectroCookie, making for a very small controller footprint  The following is the wiring diagram I use to create the controller on an ElectroCookie mini.

If you want to watch a YouTube video on how to build this particular board, see Building a WLED controller for $6.00

Or you can even fit two D1 minis that share a single logic level shifter on a standard ElectroCookie board:


This is ideal in a situation where you want to control two separate light strips individually... or the strips can be synched together via WLED.  Installing upper and lower LED cabinet lighting is a good use case for this:



If you still do not want to solder, I'd recommend securing all wiring connections with hot glue at a minimum.

If you have a 3D printer, here are my enclosure models for the full size and mini Electrocookie prototype board: Electrocookie enclosures

Integrating your WLED controller into Home Assistant

WLED has had native integration into Home Assistant since Home Assistant v0.102.  Devices will be discovered automatically by Home Assistant shortly after they are powered up.  See Home Assistant WLED Integration for details on the available sensors and services.

Additional Parts and Ideas

Depending on your install and intended use, you may wish to consider utilizing additional parts, such as aluminum LED channel & diffusers and double-sided tape (the adhesive on the LED strips themselves isn't that great and when installed under a cabinet, they will very likely break loose and sag at some point).  Here are a few additional items I've found handy in some of my installations:

Item

Notes

Aluminum LED Channel

Great for mounting to flat surfaces, cabinets, etc.

LED Channel Mounting Clips

Additional mounting clips for the channel

ElectroCookie Mini Proto Board

Instead of breadboard for more permanent install

18-gauge stranded wire

For longer power runs or injection

JST 3 pin connectors

Convenience for connecting multiple LED strips

DC power pigtail connectors

Easily connect/disconnect strips, controller, etc.

14-gauge AC Power Supply Pigtail

For use on the power supply AC side

3M Mounting tape

Extra strength for attaching strips to channel


Enjoy your new LED Lighting!


Supporting this blog and related YouTube channel

If you'd like to support future content on this blog and the related YouTube channel, or just say thanks for something that helped you out, you can use any of my Amazon links to make a purchase at absolutely no cost to you.  Or if you prefer to say thanks directly, you can buy me a one-off cup of coffee at:


26 comments:

  1. Do you have the layout for the two D1 mini on same breadboard? This is great ty!

    ReplyDelete
    Replies
    1. Other than the photo above, I don't have an actual wiring diagram, but it is basically the same as wiring a single D1 Mini. The only real difference is that the two D1 Minis can share a single logic level shifter, as the shifter has 4 available channels. So, each individual D1 Mini is wired like the diagrams above, but you just feed the signal into one the logic level shifter channels on the 3.3V side and the outgoing signal to your LED strip from the same channel on the 5V side of the shifter.

      I hope that helps! Please let me know if you need additional clarification.

      Delete
  2. where do you hookup the pins for the microphone if youre using a sacrificial pixel as logic shifter?

    ReplyDelete
    Replies
    1. If using a sacrificial pixel, it basically substitutes for the shifter and is hooked up to the WLED data line (normally D4), 5V and GND. You just won't have to use the 3.3V line like you do with the shifter.

      Connecting a microphone is the same whether using the shifter or the sacrificial pixel. The microphone is connected to the A0 pin on the D1 Mini/NodeMCU, along with 5V and GND. If it helps, you might look at the diagram in this post that shows the microphone hook up: https://resinchemtech.blogspot.com/2021/08/sound-reactive-rgb-floor-lamps.html

      If you want to use the sacrificial pixel, just take the data line, 5V and GND that is running to the logic level shifter and run those to your pixel instead.

      Delete
  3. Hello, in first place thanks for share all you knowledge, i want to do a project and i need some tips about it.
    My project is to do a Wled system for a stair, but i have some doubts.
    Can I use a ESP8266 with 24v addressable LED's?
    May I use 24v LED? for around 16 meters of LED to avoid voltaje loss (16 steps of 1meter)
    i Assume that I need two ESP, one for top and another fot botton stairs
    Do you know if WLED has any limitation to manage 16 sections?
    Thanks in advance!

    ReplyDelete
  4. Hi! Yes, you can use this controller with 24V LEDs, but if you are going to use the same power supply, you will need to use a buck converter or other method to step down the 24V to 5V for the controller. If you use two separate power supplies (one for the LEDs and one for the controller), you must have a common ground or weird things will happen. But with that many LEDs, you may want to consider using an ESP32 instead of an ESP8266. The recommended maximum number of pixels for good performance on the ESP8266 is around 500. The ESP32 can handle 800-1000 pixels with good performance. If you do the stair system in a manner similar to mine (see this video: https://youtu.be/Y29Y0iTLggg and this blog article: https://resinchemtech.blogspot.com/2021/07/simple-motion-activated-led-stair.html ), you only need one controller. What you need at both the top and bottom is some sort of motion sensor or distance measuring sensor to turn the lights off and on. Good luck with your project and let me know how it goes!

    ReplyDelete
  5. Thank you very much for your response i made a schema of my project: https://drive.google.com/file/d/1h3_TjwtJwKTKSrtoWkrm2D7RjWljGznH/view?usp=sharing
    I know that a can put stripes in zig-zag, but my stairs are made of stone and i prefeer bring all wires in unique side of the stair.
    As in the schema Do you recommend inject another 24v at the end of the stairs? if i need to inject, i can do it in parallel or must use another exit of the power supply?
    I forgot include the sensors on the schema, i need to bring 3 more wires to the bottom sensor
    I promise do not disturb more haha, thanks again.

    ReplyDelete
    Replies
    1. Your schematic looks correct. As far as additional power injection, I can't really tell you for sure. It really depends upon the total pixels, voltage drop (which is impacted by the distance and gauge wire used, etc.). I always do a test with all of my pixels connected and turned on white before I install them. If pixels along or near the end of the strip starting turning pink, then it means I need to add power injection. If you do need injection, you can split off the V+/GND from the power supply... each power lead doesn't necessarily need to come directly off of different terminals of the power supply (I think that is what you are asking), so you can run a single power lead alongside of your LEDs and feed off of that lead at each point where you need to inject power. Just assure your power supply has adequate current for the amps your strips will need. There is an excellent source of calculating power and other things like wire gauge on this site, that I use often: https://quinled.info/addressable-digital-leds/ I hope that info is helpful!

      Delete
  6. First of all, I would like to express my gratitude for all the knowledge and experience you have shared. Between you, Quindor and DrZzs, my knowledge and interest in LEDs have grown exponentially.

    Now on to my questions :)

    1. What software do you use to make your schematics above?
    2. Does the ground only have to be common between the LED strip and the controller (NodeMCU)? Power and ground being split from the power supply to the LED and another to the controller. For example, can a logic level shifter, PIR and/or microphone get their power and ground off the power rail on the ElectroCookie or would those be considered common ground anyways?

    ReplyDelete
  7. You are most welcome. Both Quindor and DrZzs is where I learned as well!

    As far as your questions:
    1. Believe it or not, I'm just using Google Drawings for my diagrams. I like to be able to use compontnt images and show the connections, as I think sometimes actual electronic schematics can be hard to follow... especially for beginners.

    2. Yes, you can absolutely use the power rails on the Electrocookie for things like the logic level shifter, mic, ect... just nothing that would draw more than about 500 mA-1A. If you come off the same power supply and split the 5V and GND to the LED strip and the ElectroCookie/controller board, then yes, you have a common ground. The common ground issue generally only occurs if using a completely separate power supplies... one for the LEDs and a different power supply for the controller. In that case, you have to create a common ground between the two. As long as you are using one power supply for both, then you have a common ground already.

    Let me know if you run into any other questions. And welcome to the addictive world of LEDs!

    ReplyDelete
    Replies
    1. Thank you so much for taking time to answer my questions. I look forward to seeing more of your blogs and videos!

      Delete
  8. Hi, I really appreciate and enjoy the time, effort, and detail you put into your videos. Your passion has gotten me very interested in adding wireless capability to an LED set up I recently completed. I have a question regarding the wiring diagram for the video you posted using the ESP8266 and 3 to 5v logic shifter titled "Build your own LED controller for under $6 with WLED" that I hope you have a moment to help me with. I plan to use the guide you posted, however, two differences in my build 1) my LEDs are 5 wire (white, blue, red, green, black) and 2) I don't need the push button. Can you provide some insight into the wiring modifications I would need to make to accommodate in comparison to the 3 wire plans you have posted please? I assume I can use the red, green and black as you have planned, I am interested in how to handle interface between the wifi board and the the remaining white, blue, and black wires/terminals on my existing LED strips . I plan to tackle the this project during the xmas break (starting 21Dec for me). Thanks again for sharing your expertise with the world and appreciate your methodical approach.

    ReplyDelete
    Replies
    1. First, if you don't need the button, simply omit the two wires that connect the button. The button is completely optional. However, the wiring diagrams I show are designed only for "clockless" or three wire LED strips (+5V, gnd and data). If you are using an LED strip that has clock and data (or maybe even individual R, G and B channels - which it almost sounds like you have), then my diagram isn't going to work for your type of LEDs... the wiring would be completely different... and WLED may or may not even work. Are these commercial LED strips that already came with a controller that you are trying to modify? That may or may not be possible. You first need to identify the type of LEDs you are using (e.g. WS2812b, SK6812, APA102, etc.). Then you will need to see if those strips are even compatible with WLED (see the WLED site for compatible hardware - https://kno.wled.ge/basics/compatible-hardware/ ). If your type of LEDs are not compatible with WLED, then you won't be able to use this controller at all. If they are compatible, then you will need to modify the wiring to meet the requirements of the LED strip... for example, using a clock and data pin. Unfortunately, you won't be able to use my wiring diagram with anything other than clockless (e.g. WS2812b) 3-wire LED strips.

      Delete
    2. Ah bummer. So many details to consider. The strips I have are the Commercial Electric Brand that have individual R, G, and B channels. I went that route as I had read that this allowed for a more purer white which is the main effect/color we use. They also output at 24v. Per the link you provided only 5v/12v strips are supported. Hate that I'm note going to be able to modify my project to be wifi controlled. I will certainly design the next project to stay within the parameters you described above. Thanks for the response and Happy holidays.

      Delete
    3. Hi. First thing I really appreciate your videos and information. I'm new to electronics but it's becoming a hobby of sorts especially with these esp controllers. I've built one of these led controllers but it seems I wasn't paying attention. I didn't realize that when I found deals on light strips they are 12v. I read on another comment you advised the use of a buck converter. If it's not to much trouble could you recommend one and advise on how that would be installed? While I can do the soldering I am far from completely understanding the why. Any direction would be greatly appreciated. Thank you.

      Delete
    4. Well, as for the why first... the 12V LED strip is obviously going to need a 12V power supply. But the controller only operates off of 5V. So, if you are going to power everything off of a single power supply, you have to split off a feed from the power supply and step it down to 5V for the controller.

      There are numerous types and styles of buck, or step-down, converters available, but here is one that I often use due to it's small size: https://amzn.to/3IEPlYm Note that this is an adjustable converter, so you will need to use a voltmeter or multimeter to measure and adjust the small potentiometer on board so that it is outputting 5V. If you don't want to do this, you can buy a step down converter that has a fixed 5V output (just search Amazon for 12v to 5V step down converter).

      The wiring is pretty straightforward. From your power supply, take one set of leads (+12V/GND) and run straight to the LEDs for power. Take another set of leads and feed one side into the high voltage side of the buck/step-down converter and then from the 5V adjusted/low side of the converter to the 5V in on the controller. The only physical connection you will have been the controller and LEDs in this case, will be the data line. I have a diagram showing the wiring of the buck converter with the controller is this blog article: https://resinchemtech.blogspot.com/2022/08/soldering-fan.html (see the section under Building the Controller) Just note that this version is meant for 5V LEDs, so you won't run your power to the LEDs from the controller... just the data line.

      I hope that helps out a bit in understanding how to use 12V LEDs with the controller. But do note that the LEDs must be 3-wire, clock-less LEDs and of a type supported by WLED... just as I replied to the comment just about yours. Let me know if you have additional questions.

      Delete
  9. That is THE MOST useful thing in the world!!!! Many many uses for this. As usual thank you for the very detailed guide!!!

    ReplyDelete
  10. Your videos are indispensable when it comes to learning about LED strips and various projects. I am currently doing a staircase install thanks to your excellent instructions.
    I do have a newbie question... I recently came across a 12v, RGB LED strip that came with a controller that has connectors for two different LED strips. the connectors have a female end that accept a connector with four male pins. Unfortunately, the LED strips have no connectors attached making it difficult to know where the +12v is.
    I know that the RGB are common ground to the +12v but I'm confused by the 'arrows' that I assumed were for data direction. At the points where the strip were factory soldered together, the arrows on either side of the solder joint point to the solder joint, so I assume there is no data flow? Please enlighten!

    ReplyDelete
    Replies
    1. Well, it is very hard to tell with commercial products and they are sometimes very difficult, if not impossible, to adapt to using your own controller. The first step is to try to determine the type of LED in use. With 4 pins/wires, these may well be clocked LEDs... or they may not be individually addressable LEDs at all. With the original controller, could each LED be a different color... or only the entire strip (or groups of LEDs) be a different color? If it is an addressable LED strip, then it does have a data direction, but what you are describing sounds like that the retail strip may not be of the addressable type. If that is the case, it is unlikely that you are going to be able to use those LEDs with WLED as I did. See if you can determine the type of LEDs used in the strip. That would be the first step in determining if you can reuse these strips with your own controller/firmware.

      Delete
    2. Thank you for your very, prompt reply! I'm pretty certain that these are not addressable. I was hoping to include some images however I see no way to do that. There are three pixels between each cuttable segment as well as three R G B chips(?) that are labelled either 1hZ or Z41.

      Delete
  11. The breadboard in your link is $342, just a lil over the $8 total budget :). Is that the correct breadboard?

    ReplyDelete
    Replies
    1. Well, that was the correct link when this article was published almost two years ago (and I looked in my history where I paid $2.99), but that's the nature of Amazon. Products, vendors and prices can fluctuate daily... although $342 for a $3 breadboard is a bit ridiculous. Surely they don't actually sell any at that price (I hope not anyway).

      Unfortunately, with the number of videos, blog articles and other places where I post links, it is impossible for me to keep up with non-stop changes of those items. Often, a product I link to may even be unavailable or discontinued a few months later, but all links are valid at the time of publication. As I generally tell others, if my link leads to a discontinued item (or one that seems ridiculously priced like this one), Amazon is pretty good as showing alternatives to those items. It is very rare that any of my projects require an exact match of an item (and I do try to note if that is the case), so I would always recommend that you shop around and price compare for any of the items to which I am linking. But I did update the breadboard link for this article... as that was just nuts! Thanks for letting me know about it.

      Delete
  12. Thank you for all of your documentation and knowledge. I am tackling the stair rail LED project and will be building the LED controller by myself, although I am a bit confused on the D1 module schematics, since I will be using more than 15 LED pixels. I saw the updated diagram for larger light sets, and I see that the power supply is hooked directly to the led lights. It appears then the logic leveler does not need to be used. The data line in the larger than 15 pixel diagram doe`sn't appear to be hooked up to any component on the breadboard and appears to be hooked into the row where the logic leveler is. Should this data line be hooked into the D4 pin on the D1 module, like the first diagram? Thanks for your help

    ReplyDelete
    Replies
    1. The diagram for the "larger light sets" only shows the data and power connections and omits the onboard wiring for simplicity. You should still build your controller with the level shifter and all the wiring as shown. It's just the power connections that are different when using a larger number of LEDs and that's what the second diagram is just showing the differences in power connections. There are two other sources you may want to take a look at if this is your first time building an LED controller:
      Blog Article: https://resinchemtech.blogspot.com/2023/01/wiring-diagrams.html
      Common LED Questions Video: https://youtu.be/GZv5Ztj6i6I

      Good luck with your project!

      Delete
  13. Thank you for sharing your LED creations. Just curious what the voltage rating of the 1000 μF (microfarad) capacitor?

    ReplyDelete
  14. You are very welcome. The capacitor I am using is rated for up to 25V. But to be honest, I rarely include it in my basic controller builds anymore. It is optional as to whether you wish to include it or not. For me, I tend to build the smaller version of the controller and the cap would prevent it from fitting in my enclosure... so I just omit it. If something happens to the controller, I might be out a few buck and 30 minutes to build a replacement... but so far that hasn't happened.

    ReplyDelete

To help eliminate spam and to keep all conversations civil, submitted comments are moderated. Therefore your post may not show up immediately. Please be patient as most reviews are completed within a few hours.