16 ms·
The amazing $1 microcontroller (2017)
- torgoguys 6y agoI've read this article before and it is great, but needs a [2017] tag.
- nickthemagicman 6y agoDo any of these have the ability to be used as a forward proxy?
- zrail 6y agoHow do you mean? Like, HTTP?
- nickthemagicman 6y agoMainly ssh but http would be good too
- outworlder 6y agoRunning SSH would be ridiculously slow. HTTP, a bit less slow. HTTPS slow as molasses again.
- ineedasername 6y agoIf you don't care about security telnet in the clear would be usable. (Because that's what we really really need: millions of embedded systems accessed by Telnet. EHLO!)
- danellis 6y agoHTTPS shouldn't be any slower. The encryption is transparent to the proxy.
- tyingq 6y agoESP32 would likely be the easiest path. WiFi on the boards, and an available ssh client library. But for a proxy, maybe you would want an actual microprocessor instead of a microcontroller. Pi Zero W or similar.
- coronadisaster 6y agoYou can use an ESP8266 as a wifi router for up to 8 clients at 5mbps each I think which is really impressive so it should be able to do that... I used that for the kids in the car so that they can play games together https://github.com/martin-ger/esp_wifi_repeater https://github.com/martin-ger/esp_wifi_repeater
- squarefoot 6y agoThere's a partial port on the ESP32. It seems lacking many features over the ESP8266 one, though the project is a lot younger. https://github.com/martin-ger/esp32_nat_router https://github.com/martin-ger/esp32_nat_router I recall that somebody found that the ESP8266 (no info about the ESP32) can talk directly to Ethernet devices, albeit it lacks a proper PHY with magnetics. https://github.com/cnlohr/espthernet https://github.com/cnlohr/espthernet It could be handy to avoid using the same WiFi subsystem both to connect to the WAN and to accept connections from all clients, which I believe has a huge performance impact. Now what if we wanted to overcome the speed and number of users limitations by connecting two or more ESP boards in a magnetic-less way, either crossing tx and rx pairs in case of two chips, or using a switch chip such as the RTL8306 to connect more than two ESPs? I think it would be possible. More as an exercise though, since costs would raise to reach many already made products.
- ClumsyPilot 6y agoif you don't intend to mess with hardware, just get any random Intel atom mini-pc, you can get them for way under $100. these things will give you like 5KB/s in bandwidth, and that's after spending months figuring out how to get networking working on them. (I am assuming you have no embedded computing experience here) In fact scratch that, none of these even have enough resources to handle TLS/SSL for one connection.
- duskwuff 6y agoLike, for networking? None of these parts have any network capabilities -- they're microcontrollers, not application processors. Even if you added networking capabilities through external hardware, many of them wouldn't have enough memory for a network stack, let alone to handle any protocol on top of that. (Many of them have 4 KB of SRAM, or even less.)
- squarefoot 6y agoYou probably want something with more resources for that use. This one can run various flavors of Linux, of which I would suggest Armbian or DietPI. https://www.friendlyarm.com/index.php?route=product/product&product_id=282 https://www.friendlyarm.com/index.php?route=product/product&... https://www.armbian.com/ https://www.armbian.com/ https://dietpi.com/ https://dietpi.com/ This one is more dedicated to networking, however it runs the proprietary RouterOS, although OpenWRT was ported with success. https://mikrotik.com/product/rbm33g https://mikrotik.com/product/rbm33g https://openwrt.org/toh/mikrotik/mikrotik_rbm33g https://openwrt.org/toh/mikrotik/mikrotik_rbm33g
- noncoml 6y agoBig fan of STM32 family for the simple reason that you can use mature open source tools, i.e. gcc toolchain, or even clang, for development.
- bgorman 6y agoIsn't that the case for virtually all embedded ARM chips?
- noncoml 6y agoIndeed
- mhh__ 6y agoYes, in the sense that even the Chinese no-name parts do have to comply to some kind of standard. The selling point with lines like STM32 or NXP is that they have lots of good documentation, Application notes etc. Simple example, I was looking at trying a weird Chinese part with a hardware NN accelerator but the entire documentation available (Chinese or English) was 10x shorter than the documentation on the serial peripherals alone on an NXP part.
- duskwuff 6y agoNot all. Some parts require proprietary tools to build a full firmware image for the chip, to debug the part, or to write to the target's onboard flash. Thankfully, these are all getting less common -- but there's still some out there. For instance, the Cypress PSoC requires Cypress's tools to generate configuration data for the part's configurable digital blocks -- there isn't enough information in the reference manual to do this yourself.
- egsmi 6y ago$1. Ouch. Too rich for me. I use $0.03 MCUs! https://hackaday.com/2019/09/09/everything-you-wanted-to-know-about-padauk-mcus-and-more/ https://hackaday.com/2019/09/09/everything-you-wanted-to-kno...
- etaioinshrdlu 6y agoDo you know anywhere I can buy these? Someone should sell them in packs of 100 on Amazon...
- userbinator 6y agohttps://lcsc.com/product-detail/PADAUK_PADAUK-Tech-PMS150C-U06_C168658.html https://lcsc.com/product-detail/PADAUK_PADAUK-Tech-PMS150C-U...
- Palomides 6y agothanks for the link, that company is becoming pretty interesting in terms of user-friendly/comprehensive access to chinese manufacturing
- HeWhoLurksLate 6y agoI got some SK6812 V3 LED'S or whatever the RGBW 'Neopixel' things are from there a while ago- really nice ordering experience, I don't remember having any problems with it, and they include datasheets, which is awesome.
- Crosseye_Jack 6y agoI use them for PCB's - I don't have access an local version of OSH Park, so if I have boards fab'ed locally I am paying though the nose for them. (If anyone has a link to a decent OSH Park alt based in the UK I would love to give them a try) If I need them "ASAP" even tacking on the £17 DHL shipping for 2-4 day shipping they still come out much cheaper than purchasing locally, but I normally just choose "standard" postage which means it takes ~10days from ordering until I have the boards in my hands but drops the shipping cost to ~£4. (shipping costs vary based on size and weight of the order) I've yet to use lcsc for components because I've been burnt in the past from ordering IC's from china and when ordering anything over the value of £15 I often get handed a £8 handling fee from the postal service to process a few quid of import VAT which always grinds my gears, so I tend to shop locally for components. But I do plan to give them a try at some point. EDIT in ref to jlcpcb: Just keep their capabilities in mind and set your EDA/CAD software to mm and not mil to save headaches if you are planning to use BGA's in your design.
- flyinglizard 6y agoThis article is great, but misses the mark by focusing on this arbitrary $1 price point. For a hobbyist, a dollar or ten is all the same. These very cheap chips are intended for high volume applications, far from the realm of DIY. If you’re doing a hobby project, take something off the top of the line. Having all those peripherals and compute power is just one thing less to worry about.
- ethbr0 6y agoLimit resource to Sweep mental complexities Away, like fall's leaves.
- polishdude20 6y agoBeautiful
- nightfly 6y ago> For a hobbyist, a dollar or ten is all the same. Not really. If I manage to burn it out that $10 MCU just became a $20 MCU. And if I want it to run off a battery, extra peripherals and compute power I don't need don't help me any. And if I want to make more than one I want to to be cheap.
- Sohcahtoa82 6y agoYup. I burned out 3 NodeMCU boards in one day because I apparently know nothing about circuits (especially transistors) and kept effectively shorting a digital IO pin to ground. Two of them appear to have blown voltage regulators. If I plug them into USB, the 3.3v pins give 0.25v on one board and 1.0v on the other. The third one appears to work fine, but I can't get it to accept flashes reliably. At least 90% of the time, it can't even open the COM port to flash (Says the device is busy). When it DOES actually flash, in the end it will often throw an error saying there was a hash mismatch, indicating the firmware was corrupted during the flashing process. I have had once or twice where it flashed with no errors, but my code appears to fail to run. It's not like I'm gonna really notice the $13 I'm spending on Amazon to replace the boards (I know I can get them cheaper on AliExpress or some other Chinese site, but I wanted them in two days, not four weeks), but still I hate spending money I don't have to.
- snvzz 6y agoThis article left me wondering: Are there no options left with 68000 family CPU?
- duskwuff 6y agoNot in this price range. The only parts from that family left in production are the ColdFire series, which are more expensive (starting at around $1.60@1k) and have unimpressive characteristics compared to other options (50 MHz with poor IPC, limited memory size, minimal peripherals). And even those are on their way out -- the product line hasn't been updated in ages, and NXP has shifted its focus to ARM.
- AnimalMuppet 6y agoStill, $1.60 isn't bad for a 68000. Some of the chips in the article are spins on the 8051, so the 68000 is a big step up from them. Now, true, you can get every peripheral imaginable in an 8051 spin, and often for that $1 price, but the 68000 has a lot more functionality as a CPU.
- ncmncm 6y agoWhat I want to know about a microcontroller is, (a) can I use Make/Gcc/Gdb to develop for it without a lot of guesswork, and (b) what is its interrupt latency? The article only hinted at (b) for a couple of them, and said practically nothing about (a). IDEs are a trap.
- jhallenworld 6y agoI recommend STM32CubeMX: this is a GUI tool that creates a gcc/ makefile project for any of their micros- so you only have to use it once to set up an example "hello world" project. No IDE is needed (older versions only generated code for IDEs, but no longer). If you follow the comments in the generated source code you can keep your code separated from their code. The advantage is that you can reconfigure your project later- for example to change microcontrollers, or enable new peripherals.
- SV_BubbleTime 6y agoI tried but HATED my code being stuffed between comment blocks of //USER CODE GOES HERE// There were four or five of those blocks in my main alone. It’s a dumb thing but was driving me nuts. If you break your code away from there’s ASAP it’s probably better.
- spfzero 6y agoInterrupt latency is always well covered in device docs, and pretty easy to find. And, honest question, isn’t it basically determined by the architecture and clock speed? So for instance, an ARM Cortex 0+ at 40 MHz, same in every family?
- ncmncm 6y agoIt is determined by the architecture, clock speed, memory architecture, time to wake from sleep, etc. So, some ISA, some other stuff. If you are familiar with the arch, you can guess pretty well, but in a big survey it seems like the point is you aren't.
- cristoperb 6y agoLast year's discussion of this article[1] is the 7th most favorited Hacker News submission ever[2]. 1: https://news.ycombinator.com/item?id=19851744 https://news.ycombinator.com/item?id=19851744 2: https://observablehq.com/@tomlarkworthy/hacker-favourites-analysis https://observablehq.com/@tomlarkworthy/hacker-favourites-an...
- dang 6y agoThere was also a big thread at the time: https://news.ycombinator.com/item?id=15633785 https://news.ycombinator.com/item?id=15633785
- ineedasername 6y agoEdit: I forgot about inexpensive arduino nano boards. I'll leave my original incorrect comment below though. Is this supposed to be geared towards hobbyist? If so, the $1 cost is sort of irrelevant if you have to spend $20 to $100 on programmers, development board, etc., when you can get a Pi Zero for & micro sd card for about $10 and be up & coding in an hour.
- thisgoodlife 6y agoNo, you don't need $20 programmers. I played with attiny85 microcontrollers in my pet projects. A $2 Arduino Nano is all it takes to program the chip.
- ineedasername 6y agoAh, that's right! I should have remembered, I have about 5 of them in my home shop setup.
- sgt 6y agoArduino Nano seems to be closer to $20 rather than $2. Where did you get that figure from?
- krallja 6y agoArduino is open-source. AliExpress has clones for under $2.
- sgt 6y agoFor just one unit I will just buy the original, I think, and support the project.
- snvzz 6y agoIf you really want to overpay for what's basically a commodity these days, to support a project that was already wildly successful a decade ago and has outside growth several times the size of the original project... go ahead.
- justinclift 6y agoAs the article itself is undated, it's hard to tell how old this info is. Looking at some of the follow up comments at the bottom of the article, they're from 2017 onwards. So, the article itself may be becoming dated at this point.
- elasticventures 6y agoThis article is very out of date. I used it for research in a project month ago and found many of the chips it mentions are end of life / discontinued now. The prices of those chips (if available) are actually higher due to their shortages. Realistically very few fresh project starts look at the cost of the controller (in fact most EE's are completely abstracted from it) and put more consideration toward E2E LTMC costs which includes things like firmware updates, wifi or network diagnostics, etc. I see a lot of companies going towards Linux-os and RaspberryPI-esque clones simply for the ease of development and debugging -- except when power, heat or space are important factors. At this point the Amtel ATMega & STM32 chips pretty much dominate the hackerspace projects thanks to the libraries and strong ecosystems. As near as I can tell all the other vendors are a rounding error in marketshare of new product starts. Note: I'm excluding things like auto and appliances along with other entrenched industries who probably consume a ton of those $1 chips because they've already invested heavily in them 10+ years ago.
- embedawayz 6y agoAs an example, the modern equivalent of its STM32F0 chip would probably be an STM32G0. STM32F030F4 ($0.55@2500) -> STM32G030F6 ($0.49@2500): * Clock speed: 48MHz -> 64MHz * Flash memory: 16KiB -> 32KiB * SRAM: 4KiB -> 8KiB * CPU core: Cortex-M0 -> Cortex-M0+ The newer chips are also on a smaller process node, so they can run off of slightly lower voltages and use a bit less power. They're incremental improvements, but time is starting to march on...
- lttlrck 6y agoI have such a soft spot for PICs, specifically the 16F84 20 odd years ago when I didn't know any better and work was boring I built a universal remote control - and put it in a PSX controller case. This was all coded in assembler which I still have, programmed with a DIY adapter that ran off a parallel port. So much fun. I used this for a few years. Outside: https://www.dropbox.com/s/0w9c61e3mfdc3lw/Photo%20Oct%2026%2C%2008%2023%2058.jpg?dl=0 https://www.dropbox.com/s/0w9c61e3mfdc3lw/Photo%20Oct%2026%2... Inside (I have no shame): https://www.dropbox.com/s/jep4rzz377h1svo/Photo%20Oct%2026%2C%2008%2028%2024.jpg?dl=0 https://www.dropbox.com/s/jep4rzz377h1svo/Photo%20Oct%2026%2... Video: https://www.dropbox.com/s/45q3uk6cgw9ti46/Video%20Oct%2026%2C%2008%2039%2010.mov?dl=0 https://www.dropbox.com/s/45q3uk6cgw9ti46/Video%20Oct%2026%2... The video was made earlier in the year, I was curious if it still worked.... not so shabby. Version 2 had a touch screen. That's still lying around somewhere.
- iainctduncan 6y agoOh me too! Springer had an amazing book on PIC16F84 programming that was my self taught low level coding education. Pre-Arduino, the PICs were the bomb, you could order free samples, download the compiler free, and build a programmer for like $20 in parts. Fond memories!
- woadwarrior01 6y agoMe too! My dad bought me a PicStart Plus and a bunch of PIC16F84s for my 15th birthday. I tried to badger him into buying me the Hitech-C compiler, but he never budged, so I was stuck with assembly. But that was a good thing, in hindsight. :)
- iainctduncan 6y agobtfsc ftw! ;-)
- btashton 6y agoI do not miss managing the memory banks, the HCS12 were also something special.
- deleted 6y ago[deleted]
- ilaksh 6y agoSeems like he didn't mention ESP8266 or anything like that. At that time it wasn't $1, but I do see some around that price on Aliexpress now.
- rckoepke 6y agoCame here to say the same thing. I agree, I don't think they were necessarily $1 in 2017, but it would be a very large omission today. It may be worth remaking an article like this today...I wouldn't mind helping someone out with that.
- teleforce 6y agoThe latest version ESP32-S2 costs $1 (99 cents to be exact), and now supports LCD interface and USB OTG! https://maker.pro/esp8266/tutorial/a-comparison-of-the-new-esp32-s2-to-the-esp32 https://maker.pro/esp8266/tutorial/a-comparison-of-the-new-e...
- sunsetSamurai 6y agoDumb question, but how do you learn to work/program for these things? any reading material I can look at? I started learning C this week and this looks very interesting.
- eru 6y agoHistorically one way people got into these was eg from learning how to program a Commodore 64 and other constrained hardware. I doubt that's the most efficient route these days, but it can still be fun. And there's lots of material on the likes of the Commodore 64. Oh, and of course there's always Google: 'but how do you learn to work/program for microcontrollers?' gets lots of hits, I bet some of them are even good.
- throwawaynothx 6y agoYou can start with a cheap ESP8266 dev board, which I believe is LUA. I made a button that just posts to a backend when we are low on milk in the kitchen for the office at work but you can do some crazy stuff. im sure there are some great books out there but a lot of people just learn by messing around and looking at other peoples tutorials online.
- tus88 6y agoThese things are little more than simplified Turing machines, so learn about them.
- ChuckMcM 6y agoIt is truly amazing what you can get these days. If the author had compared an Cortex M0+ part [1] there are lots available for < $1. For me, the ability to use command line gcc and editor on Linux to program and debug these things is the real win. I know the new kids all want a fancy IDE but I get from starting vim on a blank screen to running blink in about the same amount of time it takes eclipse to start up. Back in the day (2002) I like the PIC16F628 and even designed a board for it[2] but pretty much now I can't stand to program them. [1] From 2012 -- https://www.electronicproducts.com/a-look-at-cortex-m0-and-m0-microcontrollers/# https://www.electronicproducts.com/a-look-at-cortex-m0-and-m... [2] http://www.mcmanis.com/chuck/robotics/projects/wsm.html http://www.mcmanis.com/chuck/robotics/projects/wsm.html Free PCB for that project to anyone who has postage ($1) :-) contact in my profile.
- danellis 6y ago> I know the new kids all want a fancy IDE What makes you think it's "new kids" that want to use IDEs? They're an incredible useful tool, even more so for experienced developers.
- monocasa 6y agoI want a nice IDE; I therefore don't want the ancient skinned version of Eclipse that they provide. So tools are what they should provide so that I can plug them in to whatever IDE I'm using.
- jononor 6y agoExperienced people usually want to use their preferred IDE. The IDE experience easily available for microcontrollers is usually 1-3 specific IDEs provided by the vendor - rarely the same thing.
- pjmlp 6y agoThere are oldies spoiled with IDEs since MS-DOS/Amiga days and Eclipse isn't the only option.
- 6y ago
- rkagerer 6y agoI was just looking at this article the other day, and wondering if there's an update or if anyone knows of a good, similar rundown for 2020.
- Lerc 6y agoIt frustrates me that the AVR architecture is so good and yet so poorly speced, I would really like to see something that had the RAM size and Clock speed of some 32 bit controllers. Sometimes when you want to just throw some bytes around, 8-bit is best. It would have been fun if Logic Green had made a high end variant of the lgt8f328 were they stuffed it full of RAM (like 48k) It has more one clock instructions than the ATMega and 32MHz from an internal osc.
- jwr 6y agoContrarian view: these days I don't care how much a microcontroller costs. In quantities I'm designing for, it doesn't matter, and the cost is dwarfed by the cost of my time writing the software. I've spent a lot of time dealing with crappy and broken vendor libraries, erratas, SDKs and toolkits where the vendor changes their entire strategy every year or so, and I'm tired. At this point I wrote (I thnk) three I2C libraries for various devices and systems (they're on github) — I should never have to do that! These days I mostly use Nordic chips — not only does almost every device I design need BLE these days, but the chips are fairly nice, the SDK is developed, maintained and supported, and there is a refreshing feeling of sanity. Sure, a BMD-300 or BMD-350 module with an nRF52832 will be $10 instead of $1 or $2, but I will save so much time and frustration, that it's definitely worth it! A vendor starting to officially support Rust might change my perspective, but to this day I haven't seen any other vendor take software as seriously as Nordic does.
- MrBuddyCasino 6y agoIf only they made ble+wifi capable ones.
- jwr 6y agoI actually consider the lack of Wi-Fi a feature. I couldn't find a scenario where Wi-Fi would add value as opposed to BLE. It consumes more power, forces you to use TCP/IP, which pulls in lots of complexity without great solutions (you need to deal with pairing, security, etc), is more complex to set up... I could go on. Solutions like Thread are relatively recent (in fact I still don't know if licensing has become more reasonable). BLE and Bluetooth Mesh give you tons of functionality with low power, in a complete solution. Do I really need my devices to have an IP address? I guess this depends on what you're building, but in most cases this is about home automation, sensors, lighting, toys, etc.
- TeMPOraL 6y agoSay I'm doing home automation and I decide to go with BLE and Bluetooth Mesh (I didn't realize this was a thing). What's the recommended chip/device/design to bridge this Bluetooth network with "regular" computers?
- pacoverdi 6y agoThe site must be running on a $1 microcontroller, it takes 30s to display anything but a spinner :)
- aequitas 6y agoI think the IDE's are highly overrated. Some may provide good product specific documentation, autocomplete, flashing and debugging. But most of the times they are highly opinionated programs with their own quirks and annoyances you need to work around to get your code running on a chip. I would be sad to have to turn down a good chip because it has a bad IDE. I much more prefer good support for opensource framework's like platformio[0]. This way it hardly matters which specific chip I'm using, my workflow is mostly the same. And I can use the same editor, tools and methods I already use for developing all my other code without having to learn the quirks of new tools. [0] https://platformio.org/boards https://platformio.org/boards
- baybal2 6y agoI'm surprised to see Padauk MCUs being overlooked
- smarx007 6y agoPadawhatnow? This should answer your question why it was overlooked. And here is a link to the same author covering Padauk MCUs for people like me who have never heard about those despite having a degree in an embedded-related field: https://jaycarlson.net/2019/09/06/whats-up-with-these-3-cent-microcontrollers/ https://jaycarlson.net/2019/09/06/whats-up-with-these-3-cent...
- baybal2 6y agoThey are very big in the under $1 category
- rimliu 6y agoCan anyone recommend some resources for the absolute beginners?
- deleted 6y ago[deleted]
- zoobab 6y agoWCH CH552G programmable chip is 30 cents: http://www.zoobab.com/ch552g-blink http://www.zoobab.com/ch552g-blink