Get the top HN stories in your inbox every day.
DiabloD3
technothrasher
It was an interesting read for me, as I build professional boards from scratch using LPC and STM series chips at work, and so have the tooling to play around with cheapy things like this on a DIY hobby basis. I usually don't like to go with the pre-built SoC boards because they do it differently than I like, and since I have the resources to do it my way, I can.
dragontamer
RP2040 has zero flash on board and is a terrible chip to use as an example. Its actually a lot more complex to boot up than other chips, and I personally consider it closer to a microprocessor than a microcontroller (its somewhere in between).
STM32F0 is a cheap Cortex M0+ that has on-board flash and on-board oscillator. Other Cortex M0+ parts are similar (with the RP2040 as a massive exception). This means that the board design is extremely simple.
---------
> the SoC, RAM, flash, USB connector, the rest, and it's all machine placed and soldered, and individually tested.
Case in point: STM32F0 has RAM, Flash, Oscillator all on the SoC. Just apply Vcc + Ground and your code is running.
I guess programming is somewhat difficult, but sockets do exist for a variety of form factors. ZIF sockets for DIP are cheap, looks like the sockets for STM32F0 (64 quad flat package) are a bit pricy though.
But an "on board" chip programmer is simple in my experience. STM32 / Microchip SAM Cortex chips are designed to be easily programmed and prototyped.
--------
I think you're right in that hobbyists ought to start with developer boards. USB "makes sense" to a lot of people.
But I also want to encourage hobbyists, even advanced beginners, to mess with chips directly. Some chips are much easier to bootstrap than others. Yes, even on a breadboard.
https://www.brennantymrak.com/articles/programming-avr-with-...
benj111
The linked board includes flash.
If you're going down the route of buying a board why should you worry about the complexity of putting it all together?
dragontamer
A lot of uCs have flash on chip, that makes integration easier.
RP2040 is harder because it won't even boot until you add flash. Other chips however will boot with just Vcc and Gnd (aka + and - power applied).
That's my point. Many many chips are actually really easy to build a board around. But not RP2040.
DiabloD3
Update: Adafruit sells a RP2040 in a Pro Micro clone for $9: https://www.adafruit.com/product/5302, otherwise seemingly identical as the Sparkfun RP2040 Pro Micro clone.
That makes it about as cheap as real ATmega32u4-based Pro Micros, which are still hard to find due to the chip crunch.
mlindner
I'm not sure why people try and go for the cheapest microcontroller. These things all have unit prices in the single digit dollars or less in actual production costs. Finding a cheap microcontroller is entirely about finding a cheap reseller of whatever you're trying to get rather than finding a cheap part specifically. Only when you get to truly large volumes such that you can get volume discounts does unit price really start to matter.
Especially if you're a hobbyist, price should just basically not be a factor in what you're choosing as they're all in the same ballpark from resellers.
LoveMortuus
As a person who's financial weak, I always go with the cheapest option that I can find, especially if this is my entrance ticket into the specific space.
Yes, the cheapest option will probably have more issues then the more expensive one. But that's actually good, because if I can't deal with them, I probably would give up with a more expensive one. And this also allows me to experience what really matters to me and what I don't care about, so that if I decide to upgrade I can be much more specific on regards to what I need and what I don't need.
About a year ago I entered the space of microscopy, I was lucky enough to be able to get an old one for free from the university, one that they've deemed no longer suitable for the students (probably because it doesn't have a light), but for me it is perfect, it does everything that I need it for. As for the light, I just use an LED or phones flash.
Zero cost entry, and honestly I don't really feel the need to upgrade, I did buy an additional lense that comes with a holder for a phone so that I can view the slides on the phone's display and even record them!
My philosophy is that you should spend as little money as possible to enter a hobby.
Or in other words, don't buy tools to do a hobby. Do a hobby to buy the tools.
xmprt
It's a good philosophy to have although I think the parent commenter was referring to microcontrollers specifically. You're better off getting a decently capable one for a little more than trying to make do with the cheapest version because the difference in cost is probably a few cents and the variance between resellers will be higher than that.
dragontamer
This won't be cheap in practice.
These are 10-cents to 70-cent SMT parts. See the link from the blogpost: https://www.lcsc.com/products/Microcontroller-Units-MCUs-MPU...
This means you need a hotair rework station and soldering iron. If you want to breadboard, you'll want a set of breakout boards to place these parts.
I suggest to beginners: work with DIP instead, so that it works on your breadboard without the need of more expensive tools. I remember back when I was in college, all I could afford was a breadboard and some chips (not even a soldering iron: too expensive for my cheap self back then).
Similarly, I expect today's cheap beginners to start on DIP + breadboards, and _maybe_ get a soldering iron, eventually. SMT parts are just outside of the reach for such cheap EEs, which is fine, DIP parts (though lower performance), still exist and still have a huge variety of important projects you can do. (OpAmps, Transistors like 2N2222 and 2N7000, voltage regulators, current regulators, references, even uCs like AVR64DD28)
-----------
Spending $0.70 on parts you literally can't use is a waste of your time and money. Buying custom pcbs is like $100 for single runs. Buying breakout boards is +$3 each plus the additional tools (hot air rework) needed to work with them.
Spending $3 on a 28-DIP package (like AVR64DD28) is in fact, the cheapest way to enter this hobby. Or alternatively, find other DIP packages (maybe something else exists: I'm not very familiar with these cheaper Chinese parts), but not the parts discussed in this particular blogpost.
brokenmachine
>Buying custom pcbs is like $100 for single runs.
You can easily get small custom PCBs for <$10, delivered.
There's a really good price comparison site at https://pcbshopper.com/
5 boards - 5cm x 5cm, 2 layer, delivered for US$9.90.
quanticle
Yes, the cheapest option will probably have more issues then the more
expensive one. But that's actually good, because if I can't deal with them,
I probably would give up with a more expensive one.
I don't see how that follows. A cheap electronic component is much more likely to be out of specification, requiring hacks or workarounds to deal with the fact that it's out of spec. A more expensive component is more likely to be within its advertised specifications, and thus Just Work™, when used in a design. It seems to me that using the cheapest, bottom of the barrel, dodgiest components is a recipe for more frustration, and thus more likely to lead to giving up than using components that are modestly more expensive, but actually work to the standards which are advertised.imtringued
I entertained the idea of using WLCSP in a PCB just because I like pain. If I can do WLCSP then I can do anything.
mlindner
Sure but does your financial situation change if you pay 10¢ for your microprocessor versus paying $5 for your microprocessor?
5e92cb50239222b
Well.. yes? A relative of mine is a student and is into electronics. His monthly income (with various bonuses for good academic performance) is around $100 per month IIRC. $5 is a significant sum for someone like that.
Especially when developing something. I let out magic smoke from many a chip over the years (or partially destroyed one of the internal components, rendering the whole chip pretty much useless).
imtringued
One of those can be spun into a product, the other one can't.
kken
I think the main appeal is to work with small devices that have well defined resources. Just consider the popularity of the ATtiny85.
However, low end 32bit devices are also available from reputed suppliers. In fact, STM just announced the STM32C* series which is also aimed at replacing 8 bit controllers.
The cost benefit may only be true for low numbers and when sourcing from distributors. I am fairly certain that the price advantage is much less when talking about actual production volumes
*https://www.st.com/en/microcontrollers-microprocessors/stm32...
TheLoafOfBread
Can I buy STM32 in some decent numbers, or are they still made out of unobtanium?
mastax
Generally the newer STM32s are easier to find because, I assume, they aren't being snatched up by the billions to make designs that were finalized well before these chips were released. I didn't have trouble finding STM32G0 during the height of the shortages.
DiabloD3
This is the problem when building around a specific part, no matter how cheap. The hobbyist community has selected certain daughter boards to clone, and then place SoCs on them that can run Linux (or any other hobbyist OS). If one SoC vanishes from the market, you can drop another one in, and often with zero changes to your design, keep going.
quanto
I get what you are saying. For a typical hobbyist with a project or two, a few-cent (or even few-dollar) saving will most likely not make an economic difference.
However, there are other aspects: 1. Golf. Just like code golf, running some task in the least resources possible (price, memory space, PCB space, flops) is a fun challenge in and of itself. 2. Professional. Some of us do (or used to) have a career in hardware/firmware engineering where the cent-level cost or millimeter-level space actually matters. And it affects how we look at hardware components. 3. General fascination at how far the technology has come along.
leoedin
Even if you're not a hobbyist, development costs will dwarf BOM costs until volumes are in the 10s of thousands - saving even a dollar per item isn't worth it if you add a few months of development time due to obscure tooling or silicon bugs.
imtringued
Saving a dollar per chip(what is an item?) is going to add up to 10s of dollars per unit. I am confused.
I get what you mean regarding development costs. The cost of putting a bunch of popular/well supported components on a custom PCB is way too high. Just like the market for glue languages like python is big in the software industry I think the market for glue design tools is big in the electrical engineering industry.
If you can cut the cost of development down by 50%, the number of projects that are worth doing goes up by more than 100%. Each individual project might be less important than the next but since the cost is low it is worth it.
RealityVoid
It makes sense if you have volumes in the millions.
hakfoo
I wonder if some of it is a reaction to "growing out of" the narrow AVR ecosystem. When you have a billion options, it's neat to pick something percieved better "because I can"
I have a project that uses the now-deprecated (officially sold through, but you can find an awful lot of them of questionable authenticity on Aliexpress) Teensy++.
The Teensy++ was always expensive for what you got ($24 for an AT90USB1286), but now you can get ARM and RISC-V boards with comparable or more RAM, flash, and GPIO counts, while bumping from an 8-bit 16MHz CPU to a 32-bit 100+MHz CPU, and still pay less money. I've been fiddling with the nanoCH32V305 just because, at $6 per unit, I could put aside a fair stock of boards if I decide in a few years I want to build more of the project.
detrites
A few potential reasons:
I could imagine working in the industry professionally, it might become just as second nature to bean-count parts cost as say, to optimise compiled code size as a result of typically constrained memory environments.
Hobbyists who don't work in the industry, may yet aspire to in the future. So, would therefore be wise to develop that ethos, or - who knows - maybe that hobby project could later become something produced in high volumes?
Why needlessly limit a design, when designing something from scratch? It's rewarding to go for optimum goals. It'd be rewarding to aim to design an "optimum cost" system just as it would be for any other optimums one might target.
Roark66
One of big problems today is availability. Even if other microcontrollers do cost single dollars (which isn't often a case, some for example stm32 chips that were cheap are now going for $40 they're so rare). If you're paying $0.1 per unit you can buy a hundred (or more) for a lifetime supply if they meet your requirements.
numpad0
If I could throw a dozen $0.50 microcontroller boards at a project instead of trying to optimize on ATmega32U4, that could remove some barriers for some projects, e.g. VR Lighthouse tracking. Indeed it isn't a huge issue at quantity of exactly one per project/device.
fzliu
> The PY32F030 parts advertise a typical low-power stop mode current consumption of 4.5 µA when using a 1.0V setting with the internal regulator, and I was able to get the part to drop down to 5 µA in my testing. Meanwhile, the STM32F030 uses less than half of that in stop mode
I've had the same experience with cheap (Chinese) microcontrollers - power consumption is usually higher across all modes.
londons_explore
It's due to leakage current due to the design being produced on a less refined silicon process.
Live with it, or have external circuitry to power down the whole chip when not in use.
elsjaako
I wonder if the low price could be helped by the core being licensed from "rogue" Arm China. They still seem to be operating independently. https://www.datacenterdynamics.com/en/news/ousted-arm-china-...
undefined
mmoskal
The reprogrammable 8 bit Padauk PFS122 is around 6 cents, though out of stock. That's less then PY32 though admittedly not by much.
https://www.lcsc.com/mobile/product-detail/Microcontroller-U...
joezydeco
Like most Arm parts from the East, Puya’s SDK has set them up for Keil MDK development. You can definitely go grab a free version of Keil MDK and get going immediately, but I wanted a VSCode / Cortex-Debug / GCC-based solution, which took a bit more fiddling.
marus25's Cortex-Debug plugin for VSCode is wonderful and I'm starting to see it used more and more in the mainstream. ARM or one of the chipmakers (except possibly Nordic who seems to have their own plugin) should really give this person a salary and help push this plugin along because it shouldn't all depend on one person (c.f. xkcd#2347)
https://marketplace.visualstudio.com/items?itemName=marus25....
hinkley
I thought this was about a microcontroller to control Flash storage, not a microcontroller with flash built in.
I was all ready for a conversation about replacing computer subsystems with standard parts + open source. Tsk.
daneel_w
Is this legitimately licensed IP, or at this point stolen IP?
londons_explore
The clones tend to be reimplemented from scratch.
It turns out a team of 10 in a few months can reimplement a small microcontroller from just the public documentation of a competitor. By being 100% compatible, customers can move across without any engineering work, and you can reuse the same toolchain.
I doubt either the manufacturer or their customers will have any legal issues.
On the other hand, you probably will have issues when the original and the clone differ slightly or have different bugs.
pjmlp
It is supported by Astrobe, for those that would like a bit of Oberon and safety fun while targeting it.
Animats
There's something to be said for EPROM embedded devices. No update-induced bugs.
skrebbel
And lots of parts sales to fix initial bugs! \o/
wrldos
Wanna bet? Vendors just used to mail you new EPROMs or send you the hex file.
undefined
undefined
Get the top HN stories in your inbox every day.
I think he's doing an important analysis, but not for DIY hobbyists: knowing how cheap your SoC is only makes sense when you're finalizing a BOM for mass production, even if they're small runs. The SoC is only one component of at least a dozen required to make a working microcontroller board.
If you're doing DIY hobbyist yourself, you'll want to buy pre-mounted SoCs in a known form factor (as in, it is on a tiny daughter board, and that board has a known pin-out that remains consistent across clones). Example: the Pro Micro.
A Raspberry Pi branded Cortex-M0+ on a Pro Micro clone board sold under the Sparkfun brand is $11: https://www.sparkfun.com/products/18288 All the components to have a fully working microcontroller out of the box is included; the SoC, RAM, flash, USB connector, the rest, and it's all machine placed and soldered, and individually tested.
The dev board of the SoC he selected is $5, but get shipped from China and seem to be incomplete dev kits (no USB, no flash reprogramming pins, and the docs aren't great); it also doesn't seem to be a standard/popular form factor.
The analysis in the article is only the part that would lead you to "if I wanted to make my own Pro Micro-sized microcontroller, which SoC is cheap but good"; you still need the cheap but good equivalents for the rest of the components and then actually be able to solder it (SMD components suck for humans to hand place).