Close

v2: Hackaday Supercon

A project log for Metamer SAO

You’ve heard of RGB, now get ready for RRAYLLGTTBB+UV+WWCWBWDW

reid-sox-harrisReid Sox-Harris 10/13/2024 at 19:120 Comments

A few months later, and it's Supercon time! There were a few flaws I wanted to fix from v1 to make it able to be given out to other folks and generally a more interesting board to work with. 

First up: bootstrapping I2C. The default state of the LED controller is all off, which generally is probably a good thing. Unfortunately, that means you need to sent I2C commands to the SAO if you want it to do, well, anything, which makes it hard to give to other people. Having to entirely reflash a badge with custom firmware (that would overwrite your custom firmware) is generally a non-starter, so that had to change. 

I swear at some point I found a RGB LED controller similar to the LP5018RSMR, but with flash memory to save a default state. That would have been perfect! Unfortunately, after a few hours of searching every LED driver manufacturer I could think of, this might have been a 2am hallucination after all. Ok, so if the LED driver can't save state, then what else can I do? 

A few years ago, I came across Jay Carlson's $1 microcontroller roundup, filled with cheap MCUs of every size, shape, and flavor. A whole dollar felt a bit much to send a few I2C commands and then lay dormant, so I then came across his $0.03 MCU review. Ok, getting closer, but having a OTP MCU feels a little risky for me, and also makes it rather unhackable down the road. Thankfully, there's a middle ground: a $0.11 flash-based MCU! Nice and cheap, reprogrammable, and seemingly very well-featured for the price. So, this got designed in fairly easily, and will be programmed to initialize the LED driver on power-up so that the SAO will actually display something, even on a default badge without custom firmware. Plus, down the line I can perhaps offload animations and such to this MCU instead of doing it on the badge itself. A lot of opportunity for not a lot of cost. Adding that MCU was fairly painless (though beware, the location of the debug pins changes depending on if you're looking at the English datasheet or the Chinese one, trust the more up-to-date Chinese one), resulting in the v2 schematic: 

Problem number 2: the cost. I want to make a good number of these to give out, I don't want to take out a loan for it. The BOM for v1 came out to a tolerable $4.38CAD per bare board plus controller and power protection... and an eye-watering $10.33CAD for all of the LEDs! Part of the issue was that I was ordering in single quantities, part of the issue is that some of the LEDs were just too esoteric for normal pricing, but in any event, I needed to take the unit cost down from $15CAD/board. 

The lowest hanging fruit was alternate sourcing for the LEDs. Digikey is great for next day shipping and consistent quality, but you do pay a price for that. For bulk(ish) LEDs for a large build, LCSC provided much, much, much better pricing, with the caveat of taking longer to ship all the way from China, and ordering parts from brands that I've never heard of before. For just a fun little demo board though, no problem. The updated BOM is in the Github repo, but I was able to get the cost down to just about $1.10CAD for all of the LEDs, though I had to drop the 496nm LED. It's so cool, but the 505nm is close enough and it saves $1.17CAD -- it's cool but not the-entire-cost-of-all-the-other-LEDs-cool. The 505nm is still the most expensive LED at $0.56/ea @ 100, but I had to include one of the weird LEDs one way or another. I also did a few other subs such as making the UV led truly UV instead of just very deep blue (it's UV-A, it's safe, don't worry) and a few others are +/- 5nm or so, but overall the 10x cost saving is absolutely worth it. 

The final problem was assembly time. Manually soldering the two dozen or so components on the back is fine for one or two boards, but will suck up a lot of time for 20. Thankfully, JLCPCB also has stupidly cheap assembly services. This did require a few more BOM adjustments to get all the components into the "Basic/Preferred Extended" categories to avoid reeling costs, but with the exception of the three ICs, everything else had a good alternative in JLC's library. To keep the theme of cost-cutting going, I also wanted to stay within the limits of the economical assembly, which is a good few times cheaper than standard assembly. This means only one-sided assembly and certain parts (such as the LED driver) needed replacing with a pin-compatible alternative due to special process issues. 

Tragically, another restriction of the economical assembly option was limited board fabrication options. I had to pick between green/ENIG and white/HASL, so that holy grail of white/ENIG is still out of reach. A white PCB is still pretty close to the dream though, and my artistic vision isn't worth the sixty or so dollars it'd wind up adding to the final cost. All in, the boards with backside assembled came out to $2.75CAD/ea -- not bad! That puts the total SAO cost at under $5CAD/board (plus whatever you value my time to solder the front side), exactly what I was aiming for. 

Discussions