Welcome, Guest
Username: Password: Secret Key Remember me

TOPIC: Driveway Lantern Intelligent CCFL Replacement Element

Driveway Lantern Intelligent CCFL Replacement Element 1 month 3 days ago #18024

  • hop
  • hop's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 431
  • Thanks received: 45
Hi Everybody!!

I have not posted in my Node Server thread for a few weeks because I have been deterred into another little project I am racing against the clock on. It is holiday related so naturally, I am trying to get it finished and deployed in time for Christmas. If I should fail at this goal however, it's not a big deal, since this project can remain deployed all year and function as a holiday effect for all holidays. And it can be a functional lighting element in between.

It's not that big of a deal really. Nothing ground shattering here. To be honest, I have no idea if the number of RGB emitters I decided on is going to generate more light than my existing CCFL bulbs in my driveway lanterns. I believe they will "out-shine" their CCFL predecessors though and I'm excited!

The whole system includes 100 WS2812B LED elements arranged in 10 rows of 10 LED's. They are aimed outward from a circular length of polycarbonate tubing. At the top, where a standard bulb would be screwed into the outlet, a small light bulb outlet to electrical outlet adapter is used. Plugged into that, and fitted into the top of the tube is a AC 120vac to 5vdc dual channel USB charger/power source capable of 2.4 amps per channel. This in turn is connected to the control electronics and the LED power bus. The bottom and top of the tube will have to be sealed but I have not gotten to that point yet.

The LED control will be via an STM32F103CB board with 10 channels of control in parallel using the FastLED library in the Arduino IDE. I can do that now since I figured out how to use timer interrupts and IRQ handling in the code. In this board will be several effects pre-coded to be selected on the fly by commands coming from an ESP8266 connected to my home wireless network. I2C is my preferred transport for the communications, but I will create my own protocol if I2C fails me. I have been able to get this to work using Keil and CubeMX, but not Arduino IDE. Anyway, the ESP8266 will control syncing of the other like devices since I have two driveway lanterns and will also place one of these elements in my front door walkway overhead light fixture. MQTT will handle monitoring and control of the fixtures through the ESP8266, and each will also have its own web interface for servicing. One bonus feature... I will be able to connect a couple of 18b20 temperature sensors via onewire to the ESP8266 so I can monitor heat and detect issues of overheating, and get an outside temperature as well. All of this will be transported via the MQTT system. I can even add an excellerometer module to detect theft attempts and notify my home security! Neat huh?

Naturally, not all LED's need to be lit full on at once, which would push the current past the rating of the power supply, but I plan to code protection for that to prevent hardware failure.

Since I plan to leave these creations in place year-round, I will be going after OTA firmware upgrades over my wireless LAN in the near future. This will alleviate me the burden of removing the devices and plugging into them to update the code. I already have code written (but not fully tested) that will support this for both the ESP and the STM32.

The next stages of the project I am working on today is how to cut the polycarbonate tubing to length, and the effects handler in the STM32.

I will post more as I do it. There will most likely be several versions of the device as it evolves. I already have pages of revision ideas but I want to get the first dirty prototypes working first. Santa is tuning up his sleigh I'm sure, and I need him to see these!!

More when I do it. Thank you for your time!

Driveway Lantern Intelligent CCFL Replacement Element 4 weeks 2 days ago #18025

  • hop
  • hop's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 431
  • Thanks received: 45
Things are going along nicely!

I was able to write a quick and dirty simple command processor using one of the UARTs on the STM32. The bus pirate helped a LOT with this!! Now I can send commands from the ESP32 to the STM32 and receive acknowledgements back. ALL of this is channeled through specific topics using MQTT so I can control it from a web page on my home server. Simple stuff really. More effort just to put the code pieces together.

Interrupts are working on the STM32 nicely! I have it controlling the firing of the update process for the selected effect. The LED grid has changed a little and is now 80 LED's... 8 strips of 10 LED's. They are the type that came in a 10x10 array run that snap apart, so I snapped 8 rows of 10 from it. Now I just have to solder the bus lines and affix them to the inside of the polycarbonate tubing. In the code, I am using FastLED and set up the strips to be an 8 element array of 10 LED's per element. The library handles the addressing nicely, and the updating is so freaking fast. The effects with just two strips is stunning! To avoid being disappointed later, I already coded the arrays to be 8x10 and that is how it is running now. I just have not connected the other LED's yet.

Command processing via serial commands is all handled through the main loop with no adverse effects on the patterns. It appears timing is not an issue. YAY!

What I love about this approach is that both light fixtures will be synced rather well using MQTT. My first prototype used RF transceivers to handle that. Now a command to a topic listened two by both ESP32's will change their slave STM32 devices at the same time. I can either control the effects autonomously from the ESP's or from my home network.

That's it for now. If I miss Christmas, I can still plow on because these will look awesome for New Years. Just have to change the effects. I am still working on the OTA part of this so I can leave the fixtures in place and update the firmware over my wireless LAN. NEAT! Then there is Valentines Day, Easter, 4th of July, Halloween, etc. Very cool!

Driveway Lantern Intelligent CCFL Replacement Element 2 weeks 5 days ago #18030

  • Jon Chandler
  • Jon Chandler's Avatar
  • Offline
  • Moderator
  • Posts: 332
  • Thanks received: 341
You are doing some awesome stuff! My big achievement of the last few days was to buy a clearance set of battery-operated LED Christmas lights, hack off the battery pack and replace it with an appropriate resistor and and the working end of a failed USB cable. Now I have lights that can be operated from a USB battery pack, which will be nice during power failures.

But my BIG project didn't end there. No sir. I put a low voltage Sonoff remote control module in a box with a(nother) salvaged USB cable on the input and a USB jack on the output. Now I have a remote-controlled string of Christmas lights in the bedroom that make a nice night light :)
Time to create page: 0.221 seconds