Self, Ideating: Hey! If I took those whodads I've got lying around and pair them with the whatsits in this box, I'd have a jiggery thing. How cool! I can whip that up and it'll use up some of these parts I've been hoarding forever.
Self, First Revision: Those parts are wrong, and those parts are wrong, and these parts are right but I'd had 25-year-old stock and they're obsolete. What the heck do modern parts even look like? I should get some samples. And of those I'll use these to test another version, I think they'll work.
Self, Second Revision: I've got all these parts that came in the mail but don't remember why I picked the ones I put on the first revision. Which seem to work fine, but maybe one of the others is better for some reason. Should I make another prototype? Yeah, I'll make another prototype.
Self, Third Revision: Ooh, I like this. But hey, there's this cheaper part? If I'm going to make a lot of them I should look at making it cheaper...
Self, Fourth Revision: Huh. I've got more parts to store than I had to begin with. Again. I wonder how that keeps happening?
Curse you, self. This is a vicious cycle. That I don't think I could live without.
Anyway: that's exactly how this build went. I have a pile of tactile through-hole switches, a small number of SMT LEDs, and some leftover ATTiny 84a SMT chips. Those were the parts I used for the first prototype, which is why it's a hodgepodge of through-hole and SMT work.
Come to think of it, I think I also had the battery cages around from another project. A lot of re-use all around.
So here are some of the questions that came up while I was replacing all of the parts.
"If I mis-match the LEDs to get different colors, how much leakage current will light up the wrong lights in the Charlieplex array?"
A: not much. I stuck with LEDs from the same family, and while there are occasional small flickers of the wrong light barely lighting up, I decided the color was too cool a feature to skip.
"How much force is the right amount of force for a tactile switch? What's the right stem length?"
A: I thought that "the least amount of force they sell" would be the right answer, making the buttons as easy as possible to press. But it turns out that I didn't like them under about 120 grams of force; they felt too flimsy. And it turns out that filtering on stem length is a little tricky, because some manufacturers measure the stem length based on how proud it is of the surface of the switch; while others measure from the base of the switch. Either way - the switches I liked the most weren't the ones I wound up using, because ... stem color also played in to it. (A little more on that later.)
"What's a good design for a boost power circuit?"
A: No idea, but the reference design and layout for the MCP1640 worked well here.
"How small a part is too small?"
A: Well, 1206 parts are much more manageable than I feared. But 0402 parts are definitely too small. The first resistors I got for the voltage boost circuit were 0402 - and they did work, but there's no way I'd want to hand pick-and-place those at scale.
"Are all CR2032 battery cages the same?"
A: I'd assumed so... but no, not really. The cheap ones I got from Digikey in my last batch are very, very tight while the more expensive ones I'd originally gotten from Mouser are perfect.
"How much of this circuitry can I strip out and still have it be good enough?"
A: This was actually part of "how cheap can I make this?" which I only asked myself after making the first 100 PCBs. Yeah, that might sound a little odd, but hang with me for a moment here.
I do kinda have an annual hobby budget, and my Dalek building or badge design or large format printing all come from that. The original design for these badges started in 2020 and ended in 2023, and had loose competition for my time with an Aiie! display update (which I haven't published on that project page yet, apparently). So it was fairly easy for me to say that it didn't matter too much what 100 of these badges wound up costing me - I was more concerned about the time it would take to build them (answer: about 10 minutes a board) and less about how it would hit my wallet.
And then I finished building the first 100, with time to spare. Months, in fact. I'm not used to having a long gap between end of project and delivery... so I did what any sane person would do, I let the scope creep.
The conference is capped at 500 attendees, so I'm basically targeting 20% of the con with my hundred badges. Except that there's an important category of attendees that I wouldn't be covering at all, and we've gotten to know some of them fairly well. So I asked: how many staff and volunteers will there be - how many could it be? I guessed about 35. And was wrong.
Apparently there are about 60 staff and volunteers that run LIWho, for an audience of 500. If I had the staff take the badges I'd made, there would only be 40 left for the con attendees. And if I gave them to the con attendees there wouldn't be any for the staff. So, I thought - "How much of this circuitry can I strip out and still have it be good enough? Can I get this under $5 a badge?"
First: the LEDs are expensive, and with the different colors, it was important to have the voltage boost circuitry to keep them all more or less the same brightness. Without the voltage booster, some of the lights are still clearly visible but others are really hard to see. So, to make it cheaper, I could go back to a single color of LED and pull out the voltage booster. Everything would slowly grow dim over the life of the battery, but that sounds like a reasonable compromise - especially with a month-ish runtime, mostly sitting around.
To do that I also needed to revise the PCB; I added a solder pad to bypass the voltage boost (except the voltage protection diode; I didn't want the dock power to run back to the battery).
The traces are all still there, and I did build one "staff" badge with colored LEDs and the full power supply (from parts left over from the other builds). But that one aside, they're all running directly off of a CR2032 battery.
I did "splurge" (spent $20) for these to be black PCBs instead of the stock green. It makes them feel a little more menacing, along with the red-stemmed tactile switches (see, this is where they come in). Which I picked completely because of their color, and not at all because of cost.
The "added bonus" here is that I actually used up most of the surplus LEDs that were lying around. Some of them aren't as bright as I'd like - I would definitely not have chosen them from for their electrical characteristics. But they work, and kept the cost down to about $4.90 per badge when all was said and done.
"If I wanted to make these cheaper next time, how would I do it?"
A: The ATTiny 1606 is the most expensive single part on the board; even in bulk, and from disreputable suppliers probably counterfeiting, I couldn't find them for under $1 a part. Next time I'd pick a cheaper processor to start with.
Now, let me be clear here - this feels ridiculous to me. We're living in a world where I can buy an ESP8266, ESP32, ATTiny, Freescale, or many other microcontrollers for about a buck, and I'm complaining that they're too expensive, because I want to basically give them away for free. What a first-world problem. I am amazed at the riches available to us; from these, I could build a machine more powerful than the TRS-80 MC10 that I used in the early 80s.
Nonetheless, there's some reason for me to think it would be possible. The CH32V003 may have a more spit-and-bubblegum toolchain, but for about a dime you have a microcontroller with 2k of RAM and 16k of flash. The 1606 has 1k of RAM and 16k of flash, for about $1.10 in the kind of quantity I'm ordering.
"So what's the next design I'm going to make?"
A: ... ooh yeah, I've definitely spent some time thinking about this. And I know (a) that it won't be next year and (b) it may not be ever, unless someone bankrolls it. I had a lot of fun pushing in to areas of surface mount that I'd previously avoided on this project, and in the at-scale design that's usually not part of my calculations. But, as River Song would say... "Spoilers."