<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Andrew Wegner | Ponderings of an Andy - wled</title><link href="https://andrewwegner.com/" rel="alternate"/><link href="https://andrewwegner.com/feeds/tag/wled.atom.xml" rel="self"/><id>https://andrewwegner.com/</id><updated>2024-08-16T12:00:00-05:00</updated><subtitle>Can that be automated?</subtitle><entry><title>Controlling power to LED lights with WLED Controller and a Relay switch</title><link href="https://andrewwegner.com/control-power-wled-relay.html" rel="alternate"/><published>2024-08-16T12:00:00-05:00</published><updated>2024-08-16T12:00:00-05:00</updated><author><name>Andy Wegner</name></author><id>tag:andrewwegner.com,2024-08-16:/control-power-wled-relay.html</id><summary type="html">&lt;p&gt;Wiring a lot of LEDs requires more power than the small WLED controller can handle, but leaving a large power supply running even when the lights are off is inefficient. This post talks about the progress on the project and how I wired in a relay to keep everything running efficiently.&lt;/p&gt;</summary><content type="html">
&lt;h2 id="introduction"&gt;Introduction&lt;a class="headerlink" href="#introduction" title="Permanent link"&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;It's time to continue my summer project of setting up some outdoor LED lights. &lt;a href="https://andrewwegner.com/update-wled-ericsity-controller-0141.html"&gt;Previously&lt;/a&gt;, I &lt;a href="https://www.amazon.com/Ericsity-Controller-Addressable-WS2812B-SK6812/dp/B0CNVXY8NX"&gt;set up and updated the Ericsity controller&lt;/a&gt; with &lt;a href="https://kno.wled.ge/"&gt;WLED&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I am putting up approximately 20 meters - 65 feet - of LEDs. Total this will be nearly 2,000 individual LEDs and approximately 665 individually controlled LED segments (3 LEDs per segment). This will take more power than the little controller can handle. To demonstrate the problem of powering all of these LEDs with only the controller, look at this image:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Power drop across 20 meters of LEDs" src="https://andrewwegner.com/images/wled/voltage-drop.png"/&gt;&lt;/p&gt;
&lt;p&gt;These strips are wired with the end of one strip connected to the start of the next. The top strip is connected directly to the controller. The one below is the end of strip two, followed by the start of strip three and the bottom is the very end of the full run of LEDs. The lights are all set to the same color, but as you can see they clearly aren't the same color. The voltage drop across 65 feet of LEDs means that the LEDs are the end can't get enough power to match their earlier siblings.&lt;/p&gt;
&lt;h2 id="power-injection"&gt;Power Injection&lt;a class="headerlink" href="#power-injection" title="Permanent link"&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The solution to this specific problem is to inject power into the LED strips. I picked up some &lt;a href="https://www.amazon.com/dp/B0957T1S9C"&gt;WAGO connectors&lt;/a&gt; and a &lt;a href="https://www.amazon.com/dp/B0BXTP524R"&gt;NUOFUWEI power supply&lt;/a&gt;. I also had some 18 gauge wire on hand. With this power unit, I can easily set up three injection points.&lt;/p&gt;
&lt;p&gt;The goal was to inject power at the start of strip 1, right where the controller is connecting in the image above. Then inject between strips 2 and 3, in the middle of the run. Finally, I injected power at the end of strip 4. With these three, equally spaced injection points, I was able to get a nice uniform color across the entire 20 meter run.&lt;/p&gt;
&lt;p&gt;&lt;img alt="LED strip with power injection shows uniform coloring" src="https://andrewwegner.com/images/wled/equal-voltage.png"/&gt;&lt;/p&gt;
&lt;p&gt;Problem Solved! Right?&lt;/p&gt;
&lt;p&gt;Not exactly.&lt;/p&gt;
&lt;h2 id="turning-off-the-psu"&gt;Turning off the PSU&lt;a class="headerlink" href="#turning-off-the-psu" title="Permanent link"&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;WLED controls the lights, but doesn't control the power supply with this wiring setup. Turning off the lights within WLED does turn off the LEDs, but the power supply continues to run. It's not drawing at full load, but it is drawing power and the cooling fan is active. It's noticeable and unneeded. I want a way to turn off the power supply AND the LEDs at the same time. &lt;/p&gt;
&lt;p&gt;I can't power the WLED controller from the large power supply to do this, because if I turn off the power supply that'd also turn off the WLED controller. I'll need to power the WLED controller independently from the lights. Fortunately, this won't be a problem. &lt;/p&gt;
&lt;p&gt;The next step is figuring out how I can use WLED to control the larger power supply. Fortunately, &lt;a href="https://kno.wled.ge/features/relay-control/"&gt;WLED has the ability to control a relay&lt;/a&gt;, which I can use to control the power supply. The Ericsity controller also has two output data pins. While I don't think the second one was built in to control a relay, it works perfectly here. &lt;/p&gt;
&lt;h3 id="wiring"&gt;Wiring&lt;a class="headerlink" href="#wiring" title="Permanent link"&gt;¶&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I purchased a &lt;a href="https://capitaloneshopping.com/p/hi-letgo-5-v-1-channel-relay-mod/2RDBGLR8VL"&gt;HiLetGo relay&lt;/a&gt; so that I could toggle the larger power supply on and off. To do this, it's important that the data line and the ground are common among the controller, the power supply and the LEDs.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Wiring diagram for WLED controller, external power supply, LEDs and a relay controlling the external PSU" src="https://andrewwegner.com/images/wled/deck-lights-wled.png"/&gt;&lt;/p&gt;
&lt;p&gt;The diagram above is a rough schematic of how I wired this. The controller sends data, but not power, to the LEDs. Data was on GPIO 16. The important part here is that the data line is shared across all of the strips. I did not need a signal booster for my project, and because I'm about to use the second exposed data channel for the relay, I had to ensure that this single channel could send a signal down the entire length of the strip. Fortunately, I didn't have any issues.&lt;/p&gt;
&lt;p&gt;The wiring ground was tied into the PSU and the LEDs as well. The common ground is important.&lt;/p&gt;
&lt;p&gt;On the other side of the diagram is the relay. I put this relay between the wall and the PSU. When WLED sent an &lt;code&gt;ON&lt;/code&gt; signal, it would close the relay, turning on the PSU and the LEDs. GPIO 2 was tied to the relay and within &lt;code&gt;LED Preferences&lt;/code&gt;, the Relay Pin was set to GPIO 2. &lt;/p&gt;
&lt;p&gt;One quick power cycle from within WLED is required at this point. Press the power button in the UI to turn everything off, press it once more to turn it on. As long as the PSU is plugged into the wall, you should hear it fire up and see the LEDs turn on. If you press the power button again, the LEDs turn off, the relay clicks, shuts down the PSU and only the WLED controller remains active.&lt;/p&gt;
&lt;h2 id="success"&gt;Success&lt;a class="headerlink" href="#success" title="Permanent link"&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;With the relay in place, the LEDs don't draw phantom power while off because the PSU isn't active. The added benefit, at least for this specific power unit, is that the fans aren't running constantly so it's not as loud. While this will eventually be outside, I'd still prefer to not hear the fan when the lights are off. While they are active it's not going to be bothering me, because I'll likely have music playing for the sound reactive features which will easily be louder than this fan.&lt;/p&gt;
&lt;p&gt;The next step in the project is going to be to get this set up outside. &lt;/p&gt;</content><category term="Technical Solutions"/><category term="technical"/><category term="wled"/></entry><entry><title>Setting up and updating the Ericsity WLED Controller from 0.13.3 to 0.14.1</title><link href="https://andrewwegner.com/update-wled-ericsity-controller-0141.html" rel="alternate"/><published>2024-06-20T15:45:00-05:00</published><updated>2024-06-20T15:45:00-05:00</updated><author><name>Andy Wegner</name></author><id>tag:andrewwegner.com,2024-06-20:/update-wled-ericsity-controller-0141.html</id><summary type="html">&lt;p&gt;The Ericsity WLED controller comes with WLED 0.13.3 preinstalled and only offers the ability to update to 0.13.4. This walks through setting up the controller for the first time and moving to 0.14.1 while maintaining the sound reactive features the controller advertises.&lt;/p&gt;</summary><content type="html">
&lt;h2 id="introduction"&gt;Introduction&lt;a class="headerlink" href="#introduction" title="Permanent link"&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;My summer time project this year is to set up some LED lights outside. After testing out a couple Govee strips that I didn't like because I couldn't diffuse the individual lights away, I finally found an LED strip I liked. The next step was to control these strips so that I could do more than solid colors or the default rainbow every LED strip has. I settled on using the amazing &lt;a href="https://kno.wled.ge/"&gt;WLED project&lt;/a&gt; to control the lights. To speed up the project, I decided to get a prebuilt controller and eventually selected the &lt;a href="https://www.amazon.com/Ericsity-Controller-Addressable-WS2812B-SK6812/dp/B0CNVXY8NX"&gt;Ericsity controller with a built in mic&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Side note: This post is just about how I updated the controller. The next article in the post is available, and talks about how &lt;a href="https://andrewwegner.com/control-power-wled-relay.html"&gt;I am controlling a larger power supply with the WLED controller&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="the-problem"&gt;The Problem&lt;a class="headerlink" href="#the-problem" title="Permanent link"&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The controller arrived and was easy to set up. I wired up my strips in the basement to ensure I didn't have any power problems and then determined where I needed to make cuts and solder points once this was outside. Then I went to set up &lt;a href="https://kno.wled.ge/features/segments/"&gt;segments&lt;/a&gt; in WLED so that I could control effects in specific areas.&lt;/p&gt;
&lt;p&gt;The problem I quickly encountered was that I am outlining my deck with these lights and right in the middle of the deck is a set of steps that I also wanted to light up and then the rest of the deck rail. WLED doesn't have the ability (at least that I've found) to span an effect across multiple segments and I'd need multiple segments for this. &lt;/p&gt;
&lt;p&gt;At minimum I'd need 3 segments - The rail, the steps, the rest of the rail. If I want an effect to span the entire rail, I can't do that with the steps in the middle. Further research pointed me to the ability to &lt;a href="https://kno.wled.ge/advanced/mapping/"&gt;remap the physical LED order&lt;/a&gt; to a logical LED order. After trying to set this up, it wasn't feature complete in 0.13, but did appear to be in 0.14.&lt;/p&gt;
&lt;p&gt;However, the Ericsity - rightfully so - utilizes a &lt;a href="https://github.com/atuline/WLED"&gt;stable version of WLED&lt;/a&gt; that only allows you to &lt;a href="https://github.com/atuline/WLED/releases"&gt;update to 0.13.4&lt;/a&gt; and the README has the following note:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This repository is still maintained, and will receive bugfixes. However no new features will be added.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img alt="WLED Sound Reactive update page showing that upgrades are only available through version 0.13.4" src="https://andrewwegner.com/images/wled/wled-update-page.png"/&gt;&lt;/p&gt;
&lt;h2 id="setting-up-ericsity-controller"&gt;Setting up Ericsity Controller&lt;a class="headerlink" href="#setting-up-ericsity-controller" title="Permanent link"&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Let's take a step back and get the controller set up and then focus on upgrading it. Fortunately, Ericsity makes this pretty easy.&lt;/p&gt;
&lt;p&gt;Step 1 is to plug in the controller. After a few seconds, you will see a new network available on your phone called &lt;code&gt;WLED-AP&lt;/code&gt;. Join that network. From your browser navigate to &lt;code&gt;4.3.2.1&lt;/code&gt; and select "WIFI SETTINGS". &lt;/p&gt;
&lt;p&gt;&lt;img alt="WLED install page" src="https://andrewwegner.com/images/wled/install1.png"/&gt;&lt;/p&gt;
&lt;p&gt;The goal is to add this controller to your wireless network. Do this by adding your network name and password into the first two text boxes. I also updated the mDNS setting, but that's optional. Then save and connect.&lt;/p&gt;
&lt;p&gt;&lt;img alt="WLED network set up page" src="https://andrewwegner.com/images/wled/install2.png"/&gt;&lt;/p&gt;
&lt;p&gt;Finally, install the WLED mobile application if you are going to manage this via your phone. On an android device you can find it in the Google Play store with the name &lt;a href="https://play.google.com/store/apps/details?id=com.aircoookie.WLED&amp;amp;hl=en_US"&gt;WLED&lt;/a&gt;. Reconnect to your wireless network and the one you just added the controller to. Once installed and reconnected to the network, open the application. &lt;/p&gt;
&lt;p&gt;If you have already installed and configured a controller, you'll see your previous controllers listed. To add the new controller, click on the &lt;code&gt;+&lt;/code&gt; sign in the upper right. Then "Start Discovery". When the controller is found, you can press the check button.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Searching for and adding a new controller to the WLED application" src="https://andrewwegner.com/images/wled/install3.png"/&gt;&lt;/p&gt;
&lt;p&gt;The new controller will be listed on the main WLED page with the default name of &lt;code&gt;WLED-SoundReactive&lt;/code&gt;. Select that controller by tapping it. Then select "Config" along the top and "Security &amp;amp; Updates" at the bottom.&lt;/p&gt;
&lt;p&gt;Scroll all the way down to the bottom of this page and you should see that you have the following version installed:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;WLED SR version 0.13.3&lt;/code&gt;&lt;/p&gt;
&lt;h2 id="update-to-014x"&gt;Update to 0.14.x&lt;a class="headerlink" href="#update-to-014x" title="Permanent link"&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;From the Security &amp;amp; Updates page, it makes sense to try and perform an update. If you click "Manual OTA Update" you'll notice that only version &lt;code&gt;0.13.3&lt;/code&gt; is available via this link though. It's time to do a manual update!&lt;/p&gt;
&lt;p&gt;I am utilizing the &lt;a href="https://github.com/MoonModules/WLED"&gt;MoonModules branch&lt;/a&gt; because the README for the default install says that changes should be made against this branch.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Pull Requests should be created against the MoonModules mdev branch.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I performed this OTA upgrade from my computer by navigating to the mDNS I set up previously. It can also be accessed by the IP address of the controller in your browser.&lt;/p&gt;
&lt;p&gt;At the time of this post, the &lt;a href="https://github.com/MoonModules/WLED/releases"&gt;current release&lt;/a&gt; was &lt;code&gt;0.14.1-b30&lt;/code&gt;. This was released approximately 6 months ago. I briefly skimmed through recent issues and pull requests to see if I should find a more recent build. There was a &lt;a href="https://github.com/MoonModules/WLED/issues/130"&gt;crash issue&lt;/a&gt; reported with the &lt;code&gt;ripple&lt;/code&gt; effects. Since I like that particular effect, I decided to go with a newer build than the official release. &lt;/p&gt;
&lt;h3 id="official-build"&gt;Official build&lt;a class="headerlink" href="#official-build" title="Permanent link"&gt;¶&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;If you are going to stick with an official release, navigate to the &lt;a href="https://github.com/MoonModules/WLED/releases"&gt;release page&lt;/a&gt; and download the binary file you want to install. For the Ericsity, I found that the generic ESP32 build worked. If you want to use this, look for the file titled &lt;code&gt;WLEDMM_0.14.1-b30.36_esp32_4MB_M.bin&lt;/code&gt;. You could also use the &lt;code&gt;WLEDMM_0.14.1-b30.36_esp32_4MB_S.bin&lt;/code&gt;. Download this file.&lt;/p&gt;
&lt;h3 id="selecting-a-more-recent-build"&gt;Selecting a more recent build&lt;a class="headerlink" href="#selecting-a-more-recent-build" title="Permanent link"&gt;¶&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Since I wanted a fix for the item I &lt;a href="https://github.com/MoonModules/WLED/issues/130"&gt;found&lt;/a&gt;, I opted to download a recent build of the &lt;code&gt;mdev&lt;/code&gt; branch. This can be accomplished by navigating to the build pipeline and filtering for the &lt;code&gt;mdev&lt;/code&gt; branch. This is on Github and available via this direct link to the &lt;a href="https://github.com/MoonModules/WLED/actions/workflows/wled-ci.yml?query=branch%3Amdev"&gt;mdev pipeline&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Recent builds on Github. Look for mdev branch" src="https://andrewwegner.com/images/wled/github-builds.png"/&gt;&lt;/p&gt;
&lt;p&gt;From here, select the build you want and scroll all the way to the bottom of the page. Find the binary you want to download. In my case, I wanted the &lt;code&gt;firmware-esp32_4MB_M&lt;/code&gt; and download it. Once downloaded, extract it so that you can upload the &lt;code&gt;.bin&lt;/code&gt; file within the WLED page. &lt;/p&gt;
&lt;p&gt;&lt;img alt="Select the build to utilize. For the Ericsity controller, I found the firmware-esp32_4MB_M version works" src="https://andrewwegner.com/images/wled/github-build-version.png"/&gt;&lt;/p&gt;
&lt;h3 id="press-the-button"&gt;Press the button!&lt;a class="headerlink" href="#press-the-button" title="Permanent link"&gt;¶&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In WLED's Security and Update page, select this binary and then click "Update!"&lt;/p&gt;
&lt;p&gt;&lt;img alt="Upload the binary to utilize as the new image" src="https://andrewwegner.com/images/wled/update1.png"/&gt;&lt;/p&gt;
&lt;p&gt;The update took less than a minute for me. While the new image was being installed, I was told not to close or refresh the page.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Update installing, don't close or refresh" src="https://andrewwegner.com/images/wled/update2.png"/&gt;&lt;/p&gt;
&lt;p&gt;When the update is complete, the controller will reboot. &lt;/p&gt;
&lt;p&gt;&lt;img alt="Update complete, rebooting" src="https://andrewwegner.com/images/wled/update3.png"/&gt;&lt;/p&gt;
&lt;p&gt;To confirm that everything has been updated, click on "Config". Immediately, you'll notice a lot more options. Scroll to the bottom and select "Security &amp;amp; Updates" and at the bottom you'll have an About section that lists the version you selected to install. Mine looks like this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;WLEDMM version 0.14.1-b31.38 ☾&lt;/code&gt;&lt;/p&gt;
&lt;h3 id="fixing-sound-reactive"&gt;Fixing Sound Reactive&lt;a class="headerlink" href="#fixing-sound-reactive" title="Permanent link"&gt;¶&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;During testing, I noticed that the sound reaction wasn't working. I found the AudioReactive plugin was disabled by default. This is an easy fix. In the WLED application (or web page), click on "Info" then click the power button icon next to "AudioReactive". However, this isn't enough to solve the problem. Click on "Config" then scroll down to AudioReactive. First make sure it is enabled (it should be after the power button selection above). &lt;/p&gt;
&lt;p&gt;The digitalmic section needs to be modified. The Ericsity controller has the microphone on the following pins:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Microphone Type: Generic I2S&lt;/li&gt;
&lt;li&gt;Pin I2S SD: 26&lt;/li&gt;
&lt;li&gt;Pin I2S WS: 5&lt;/li&gt;
&lt;li&gt;Pin I2S SCK: 21&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="Correct audio settings for Ericsity controller. Pin 26 for SD, Pin 5 for WS and Pin 21 for SCK" src="https://andrewwegner.com/images/wled/correct-audio.png"/&gt; &lt;/p&gt;
&lt;p&gt;I found that pin 5 was selected for another plugin. If you find this too, navigate back to Config page and select "Rotary-Encoder". I don't utilize this plugin, but it is part of the &lt;code&gt;M&lt;/code&gt; build I downloaded. Disable the plugin and change the &lt;code&gt;CLK Pin&lt;/code&gt; to be &lt;code&gt;undefined&lt;/code&gt;. Then save this change and go back to the AudioReactive plugin and set it up with the pin layout above.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Disable the Rotary-Encoder plugin and set the CLK pin to undefined" src="https://andrewwegner.com/images/wled/disabled-plugin.png"/&gt;&lt;/p&gt;
&lt;p&gt;Finally, reboot the controller by selecting "Info" and rebooting the controller at the bottom.&lt;/p&gt;
&lt;h2 id="good-to-go"&gt;Good to go&lt;a class="headerlink" href="#good-to-go" title="Permanent link"&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Now that the controller has rebooted, audio reactions are working again. The branch I've updated my controller to is actively maintained for the 0.14 branch, even if it is several months behind the main line. I'm satisfied with this for now and will begin experimenting with the led mappings that I need that started this entire upgrade process.&lt;/p&gt;</content><category term="Technical Solutions"/><category term="technical"/><category term="wled"/></entry></feed>