Live data from Hacker News

The Amazing $1 Microcontroller (2017)

jaycarlson.net

181–190 of 199 posts

Re: The Amazing $1 Microcontroller (2017)

#181
post #69
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…

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 lik…

> 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.

Re: The Amazing $1 Microcontroller (2017)

#182

Earlier quoted context omitted.

"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

If an incident occurs and they identify additional components connected to the "trigger" you'd have to provide the whole "paper trail" for every single bit of your setup and show that it's above board: were the components certified for the use, were they installed by authorized personnel, were they operated properly, was the code you wrote for it to blame, etc. If you handled all the implementation yourself then it's…

> you'd have to provide the whole "paper trail" for every single bit of your setup

Can you cite any firsthand account of this sort of thing happening somewhere in the US? Given the ease with which people can reach millions of people with their tale of woe/outrage the fact that such stories are not readily available on social media makes me think this is mostly urban legend.

Re: The Amazing $1 Microcontroller (2017)

#183
post #85

Earlier quoted context omitted.

It doesn't measure voltage and thus can't measure true energy consumption = power, only currents. It then must estimate power based on some preset voltage. Not to mention those clamps can't have precision or time resolution for truly interesting stuff. A toy, in other words. It might be good enough to get a rough idea what eats more or less and when, but it'll never match the utility power meter which is what you're…

> Not to mention those clamps can't have precision or time resolution for truly interesting stuff. That's actually not correct. Clamps / current transformers are totally fine.

Then you haven't taken into account noise building up in every half inch of a cable that leads from the clamp to the instr-amp. Or do you advocate clamps with built-in ADCs? No objection then, as long as the wires carry digital signal but for the fact that this would cost so much it isn't funny. One might as well stick to off-the-shelf PLC-style rail-mounted IO modules and shunts/transformers then.

Re: The Amazing $1 Microcontroller (2017)

#184
post #140

Earlier quoted context omitted.

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.

I think it's a stretch to say "most [MCUs] use the harvard architecture, meaning code memory is in ROM and uses a separate address space than data" since I have not encountered so far not even one device (in the about a dozen or so that I worked with in real life) that actually had a different address space for RAM than ROM.

I will say that for the particular one that OP linked above, this does seem the case since the datasheet mentions "ll the 64 bytes data memory of PMS150C can be accessed by indirect access mechanism."

Re: The Amazing $1 Microcontroller (2017)

#185
post #156

Earlier quoted context omitted.

> Robotdyn Blue Pill (STM32, fun for playing with Rust). $3.49 is great, nice find. Hopefully now that Espressif has unveiled their fork of LLVM you (as well as myself :P) will be able to use Rust on the ESP chips soon enough.

For regular STM32F103C8T6 blue pills, of course there are lots of sellers on AliExpress that go lower. The lowest right now [1] is listing them for $1.53. That said, it's really confusing how much flash memory are on these. The community seems to find that they list as 64 KB, but in reality ST has been shipping the part with 128 KB without saying. I have two black pills (slightly different board, same MCU) but the on…

But the RobotDyn Blue Pill has the correct USB resistor values. Also, a lot of unnamed Blue Pills come with bad voltage regulators. My time is worth the extra $2 ;).

Re: The Amazing $1 Microcontroller (2017)

#186
post #140

Earlier quoted context omitted.

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.

I think it's a stretch to say "most [MCUs] use the harvard architecture, meaning code memory is in ROM and uses a separate address space than data" since I have not encountered so far not even one device (in the about a dozen or so that I worked with in real life) that actually had a different address space for RAM than ROM. I will say that for the particular one that OP linked above, this does seem the case since th…

Your compiler or assembler might abstract it for you but most (basically anything smaller than an ARM Cortex-M) will have harvard architecture. Some MCU's ran run programs from RAM but IIRC they do it by loading RAM into Code Memory and then executing it, it looks like VN from the outside but isn't quite on the inside.

Harvard doesn't specify if you need an indirect access mechanism, plenty of HV computers can access their code memory fairly normally (either by using a special bit in the bus or opcode or mapping it into a unused section of normal address space). Harvard simply means that Code and Data come from a separate bus and in most cases that means separate devices.

If your MCU has two seperate specs for Flash/EEPROM as Data and Program Memory, then it's 100% Harvard. And that's basically most of them.

Re: The Amazing $1 Microcontroller (2017)

#187
post #186

Earlier quoted context omitted.

I think it's a stretch to say "most [MCUs] use the harvard architecture, meaning code memory is in ROM and uses a separate address space than data" since I have not encountered so far not even one device (in the about a dozen or so that I worked with in real life) that actually had a different address space for RAM than ROM. I will say that for the particular one that OP linked above, this does seem the case since th…

Your compiler or assembler might abstract it for you but most (basically anything smaller than an ARM Cortex-M) will have harvard architecture. Some MCU's ran run programs from RAM but IIRC they do it by loading RAM into Code Memory and then executing it, it looks like VN from the outside but isn't quite on the inside. Harvard doesn't specify if you need an indirect access mechanism, plenty of HV computers can access…

I am not arguing about the existence of Hardvard arch. on MCU's but rather on the fact that most of the time, RAM and ROM memory accesses happen in the same address space. For sure, the underlying HW might connect you to different buses, but on a lot of MCU's, from the programmer's perspective, the address space is a big flat area containing everything.

For sure, my experience has probably tainted my outlook. I have the most experience with Renesas MCU's and for example on them, I can surely run programs straight from the RAM, and depending what you're doing, you might sometimes be forced to do so. I worked with Cortex M also, and they're flat address space too.

I did check out the specs for Atmega MCU's and it seems those, as you described have different address spaces for data and code areas. What I want to say, I guess is that you can have a huge variety of options and architectural approaches for MCU's.

Re: The Amazing $1 Microcontroller (2017)

#188
post #163

Anyone know a good microcontroller with at least 3 DACs ?

Did you look in the STM32 line? The first I found was the STM32F3x4 line [1], they have up to 3 DACs with 12-bit precsion it sounds like. Not sure about pricing, a quick Digikey search shows the STM32F334C4T6 listing at $3.72 in singles. ST has development boards too, didn't price those.

I think you may have forgotten the actual link.

Re: The Amazing $1 Microcontroller (2017)

#189
post #182

Earlier quoted context omitted.

If an incident occurs and they identify additional components connected to the "trigger" you'd have to provide the whole "paper trail" for every single bit of your setup and show that it's above board: were the components certified for the use, were they installed by authorized personnel, were they operated properly, was the code you wrote for it to blame, etc. If you handled all the implementation yourself then it's…

> you'd have to provide the whole "paper trail" for every single bit of your setup Can you cite any firsthand account of this sort of thing happening somewhere in the US? Given the ease with which people can reach millions of people with their tale of woe/outrage the fact that such stories are not readily available on social media makes me think this is mostly urban legend.

Not sure I understand, you think it's an urban legend that an insurance company will do what it can to avoid a payout especially when the incident involves unauthorized modifications to the electrical wiring of the house, which ended up triggering a fire?

There's no need to cite firsthand accounts, you will find this in your own insurance contract. Insurance works pretty much the same everywhere, unauthorized modifications (especially to critical systems) usually invalidate any insurance claim when they can be linked to the incident. [0] Electrical wiring, plumbing, structure of the building, safety or security systems, etc. And it makes perfect sense if you think about it.

[0] http://www.insurancequotes.org/renters/3-major-diy-mistakes-...

Re: The Amazing $1 Microcontroller (2017)

#190

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 b…

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.
Post reply on HN