🌈 ESP32-S3 Rainbow: ZX Spectrum Emulator Board! Get it on Crowd Supply →
View All Posts
read
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi

I recently received this email from Amazon - at some point I hooked up some of my Hue devices to our Alexa and must have clicked a button to remind me to order supplies.

Buy some batteries!

I find it pretty amazing that the Hue switch in question was actually ordered in 2016, so the battery has lasted around 7 years!

What was very interesting, to me, was the link to view the device usage history. Clicking on it takes us to this page:

Consumption history

It’s an interesting table, but not very useful - we can’t do much with this table. However, doing a bit of snooping on the network traffic, we can see there’s some fairly simple data being sent around when click the Previous and Next page links.

Network traffic

After a bit of chatting with Mr ChatGPT I was able to turn these requests into a little web scraper. All we need is a valid cookie from one of the requests and we can pull down all the data.

An interesting pattern

The battery level is measured approximately every 15 minutes and it’s pretty noisy, but we can smooth it over multiple readings and get quite a decent plot. We can also add in markers for the start of each day and we can see a pretty interesting pattern.

Daily pattern

If we zoom into just a couple of days things become even more clear:

Taking a closer look

We keep our heating off overnight, and it turns off fairly early. This means that during the night the room with the switch in gets pretty cold. And as the room cools down the battery performs less well. Then around 6 or 7am, the heating comes back on and the battery starts to warm up. The battery performance goes up as it gets warmer!

Battery level and temperature

I did a few measurements of the battery at different temperatures, room temperature, after being in the fridge for a while, and then after being warmed to body temperature. It’s quite a dramatic difference in performance.

This is what we would expect, but it’s nice to get our own confirmation of the fact :)

The science

For the replacement battery I was thinking of using a rechargeable lithium coin cell. But there is a slight problem, looking at the PCB and buzzing out some of the connections I can see that the power pin for the main IC - an ATmega256RFR2 is directly connected to the coin cell.

Close up PCB

Interestingly the ATmega256RFR2 does have a built in voltage regulator - but unfortunately the maximum allowed voltage is 3.6V. A fully charged lithium coin cell will have 4.2V, so it could damage the CPU. So we’ll need to stick with disposable cells for now…

The PCB is pretty simple, on the left we have the PCB antenna along with its matching network of passive components. The large IC is the MCU, the smaller IC below the MCU is a flash chip, and the 3 pin IC to the right of the MCU is a MOSFET. This MOSFET is used to control power to the flash chip, so the MCU can power down the flash when it is not required.

There are some interesting test points that may merit further investigation at some point - but that will be for a future project…

Test points

With a new normal non-rechargeable coin cell installed we get possibly one of the most boring charts in the world. We’re going to get 100% reported until our battery drops below 3v. Which might take some time. But I’ll keep an eye on it and will post if anything exciting happens!

A very boring chart...

Have a watch of the video - it’s got a lot more detail in it:

Related Posts

I Built a 27V Circuit to Fix This $3 Gadget - I revived a cheap scribble pad by swapping its fried board for a tiny PCB that boosts a coin cell to 27 V—enough to cleanly reset the bistable LCD. It’s a Joule Thief with Zener regulation and twin 220 µH inductors (mounted in opposite orientations), pulling ~17 mA during charge and ~7 mA while regulating. It’s coin-cell friendly, works great, and just needs a bit of case surgery for a perfect fit.
10 Cent Music Machine - I built a tiny coin‑cell music board around the $0.10 WCH CH32V003J4M6 (8‑pin, 48MHz RISC‑V, 16K flash/2K RAM). The PCB is just 16.3×11.7mm with a piezo buzzer and transistor, and in standby it sips 7–8µA. I did hit a snag: playback caused 130mA peaks that browned out a CR2032. A LiPo fixed it, but I really wanted coin‑cell, so I upped the buzzer’s base resistor to 10k, dropping peaks to 56mA and average to ~7mA—now it runs happily (and loudly) from a coin cell. Pro tip: if standby bricks programming, wlink can erase via power-off mode. I’m bit‑banging audio, published a simple MIDI→buzzer tool with a 1‑bit SFX generator, and all the code’s on GitHub.
Whats wrong with my lightbulbs - In the saga of my beleaguered light bulbs, I've found myself knee-deep in electrical components and a fair bit of frustration. Of the four LED bulbs I invested in, only one survives unscathed, while another's flickering demise is imminent. My investigation revealed overheating bases, resilient capacitors, and an interesting LED filament setup. Ultimately, it seems one LED strip in the bulbs went open circuit, setting off a cascading failure. It's been a journey through minor electrical engineering heartbreak, with some messy disassembly and a sprinkle of high voltage excitement!
No Power? No Problem! A Wireless Pi Doom Machine - In my latest wireless charging experiments, I got my hands on a set of wireless charging PCBs and dove into testing different voltage inputs and their efficiency levels. It was interesting to realise that the 5V input managed to provide a decent efficiency of 73%, while 12V input struggled and heated the receiver board excessively. With the perks and limits of this setup explored, I took a whirl at creating a wireless Pi Doom machine. It worked like a charm! However, I quickly noticed the need to split charging and boost board into two different modules - a project to look forward to. Half the fun is getting there! Check out the video [here](https://youtu.be/glCIuOoFm7U) for more detail on the project.
Danger danger high voltage - In this blog post, I explore my experiments with high-voltage circuits, trying to light up LED filaments salvaged from broken light bulbs. Despite some explosive mishaps with capacitors and MOSFETs, I decided to try a proper DC-DC converter. Unfortunately, the one I got turned out to be faulty, highlighting some rough soldering and component failures. I've ordered replacements and hope to successfully light the filaments soon. Follow along on my troubleshooting journey with plenty of learning curves!

Related Videos

Is it time to change my batteries? Amazon thinks so! - Got a heads up from Amazon that one of my device batteries was low. Gotta give it to the battery, it lasted quite longer than I anticipated. So, I peeked into the device usage history, which was a trove of data Amazon has kindly stored. In fact, I wrote a web scraper to download all this data. Sadly, records only go back to two weeks. Nevertheless, I plotted the data and surprisingly the pattern revealed that battery level gets affected by temperature change. Cool, isn't it? Finally managed to change the battery. Also, I might just plug in a rechargeable one next time so as to not be a part of the 'throw-away battery' culture. All in all, quite an interesting discovery, courtesy of my Amazon device battery.
787 Volts From a $2 Board! - Let's have some fun with high voltage experiments and LED filaments! I've been dabbling with 300-400 volts, testing out capacitor charging, and saving some flickery Philips bulbs. With a new ESP32 Rainbow project in the works and a nifty minimalist ESP32 S3 board arriving soon, there's lots going on. Despite some high ripple issues and quirky sounds from the modules, swapping to an old-school surface mount board provides smooth performance with almost no ripple. Join me as I explore the limits and potential projects with these LEDs. And for a shocking tidbit at the end, explore some high voltage calculations—it's electrifying!
Making this CR*P Night Light GOOD - I've been picking up cheap motion night lights—performance meh, battery life definitely not 'four charges a year'. So I cracked one open for a Big Clive-style reverse-engineer: TP4054 charger at ~300 mA into a tiny 350 mAh cell, an 8-pin mystery PIR/LED driver taking the PIR and LDR directly and sinking the LED cathodes. No visible current limiting on the board, but measured ~68 mA on the bench so it's baked into the chip. Then I gutted the brains, dropped in an RC-WL0516 radar sensor, added an LDR and a timing cap to stretch the ~3 s timeout, and drove the LEDs with a MOSFET and proper current limiting. Swapped in a bigger 820 mAh battery, reassembled so it still charges and looks stock—and now it actually works nicely. Also, bonus anti-subscribe jam. Good as new.
Oops I Did It Again… Swapped VCC and GND, on My PCB 🙈 - Hey everyone! In this video, I made a little snafu with my PCB layout by confusing a common anode with a common cathode for my RGB LED. I walked through fixing it by a bit of desoldering, applying solder resist, and reconnecting with a fine wire. Thanks to PCB Way for their awesome service, and as always, all the mistakes you see are mine alone! It's all sorted now, and our LED is shining brightly once again. Let's take a look at the process!
Train Surgery - I take a fun but unbelievably loud battery train and give it some train surgery: measure the 4xAA pack (~6 V), gut the coal car, shoehorn in an 18650 with a charge/protect/boost board set to about 5.5 V, wire it up, sanity-check polarity, and get the wheels turning. Then I tame the racket by putting a potentiometer inline with the speaker, chop some plastic so the knob pokes out, and hot-glue it all in place. Result: rechargeable power, adjustable volume, same charm—minus the living-room headache. (Quick shoutout to PCBWay for the boards.)
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
Blog Logo

Chris Greening


Published

> Image

atomic14

A collection of slightly mad projects, instructive/educational videos, and generally interesting stuff. Building projects around the Arduino and ESP32 platforms - we'll be exploring AI, Computer Vision, Audio, 3D Printing - it may get a bit eclectic...

View All Posts