Pixellated image of the innards from a disposable vape

If you visit dougbelshaw.com you will notice that the site loads instantly, no matter the speed of your connection or which device you’re on. That’s because it’s a mere 7.7kB in size. I did have it under 1kB, but I added a JavaScript effect, and a favicon.

That means that I could host this website on pretty much anything I choose — including, it turns out, a vape. That’s right, the microcontroller running inside a disposable vape is about the same clock speed as early 1990s personal computers. While they had more RAM and storage space, landfill considerations aside, it’s pretty incredible that someone has managed to run a website from things that are being used as fancy “pacifier for adults.”

I’m not here to scold anyone, but we’re so used to autoplaying videos these days, even on news sites, that we don’t question the impact that’s having on the energy consumption of the world. Combined with an increasing amount of dark data and perhaps it’s time to consciously minimise our digital footprints? Also, it’s cool to be able to host your website yourself on something like a vape. Much cooler than using them for their intended purpose!

For a couple of years now, I have been collecting disposable vapes from friends and family. Initially, I only salvaged the batteries for “future” projects (It’s not hoarding, I promise), but recently, disposable vapes have gotten more advanced. I wouldn’t want to be the lawyer who one day will have to argue how a device with USB C and a rechargeable battery can be classified as “disposable”. Thankfully, I don’t plan on pursuing law anytime soon.

Last year, I was tearing apart some of these fancier pacifiers for adults when I noticed something that caught my eye, instead of the expected black blob of goo hiding some ASIC (Application Specific Integrated Circuit) I see a little integrated circuit inscribed “PUYA”. I don’t blame you if this name doesn’t excite you as much it does me, most people have never heard of them. They are most well known for their flash chips, but I first came across them after reading Jay Carlson’s blog post about the cheapest flash microcontroller you can buy. They are quite capable little ARM Cortex-M0+ micros.

Over the past year I have collected quite a few of these PY32 based vapes, all of them from different models of vape from the same manufacturer. It’s not my place to do free advertising for big tobacco, so I won’t mention the brand I got it from, but if anyone who worked on designing them reads this, thanks for labeling the debug pins!

[…]

So here are the specs of a microcontroller so bad, it’s basically disposable:

  • 24MHz Coretex M0+
  • 24KiB of Flash Storage
  • 3KiB of Static RAM
  • a few peripherals, none of which we will use.

You may look at those specs and think that it’s not much to work with. I don’t blame you, a 10y old phone can barely load google, and this is about 100x slower. I on the other hand see a blazingly fast web server.

Source: BogdanTheGeek’s Blog

Image: modified from original included in source blog posts (using Dither It!)