News for hackers. Stuff that matters.
Re:The amazing $1 microcontroller (2017) by michaelt on Thursday September 10, 2020 @06:12AM (#24430749)
In a way designing a $2 device is simpler, as the low price means a low component count.

Having built a Dash Button clone with an ESP8266:

1. Choose a microcontroller that will run on <3 volts, and power it directly from two AA batteries in series. You have neither the power budget nor the financial budget for anything more complicated than that.

2. Your microcontroller should spend 99.99% of its time in its lowest power sleep mode. When sleeping, the microcontroller should consume <10μA and the other, non-microcontroller circuitry should consume the same amount.

These are rock-bottom power levels, expect to remove any status LEDs, USB-serial converter/in-circuit debugger chips, and even linear regulators compared to a development kit.

You don't have to use an ESP8266 like I did - a more experienced guy might have chosen an MSP430 or something similar.

3. Given you can only leave sleep mode 0.01% of the time, i.e. 8 seconds per day, if it takes 1 second to connect to wifi, send a message and get an acknowledgement back, you can only do that 8 times per day. If you want to update more often, you'll need something faster to connect and send a message. This is why many smart home systems use 433MHz to a base station, rather than using wifi directly.

4. A $2 budget won't include a case until you're making fairly serious volumes. Repurpose something you were throwing out, or wrap it the circuit in electrical tape, or go over budget but declare victory as you could hit the target in larger volumes.

Re:The amazing $1 microcontroller (2017) by twic on Thursday September 10, 2020 @07:17AM (#24431161)
For cases, matchboxes are ~20p a go: https://www.ebay.co.uk/itm/SET-50-PLAIN-WHITE-EMPTY-MATCHBOX...

You might struggle to get an AA cell in them, though.

Re:The amazing $1 microcontroller (2017) by sgt on Thursday September 10, 2020 @07:07AM (#24431096)
4. Just encase it in a blob of hot glue!
Re:The amazing $1 microcontroller (2017) by StavrosK on Thursday September 10, 2020 @06:40AM (#24430926)
You can use ESP-NOW instead of WiFi, although I'm not sure how quickly that connects and how much power it uses. I think it's much less than WiFi, but do double-check.