DLE (Globes of Fire) Part 4

It’s been very long since my last update, and a fair bit has happened.

Hardware:

I did a rev 1.2 of the board and sent them off to allpcb for a small run (10 IIRC, so 120 of the LED boards and 15 of the end boards).

The boards showed up quickly, and didn’t work. Well, two of the LEDs worked sometimes, but the third would not.

Clever me, I did some led moving and I managed to route the VCC line for LED #2 right across the data out pad when I did some moving. I could break the pad by hand and get them to work, which through trying to be quick led me creating a circuit that would work for all the colors except white because I didn’t break the trace completely. Which led me to think a new real of LEDs was bad and waste a couple of days trying to track down what was going on.

I took the opportunity to do rev 1.3:

image

I bumped the VCC and ground tracks up in size, redid the VCC routing, and just generally cleaned things up to be nicer. I also added (finally) a 100 nF decoupling capacitor to the right of the #1 LED, which should help eliminate glitches in the future.

I spun a small verification order (3) through OSHPark because it was only $5, and those worked great. After that, I pulled out my little list of material costs, went back to reprice the PCBs, and found that JLCPCB would do my full first order for $83 delivered, which was about 30% less than the $120 I had written down. Given the temporary nature of PCB special deals, I put that order in, and today found this on my doorstep:

IMG_9215

Well, technically they were in a *box* on my front porch. That is 600 of the LED facets in the two bags at the top and 50 of the top facet in the small box. And the two pretty purple boards are the test ones from OSHPark.

Assembly

I’ve gotten pretty good at soldering the LEDs on the facets, but my plan all along was to reflow them. Towards that, I picked up a few things:

That’s a nice little Black & Decker TO1313SBD toaster oven.

And:

That’s a Controleo3 toaster oven conversion kit. We’re going to hot-rod that oven, adding a full computer control to it (the blue board on the left), add an extra heating element, a lot of insulation, and even a servo to open the door.

All of this will give me a reflow oven; you can put a board with solder paste and components on it, hit a button, and it will heat the board at a certain rate until the solder melts and then cool them down at an appropriate rate. It’s going to live under the garage near the laser cutter, and my guess is that I’m going to need a bit of ventilation for it.

Firmware

I am at what I think is the V1 firmware, for approximately the third time. This took a whole lot of time and effort, with the usual fun of running two different codebases on two microcontrollers connected over USB.

Provisioning

The first time setup for IoT devices can be a bit of a pain, as they have to get your wireless ssid and password. In playing around, I found that iOS doesn’t let you enumerate wireless networks or change connections programmatically, which meant it might be a real pain to set up multiple nodes by hand.

Then, I had a small bit of insight, and realized that I already had a device that could easily enumerate all the wireless networks; the ESP can do that an I already had the code because I needed it for testing. It was merely a matter of grafting it onto the existing code.If you connect to the network for any node and give it an SSID and password, it will verify that it works and then pass it off to all of the other nodes so that they can auto-configure. That code is all done, and it’s pretty cool to watch because the current firmware shows the state of the connection by flashing. Okay, maybe that’s only a little cool.

Animation

I wrote a few of the simple animations that I want; some color rotations, a flash and decay animation, and a blend from the current color to a new one.

I also wanted to be able to go fully to the metal and control every LED remotely and quickly. That led me to a better Http server for the ESP, a brief flirtation with TCP, and finally an implementation based on UDP. The server is fast enough that you could send the data for all 33 leds 500 times a second and it would work; it is currently constrained to 100 Hz because that is the speed the animation loop runs at, and I expect that for real applications sending data at 60 Hz would be fine.

I am particularly happy with how the command processor worked out; the implementation is nice and clean.

The wireless information is stored in permanent memory, and it is also possible to store the current animation so that it will resume on startup.

Software (app)

I want to have an app to control all of this. It needs to support both Android and iOS, which made Xamarin the logical choice; I can support both and I can write C# code which is a huge plus in my book.

Like many open-sourcy software, it can be a real pain at times, but I’m able to build an app that deploys to my phone and debugs, and that’s a decent first step. I’m working on network discovery right now; once the provisioning is done, the app needs to enumerate all local ip addresses and see if one of my controllers is hiding there.

And I’m using Xamarin Forms, which is built on top of XAML, which I guess is an advantage since I did XAML professional for a fair bit, but it’s a bit of a mind-bender as usual.

I wanted to do something different for discovery, so I wrote a graphical pinger. Here’s a video.

The app still needs a lot of work; it needs a way to do the initial provisioning, a way to list the different animations it can do, a color picker, etc.


So, what do you think ?