The Three Cent Motor Controller

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.

20 thoughts on “The Three Cent Motor Controller

  1. 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…

  2. 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.

  3. 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.

  4. >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.

  5. 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…

    1. 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 …

  6. 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.

Leave a Reply to cpldcpuCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.