Motorcycle LEDs , Led sales , LED installation , glow pro , plug n play , motorcycle rallies .
Today, I'm going to take you step by step, all the way from one of the simplest LED strip projects on and through the most complex, up to and including delivery of live custom effects from your PC to the strips in real time over Wi-Fi. I'll show you the big picture from end to end. To get started, let's begin with the basics, just a strip, power, and a module to control it all. Here's a simple LED strip setup. A single, individually addressable strip connected to an ESP32 module, both available from Amazon, and by the way, everything you need is listed in the video description. When we power it up, the ESP32 starts communicating with the LED strip and sending the magical color data to it. It does this over a single green, normally, data wire, and so the only connection from the chip to the strip is one single wire plus power and ground. We don't need to know anything about that data signal for now, other than it needs to be connected. It shows how each LED can be addressed and set to its own unique color, but not much more. To make things more fun, let's upgrade to a more complete ESP32 module, the M5 Stack Core 2. This M5 contains some important accessories But it's the audio microphone and the display screen that we are really interested in. Let's change over to the M5 then. When we connect it back up to the LEDs and power it up, it's much the same as what we saw before. But if you look at the screen, we can see that it's running a complete 16-band audio spectr Now, it's a cool display to be sure, but what's more important is that we have access to that audio spectr The simplest case would be a basic VU meter that reacts to the sound level, and we can see that operating here. It's cute and an interesting proof of concept showing that the audio works, but not something you'd want to spend a lot of time staring at. So instead, let's incorporate the entire audio spectr To visualize the entire spectr We need a matrix where we can draw horizontally and vertically Fortunately, RGB LED matrices are readily available on Amazon, so I grabbed a set of 3 16x16 matrices. Wired up in series by simply plugging one into the next, the LEDs internally form one long string of LEDs wound back and forth across the face of the matrix. This type of winding is known as a boostrophodon, named after the way that an ox might plow a field without doing any backtracking. To figure out where a particular XY LED lives in this overall strip, it's a bit more complicated as we must multiply the X coordinate by the overall height and then add the Y. But because the Y winds back and forth in alternate col Fortunately for us, the Night Driver software package that I'm using does all this automatically. You just plug the matrix in and connect the one signal wire. From there on out, you can draw an XY space and it appears on the LED matrix. Now we won't be running any custom code though, just installing the spectr Here we can see the spectr The sound code does automatic vol It can handle anything from whispers to concert level audio. The same software can also drive a Hub75 style matrix and here we see an example of the spectr These are the same panels used to make those giant video walls and so the readily available online is used surplus from even Amazon, eBay and AliExpress. With a microphone and an IR remote control connected, you can step through a variety of effects There are also novelty items There's a pong clock and a dancing banana and a Nyan Cat as well as Conway's Game of Life and about two dozen cool geometric effects. But now we're getting ahead of ourselves because so far I haven't even said how I'm getting the software onto this module in the first place. Because normally this is a pretty big barrier to getting started because typically you're going to have to write code or at least flash a chip yourself and that can be complicated. Fortunately, Night Driver makes this easy because we can simply plug your M5 in, visit the web page, select the serial port and it will flash the module for us over the web completely automatically. When the flashing process is complete, the module will boot up and prompt us for Wi-Fi credentials which I'll provide. Having Wi-Fi opens up a world of possibilities as we shall see shortly. Wi-Fi or not, once we have the Night Driver code on the module, we can use it to control the LEDs and make them sound reactive. The sound code also features beat detection, which is to say that it's continually listening to the music and looking for regular peaks, which are considered to beats within the music. To demonstrate the beat detection, I created a little art project out of old glass electrical insulators that my grandfather once collected. I added an individually addressable LED ring inside the base of each one and with the software installed and configured to the insulators project, you can see that the glass insulators react to the transit to where it beats in the music and that their reaction depends on how sharp and strong any particular beat is. I also used it to drive the fans in my Lian Li Threaderper case. I wired all ten fans together into one long chain and configured the software for 16 LEDs per fan and with the fan set project, the rest is all automatic. In addition to the flame effects, there are several sound reactive and beat reactive effects. I've added an infrared receiver to the module so that I can control it from outside the glass case with just a simple RGB remote. That allows me to change effects or quiet the whole thing at the push of a button. One of my favorites in small doses is this interesting spinning tape reels effect that emulates the old tapes of the 1960s IBM mainframes. The software I've been using on each of these projects so far has been Night Driver, a completely free and open source project that's on GitHub and that you can find at nightdriverled. com. Night Driver is similar in concept to the WLED package that you might be familiar with, but it's a favorite more powerful in the sense that it supports effects that span multiple strips, effects generated on the PC, color data sent across the Wi-Fi, and even clock synchronized to the big atomic clock in Boulder, Colorado. But wait, there's more. With Night Driver, the ESP32 can actually control up to eight strips in parallel with almost no loss in performance. When I first learned this, I was scratching my head trying to figure out what could I make that requires eight channels of LEDs. And then it struck me, my patio Spokes are almost two meters long each, so the single one meter strip wouldn't cut it. So I literally cut it and then soldered two strips end to end for each of the spokes, giving me about 250 LEDs on each one. Then I attached each LED strip to the underside of a spoke and wired all the powers and grounds together, connected each to a beefy power supply, and so on. Each strip would be a completely separate channel connected to a different pin on the ESP32 and capable of running different colors or even different effects on each spoke. I got it all up and running and it looked great. It's become one of the main features of my backyard at night and I learned an important lesson. Just because you can doesn't mean that you need to. It was a bit of extra coating and a lot of extra wiring to have eighth completely independent channels Almost none of the effects really benefited from independent channel drawing and in the vast majority of cases, the spokes were all mere copies of one another And that's why when a small windstorm finally destroyed the first version of the It appears the chip can sync enough power or current for eight signals on a single pin and so it all works well. That left me still looking for a project where it made sense to have different effects on each channel and I found a cool hanging lamp on eBay. I turned it upside down and then added a mast to make it into a table lamp instead of a hanging lamp and then I stripped all over the factory electronics and LEDs out of it. Next Installed the ESP32 module and then connected it to the four strips, one in each arm of the lamp. The data wire from each strip connects to a different pin on the ESP32 and each one is a completely independent channel, which allows us to run different color flame effects on each of the arms for example. It also sports a remote control so that you can step through the effects and select colors and so on. Speaking of colors, most every color effect running here in my shop is powered by an ESP32 as well. The windows you see behind me are running a simple color fill effect in each window that has its own ESP32 connected to about 800 LEDs that ring the edge of the window. Of course we can make it much more dynamic Now it would be a lot of pain to try to maintain all of these different effects around the shop, much less coordinate or change the effects and have them be consistent between the strips. That's why I decided that I was going to add Wi-Fi to the mix. Now as I mentioned, there's an existing package called WLED that also has some Wi-Fi support but it's quite different. WLED uses what's known as UDP broadcast and the timing and even success of UDP isn't guaranteed. It's basically fire and forget it from the server and you hope your strips all get the signal at about the same time and that they all even get it. If they don't, it looks terrible. Night Driver takes a slightly more rigorous approach. It uses TCP-IP sockets instead of UDP which means the delivery of each and every packet of color data is guaranteed or at least you'll know about the drop. Still ensuring that each strip shows the same frame of the same effect at the same time can be challenging. So what I wound up doing was syncing the clock in each of the ESP32s via NTP to the atomic clock in Boulder, Colorado. On each of ESP32 there's a circular buffer of frames of color data up to the limit of available memory and each one has a time stamp that indicates when it should be showing. When a frame comes due it's immediately shown on the LED strip and as frames are received over Wi-Fi they're added into that circular queue. In this way all of the strips show the exact same frame at the exact same time. Now a basic ESP32 can handle about 30 frames of data in its buffers and at 30 frames per second that means it can survive about a 1 second Wi-Fi hiccup. But because I wanted a bit more resiliency I bought modules with PS RAM support and then added PS RAM support to Night Driver and that gives each strip up to about 500 buffers or 15 seconds. And if the Wi-Fi is down for more than about 15 seconds it'slightly really down. But the strips will survive more transient issues without any dropout. This ability goes well beyond just keeping two strips in sync though. It also enables you to create an LED drawing canvas that spans multiple disconnected strips. For example, around the perimeter of the shop is an ambient color strip. I wanted the colors to be continuous around the ceiling but the cabinets aren't continuous and so I didn't want to fish wires. So I added code instead that enabled spanning a single LED strip effect across multiple modules scattered around disconnected physical locations. That means the strips are connected to and take their directions from the same server over Wi-Fi and there's no other connection between them yet they run in reliable perfect sync. Now, even I'll admit that it's a bit of overkill for this ambient strip but the fun doesn't end there. The guest house out back that features an LED strip that runs for more than 100 feet around its perimeter and it's all 144 LEDs per meter. That means there are almost 5000 LEDs in the strip and they're connected to four different ESP32s. At the server they're joined to become a big single canvas and then effects are rendered to the whole thing and it just works thanks to Night Driver. My favorite effect is the fireworks effect. Because the effect spans all four modules virtually, particles fly back and forth from strip to strip without interruption and are perfectly timed when they cross strip boundaries. You might wonder why I'd go to all the work of adding virtual Wi-Fi support when I could I suppose just cascade the data wire from LED strip onto the next one, right? And the problem that arises is the frequency with which you can update the LEDs. This data signal is limited to around 30,000 LEDs per second and at 24 bits of color it sounds admirably fast than it actually is but there are still some practical limitations. It means you can only do about 1000 LEDs at once at 30 frames per second. And that's why the Cabana Fireworks installation must be split across four disconnected strips. If it were all one long strip you'd get at most about 6 frames per second and that's just not enough. But with synchronized Wi-Fi they draw in parallel and they refresh it once and they run at 30 frames per second and it's all beautiful. The Night Driver code is all public and completely free open source for non-commercial use under GPL version 3. You can get it at nightdrivereled. com and in the next few months I'll be releasing a dedicated Matrix Driver board in the form of the Mesmerizer which we saw a brief glimpse of earlier. If you're all interested in addressable LEDs or matrices they're one of my passions so please make sure that you're subscribed to the channel and you've turned on the all notifications for it. That way you'll be notified when the Mesmerizer is released and for future LED episodes. In the meantime and in between time, hope to Right here in Dave's Garage.