We’re knee-deep in new microcontrollers over here, from the new Raspberry Pi Pico to an engineering sample from Espressif that’s right now on our desk. (Spoiler alert, review coming out Monday.) And microcontroller peripherals are a little bit like Pokemon — you’ve just got to catch them all. If a microcontroller doesn’t have 23 UARTS, WiFi, Bluetooth, IR/DA, and a 16-channel 48 MHz ADC, it’s hardly worth considering. More is always better, right?
No, it’s not. Chip design is always a compromise, and who says you’re limited to one microcontroller per project anyway? [Francesco] built a gas-meter reader that reminded to think outside of the single-microcontroller design paradigm. It uses an ATtiny13 for its low power sleep mode, ease of wakeup, and decent ADCs. Pairing this with an ESP8266 that’s turned off except when the ATtiny wants to send data to the network results in a lower power budget than would be achievable with the ESP alone, but still gets his data up into his home-grown cloud.
Of course, there’s more complexity here than a single-micro solution, but the I2C lines between the two chips actually form a natural division of work — each unit can be tested separately. And it’s using each chip for what it’s best at: simple, low-power tasks for the Tiny and wrangling WiFi on the ESP.
Once you’ve moved past the “more is better” mindset, you’ll start to make a mental map of which chips are best for what. The obvious next step is combination designs like this one.
“ATtiny13 for its low power sleep mode, ease of wakeup, and decent ADCs…”
I dunno, a 10b ADC with 8 to 9 ENOB having dubious input Z might be “decent” if you are not doing much with a small-range hi-Z DC input signal.
And to be the cranky contrarian, multiple processors may just increase complexity, increase costs, and decrease reliability. For low-power designs, I tend to use TI stuff. Where I need ‘complex’ I/O, tend to either go to an M0 or M4, or just use a specialized IC via I2S/I2C/SPI.
You don’t get precise ADC in general-purpose chips because those are still treated as munitions in certain jurisdictions. IMO both AVR, STM and PIC microcontrollers will soon be replaced by RISC-V chips because it’s libre-hardware and can be manufactured by anyone without having to deal with ITAR or other export restrictions.
Oh bull hockey puck. ITAR affects ADCs rated for −54 °C to above +125 °C AND hermetically sealed. There are other general considerations for modules or components. There are hi-performance 24b ADCs not subject to ITAR.
Separation of functionality Decreases complexity. Components can be treated separately. Effects of modifications are limited in scope. Efforts can be more easily divided among workers. All in all it is a big win for the quality of the finished product. Its common practice in every industry.
Telcordia SR322 and Mil Hdbk 217 would would not agree.
And having done 20 years of designing and conducting HALT, HASS, and ESS test programs, I am inclined to agree with these generic and relativistic predictions of reliability.
Adding the extra complexity of ATTINY13 + I2C just to cover the short coming of the ESP8266. Talk about not choosing the right part for the task.
Looked good to me. I did the same back in 2015 – the ESP is far too power hungry to be left on, and an attiny can’t do WiFi. In retrospect, I should’ve gone with a MSP430, but the principle still holds. I also had a socket for a NRF24L01 as an alternative to the ESP, but the ESP won out.
The point is, there is probably a chip that does wifi AND proper power saving at the same time, so the ESP was the wrong tool for the job in the first place and the ATTiny was just a hack on top to make it wor.
Nothing’s *ever* good enough, is it?
If so, name it. There certainly wasn’t back then. BLE was the only similar option, but there were no commodity modules at a comparable price to the ESP. While I would agree the ESP was lacking in low power mode (and said it several times on here), this was there only way around the problem at a sensible price point.
dupe
never mind, only half
Half a mind is better than no mind at all. It also puts you way ahead of many those who dribble here :)
I love projects as this one and they are worth the article because of:
* KISS principle
* just a handful of parts for the job
* self made prototype board
Atsamd or atsaml and a winc1500 would be low power.
Couldn’t see a point to this comment other than you have little to no joy in your life except to tear other people down.