Comment by GeertB
18 hours ago
For these devices the microcontroller needs to be super cheap. Microcontrollers like the Puya PY32 Series (e.g., PY32C642, PY32F002/F030) can cost in the $0.02 - $0.05 range for the kind of many-million volumes applicable for disposable vapes. These are 32-bit ARM Cortex M0 MCUs, running at a 24 MHz clock or similar, some with 24 KB of ROM and maybe 3 KB of RAM!
To put into context: this is 3x the ROM/RAM of the ZX81 home computer of the early 1980s. The ARM M0 processor does full 32-bit multiplication in hardware, versus the Z80 that doesn't even offer an 8-bit multiply instruction. If we look at some BASIC code doing soft-float computation, as was most common at the time, the execution speed is about 3 orders of magnitude faster, while the cost of the processor is 2 - 3 orders of magnitudes less. What an amazing time we live in!
Which is why when folks nowadays say "you cannot use XYZ for embedded", given what most embedded systems look like, and what many of us used to code on 8 and 16 bit home computers, I can only assert they have no idea how powerful modern embedded systems have become.
Now that it is a pity that when people talk about saving the planet everyone keeps rushing to dispoable electronics, what serves me to go by bycicle to work, be vegetarian, recicle my garbage, if everyone is dumping tablets, phones and magnificient thin laptops into the ground, and vapes of course.
> Which is why when folks nowadays say "you cannot use XYZ for embedded", given what most embedded systems look like, and what many of us used to code on 8 and 16 bit home computers, I can only assert they have no idea how powerful modern embedded systems have become.
Yet, I still need to wait about 1 second (!) after each key press when buying a parking ticket and the machine wants me to enter my license plate number. The latency is so huge I initially thought the machine was broken. I guess it’s not the chip problem but terrible programming due to developers thinking they don’t need to care about performance because their chip runs in megahertz.
There's no pressure to make a good product because nobody making this decision has to use the machine. Everywhere I've worked purchase decisions are made by somebody with no direct contact to the actual usage, maybe if you're lucky they at least asked the people who need the product what the requirements are, otherwise it's just whatever they (who don't use this product) thought would be good.
"Key presses are 15x slower than they should be" gets labelled P5 low priority bug report, whereas "New AI integration to predict lot income" is P0 must-fix because on Tuesday a sales guy told a potential customer that it'd be in the next version and apparently the lead looked interested so we're doing it.
14 replies →
My first guess was debouncing. They assume that the switches are worn out, deeply weathered, and cheaply made. Each press will cause the signal to oscillate and they're taking their sweet time to register it.
When the device is new this is an absurd amount of time to wait. As the device degrades over 10, 20 years, that programming will keep it working the same. Awful the entire time, yes, but the same as the day it was new.
9 replies →
One of the more inspired design choices of the parking ticket devices in my area is the inclusion of a key repeat feature.
If you keep your finger on the touchscreen for just long enough, it helpfully repeats the keystroke while you're entering a license plate.
Given the inevitable hardware issues, this means that what should be a single tap frequently becomes a burst of identical characters.
The programmers who worked on this probably would've liked to be game developers instead.
That's programmer incompetence. Unfortunately pervasive, especially with devices like parking meters, EV chargers, and similar, where the feedback loop (angry customer) is long (angry customers resulting in revenue decrease) or non-existent.
7 replies →
Give it some slack, it's probably doing its best to inexplicably run windows.
1 reply →
Or maybe they think they should be sending each keystroke to a server and waiting for the response.
7 replies →
Everyone was locked out in a building am staying at (40 something stories) for several hours. When I asked the concierge if I can have a look at the system, it turns out they had none. The whole thing communicated with AWS for some subscription SaaS that provided them with a front-end to register/block cards. And every tap anywhere (elevators/doors/locks) in the building communicated back with this system hosted on AWS. Absolute nightmare.
48 replies →
Only in America. America is deigned to make you mad that public common life isn't keeping up with whats in everybody's pocket.
Gently forcing the individual to choose sapient or insentient.
Sorry to rant, but this kind of stuff is the only thing that triggers me. It's gotten so bad that my family makes me put a dollar in a 'complain jar' everytime I talk about how poor quality software has become.
Just one recent example: few months ago, I replaced a Bosch dishwasher with the latest version of the same model. Now, when I press the start button to initiate the cycle, it takes over 3 seconds for it to register! Like, what is going on in that 3 seconds?
How was it possible that even 'kind of good' developers like me were able todo much more with much less back in the 90s? My boss would be like, "Here's this new hardware thingy and the manual. Now figure out how to do the impossible by Monday." Was it because we had bigger teams, more focus, fewer dependencies?
1 reply →
Whilst I can not see a motivation I refuse to accept that parking machines are not advisarial design. Why do they have haf a dozen things that look a bit like tap n pay if they are not trying to make it eaiser for card skimmers.
And the self service kiosks/checkouts at supermarkets. So infuriating! Like I'd have to try to make something that slow myself on purpose!
Besides the fact that scanning a barcode seems beyond much of the general population, they do it so sloooow.
5 replies →
It could also be intentional UX design. Or a result of the keyboard hardware.
What can you expect, when people assume as normal shipping the browser alongside the "native" application, and scripting languages using an interpreter are used in production code?
Maybe that ticket machine was coded in MicroPython. /s
6 replies →
Anything that makes the world worse for car drivers is a huge bonus for The planet.
Plastic bottles are discarded because they can be replaced at low cost. Disposable vapes are possible because batteries became cheap enough: the chip is a rounding error.
The same market forces that gave us affordable electric vehicles gave us disposable vapes.
If it goes anything like plastic bottles, there will be a bitter fight for corporate accountability that goes nowhere. It’s especially difficult here because there isn’t a single monopoly like Coca-cola to hold responsible. What is the bottle bill equivalent for vapes?
Be heartened that your choices are meaningful. The impact of e-waste on ground contamination from landfills in the United States and Europe is negligible, and landfill capacity itself does not approach the level of emergency that planetary warming is for human civilizations.
Bicycling, transit usage, and switching to lower-carbon food sources significantly reduces your CO2 footprint. Your example influences others in your community, though it may not be personally apparent.
The idea that people are smoking arm chips makes me laugh.
Not smoking, vaping - better for your health but not RISC free.
Hey man, RISC architecture is gonna change everything
1 reply →
it's literal vaporware
This is your brain. This is your brain on ARM.
Technical Boy's vape is here: https://giphy.com/gifs/americangods-vape-american-gods-26BGN...
Something I recently found out about ARM Cortex M0s, they are small enough and cheap enough that they get used in USB cables to handle protocol negotiation between devices.
Given that the moon lander had a 1Mhz processor and 4kb of ram means we landed on the moon with the compute power of a Vape or USB cable. Wild times indeed.
It also stood out to me how little stuff is in there - there's the uC itself, 3 transistors for heating the flavor canisters, an op-amp for the microphones, but other than that I don't really see anything - no external oscillator, no vrm (though a charger/BMS circuit must be in there somewhere).
I see lots more cost-cutting corners they could take...
Vapes are probably made in enough quantity to warrant custom silicon. Then the mosfets and charge circuit could be on the same die. It could be mounted COB (black blob).
They could probably use a single 'microphone' (pressure sensor) and determine which setting based on a photodiode.
The PCB's could be replaced with a flex PCB which integrates the heating elements (Vegetable Glycerine boils at 290C, whereas Polyimide can do 400C for a short while). Construction of the whole device can then involve putting the PCB inside the injection moulding machine for the cavities, eliminating all assembly steps, joints and potential leaks, and reducing part count
> Vapes are probably made in enough quantity to warrant custom silicon
Not when the MCUs might cost a penny and the other parts aren’t much more.
Putting high power electronics and analog into the same custom silicon as a custom digital logic is nontrivial. They’re made on different processes.
6 replies →
The vape is disposable, no need for a charging circuit and maybe a simple ADC to determine battery life based on a discharge curve.
Apparently there is a charging circuit, because the battery will run out long before the fluid does
2 replies →
How close are we to smart dust I wonder? How small can we make wireless communications?
> How close are we to smart dust I wonder? How small can we make wireless communications?
There's two limiting factors for 'smart dust': power (batteries are the majority weight and volume of this vape), and antennae (minimum size determined by wavelength of carrier wave).
I believe you can fit an NFC module in a 5x5mm package, but that does externalize the power supply.
RFID tags are powered wirelessly, one could imagine powering smaller particles when operating on higher frequencies (RFID is on 13.something MHz requiring relatively large coils). A directional antenna could send a pulsed beam to power a subset of the particles in the area and afterwards receive their signals.
3 replies →
> There's two limiting factors for 'smart dust': power
RFID is historically powered by one of three methods,
one of which is completely wireless/battery-free.
We are going to have to rethink power for smart dust. Like consider that no creature out there is powered by batteries. From the biggest land animal to the smallest microbe it’s all chemistry.
Maybe the smart dust will have to eat microbes and stuff to stay active.
As for communication, we can’t go shoving antennas in them as then they’d be larger than dust. And you can’t use the optical part of the spectrum because of interference with basically everything. You can’t use wavelengths smaller either as you get into UV and high radiation. There is the terahertz radio spectrum [0] between 3mm and 30um that is pretty open and not utilized at all because we haven’t figured out how to make good transmitters. Plus the spectrum isn’t very useful as it isn’t very penetrating and water vapor absorbs it… and it requires lots of power.
Smart dust might have to be more of a distributed computer or something. Or a micro machine that uses chemistry and mechanical magic to do its operations.
[0] https://en.wikipedia.org/wiki/Terahertz_radiation
1 reply →
> These are 32-bit ARM Cortex M0 MCUs, running at a 24 MHz clock or similar, some with 24 KB of ROM and maybe 3 KB of RAM!
So, probably enough to land on the moon. And cheap enough to justify a dozen backups.
This is exactly it. The tech in these sorts of devices is way overpowered for what they are or need simply because it's a lot cheaper to do it that way than it would be to use more appropriately scaled computing power. Either the "more appropriate" components are no longer in production, or they are in production but are now considered somewhat niche and are only produced in volumes that make them considerably more expensive than the more advanced/powerful options.
So you end up with something that could probably be coaxed into running DOOM at playable FPS (if it had enough RAM and a display) relegated to running a humble - and frankly objectionably wasteful (coupled with questionable health outcomes with long term use) - disposable vape.
The Z80 didn't even do 8 bit add. The ALU operates in two 4 bit cycles.
I am now wondering if it's possible to put a ZX81 emulator on one of these microcontrollers. It would need to emulate the Z80 but you've got plenty of spare cycles, and 3x the ROM and RAM of the original, so enough space for a small emulator!
What a world we live in; we have gotten to a point where computers are so small and cheap that they can literally be “disposable”.
It’s beautiful, I love it.
For my part, I hate anything explicitly labeled "disposable". As the author writes, you're supposed to recycle it, but how many people will do that if it has "disposable" written on it? Even worse, if it was truly disposable they could use a non-rechargeable battery, but because they have to keep up the pretense of it being reusable, they have to include a rechargeable battery with more dodgy chemistry that probably shouldn't end up in a landfill...
To make matters worse, recycling is a scam (with a small handful of exceptions).
28 replies →
Why recycle things that you can make them cheaper, with less resources and in higher quality from scratch?
(The above is not so much about processors, but about plastics. As long as we are still burning any fossil fuels at all, we are probably better off holding off on recycling and instead burning the plastic for electricity to use ever so slightly less new fossil fuels for power, and instead use the virgin fossil fuels to make new plastics.
Especially considering the extra logistics and quality degradation that recycling entails.
Directly re-using plastic bottles a few times might still be worth it, though.)
11 replies →
>they could use a non-rechargeable battery
The problem here is the item lasts 'long enough' that they can't, a single battery, unless it were very large would drain charge first.
But that brings in the second issue of the device not being refillable, which may be the bigger sin.
Let's start by pricing in the negative externalities.
> As the author writes, you're supposed to recycle it, but how many people will do that if it has "disposable" written on it?
You need to offer an incentive (ie: discount on new vape if you recycle) and then, from my experience, most people will recycle.
2 replies →
It reminds me of how Sussman talked about someday we'd have computers so small and cheap that we'd mix dozens in our concrete and be put throughout our space.
Russia started with mixing diodes into concrete a while ago- https://news.ycombinator.com/item?id=41933979
A Deepness in the Sky by Vinge has this as a minor plot point.
> It’s beautiful
Especially since both the waste created in the process of making the device and the e-waste created with it's disposal are somebody else's problem!
> It’s beautiful, I love it.
When computers become disposable, their programmers soon become disposable as well. Maybe, you shouldn't love it.
That doesn't make sense.
1 reply →
For the even cheaper e-cigarettes many vendors are producing dedicaded ASICS integrating heater control, pressure sensing, battery management, for as close to free as it gets. It's astonishing.
It's all integrated on a tiny PCB mounted to the back of the microphone.
Wow: the Sinclair ZX81 launched in the UK in 1981 for around £49.95 as a kit (£50) and £69.95 assembled, making it incredibly cheap, and later in the US as the Timex Sinclair 1000 for $99.95 (kit) or $149.95 (assembled)
Cheap for a 1980s computer, now pennies. Wild.
"Microcontrollers like the Puya PY32 Series (e.g., PY32C642, PY32F002/F030) can cost in the $0.02 - $0.05 range"
LCSC says between 6 and 8 cents in volume:
https://www.lcsc.com/product-detail/C5292058.html
500+ $ 0.0802 2,500+ $ 0.0727 5,000+ $ 0.0682"
> [...] while the cost of the processor is 2 - 3 orders of magnitudes less.
Is that inflation adjusted? If not, the real cost difference is even starker.
Nowsdays computers misguided us to think that we need to measure RAM in GB and storage in TB. There are a lot of "invisible" applications running on 8bit MCU (not ARM based and more modern than ZX80) and few kB of flash and a bunch of RAM (64 bytes in luxury models). In this context matter more the integrated peripherals like ADC, DAC, PWM, etc that simplify the complexity of board and reduce the total cost.
idea for a hobby project for someone better versed in hw than me - create a computer that can at least run basic with the MCU from the disposable vape.. :)
first one to run doom on a vape would do great numbers on youtube
Already been done.
3 replies →
I've bought hundreds of Puya's for my lab stock on LCSC. Neat little things!
How usable are they for hacking? I've had bad experiences with more obscure chips requiring custom programmers/debuggers.
They're great, because you can use all standard ARM tooling, including CMSIS-DAP dongles for debugging.
> What an amazing time we live in!
I feel like, pioneers of the past would be rather disappointed with us.
I mean, primarily we're not using this ridiculous power to solve actual problems, but to enslave one another in addiction, mindless consumption and manufactured consent to a lesser life.
Almost 100 years later, now with computer enabled misinformation and agitation campaigns by tech oligarchs, a new fascism is on the rise and Alan Turing would be called an abomination, again.