Live data from Hacker News

The Amazing $1 Microcontroller (2017)

jaycarlson.net

131–140 of 199 posts

Re: The Amazing $1 Microcontroller (2017)

#131

Earlier quoted context omitted.

I just got into the micro controller world a few days ago and it's overwhelming how many options there are! Between the pi, the Arduino, the ESP8266, Wemos ans so so many more which all come in so many flavors it's really tricky to the "ideal" one for a beginner like myself. The project I have in mind would require to work on batteries as opposed to plugin it into a well. It sounds like you're suggesting that anythin…

Depends on what you mean by "very low consumption". For one project I used a SparkFun SAMD21 Mini Breakout[0], and with the RTCZero[1] library was pretty easily able to get it down to 0.3mA when sleeping and averaging 1.3mA overall. (OK, I had to desolder the power LED which was eating 3mA.) I've since switched over to using Adafruit Feather M0 boards for most stuff, which is basically the same thing. [0] https://www…

Nice, thanks a lot for the info that's going to be helpful. I'll look into these!

Re: The Amazing $1 Microcontroller (2017)

#132
post #49
post #23

Earlier quoted context omitted.

As someone building up some home automation I'd love to know how you are monitoring and controlling power. Remote power strips? Replacement outlets? Something diy?

Sure. Power monitoring is tricky. Rest are simple. Power monitoring involves converting the mains voltage to DC that is almost proportional to the mains voltage. Then you would rectify it and downsize it and get it to a voltage level that whatever power management IC you use can accept. You also need to include fuses and other safety circuitry to ensure it doesn't exceed that threshold your microcontroller can accept…

Can you buy single items on AliBaba? I've been buying from AliExpress a lot because of the convenience, I didn't know you could do the same on the main site?

Re: The Amazing $1 Microcontroller (2017)

#133
post #10

I like MSP430 a lot but the tooling leaves a bit to be desired. Maybe that's been improved upon recently by TI but a few years back you were left with few choices other than installing some kind of IDE on Windows.

TI distributes a pre-compiled version of GCC [0] for the MSP430 along with a command line MSP-flasher [1] utility for flashing code to the device. It all works really well on Linux. I haven't had to touch any of their windows tools. It can be slightly confusing getting started because there are 101 different ways to develop and compilers you could use so you have to wade though examples that may not be applicable to your chosen development environment. Once you get past that it isn't hard. I really like the tutorial series on simplyembeded [2] they to a great job of covering the MSP430 basics.

[0] http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430... [1] http://www.ti.com/tool/MSP430-FLASHER [2] http://www.simplyembedded.org/tutorials/

Re: The Amazing $1 Microcontroller (2017)

#134
post #8

My favorite is the ATTINY 85. It's so cheap and yet, it can do almost most of the things you can do an Arduino. And yes, you can program it using the Arduino IDE as well. Last year, I started out to digitalize my entire house with these tiny ATTINY 85 chips and with some nrF wireless chips. It has worked really well for me and I'm able to control and monitor any power port in my house as well as my mains. The overall…

How are you switching mains power safely? I looked into it, but gave up when I realized I'd have to install a rectifier in the wall which just seemed like a fire waiting to happen.

You can use smart plugs like Sonoff S20[1] and flash your own firmware. They have the widely used ESP8266 inside. I use ESPurna[2] on them, which has many common integrations built-in (Alexa, MQTT, etc) and is very easy to extend further.

[1] https://www.itead.cc/smart-socket.html

[2] https://github.com/xoseperez/espurna

Re: The Amazing $1 Microcontroller (2017)

#135
Those Infineon chips are incredible for how inexpensive they are. I've worked with an XMC1400 at work (another one of their M0-based offerings) and it was insane how sophisticated the peripherals on those things are, despite being a dirt cheap part.

That said, their IDE sucks (well, every manufacturer-provided IDE sucks, but whatever). Life is way easier with a couple makefiles and Ozone.

Re: The Amazing $1 Microcontroller (2017)

#136

The writer was on an episode of Embedded.fm podcast awhile back, one of the rare ones where they really get into embedded in detail. Good episode, I recommend it. Two take-aways were that he just loved the Silicon Labs EFM series, which is a modern set of peripherals wrapped around an absolutely outdated 8051. For the most part micros are just moving things from one peripheral to another and that can work out just fi…

>8051 TI is still pumping out Zigbee boards based on it. I had to dig through documentation and tick a box saying I wasn't going to make missiles just to figure out what I needed to program it. I'm kinda curious about 8051 chips. They're absolutely everywhere, although maybe now the Espressif chips are taking over.

8051 is OLD, Espressif is far newer.

I like the amount of support that ESP gets but would personally never use it because I told trust Chinese networking chips.

The 8051 makes absolutely no sense to anyone - except when you consider the extreme low cost.

In the example of the SiLabs parts, they took the modern peripherals from their ARM chips and plopped them down to a 8051 core. Some times that will work great, but if you are doing any “real work” (preocessing) on chip just go with ARM. But, he, sometimes you need to toggle some LEDs and write something out over SPI.

Re: The Amazing $1 Microcontroller (2017)

#137
post #8

My favorite is the ATTINY 85. It's so cheap and yet, it can do almost most of the things you can do an Arduino. And yes, you can program it using the Arduino IDE as well. Last year, I started out to digitalize my entire house with these tiny ATTINY 85 chips and with some nrF wireless chips. It has worked really well for me and I'm able to control and monitor any power port in my house as well as my mains. The overall…

What? How? Explain please. I've been interested in this for a while, and I know how cheap the ATTINY85 is but I just started experimenting with the Arduino, and just got a relay to switch on/off. Still learning how to get the ArduoCAM to work, and how I can transmit images over WiFi.

My point is, can you link to a tutorial? I'm a newb, but I'm a fairly competent full-stack developer.

Re: The Amazing $1 Microcontroller (2017)

#138
post #47

I feel obligated to mention in every one of these threads the wemos D1. I actually have a tough time explaining just how incredible this board is. You can program it in the Arduino environment, meaning if you are doing any hobby electronics, you're probably already really familiar with the programming modalities. It comes with a programmer, and power regulator. No fussing with anything like you might have to with a b…

> I feel obligated to mention in every one of these threads the wemos D1. Does there exist a similar board with an ESP32?

The 'DevKit-C' breakout boards are $10 each from authorized distributors; they're a little large and you could probably find variations for closer to $6-7 if you went looking, but they're good for general-purpose stuff.

It seems like small power-efficient microcontrollers have made enormous progress over the past decade, and we have an opportunity for the PC revolution all over again. The ESP32 is a little bit power-hungry, but it's also a proper CPU; it has two 240MHz cores, a few hundred kilobytes of RAM, an extra low-power core that can wake the main system up from sleep, and an MPU that can keep track of 8 process IDs per core including 2 privileged ones. People used to make do with less. It also has WiFi and Bluetooth and these days you can even write programs for it in Python.

I'd love to see more people thinking about the problems in their lives with relation to a $20 bin of modern parts. Sensors, displays, and actuators have made similar progress, and the possibilities are endless. But the pool of people trying to realize them is finite and way too small.

Re: The Amazing $1 Microcontroller (2017)

#139
post #23
post #8

My favorite is the ATTINY 85. It's so cheap and yet, it can do almost most of the things you can do an Arduino. And yes, you can program it using the Arduino IDE as well. Last year, I started out to digitalize my entire house with these tiny ATTINY 85 chips and with some nrF wireless chips. It has worked really well for me and I'm able to control and monitor any power port in my house as well as my mains. The overall…

As someone building up some home automation I'd love to know how you are monitoring and controlling power. Remote power strips? Replacement outlets? Something diy?

For household energy usage monitoring, I installed an off-the-shelf DIN rail power meter with LEDs. I ignore the meter readout, but the LEDs give off a brief flash every Wh or so (don't remember the scale, but it was precise enough) — these flashes are processed by three phototransistors hooked up directly to I/O pins of a microcontroller, generating interrupts.

This results in a safe, reliable and simple monitoring system.

On a related note, as to microcontroller choices: having done quite a bit of work with MSP430 and various NXP Kinetis chips, I am very, very tired of crappy software engineering practices, monstrous IDEs which are all a reworked version of Eclipse, bad libraries and frameworks which change direction seemingly every month. So I decided to stick with the Nordic Semiconductor chips (mostly nRF52832 and 52840 these days). Yes, they are more expensive per chip. But I don't use hundreds of them, and the savings in my time are huge: their SDKs are nice, you don't have to use their IDEs, you can stick to gcc and Makefiles, and it's overall a decent experience.

In general, while I really like the article series, I don't think the price of a microcontroller matters much in hobby usage. It's very important in commercial designs, but at home where you will never use more than 10 — who cares? It's the overall development experience that matters.

Re: The Amazing $1 Microcontroller (2017)

#140

It's missing the below 5 cents microcontrollers: https://lcsc.com/product-detail/PADAUK_PADAUK-Tech-PMS150C_C...

A 1,000 cpu cluster for $29. Nice.

A MCU is sadly not a CPU, for example, most use the harvard architecture, meaning code memory is in ROM and uses a separate address space than data, which usually lives in SRAM. This limits a lot of things you could possibly do. RAM is also very very limited and you have to use it for any data you put on the stack as well as on the heap. You could however, emulate a very very weak and simple CPU on it.
Post reply on HN