Making A Three Cent Microcontroller Useful

The Padauk PMS150C is a terrible microcontroller. There are only six pins, there’s only one kiloword of Flash, 64 bytes of RAM, and it doesn’t do multiplication. You can only write code to this chip once, and the IDE uses 8-bit ints. [Anders] got his hands on some of these chips and decided to do something useful with them. It turns out that you can do a lot with minimal hardware, such as driving 300 RGB LEDs with a three cent microcontroller.

There’s some work trying to make an Open Source toolchain for these chips, but [Anders] decided to just go with the manufacturer IDE and programmer. What to do with a three cent microcontroller, though? Obviously something blinky. [Anders] connected this microcontroller to a strip of Neopixels, or WS2812Bs, but instead of driving them by giving each pixel a few bytes of RAM, the entire strip is being bitbanged one bit at a time. It’s some clever code, and even if [Anders] won’t be able to send images to a gigantic graphic display made of Neopixels, it’s still a neat trick.

At three cents and nearly zero associated hardware, this is the cheapest microcontroller we’ve ever seen. Even the minimalist PIC and AVR parts are on the orders of dozens of cents per part, and they still only have the functionality of this three-cent part. The manufacturer’s page has more details on the microcontroller itself including the data sheet, and you can check out the sizzle reel of this project below.

47 thoughts on “Making A Three Cent Microcontroller Useful

      1. Ah ha, here tis more data with ”suggestion” also has a to d ie in column is an analog option for some pins, if that pans out then a much better option at 5 times the 3c price of the PMS150, LoL
        http://www.padauk.com.tw/en/product/show.aspx?num=66&kw=Pfs154
        IDE and English user manual here http://www.padauk.com.tw/en/technical/index.aspx?kind=26
        PMS150C does have programmable V ref
        PFS173 looking nicer with multichannel 8 bit a to d

  1. No, it’s not a “terrible microcontroller”. That’s nonsense. It’s a fit-for-purpose engineering design which combined extremely low-cost, OTP, low I/O in a single chip and small code base.

    If you have an application which this fits, it’s the “right microcontroller”. If you’re trying to do something else with it, then you’re either a “terrible engineer”, or as here, a “cool hacker playing with an unusual part”.

    1. Agreed, calling it a “terrible microcontroller” is ridiculous. To me it’s a perfect microcontroller. Why? Because here you have a part that can replace many single-purpose chips and do the same thing or better at a fraction of the cost. That’s what these are for and they fill that niche perfectly.

      I had a problem with my wESP32 where the BD5228 I was using to sequence the Ethernet PHY reset wasn’t always working correctly (see https://www.crowdsupply.com/silicognition/wesp32/updates/the-phy-reset-saga). The PMS150C was perfect to fix this: writing the program was trivial, the micro fit where the old chip used to be and I could make it generate the exact signals I wanted. For significantly less than the price of the chip it was replacing, even factory programmed, it did exactly what I wanted it to do.

      And to the comment below, check out the PMS132, it has an ADC. Plus if you really want to, it is of course possible to take analog readings using a timer and comparator, which the PMS150C has.

      1. Good to hear.
        Curious if the chip manufacturer’s parts were no hassle and the idea software for PC presumably and did you use their ICE too – which specific ICE as I’ve seen a few earlier/different ones listed ?
        The ICE you settled on good for their other devices ?
        All up what did it cost to get what you needed from China to program, verify, test and debug the chips for that application

        1. As EEVBlog brought out the tools are kinda “different” but I have had no real issues figuring things out. I got the 5S-I-S01 ICE and it works for the PMS150C I used and the PMS132 I’m using for another project where I need ADC. Probably works for other parts as well.
          The 5S-P-003 programmer and 5S-I-S01 ICE cost me $277 total with shipping.

      2. Calling it a “terrible microcontroller” is brilliant, once you understand that the point is to get people to read and comment on the article.
        Thanks for sharing your example of how this chip can be useful.

    2. right, it’s a decent little tool, e.g. to connect something via ic2, to decentralize a task, to simplify something otherwise too complicated, to do something simple (like you already mentioned), …

  2. More importantly, what could one build by spending $20 on 666 of these guys?
    Can it read analog values from the pins? Then you could hook up various sensors that cost pennies.

    If I were a cold storage facility or a data center, I’d consider putting these 1 foot apart with a temp sensor and an LED. If temp goes outside some threshold, light up red. Now you can see a temperature problem before it effects the whole room, and you can see exactly where it’s originating.

    1. No ADC, so no analog readings. It’s got a PWM generator, a comparator and some digital IO and that’s pretty much it.

      You could probably bitbang i2c, but almost any sensor is going to cost an order of magnitude more than the micro…

      1. There’s a PWM output that can be used to implement a DAC with an RC, combined with a comparator gives you an ADC eg successive approximation, add a thermistor and you can monitor temperature. Voila!

        1. You don’t need to use PWM at all. You can make a bare minimum ADC with just a R and a C.
          – discharge a cap by setting an I/O to output a ‘0’.
          – turn it into an input pin.
          – the thermistor is your R connected to Vcc and you can time how long it takes to charge up until the I/O sees a ‘1’.
          – calculate R from known C, VIH threshold(datasheet), VCC and the time. Or you could make a table of calibrated time vs temperature.

          There are other more accurate ADC you could build with the comparator.

          1. I agree if all you want is a thermistor but [Wade] mentioned “analog readings” so I wanted to provide generic analog capability ie DAC and ADC. If all that was required was for eg [David]’s temperature application then the charge/discharge method is simpler.

          2. You certainly could, but at some point it might be easier to switch to some more capable (and expensive) micro… Except if you are doing production stuff and need to justify each 1/10 cent of course.

          3. There are much better and higher resolution ADC with simple RC e.g. dual slope, delta sigma. Might want to read some good app notes.

            Why make DAC out of filtering PWM and make a SAR!? PWM DAC is noisy as hell and you’ll need a large RC to filter to get any resolution. Once again back to component counts etc as your passives is significant vs uP cost.

            If all you want is a thermal threshold, you just need the thermister and a fixed resistor as a voltage divider. Calculate the resistor need for temperature to trip the comparator. :P

    2. You could probably do some pretty neat stuff with 45 cents worth (15 mcus). Basically each subroutine could be a separate mcu if you wanted – all running simultaneously in a pipeline.

    3. Maybe something with a thermister and a capacitor connected from the LED PWM pin back to a comparator or digital input pin. You could read the time it takes to charge/discharge the capacitor during the switching cycles.

        1. Might want to be familiarize with the PIC. You’ll need to bitbang it.
          Just because arduino called it as analog doesn’t meant a thing. It is a horrible way of making analog output as it is noisy as hell and require a lot of filtering.

  3. How would you program such a thing? Flash is great because you can just keep on reflashing to try new code. Are there ICEs you need to obtain? Does anyone know a version with flash?

    1. As said before, EEVblog has blabbed about this thing for some hours. He even shows how the IDE works and how the programming language for this thing works. It is a sub set of C, and the IDE is very basic and simple, but still hase nice features such as built in help and documented examples.

      And at 3ct a piece you don’t really care about the price of a complete development kit (Few hundred EUR) or Flash versus OTP. (There seem to be emulators though, just as here 20 years ago).

      This padauk thing is marketed for high volume production.

      My toothbrush has a MSP430 in it. I wonder if that toothbrush brands pays less for a MSP430 than the 3ct a padauk costs. Maybe the low power modes of the Padauk are not good enough.

    1. Right, it was just the writer of the article who felt the need to add some sensationalism to his article to draw out more comments.
      Great job on the project and for using the best tool for the job instead of just another Arduino like most people would do!

  4. “…and it doesn’t do multiplication”
    Sure it does, you just need it to program it yourself. If it has an add instruction it can multiply, it only takes a little bit longer but in most cases that isn’t important. If I understand correctly, you don’t even need it to make LED’s blink, but hey… I’m no expert.

    Calling the Padauk PMS150C “a terrible microcontroller” makes no sense at all, terrible compared to what? Sometimes you just don’t need an 160MHz wifi enabled arduino based beast.

    1. Thank you! This is the answer I was scanning the comments for before rage-posting. +1

      He should actually be paid in Benchoff Bucks at this point. Little more than a clickbait troll that actually detracts from the interest of the project and ticks people off into nitpick mode until the creator has to come in and defend themselves.

  5. You shouldn’t call the WS2812B “Neopixel”. The latter is a registered trademark of Adafruit Industries, used to mislead people about the real maker of these intelligent LEDs, Shenzhen Worldsemi. Adafruit sues other companies calling WS2812B “Neopixel”. This is what it is about.

  6. If you need to make something simple for between 30 and 35 cents per unit on an industrial scale, this is ideal. OTP means nothing if your product is disposable. You can buy them programmed and placed and baked. Ideal for a LED “mace” or “hairband” or that kind of fairground tat. Maybe even without a PCB.

  7. So little imagination, both in the article and the comments.

    A 3 cent OTP microcontroller with a comparator timer and PWM is ideal for implementing a neuron. For $3 you can make a neural net with 100 neurons. You can do a lot with 100 neurons, say coordinating the legs on an artificial cockroach . Its been done. As I recall it only takes about 5 neurons to control each leg, leaving 70 neurons for other tasks.

Leave a 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.