Readit News logoReadit News
neya · 7 years ago
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 setup still costed less than a Nest, yet, vastly more powerful. Of course, the downside is you need to write code, have a running server to control it on the cloud. But, no problem for me as I'm a (Google Cloud) consultant and this is what I do for a living.

I use Google Cloud's IAP with AppEngine (I may switch to cloud run now, since it's cheaper tho) and I have a private REST server running that I can access from my own Android app.

The whole thing took me a year to finish, but that's because I worked on it maybe once or twice a week in the weekends and didn't focus on it much.

But, my effort has paid off and it's amazing to me that what is possible with just a dollar investment.

83 · 7 years ago
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?
jwr · 7 years ago
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.

ims · 7 years ago
If your meter broadcasts your household energy usage, you may be able to use a ~$20 SDR dongle hooked up to a Raspberry Pi to read the kWh of the whole house several times per minute.

There are some little tools that make this easy: https://github.com/bemasher/rtlamr

You'll need to do a little detective work to separate yours out from the neighbors' but it's not hard.

For my house, I can also read water usage and natural gas the same way by alternating through the relevant frequencies.

neya · 7 years ago
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. For example, if my uC works based off just 5 volts, I want to make sure I downsize my 120VAC to just 2.5V but still proportional, this means, when there is a spike, my uC can take a hit upto 5 volts, but that means my actual power supply has a spike of 100%, which means I'm getting 240VAC on a 120VAC outlet (which has never happened so far).

Then, for the actual turning on or off of switches itself, I just use relays and some relay/motor coil ICs to control them. Sorry I don't remember exactly as this was a year ago and this system is lying inside my wall. So I need to remove the switchboard (and use a lens) to find out the numbers. But then, you can always google for "Power management / mains voltage IC", you can find even ready made modules on eBay.

The tricky part is component layout since you are dealing with high voltage, it can form arcs: https://www.youtube.com/watch?v=MAlyEMQxTN0

Not as powerful, but still a smaller version of those arcs. So, you want to use well rated components with decent thresholds. Eg. Don't use a low power relay, cheap capacitors, etc.

All of this is then passed on through uCs(ATTINY 85 + other uCs in the circuit) to some nrF wireless modules I bought in bulk on AliBaba through my uC

To be clear, each switchboard housing contains - a couple of relays, uCs, nRF modules, temperature and humidity sensors and some infrared sensors (I don't use them anymore). I believe they also have overvoltage protection and short circuit protection in built (because of an IC I use). It will simply turn the relay off in the event of a spike or short circuit.

BTW, AliBaba is the cheapest. Don't buy from AliExpress, it's usually plagued with dropshippers (god, I hate them so much) who just keep hefty margins off a factory somewhere that you can find on AliBaba. Other alternatives, but still under AliBaba group: 1688.com, tmall.com

If you think about it, in cloud lingo, we would call this architecture as "micro services" except that there's one big monolith which is my mains module run by an old laptop motherboard. (Sony Vaio FZ series)

This nrF module talks to a an old laptop motherboard through serial, that passes information to a REST API. This laptop motherboard is located where usually all the mains connections go in. One thing I didn't use on purpose is smart trippers/circuit breakers. Sure, they're smart, but you're relying on someone else for security while also giving away your power usage consumption data. Besides, if a circuit breaker goes off, you want to know why it happened before turning it on, so I find it pointless to make them be able to turn on automatically or from your phone when I can just walk to my mains box and turn it on myself.

The REST API is built with Phoenix/Elixir, and is hosted on Google Cloud AppEngine. I haven't had any downtime so far (yet) and is blazing fast. Like I said, I'm a Google Cloud consultant, so this is what I do for a living. You may have luck doing the same with AWS/DigitalOcean. Just use something you know well.

And don't ever get into doing devops for this kind of thing. It's more critical than you think. So, don't make choices like try to save up on the servers by running your own instance on a DO droplet for 5 bucks a month. Sure, you saved up some cash, but the devops it takes you will cost you more. More importantly, if some hacker gets in, you're doomed!

Once, when I was in my house, the lights and TV suddenly started turning on and off in the hall room. This was right after I came back from watching Insidious and it was really scary. Then I found out, it happened because there was a really fat mouse on the motherboard (don't know how it got there) walking around the jumper wires. Haha!

Hope this helps, sorry I will try to update with specifics maybe in a separate blog post here.

cr0sh · 7 years ago
Are you in the United States?

I'm just curious how your homeowner's insurance feels about this? That is, will they still pay out for a claim should something happen, and they determine your modifications were at fault?

Because if the adjuster or whomever does find you have such modifications - they -will- blame those.

And probably deny your claim and coverage (and probably cancel your policy).

At least that would likely be your experience if you live in the United States.

I've often thought that having such a system would be fun, but the potential downside should anything go wrong has put a damper on it (even if whatever happened was not related to your modifications - they will blame it on them, just to get out of the claim).

The only "inexpensive" way around it is to use UL listed interfaces made by a third party, then interface with those. But there, you don't usually get everything you want.

Of course at that point, the insurance company might just shift the burden on you to "So, did you have this done by a licensed electrician? Where is your inspection report?"...

hathawsh · 7 years ago
I agree. I bought a little relay board a few years ago to get started on a project for controlling line voltage, but then I started to think:

- Will the board short if it happens to collect moisture, oil, dust, or lint? What if a bug is attracted to it? Will I even monitor the condition of the board?

- Will the traces and relays heat up if I accidentally draw too much current through them? Will they degrade over time?

- Is there a chance that vibration could loosen the board and make unintentional connections?

I decided I probably could never answer these questions well enough to satisfy an insurance company. It doesn't matter that I have plenty of experience with line voltage; what matters is that I am not a licensed electrician. Therefore, at home, I only experiment with low voltage and low current, delegating all line voltage to UL listed devices.

simonbh · 7 years ago
I went with a IotaWatt for measuring my home energy usage. It is based on the ESP8266 and is completely opensource hardware and software. You retain control of your data or you send to an external server.

https://iotawatt.com/

Gibbon1 · 7 years ago
In the US the home owners policy like auto insurance isn't to protect the home owner. It's to protect the bank holding the mortgage.

The flip side of that is the risk of a geek installing a power monitor without permits pales in comparison to someone plugging a 1500 Watt wall heater an an ancient wall outlet.

fenwick67 · 7 years ago
"Because if the adjuster or whomever does find you have such modifications - they -will- blame those.

And probably deny your claim and coverage (and probably cancel your policy)."

I'm skeptical that an insurance company will be able to determine exactly what part you used and if it was UL listed unless you yourself tell them

fr0sty · 7 years ago
> And probably deny your claim and coverage (and probably cancel your policy).

Can you point me to an instance of this actually happening? I see this warning given all the time but have to date never found an instance where someone's claim was denied for these sorts of reasons.

mylons · 7 years ago
does insurance feel the same way about a Nest and other commercial devices that are already available?
neya · 7 years ago
I'm not in the US, so maybe that's a consideration for these type of projects.
microtonal · 7 years ago
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.

How do you deal with the small number of pins? The NRF24L01+ uses SPI, which requires 4 pins. There are some guides on how to hook up an NRF with 3 pins. I think that only leaves 3 pins (besides VCC and GND)?

The ATtiny seems to be very attractive otherwise, because it works across a relatively large voltage range and does not use a lot of power.

Did you consider the ATtiny84, which has double the GPIO pins?

neya · 7 years ago
I did consider the ATTINY 84, in fact it was the 84 was the one I wanted to order. But due to a mistake, I had ordered the 85 instead. So, when they arrived, I didn't really feel like waiting another week to get working on this project, so I found an online hack/article that allowed me to use the 85s with just 3 pins. I can't remember exactly (it was a year ago), but something similar to this I guess:

https://www.instructables.com/id/NRF24L01-With-ATtiny85-3-Pi...

penagwin · 7 years ago
I have no clue what your project is, but a lot of us like the ESP8266/ESP32 which are ~2$ and ~5 per module, or around double with their dev kits. Get's you lots of GPIO + wifi.
candiodari · 7 years ago
I wrote a firmware that lets me turn any attiny into a gpio-to-i2c and supports in-place-upgrade also over i2c.

Now I have up to 20 extra gpio for 0.5$ or so. This is not very hard.

praveenster · 7 years ago
This sounds really interesting and is something I’ve been meaning to do for my house as well. Do you have a blog post with the details or a github page?
amingilani · 7 years ago
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.

penagwin · 7 years ago
What's your experience with running your server non-locally? Not judging, just curious as usually those that DIY their home automations are also into homelab stuff and setup a spare laptop or something for the server.

Derp - You're a cloud consultant, oh okay haha. I'm guessing your home ISP network is pretty reliable then? I'm stuck on con-cast so unfortunetly I have to be prepared for occasional high-packet loss/no internet situations. They're fairly rare, but I want to make sure my lights can be controlled 24/7

neya · 7 years ago
It depends on your requirements. I don't need to constantly monitor what my voltage values are. I just want stuff to happen when I send a REST API call. So, I'm not too bothered about latency. I just need to know if there's an outage or overvoltage, or short circuit, etc..
tmaly · 7 years ago
What does your programming environment look like for programming these chips?

Do you have any blog posts showcasing your project?

neya · 7 years ago
Just Arduino.

>Do you have any blog posts showcasing your project?

Started writing today. Haha. I will share it on HN once done.

so_tired · 7 years ago
This is such a great setup.

Maybe if we just put 10 of these mini-controllers in each home, we can cover the majority of electricity consumption, and get demand flexibility the cheap way (instead of fitting each home with an expensive smart meter).

(Obviously the cloud/app parts will have to be centralized with consumer opt-in and preferences etc..)

Have u thought about this ?

Has this approach been explored ?

great project..

HeyLaughingBoy · 7 years ago
There's a world of difference between a hobby project and a large-scale production item. The CPU in the smart meter likely isn't much more powerful than an ATTiny. By the time you've scaled this project up to meet the needs of the electric company, the cost is likely comparable to what they already have.

BOM (Bill Of Materials) cost is rarely the limiting factor on commercial products. The selling price of most devices is usually a large multiple of the cost of components.

penagwin · 7 years ago
I'm curious, is this a common problem? At least here in Michigan, our electric company essentially replaced all meters with smart meters for free, unless you choose to opt-out.

Power-measuring outlets do exist, Belkin has one under the WEMO brand for example. It's just that it generally makes far more sense (for the electric company) to put the meter in one spot, instead of every outlet.

You still have to have the mini-controllers communicate with the power company though, so I'm not sure what problem you'd be solving?

yeahitslikethat · 7 years ago
I'm doing the same thing now. I bet your people think you're as crazy as my people think of me.

My other friends are spending thousands of dollars retrofitting lighting and everything when they could spend a fraction and write some code.

And learn a skill. And not have their privacy invaded. And have more money they always complain about not having enough of.

neya · 7 years ago
> I bet your people think you're as crazy as my people think of me.

For one year, it was constant annoying discouragement. Then, once we had this party in my house and I showed it off to everyone and they finally realized its worth. To me, the privacy factor is alone worth doing this project.

voltagex_ · 7 years ago
What's your hourly rate?

I've got a Google Home and LIFX bulbs, but I've also spent hundreds and hundreds of hours learning, tinkering and coding. I can do this because I'm single and am lucky enough to have a lot of free time.

If I was doing it again, I'd stick with the LIFX bulbs and use the hundreds of hours doing something that would earn me some money.

kickscondor · 7 years ago
Totally with you. The tiny original Digispark (with the USB traces on the board itself) is my fave - I use them for teaching school clubs and personal projects/gifts. If I need to go beyond that, it usually means straight to the ESP8266 or ESP32. But that's pretty rare. (With you on the nRFs, too!)
penagwin · 7 years ago
How do you like the nRFs? I've been all over the ESP8266/ESP32 since it came out, they're crazily versatile chips!

I've been interested in Lora/nRF/LoraWAN for some of my low-power further range projects. I'm just curious as to how they compare to the ESP's.

Also, how do you power your projects? I'm considering buying 6+ usb bricks, but I'm skeptical of non-brand name ones, and brand name bricks are expensive. After watching BigClive though I'm sure I trust any non-brand name ones....

merpnderp · 7 years ago
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.
wrycoder · 7 years ago
I use these blocks from Sparkfun: Solid State Relay - 40A (3-32V DC Input)

They have four screw terminals - two for 3VDC to control and two for 24V - 380V AC for the load. They have the CE certification.

I bolt them down inside a NEMA enclosure and use standard residential wiring techniques (buy a book or two!) to wire them to standard outlets, where I plug in the load.

The controller (Arduino etc.) is typically mounted in a small plastic box outside the NEMA enclosure with a terminal strip to attach sensors and so forth. It's powered by a wall wart.

This approach meets code and is perfectly safe. For level of competence needed - you should be capable of doing residential electrical wiring. That's a useful skill to learn.

mopsi · 7 years ago
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

lstodd · 7 years ago
There are basically two options:

- learn how to and design a PCB with relays or FETs or whatever, following all the best practices for it to not catch fire.

- buy off-the-shelf rail-mounted relays/contactors, then design a driving circuit that will be all low voltage.

Assembling it all on a breadboard won't cut it (as in will blow up sooner or later), that's for sure.

83 · 7 years ago
I've been looking into this as well since the time/risk/insurance issues of diy are kind of putting me off. The Functional Devices RIB (Relay In a Box) devices for ~$10 look pretty slick, only downside is 12v control signal. I ordered a couple to play with but haven't had time to install them yet.
stevetodd · 7 years ago
Do you have any write ups or code on this to share?
neya · 7 years ago
I am working on one. I will post it on HN when it's done :)
nerfhammer · 7 years ago
I've been using the attiny84, iirc attiny85 doesn't support the lowest of the low power modes
saagarjha · 7 years ago
> the downside is you need to write code

You might call that an upside!

dhruvkar · 7 years ago
Sounds fascinating!

>> yet, vastly more powerful

What's sorts of things can you now do with this setup?

neya · 7 years ago
#1 is my privacy. I don't trust anyone else with my privacy.

I can do some stuff like turn on AV receivers and program them to do something automatically, like switch to movie mode if I stay in the room for 2 minutes (just an example) for example because each of my power outlet has an IR transceiver. Though I don't use them much, they have a lot of utility. The reason I don't use them much now is I upgraded my receiver and now I need to re-program the IR transceiver with the commands from the AV unit's remote.

With Google cloud, you can write your own Siri-like interface, so you can talk to any power outlets you want, which is my next milestone. Stuff like this would normally require different vendors to operate together (Eg. Nest + SIRI + Homekit) but because this is my own platform, I can do whatever I want.

blhack · 7 years ago
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 bare ESP8266.

It also has WiFi. It is the magic internet of things that I swear everybody was dreaming about 5 years ago. Go buy 10 of them. They're my favorite favorite favorite general purpose dev board right now, and actually they're so cheap that I have no problem putting them into "finished products"[1].

Here they are for about $3: (https://www.aliexpress.com/item/ESP8266-ESP-12F-CH340-CH340G...)

[1]: I build custom/one-off large scale installation pieces and hardware prototypes. Almost every single one of them has an arduino-ish device in it somewhere.

gmiller123456 · 7 years ago
I actually prefer the Wemos D1 Mini. The D1 you linked has the same header layout as the Arduino, which might confuse a lot of people that you can use Arduino shields. Some of them might work, but probably not without modifying the libraries for them.

The D1 Mini actually has it's own shield format, and several shields are available. Even experienced people will find value in the ability to just plug in a display, or other device and use already available libraries. Maybe not great for production work, but great for prototyping and learning.

I think the big downfall with any ESP8266 board compared to others is going to be power consumption, even with WiFi off. So anyone not plugging theirs into a wall should do some research in that area.

slhomme · 7 years ago
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 anything ESP8266-based would not be ideal not plugged into a wall. Could you share some pointers to what alternative might be better for very low consumption but still has wifi capabilities? Thanks a lot! I'll keep digging in the meantime, this is a fascinating world I'me happy to explore!
nielsole · 7 years ago
The esp8266 has a deep sleep mode that can go down below 1 micro amp IIRC
blhack · 7 years ago
The uno format is exactly why I like it. It means I can use screw shields made for the UNO on it. Also lots of other shields that will accept 3.3v logic.
Taniwha · 7 years ago
I give these away to local kids - on aliexpress $5 buys you a baggy containing a D1, a proto board, wires, resistors, LEDs, temp/light sensors, switches ....

Great value - program them as if they were an arduino

blhack · 7 years ago
Same!
quickthrower2 · 7 years ago
I'm using a ESP8266 board from a local shop, $17, I knew you can get cheaper on Ali but starting out I like not to wait and not worry so much about quality. However I will look into these for future boards.

I set up a thermal sensor that updates a Parse (remember them!) clone. Working well but sometimes it just stops updating, not sure if it is the device or the Parse clone's fault or a bit of both. But it works nicely for a day or so at a time.

Just a reminder things might not go smoothly with these devices, they are tricky to debug if they crash. When you are communicating via http the apis are not as nice as I am used to on the desktop.

wolfgke · 7 years ago
> I feel obligated to mention in every one of these threads the wemos D1.

Does there exist a similar board with an ESP32?

leggomylibro · 7 years ago
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.

sigwinch28 · 7 years ago
I use the LOLIN32 boards for this.
sickrumbear · 7 years ago
this looks really cool! any project write-ups online that show how it can/ is being used?
stevekemp · 7 years ago
Multiple projects posted if you search my practical project involves polling a remote API to display tram departures

https://steve.fi/Hardware/helsinki-tram-times/

But you also find out about constraints too. Driving an epaper display without running out of RAM was a fun challenge:

https://steve.fi/Hardware/d1-epaper/

Rebelgecko · 7 years ago
If you search for "ESP8266" (especially on a website like hackaday.com) you will see a lot of projects using these boards or very similar ones. You can also look up the ESP32, which is the big brother of the ESP-8266 with Bluetooth LE, more CPUs, and some other cool features.
xondono · 7 years ago
my takes from my +10 years on this sector:

- Unless you are building something with high volumes (or something trivially easy), development costs are going to be your biggest expense by far, specially firmware/software.

- Using cheap parts is nice, and if you come from the DIY world you will know many such parts. If you are going to build something commercially, avoid those things like the plague, because they will become the biggest sinkhole of technological debt.

- Software/Apps behave like high-risk investments (natural monopolies, zero-or-nothing situations, low initial costs), electronics behaves more like long term investments (high initial costs, high development path dependency). It's way more profitable to have a product you barely have to touch (but sells well), than several that need constant modifications.

Which leads me to some tips:

- There's not much sense in 8 bit / 16 bit microcontrollers for most projects nowadays. Don't fear going to 32 bit.

- MIPS/AVR are nice, but if you are building something that is not a one-off (or you plan to build on the product), go with ARM (for now).

- Build your PoC and prototypes on manufacturer libraries, but once you have the resources for it, well-thought and tailored libraries will make your life easier.

- When working on libraries, don't write them directly from the datasheet. Go for the family references, target the whole family instead of a single chip.

- Before chosing any component, specially the ones that are hard to replace, price is secondary at best. Availability is way more important.

- If you are willing to take some risk, look at Rust for embedded. The language is still 'young' and there's a lot of stuff that needs to settle down, but man, does it look good.

d21d3q · 7 years ago
And for PoC pick one with more memory - e.g. you can find chip (like stm32f0x1) with same pinout, peripherals - you can optimize that later, and don't worry about it while using fat libraries.
jhallenworld · 7 years ago
It's missing the below 5 cents microcontrollers:

https://lcsc.com/product-detail/PADAUK_PADAUK-Tech-PMS150C_C...

bmcooley · 7 years ago
I looked through the datasheet, but couldn't figure out what "1KW" of program memory meant.
magicalhippo · 7 years ago
It's supposed to be 1kW, ie 1024 words.
saagarjha · 7 years ago
Looks to be a typo for 1 KiB, since the address space seems to go from 0x0 to 0x3FF.
skykooler · 7 years ago
1 thousand words, probably.
koala_man · 7 years ago
A 1,000 cpu cluster for $29. Nice.
zaarn · 7 years ago
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.
sgt · 7 years ago
How is the documentation on those?
louky · 7 years ago
Not great, Dave from EEVblog did a few videos on them and how to use them. I think they're all OTP

https://www.youtube.com/watch?v=Rixo78hv_lw

jdietrich · 7 years ago
Surprisingly acceptable. The datasheets are reasonably legible and there's a weird but perfectly usable SDK. Padauk clearly don't care about the hobbyist market or more specialised applications that require certification or long-term availability, but their offering seems like an entirely reasonable choice for low-cost, mass-market products.
coupdejarnac · 7 years ago
Fine if you can read Chinese.

There are several discussions about them at eevblog, with many people having success. It's probably the best place to get information in English.

iheartpotatoes · 7 years ago
Having used half the IDE's this person outlined, I really really really really wish every single one had a "write Makefile" option. Maybe 1/4 or the IDEs I use do that successfully. I always end up using GDB for debugging, and then the IDE for asm-level tweaking (well, I don't do the tweaking, someone smarter than me does :), but I can do 90% of my work in GDB).

In the "real world" IAR Embedded Workshop is the hands-down winner (licenses are $$$$$$), which is unfortunate because despite being so mature it is awfully clunky.

imagiko · 7 years ago
Agree so much. Every project I run, I start off working with the available IDE (Keil, Eclipse) that the manufacturer likes and then take the effort of writing a Makefile for it. Absolutely hate dealing with IDEs and their buried settings! Terminal, code editor and gdb FTW :)
feistypharit · 7 years ago
You actually can use make instead of the Arduino IDE many times. For the ESP, check out https://github.com/plerup/makeEspArduino. It works reasonably well.
iheartpotatoes · 7 years ago
Yeah, I didn't know that existed but I created my own make environment a while back. My arduinos have been gathering dust for about 5 years, ever since I discovered the ST nucleo64 line ... 80MHz, 1M flash, 256K sram, 4 UARTs, 4 SPI, 4 I2C, 20+ GPIO, 4 ADCs for under US$15 ... I pretty much stopped using Arduino everything.
ChuckMcM · 7 years ago
This was well done.

As I have mentioned in the past, my discussions with people at Microchip and Motorola have conceded that with modern process technology the cost of the silicon is insignificant compared to the cost of packaging and testing. As a result you get to about $1/chip in singles as the low price cut-off but you can put an 8 bit, 16 bit, or 32 bit processor in there and it doesn't change the cost. It can cost more if you add a lot more FLASH or RAM. That takes up silicon real estate and is longer to test so it can reach the point where the dice is once again a meaningful contributor to the cost.

patrickyeon · 7 years ago
I guess that makes sense, and it's not a particularly new phenomenon. The MOS 6507 (used in the Atari 2600) was mostly the same silicon as the 6502 (as used in Apple II and many other places), but cheaper because it was in a smaller package.
SlowRobotAhead · 7 years ago
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 fine. It's nice SI used SWD/JTAG as the debug peripheral so you can program it along side all the ARM parts you're actually going to use.

And two... Having used almost everything on this list. I'm going to chose the ARM M0/M0+ 10 times out of 10 anymore. Maybe I prefer STM's peripherals to Atmel's event-eccentric, or whatever. I just can't honestly see starting a new project today on 8051, PIC16/24, AVR etc. Maybe it's what you're used to. Or maybe for someone making landfill-ready toys with razor thin margins, but I'm glad that's not me.

voltagex_ · 7 years ago
>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.

SlowRobotAhead · 7 years ago
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.

Darkphibre · 7 years ago
Oh, I really like his analysis on "Parametric Reach" for the various architectures:

> If you want to commit to a single architecture, it’s important to know which one gives you the most headroom to move up. I created a fictious “times better” score by comparing the the part tested with the best part available in the same ecosystem — this usually means fairly comparable peripheral programming, along with identical development tools. I multiplied the core speed, package size, flash, and RAM capacities together, ratioed the two parts, and then took the quartic root. Essentially, if every parameter is double, it is considered “2.0 x” as powerful.

iheartpotatoes · 7 years ago
He should have used the geometric mean, that's exactly what it is designed for.
teraflop · 7 years ago
Multiplying four values together and taking their fourth root is the geometric mean.