If you follow the world of small microcontrollers you will certainly be familiar with the usual fare of Atmel, ARM Cortex, PIC, and others. But these aren’t the smallest or cheapest devices, below them is an entire category of grain-of-dust microcontrollers with minimal capabilities and at rock bottom prices. Maybe the most well known are the Padauk series of chips, whose PIC12-like architecture can be had for literal pennies. These are the famous 3 cent microcontrollers, but despite their fame they have a bit of a reputation in our community for being difficult to work with. [Ben Lim] dispels some of those ideas, by Padauk-enabling a motor and encoder from a printer to make a three cent motor controller.
The Padauk doesn’t have on-chip peripherals such as SPI, instead its IDE provides bit-banging code to do the job. This and some PID motor controller code makes for a straightforward task on the little chip, and with the help of a probably considerably more expensive MAX14870 it can drive the motor. For the curious, the code can be found in a Git Hub repository. There may be more accomplished motor controllers to be found, but we doubt you’ll find one with a cheaper microcontroller.
Want to know what the fuss is about with the Padauk? Our colleague [Maya Posch] has you covered.
This is a fantastic tip
Using a 3ct microcontroller with a $6 motor driver seems kinda odd to me. I get it, this is about using a 3ct MCU, but you should know that there are much cheaper motor drivers, like this MD7620A: https://lcsc.com/product-detail/Motor-Driver-ICs_Shanghai-Mingda-Microelectronics-MD7620A_C920529.html
Author here, thanks for the tip! The motor driver was what I happened to have on hand that would drive a 12V motor, so that was what I went with.
Ah ha, good to see there’s still interest in this (misunderstood) lowly chip – ripe for the OCD designer getting heaps out of such a tiny simple piece of silicon that’s dirt cheap, thanks for update post :-)
Curious how people are going with current supply given world wide shortage of various semiconductors and more pressure on foundries to produce, ie can we still get a batch of a 1000 or so of these at a time And an in circuit emulator (ICE) without needing to ditch OTP parts – even though cheap it doesn’t quite feel right, though there might be a sort of empty space workaround up to a point eg?
I could use an array of 32 X 16 of these beasts in an experimental wide band sensor arrangement, though been fiddling with the programming model for months, maybe ready in a month or so to decide AVR or something like the padauk, arrgh.
Looking forward to up dated reports of how you guys going with simple designs with an ICE on windows 7 if possible ?
Is there a windows simulator, if anyone recalls the avsim05 days also with z80 & 8051, those were the days :-)
Eg a possible digital path to replicate a 555 ah lah tiny avr equivalent but, with a sequence queue…
https://lcsc.com/product-detail/Microcontroller-Units-MCUs-MPUs-SOCs_PADAUK-Tech-PFC161-EY10_C2857158.html
seems to be in stock and allow multiple programming sessions. Not the 10k I remember from Atmel, but still: enough to do development work. If you reprogram 10 times per day, you’ll need 4 development boards per year. (or at least new chips).
OMG avsim05! – haven’t heard of that in decades but used it a lot. It was amazing software for the times.
Last time I checked, these 3-cent Padauk chips have been either sold out or out of production ever since news of a chip shortage.
Ah just found this summary, covers some of my first post interests :-)
https://jaycarlson.net/2019/09/06/whats-up-with-these-3-cent-microcontrollers/
As to availability of parts & ICE, last time I enquired twice mid last year or so, never got a reply :-(
That was an interesting read, thanks.
It’s not really cheap if you add up all the cost of getting familiar with the architecture, setting up tool chains, dealing with weird bugs, dealing with crippled tool chain, and the lack of upgrade path to more capable units.
Unless, of course, you deal with high volume projects where you can amortize the costs.
Buzz kill
3 cents is out of date. I recently got a quote for 5,000 of these parts from LCSC for 10 cents apiece. Good luck finding them at the regular price
Yeah, chip shortages are driving prices up on everything.
The exponential growth of microcontroller architectures is a bit like the exponential growth of TV channels. You can spend so long scrolling the specs of what is available that, if not careful, you never get to actually choose one.
there are some viable open source tools available for the padauk
https://free-pdk.github.io/ There they also link to datasheets in english
Incidentally, it sounds like all that is missing for paduk mcus is a fully featured open source ICE.
>despite their fame they have a bit of a reputation in our community for being difficult to work with.
Surely there are people that have programmed worse parts before. It is no worse than the old PIC14/12 or earlier microcontrollers that you have to bitbang everything and mostly programmed in assembly language.
Once you are using in the 100K quantity, a $0.10 save in BOM can goes towards paying someone $10k one time to do the coding.
These chips are interesting but it should be noted that they lack the power saving frills of the ATtiny and their operating temperature is between -20 and 70 degrees (unless you pay extra). Compiler support is currently limited to SDCC and whatever Padauk supplies.
Datasheet: http://www.padauk.com.tw/upload/doc/PMC150,%20PMS150%20datasheet%20V108_EN_20181211.pdf
The problem is rather that these devices are very difficult to come by at the moment. And the few that pop up on LCSC come with a steeply increased price, making them much less interesting compared to established 8 bit controllers and even lower cost 32 bit.
One interesting feature of the Padauk architecture is that it allows simultaneous multithreading in hardware. Unfortunately it’s get difficult to get devices with more than one core.
Btw, the core business of Padauk MCUs seem to be fan controllers and other simple motor drivers. So implementing a motor-driver is maybe not really a hack…
Interesting point, anyone got an idea how to find suitable motor drivers for 3 phase motors usually used in that case? The LCSC search is not giving so many filter options ;-)
Filtering 10k parts list on digikey is sometimes difficult, but here you can filter for package and manufacturer …
I use these chips for PWM generation for LED brightness control. They do this very well, with a quite wide range of frequencies available. Paduak was awesome about helping with the code to get them running. Like to the point of i sent an email asking how to generate a specific frequency, and they sent me back a 99% working program. I think i waited at least 6 months to get the official programmer from them though, and this was pre chip shortage. There is an open source programmer out there that i built while i was waiting, but i had nothing but trouble with it actually flashing the chips reliably.
These sound great until you realize that you need to learn a whole new tool-chain to use them.
I’ll be leaving them alone unless support is added to platformIO.