As I have way too much free time currently (I'm available if you'd like some help to tame a wild code base), I started a new clock project that is in the back of my mind since I reorganized my desk earlier this year.

The idea is to replace the word clock by a led matrix that could display time and fit on the shelf under the screen.

The gap between the two shelves is only 52mm. If I want to make it a full led matrix (that I could write text on), I'm going to need to go small on that one to fit the 11 lines required (to handle french accented letters :)

I was not sure the laser cutter (and the wood) could deliver on that size. So I cut some tests with different thickness between cells.
I was expecting the 0.8mm thick to fail (either being to fragile, or just burning). But it did not. And I'm really happy, this is quite promising.

#LaserCutting #LedMatrix

My plan is to use ws2812b led in 2020 package (2x2mm).

They are ridiculously small. They're going to stress my soldering skills :)

#ws2812b #LedMatrix

This is quite compact pcb :)
Obivously freerouting did not successfully create a routing, but I can't really blame it.
I'll do it by hand tomorrow.

#pcb #LedMatrix #ws2812b #kicad

I ended making a smaller version, to lower the cost of a prototype I'm not completely confident I'll be able to build.

Also that version is symmetrical, I like it better :)

Next step in 3 weeks, when it'll come back from the manufacturer :)

#pcb #kicad #ws2182b #LedMatrix

pcb arrived \o/

Damn that's compact.
I knew it (I designed them) but seeing them is something else. That's way smaller than everything I've made before.

So, it's soldering time !

#pcb #LedMatrix #ws2812b

So this is an epic fail :)

The footprint I used for the leds does not match their actual layout.

By rotating the leds by 90°, they match the footprint's pinout so I was hoping I could still make it work.
But pads are too short and leds won't align correctly with them, so it fails :(

The good thing from this is that I'm quite confident I'll be able to solder them properly (once I'll get the proper footprint :).

Let's try again :)

#pcb #fail

Here we go again. With the correct layout this time (I hope :)

#pcb #kicad #LedMatrix

Pcb arrived this morning so I took the afternoon off to solder and play :)
Soldering went fine,, but I'm glad I invested in a small hot plate few months ago.
Apparently, only 1 faulty led, I have to fix.

#pcb #wsw2812b #LedMatrix

I change the failing led, and some other but I still had some bad 'twinkling'.
I suspected (and hoped) the cause was bad leds as I had salvaged them from the previous prototype, they might have suffered.
So I solder another one with new leds, and no more twinkling. It works just fine!

(there is some brightness difference, but is because there is two kind of chips, the newer are brighter).

I'm really happy with this. I'm going to write some code to display stuff then It'll be time to think about the real version :)

#LedMatrix #ws2182b #esp8266 #pcb

I ended soldering the last pcb with leds from the same batch.
As expected, no more brightness discrepancy. It was worth it \o/

The code will wait :)
#LedMatrix #ws2182b #esp8266 #pcb

And we have clock ! \o/

This means I will most likely design the definitive pcb during the week end :)

#LedMatrix #esp8266 #LedClock #ws2812b

I did not realize when I posted that the video was that bad (it was late).
So, I made a (I think) better one.

I think I'm done with this prototype, I'll start working one the bigger version, maybe 11x50.

#LedMatrix #LedClock #esp8266 #ws2812b

That's a lot of leds...

#LedMatrix #pcb #kicad

The pcbs arrived this morning.
They're quite intimidating.

I have some other (paying:) work early afternoon then I'll be free to work on it.

Hopefully, I'll have it done for by the end of the day :)

#LedMatrix #pcb

First, I made a jig to align the pcb and the stencil reliably while applying the solder paste.

#LedMatrix #pcb #stencil

90 min later, half of the leds are in place. That's 324.

And 324 leds to go :)

#LedMatrix #pcb #ws2812b

Only an hour to finish the placing of the leds.
I'm getting better :)

It's ready for the soldering on the hot plate.

#LedMatrix #pcb #soldering #ws2812b

So I added a connector, plugged it to a controller and nothing happened.

I had a moment of doubt, maybe the whole thing was faulty.

Then I look closely at the first led of the chain, and one of the pin wasn't correctly soldered.

I fixed it, plugged it again, and boom ! \o/

#LedMatrix #ws2812b

I designed the case, but it's too late to start the laser cutter. It'll wait tomorrow.

Instead, I quickly adapted the code I wrote for the prototype :)

#LedMatrix #ws2812b

A case, and a piece of paper as a diffuser and looks so much better :)

I love it!

I still have some finishing touch, some features to code and a lot of cleaning :)

#LedMatrix #esp8266 #ws2812b

I just realized that this small thing (the pcb is 46x242mm) could draw up to 31 amps / 155W. That's a lot.

I don't have a power supply that could delivers that. But part of me is tempted to find one, just to try.

With sun glasses and a fire extinguisher :)

Matrix being (mostly) done means 'Acrylic word clock' will be able to retire after at least 6 years of non stop working on my desk.

Sadly, the plywood of the grid is falling apart causing some cells to 'leak'.

Maybe I've been to optimistic in how thin I could go with the grid :)
Or went too strong with the laser.

Also, it's not a very good plywood. I think I have some of better quality left.

I guess I'll have some test to do.

#LedMatrix #plywood #LaserCut

I cut another grid on a better plywood and no more visible leaks \o/
There is still one, but in a place I'm not really using, so that's ok (for now).

I'll have to find a better way to make those kind of grid. Maybe 3d printing?

#LedMatrix #ws2812b #LedClock #LaserCut

also, I ordered 2000 leds to build the other two pcbs I have :)

A year later, and I finally cleaned the files, code, and history. *matrix* is officially done \o/.
All files (code, pcb & case) can be found here: https://gitlab.com/avernois/clocks/-/tree/main/matrix?ref_type=heads

#LedClock #ws2812b #esp8266 #LedMatrix

Also this one won't join the shop (https://shop.crafting-labs.fr) because it's too much power.
Technically, it could draw up to 24A. The circuit is not design to handle such current and could be a fire hazard if not used properly.
(The default face does not draw more than 0.7A, so I'm safe :).
Accueil - Crafting Labs: la boutique

Fun (dev) fact: one of the reason it took so long for matrix to be merged is I had a weird bug: at (seemingly) random the clock reboot itself.
There are few "usual suspects" for that kind of behavior:
* no space left to allocate memory
* reading/write un-allocated memory
* preventing the system to handle wifi request (by monopolizing process power like infinite loop for example).

I spent days trying to understand which one it was. I rewrote the display part multiple times.
I found some potential issues, fixed them. But still the reboot kept occurring.

At the same time I made matrix, I added a new feature to the firmware, maybe there lies the problem.
1/n

I was suspicious, because I have other clocks running that new firmware, with the feature enabled and I never spotted a reboot.
But reboot are fast (1 to 3s), maybe they happen when I was not looking.
So I wrote a /uptime endpoint to be able to track reboot. But no. Matrix was the only one affected.

So maybe it was a hardware problem. So I tried with a brand new esp8266 and a freshly soldered pcb. That was not it. Again.

It's a code problem then. I cleaned it again, improving largely the memory footprint for all clocks (forcing me to touch the code of all existing displays).

But, it kept rebooting at random. Again.

2/n

All these took weeks of work over the last year.

That is the fun (and despair) of not reproducible defects: until they appear, you can't know if you fixed them (or not).

Many times, I thought I got it. Only to see the clock reboot after a few hours some times a few days.

The code was fine, the hardware was fine. The memory was fine and I was not accessing memory I was not supposed to.

So I change the only thing left, the thing the I could not see how it could be the origin of random reboot: the power supply.

And that was it.It was the power supply all along.. I changed it, no more reboot.

It's fixed

Well for now. Who knows with random defect :)

3/3