top | item 46612530

(no title)

GeertB | 1 month 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!

discuss

order

pjmlp|1 month ago

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.

pkolaczk|1 month ago

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

conradev|1 month ago

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?

linkregister|1 month ago

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.

stonemetal12|1 month ago

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.

torginus|1 month ago

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

londons_explore|1 month ago

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

joezydeco|1 month ago

The vape is disposable, no need for a charging circuit and maybe a simple ADC to determine battery life based on a discharge curve.

ninalanyon|1 month ago

How close are we to smart dust I wonder? How small can we make wireless communications?

kvdveer|1 month ago

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

rwmj|1 month ago

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!

estimator7292|1 month ago

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.

tombert|1 month ago

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.

rob74|1 month ago

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

smj-edison|1 month ago

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.

roadside_picnic|1 month ago

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

Mikhail_K|1 month ago

> It’s beautiful, I love it.

When computers become disposable, their programmers soon become disposable as well. Maybe, you shouldn't love it.

PurpleRamen|1 month ago

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

eru|1 month ago

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

bartread|1 month ago

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.

rm30|1 month ago

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.

efields|1 month ago

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.

wingtw|1 month ago

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

dionys|1 month ago

first one to run doom on a vape would do great numbers on youtube

heavenlyblue|1 month ago

It's a god damn vape, 3Kb of ram is already a massive overkill for the purpose.

SuperMouse|1 month ago

I've bought hundreds of Puya's for my lab stock on LCSC. Neat little things!

torginus|1 month ago

How usable are they for hacking? I've had bad experiences with more obscure chips requiring custom programmers/debuggers.

jijijijij|1 month ago

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