Welcome, Guest
Username: Password: Secret Key Remember me

TOPIC: ESP32 Holiday Lights with LAN Support

ESP32 Holiday Lights with LAN Support 6 days 21 hours ago #18117

  • hop
  • hop's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 492
  • Thanks received: 46
Hi All,
This is a very old project that has evolved several times before ever being truly deployed. Since I have a habit of starting projects and not finishing them, I didn't want to post about this until it was almost done. But there has been such a flurry of research and development activity in the last week, I HAVE to get it on the record here.

If anything, it serves as a blog for the development of the project for me, and allows others to follow in the footsteps.

At the beginning of this idea, several years ago I believe, it was a rather complicated adventure! Long before I knew anything about the Raspberry Pi, the Beagle Bone Black, or even the Teensy, I used the pro mini with the Arduino ProMini ATMEGA328P religiously in 16 MHz 5 vdc mode. And it did well controlling the WS2812B LED modules, even in multiple strands. But since I have two driveway lights, I needed them to be in-sync. So I added the nrf24l01 modules and had success! But I still did not have a connection with my wireless LAN, and that was a stumbling block.

Now years later, IoT has evolved a billion fold, and using the ESP32 is proving to be an EVERYTHING-IN-ONE-PACKAGE solution to this project. So now I have connection with my wireless LAN, lots of memory for patterns, effects, even timers and interrupts. And lets not forget OTA firmware updates! WOOHOO! But then deficiencies in my analog electricity side was rearing it's ugly head. WS2812B strands have become more dense, with 144 modules per meter, so I was looking at 160 modules per fixture. Math calculations showed that with all of them full-on, I was looking at a 9.6 amp draw. Thankfully, switching PSU modules have evolved too, and I will be using two 5 vdc 10 amp bare units and they are arriving tomorrow. YAY!

So I am hard at work on a protocol for effect scripting, because I want to write it, not just use someone else's creation. I initially wanted to use DMX, because of it's proven ability in the market, and also its support with pattern developing software support. But no, I had to do this myself, so I developed my own protocol for the "PLAYLIST" so-to-speak, the effects configurations, and the timer driven interrupts that keep all the processing timely and sync-able. The only problem with this is that I have to write a desktop app to create the effects tracks or I'll have to code them statically, and manually, for the code inside the units.

The big part of this whole monster is I need to sync effects between two lighting fixtures. I considered MIDI, and still am unless I think of something better. I want them to be autonomous, without needing my home server to control them, so it has to be something I can load into the parent fixture. The other will be the slave and do what it is told. For this, I haven't decided on a transport. MQTT might work, as I have read about randomly occurring delays with TCP. My telnet difficulties make it out of the question. Maybe websockets... who knows!

So I have the acrylic tubes, the sheets I plan to cut the end-cap seals from, the light bulb adapters, and soon the power supplies. I have the 144, 60, AND 30 WS2812B modules per meter strips... about a thousand per. Connectors, wire, heat shrink tubing, hardware, and about half the code needed. Where I am now is finishing the effects handling protocol and the script protocol.

More when I do it. I have 20 days until XMAS but I want these up this weekend. STAY TUNED! :)

ESP32 Holiday Lights with LAN Support 6 days 20 hours ago #18118

  • hop
  • hop's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 492
  • Thanks received: 46
TEMPERATURE MONITORING

Since I worry about heat so much, especially dealing with AC, and because I have so many DS18B20 temperature sensors, I decided to run 5 temp sensors and have that data available to the home server, probably through MQTT. All 5 will be on the parent device, and maybe 3 on the client device.

I found that I can connect multiples of these through one pin of my ESP32 Espressif development modules. I'll have one monitoring ambient temperature, one on the PSU, one by the WS2812B modules, one against the acrylic, and one outside the fixture. Necessary? Probably not. But it will be neat to track the collection of temps as I run through the different effects. I also have a number of humidity sensors that although not high quality, they might offer some data as to the moisture level inside and outside the fixtures.

Since this is my first outside IoT deployment, it is worth it to get some data and see how my rubber grommets and o-rings are doing. As I explore fashioning my own outside cases, this acrylic tubing might be a viable option for me for my outside IoT gear. Plus, I like how I can see inside at the inner workings.

It's an idea, and not necessarily an ADD until I get everything else working. I know that one-wire works on the ESP32, but not sure how my timer interrupts will interfere with the data handshakes. I have a ton of testing to do!!

ESP32 Holiday Lights with LAN Support 6 days 20 hours ago #18119

  • hop
  • hop's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 492
  • Thanks received: 46
SPEAKER INCLUSION

I went looking for IoT speakers and 3-5 watt amplifier modules, and found some interesting gear! For one, I found a water-proof 50mm diameter 8 ohm speaker that is 4 watt rated, and would mount nicely at the bottom of this fixture. The ESP32 is capable of streaming audio in stereo and with an amplifier, I might be able to play holiday tunes along with my lights as a light show!

Yeah, it's for next year, but interesting that it is doable!

The ESP32 has 2 cores, but I want to leave one of them alone to handle the online thing. Tweaks through testing are certainly coming soon. This is an amazing level of FUN!

ESP32 Holiday Lights with LAN Support 19 hours 21 minutes ago #18120

  • hop
  • hop's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 492
  • Thanks received: 46
After a lot of trial and error, mostly error, I figured out how to run all 8 strips with their individual effects AND run an timer controlled interrupt system for the other effects. Now it is just a matter of the labor involved to wire it all together. I am REALLY hoping to have video of the effects in a few days. All the pieces are in hand. I just need to put it all together and tweak the software.

I have not done the online part yet, but it is coming. WOOHOO!
Time to create page: 0.230 seconds