Got a fiddly little task, more or less easily done in discrete components, but using an AVR is probably cheaper and smaller, and almost certainly more energy efficient*.
So I look up the cheapest AVR that'll serve the purpose, in context. $1.11 in onesies.
Then I look at other options. Motorola Freescale has something for 95¢ in onesies. With a 48 MHz, 32-bit core (ARM Cortex M0), despite which it's rated for a 5.5V supply (as well as much lower voltages, of course). And: it's got enough additional built-in doodads that I can probably eliminate a couple of other chips, and get 'er done with just the MCU, some FETs and diodes, and passives that I'd need regardless. Maybe also a decently accurate voltage reference if it turns out the on-chip reference's 1.7% tolerance isn't good enough.
So I set out to do something absurdly simple, and end up basically using a VAX to turn the lights on and off and manage a couple of switching voltage regulators. (Actual VAXen had a lot more memory, as well as things like disks and paged memory management, but the CPUs weren't this fast, and I don't think any of them had PWM controllers and sub-10µW sleep modes.)
It's not a gotta-be-done-this-week project; if it were, I'd use an AVR, which is a known quantity. I just ordered a $13 eval board for the 95¢ MCU so's I can see how it programs.
* Not that I'm going all Green, but this thing runs on a battery, so having very low idle power consumption is a bona fide application requirement, and I'm trying to avoid use of a real mechanical power switch, because Awkward and Fragile (in this particular context, where a mad-scientist-style Great Big Knife Switch simply isn't an option).
Comments