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
#AMAZON #ATMEGA256RFR2 #BATTERY LIFE #DIY ELECTRONICS #HUE #PCB #TEMPERATURE EFFECT #WEB SCRAPING

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:

#AMAZON #ATMEGA256RFR2 #BATTERY LIFE #DIY ELECTRONICS #HUE #PCB #TEMPERATURE EFFECT #WEB SCRAPING

Related Posts

Hue Light Hack - In a fun-filled deep dive into a Philip's Hue Color light bulb, I disassembled, analyzed, and ultimately restored it to working order. Over the course of the hack, I dismantled the bulb’s interior, from the aluminum PCB to the tiny ICs on the logic board, gave a detailed breakdown of their functions and even reverse engineered the signals controlling the colors. Most of the colors worked out pretty well, except for the dodgy yellow. Also, I tried running the hacked bulb setup with my old Moonlamp project. It was a great challenge and an exciting journey!
Picking up Free Lithium Cells Off the Street and Making them Safe for Use - This blog post reveals how you can salvage lithium cells from the many discarded, disposable vape devices that get littered in our towns and cities. With a pair of pliers and some bravery, I managed to rescue some decent batteries, which still had a good amount of power in them. However, with no in-built protection in these cells, I also demonstrated the importance of adding a battery protection board to ensure they are safe for use in various projects. Conclusively, through rummaging in the trash, I not only acquired useful components for my projects but also took a step towards making the planet a cleaner place.
Energy Scavenging - Can we keep our electronics running indefinitely? - After a previous unsuccessful attempt to power my Christmas lights with solar power, I've decided to try run my ultra-energy efficient ePaper weather display on solar energy. This display, already low on power consumption thanks to ESP32's deep sleep mode, is now paired with the BQ25570 energy-harvesting board and lithium cell to test if solar power can keep it running. Despite the limited Scottish winter sun, initial results look promising. With a little more code tinkering, it is my belief that the weather display might just keep running indefinitely and never need charging again.
DIY 20,000mAh Power Bank - Was it worth it? - In this blog post, I embarked on a fun project to create a DIY power bank using two 10,000mAh lithium cells I had lying around, and a charge control board. After some tinkering and tests, I learned that measuring power bank efficiency requires more than looking at amp-hours. With some help from a friend, I found out our power bank was actually over 93% efficient, a pretty fantastic result. Despite some challenges with certain devices not drawing their full potential power from my power bank, I concluded that while it was an enjoyable project, buying a ready-made power bank might be more convenient.
Look at my shiny crystal balls - Just upgraded my basic AliExpress crystal balls with some tech wizardry - I've thrown in an ESP32-S3-MINI, a mic, and made them battery powered. Thanks to WLED software, they're now smart and responsive! Shared the KiCAD project for fellow tinkerers. Check out my video to see these balls in action!

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.
Boost Battery Life: DIY Rechargeable LED Lights Hack - Have you ever wanted to hack your battery-powered LED string lights and make them rechargeable? In this fun DIY project, learn how to replace disposable batteries with lithium cells and transform your LED lights by using a charging board, resistors, and other simple components.
Another Street Battery Salvage - In this video, I plucked a battery from a Honey Melon street crystal, ending up with another 500-milliamp hour battery to add to my growing collection. After checking the connection, I added a protective PCB and tested the battery - a reasonable 3.5 volts at a flat level. Following the safe soldering of wires and wrapping it up, I hooked the revamped battery to my charger. It showed promising results, charging quickly at one amp with voltage visibly on rise. After a full recharge, I performed a load test which unfortunately gave a disappointing 311 milliamp hour. It falls short of my other salvaged batteries – 500 and 550 milliamp hour, but nonetheless, it’s a fine addition to the collection.
#shorts - 20,000mAh? https://youtu.be/PEHDVoAE8sE - Discover the real efficiency of power banks by measuring the amp hours and Watt hours of two 10,000mAh batteries in this intriguing experiment.
DIY Power Bank: 20,000mAh? - Discover the efficiency of a DIY 20,000mAh USB-C power bank compared to commercial versions, as a control board and lithium batteries charge up an array of devices, including a soldering iron and mini-hotplate, while also considering the project's overall cost.
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