Picked up one of those single-use USB temperture loggers cheap because I wanted the chip inside, and it turned out to be an STM32L073CZT6. That's a nice catch for a throwaway device, 192k of flash and a low-power mode that actually earns its keep. The whole board runs off a coin cell, so clearly someone engineered it to sip power for years. Getting access was the fiddly part. There's a push button and test pads under the label, and SWD wasn't locked, which saved me alot of grief. I soldered four thin wires to the pads, hooked up my ST-Link clone, and OpenOCD found the chip straight away. Dumped the factory firmware first for backup, then wiped it and got a blink test running through the LCD driver pins. The LCD segment layout took some trial and error. I wrote a little routine that lights one segment at a time and noted what each one maps to. Took about an hour of squinting but now I can print arbitrary numbers on the screen. Battery life is the fun part, the thing idles at basicly nothing in stop mode, so it shoud sit on my desk for months. Next step is hooking the actual temperature sensor up properly and logging to flash, since there's plenty of spare room. If it works out I'll post the pin map I made.
Spent the weekend pulling apart a USB temperature logger and got the STM32L073 talking
Oct 16, 2026
Last reply: 1 day ago
5 Replies
I pulled one of those L073 parts out of a dead water meter display unit a while back, same lucky feeling when I read the lid off it under the microscope. Mine had the debug pins tied to a connector that was glued over, but a bit of isopropyl and patience got it free and the chip talked fine to my cheap blue pill programmer clone through the ST-Link utility. The segment mapping thing you did sounds familiar. I did the same walk-the-pins trick on mine and it took way longer than an hour because two of the com lines were swapped from what I assumed. Ended up drawing the whole layout on graph paper with the board propped on a phone stand. Tedious but once it's on paper you never have to do it again. One thing that bit me was the wake-up timing. I assumed the RTC would keep running in the deepest sleep state like the datasheet suggests, and it does, but my current draw was way higher than expected untill I found a pull-up I'd left enabled on an unused pin. Worth checking every pin state before you measure, those little leaks add up fast on a coin cell. For logging to internal flash, write a whole page at a time rather than byte by byte, it goes much faster and saves wear. My logger has been sitting on the windowsill tracking garage temps since spring on the original cell.
I bought a Nucleo board with one of the L0 parts on it last year for a chicken coop temperature project, so I never had to deal with pads under a label or salvage work. Mine lives in a plastic lunchbox on the coop wall running off three AA batteries, and it has been going since October without a battery change. One thing that bit me early on: the sleep current sat way higher than the datasheet number, and it turned out the programmer connection was staying alive in the background even when the chip was supposed to be dozing. There is a bit you clear before letting it rest, and once I did that the batteries stopped draining overnight. Took me a week of swapping cells to work out what was happening, so if your desk logger starts eating the coin cell faster than expected, check that first before blaming the chip.
On the screen mapping, I went about it another way than lighting segments one at a time. I printed the numbers 0 thru 9 in a row across the display and compared wich segments changed between each pair, then built the lookup from that. Took about twenty minutes and no squinting. Curious what sensor came on your board. Mine is just a cheap two-wire digital one, and I write a reading to the spare memory on the chip once an hour, which barely moves the battery needle.
One thing to watch on the LCD side is that the contrast depends on the duty and bias settings matching how the glass was actually wired, and the factory firmware usally picks a combination that looks fine at a coin cell voltage but goes washed out or ghosting once you swap in your own init sequence. I chased what I thougth was a mapping error for a whole evening once when it was really just the internal contrast voltage register sitting at a diffrent step than my code set it to. If your digits come up faint or with segments half lit, poke at that before you redo your segment table.
Agree with doing the flash writes a page at a time. I learned that the hard way on my own logger, writing every reading as it came in chewed through the write time and the battery noticeably. Now I buffer a day's samples in RAM and dump them all in one go just after midnight, and the current meter barely twitches during the write. Windowsill deployment sounds about right too, mine spent the summer tracking the shed and I only opened the case once to swap in a fresh cell when I got greedy with the sample rate.
Nice save on the firmware dump before wiping. I skipped that once on a similar salvage job and spent a week regretting it, the factory code had all the sensor calibration baked in somewhere and I couldn't figure out why my readings were a couple degrees off. If your dump still exists it's worth a skim for that stuff before you reinvent it.
Also curious what you're doing about the coin cell when you're logging to flash more often. Mine had a holder that was marginal from the factory, a bit of bent contact and it'd drop out every time I bumped the board.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required