Live data from Hacker News

Exploring different microcontrollers less than $1

jaycarlson.net

41–50 of 191 posts

Re: Exploring different microcontrollers less than $1

#41
post #11

If I hadn't seen this article on Hacker News today, is there any combination of plausible keywords I could have typed into Google to find this particular article if I were looking for an in-depth review of microcontrollers? I tried "best microcontrollers reviewed", "best low-cost microcontrollers", "survey of microcontrollers", and a bunch of others. Nothing that Google finds in the first 10-20 hits is as good this r…

I've noticed recently (few years maybe) that Google "punishes" results from blogs and less known domains. Searching for some specific keyword combination often results in skipping first few pages of cruft from popular sites just to find exactly what I was looking for in some blog post buried >3 pages deep.

Re: Exploring different microcontrollers less than $1

#42
post #11

If I hadn't seen this article on Hacker News today, is there any combination of plausible keywords I could have typed into Google to find this particular article if I were looking for an in-depth review of microcontrollers? I tried "best microcontrollers reviewed", "best low-cost microcontrollers", "survey of microcontrollers", and a bunch of others. Nothing that Google finds in the first 10-20 hits is as good this r…

I usually find stuff like this by searching for

"tinyavr vs pic24" or even "tinyavr vs" and see what google suggests is a competitor.

Re: Exploring different microcontrollers less than $1

#43
post #12

Earlier quoted context omitted.

Yea I'm hoping somebody can provide a list of various manufacturers and part names similar to the article..

My article includes the Holtek HT-66, the STCmicro STC8, the Nuvoton N76, and the ST STM8 — all hover in the 1-2 RMB range (especially when purchased in volume from within the mainland). The STC8 and N76 parts are 8051, the other two are their own design. The HT-66 looks very much like a PIC16 part, and IDE and compiler are totally free. The STM8 is probably the best-performing part in that price range, and has a fre…

This is a great blog post but I'd also like to throw in that the STM line has a pretty great linux toolchain (official or not, I'm not sure).

I made a repository for the toolchain necessary to get STM boards working here: https://github.com/abraithwaite/STM32

Although it's outdated, the links at the bottom appear to link to updated tools which are presumably better :-)

Re: Exploring different microcontrollers less than $1

#44

Can any of these be programmed with Rust?

Yes! Theoretically anything that Rust has support for (https://forge.rust-lang.org/platform-support.html) but I think most work has been put into ARM Cortex-M support recently. Especially Jorge Aparicio has worked to make embedded programming in Rust a joy (see https://japaric.github.io/discovery/ for an introduction). If you use STM32F MCUs you will probably have the lowest friction. I've heard of other people using the NXP Kinetis lineup as well. Do mind though that there are not many peripheral libraries yet. Currently I myself am fighting with getting USB to work. Of course you could still use the vendor provided C libraries and link against them if you don't want to go for 100% Rust.

The best part: You can use many of Rust's high level zero-cost abstractions. Just take a look at this example code which compiles to very efficient assembly: https://github.com/japaric/discovery/blob/116fe76491d661b5ee...

Re: Exploring different microcontrollers less than $1

#45
post #21

What's really amazing is that for less than $5 nowadays you can have a 1GHz+ quad core ARM Cortex-a53 with FPU and NEON support. I mean, sure, your entire device will be more than $5, and it'll be kinda power hungry at 3W or so running full tilt, but that's a pretty beefy chip for the price of a venti Starbucks latte, capable of running full Linux, with GPU, media encode/decode, etc, etc.

It is all a question of use case. This reply comes up all the time when I talk about how I use microcontrollers and what I use them for. For myself, microcontrollers offer me maximum control with minimum overhead. No OS, or maybe just some RTOS that does not really "boot" except for copying initial values for variables from Flash into RAM, being done in a fraction of a second. Switch it on, off it goes. Interfacing with SRAM and Flash without a driver.

You can do MCU based PCB designs. It gets harder when it comes to the mentioned Cortex-A. It will be harder to sample, say, 40 pieces of them. You're very much supposed (and better off) to buy boards like OrangePi or similar.

ESP designs, especially ESP32, are somewhat in between. Started off as a little documented blackbox with a RTOS interface it is now a much better (but absolutely not on par with Cortex-M designs) documented platform. However, part of it is still a proprietary code blob. They are beefy beasts, however, and when you need just that - well, it's a no-brainer. I just wish they were documented like STM32s plus ARM manuals and had a little more toolchain support. The price tag keeps me from complaining any louder.

When you don't really have hard constraints and are fine with a 5 second bootup, chose whatever fits your bill. When exact timing is an issue (and you don't want to go bare metal on the Cortex-A), when fast bootup is an issue, well - better look at MCUs.

Re: Exploring different microcontrollers less than $1

#48
post #11

If I hadn't seen this article on Hacker News today, is there any combination of plausible keywords I could have typed into Google to find this particular article if I were looking for an in-depth review of microcontrollers? I tried "best microcontrollers reviewed", "best low-cost microcontrollers", "survey of microcontrollers", and a bunch of others. Nothing that Google finds in the first 10-20 hits is as good this r…

> I suppose the lessons are: there's room for lots of improvement in search engines, or SEO really works and you better promote yourself no matter how good you are, or word of mouth (Hacker News in this case) is still the way to find the best stuff. The way I look at it: SEO really works, and shit sources tend to spend a lot on it, while quality sources tend to not spend anything on it at all - therefore a lot of qua…

Indeed. SEO how it's referred to and done most of the time is almost an anti-pattern: People adjust their system (website) to implementation details of another service (search engines) instead of just fulfilling the "public contract" (exposing good, accessible content).

But that's dangerous, as search engines evolve, change behavior and occasionally penalize this kind of behavior. That's why I always tried to explain to customers they should just focus on good content for humans and not care about explicit SEO after they claimed someone had told them that Google had recently "changed their algorithm" and now did XY.

Re: Exploring different microcontrollers less than $1

#49
post #13
post #9

Didn't read all the author's criteria, but esp8266 is worth mentioning in the context of cheap microcontrollers. https://en.wikipedia.org/wiki/ESP8266

I am falling in love with wemos's breakout boards for ESP. For instance, this one: https://www.aliexpress.com/item/WeMos-D1-ESP-Wroom-02-ESP826... This is an ESP8266 breakout/programmer for about ~$3: https://www.aliexpress.com/item/ESP8266-ESP12-ESP-12-WeMos-D... Absolutely incredible stuff. Ordered this one coming soon: https://www.aliexpress.com/item/WEMOS-WiFi-Bluetooth-Battery... And in the realm of awesome brea…

I believe that for the US market you are required to use the 915MHz ISM band LORA modules, the one you pointed to works in the 432MHz band.

Re: Exploring different microcontrollers less than $1

#50
post #47
post #9

Didn't read all the author's criteria, but esp8266 is worth mentioning in the context of cheap microcontrollers. https://en.wikipedia.org/wiki/ESP8266

Yea, I was hoping to see it there on the comparison list. I guess it fails some criteria.

> I guess it fails some criteria.

> A new series that explores 21 different microcontrollers — all less than $1

Post reply on HN