Tweets
Replying to @hyperkomplexe
I can, and in tests that got me down to 4 µA, but alas I can’t use the ultra-low-power BACKUP mode that would get my consumption down to the nA range. It’s also not a great user experience; the watch looks dead until you press a button. Something on screen is better than nothing.
(original)
Replying to @josecastillo
Technically the crystal oscillator is running, as well as the ultra-low-power 32 kHz oscillator, but we already realized that we need both of those running. I tried disabling bits and pieces of them, but that just hung the microcontroller. I sense that there’s nothing to do here.
(original)
Replying to @josecastillo
The RTC and the button are actually one thing; both are running off the real-time clock peripheral. There’s not much to optimize here. The only thing I can think of is, I enabled some debouncing for the button input. Disabling it seems to lower my power consumption by 0.5 µA!
(original)
Replying to @josecastillo
Okay y’all. This is it. The final frontier. I have some ideas but I’m at the point where, in sleep, only 3 things are running: the RTC, the screen and one button. We’re at 10µA, and each µA we save will give us at least a month of extra runtime. What’s left, what can we optimize?
(original)
Replying to @josecastillo
Good news / bad news. I can set the register myself, but it looks like the SAM L22 defaults to using the low power clock. Which means the mistake I thought I made last night was canceled out by this setting not being used in the first place. need to ponder this over a granola bar
(original)
Replying to @josecastillo
oh interesting: maybe it’s because while that setting seems to exist, it never gets used anywhere? god what demons lurk in boilerplate project files. Oh well. if a register needs setting, I suppose I can set it myself.
(original)
Replying to @josecastillo
HUH. so this is unexpected. changing the clock selection for the SLCD controller doesn’t seem to change power consumption at all.
(original)
Replying to @audreydodgen and @the_prepared
(if I remember to eat it)
(original)
Replying to @audreydodgen and @the_prepared
haha I grabbed a granola bar, that should tide me over til lunch :)
(original)
Replying to @josecastillo
OKAY! It is 8:40 AM, I’ve skipped breakfast and slammed some coffee, and now I’m here at the workshop of @the_prepared to get some answers to my questions. Can we eke more power savings out of the watch? IDK, but I’m going to share my progress as I go. (thread continues!)
(original)
Replying to @josecastillo
four. Four four four. Wordle 237 4/6*
⬛🟨⬛⬛🟨
🟨🟨🟨🟩⬛
⬛🟩🟨🟩🟩
🟩🟩🟩🟩🟩(original)
Replying to @folknology
Technically it also uses the clock for its frame counter, which means the ‘visual’ tick/tock in sleep mode may look ever so slightly off, but it’s purely cosmetic, and I sense that if we reset the frame counter when we wake up each minute, it won’t drift that much.
(original)
Replying to @folknology
good news is the RTC can still use the external crystal! The trick is the oscillator controller prescales it to 1024 Hz, so the RTC gets a lower frequency (but still very accurate) tick. The LCD only uses the clock for timing pulses to the glass, which doesn’t affect timekeeping.
(original)
Replying to @tahnok
as a colleague was eager to point out: not just one character, but one bit!
(original)
Replying to @josecastillo
late-night coda: holy shit, I’m also clocking the display from the high-accuracy crystal and not the low-power oscillator. Are there power savings here too? If so, it’d also affect my sleep current consumption!
Fighting the urge to bike back to the shop and test this right now…(original)
Replying to @darianbjohnson
I still think sleep makes sense. The spike is super short and in the ~mA range. And even if sleep only happens eight hours a day (when you’re asleep too), it means there’s a solid third of the year where you’re not wasting energy on an update a second. Every little bit counts!
(original)
Replying to @tahnok
Funny irony, last month I convinced my colleagues @HelloTidbyt to make a discord but I haven’t don’t it myself! I should.
(original)
Replying to @sajad_ghorbanii and @ShaneDuffy_
Out of stock at the moment but Adafruit carries them now: https://www.adafruit.com/product/5048
(original)
Replying to @josecastillo
ANYWAY: tl;dr: after over a year shaving microamperes off of this project (and after blogging about how well we’d done), I discovered that I’d subtly misconfigured one of my peripherals, and found significant power savings to the tune of 650% more hours in wake mode. 🥳 /thread
(original)
Replying to @josecastillo
When I started this, wake mode power consumption was at 300µA. I worked for weeks to get it to 100, then 90. Thought I’d hit a wall, but by sweating the small stuff again and again we got to 30, and EVEN THEN there were more improvements to be found. Lots of lessons learned here.
(original)
Replying to @josecastillo
I think I can now say with a high degree of certainty that, as configured today, Sensor Watch has year-long battery life. It’s an estimate, but the data strongly suggests it’s a reasonable one. And this gives us more headroom for adding an always-on sensor like an accelerometer!
(original)
Replying to @josecastillo
You may recall this graph from today’s post. The light green line was my original assumption: average 2 hours a day awake, and you get a year of battery life. With this change, we can manage 12 hours — and you’re flirting with 11 months on battery if you never go to sleep at all!
(original)
Replying to @josecastillo
The one line change. This one change brings my current consumption in wake mode from just under 30 µA to just under 13 µA. Which is huge. It almost makes me call into question the whole premise of prioritizing sleep mode so highly in the first place. 7/?
(original)
Replying to @josecastillo
But! In the config file, there’s a note: you should only use the external clock when higher frequency is your priority. If you care about power, you should use the ultra-low-power oscillator instead. This makes sense: even at the same speed, an external clock involves more stuff.
(original)
Replying to @josecastillo
There are two 32 KHz clocks on the watch: the highly accurate crystal we use for timekeeping, and a less accurate but v low power oscillator inside the SAM L22. When I set up the project, I had the EIC use the crystal, figuring it was better to use the same clock for everything.
(original)
Replying to @josecastillo
All peripherals need a clock to run. Not like a wall clock, but a signal that toggles — and the faster it toggles, the more power it uses. The main watch CPU uses a clock of 4 MHz, which consumes a lot of power. The EIC, being on all the time, needs something much slower: 32 kHz.
(original)
Replying to @josecastillo
I literally have this chart taped to my wall, a @MicrochipMakes table showing current consumption for SAMD peripherals. The EIC (near the end) should be around 5µA, not 17µA. Something wasn’t adding up. Then I remembered something I did at the very beginning of the project… 3/?
(original)
Replying to @josecastillo
OKAY. So. I’ve done this before: you just turn systems off one by one until you find the leak. It’s how I got from 300µA to 100 to 30. Did it again and discovered the offending system is the external interrupt controller. But it’s not supposed to consume that much current. 🤔 2/?
(original)
OH MY GOD did I just cut my power budget by 60% with a one-line change? Today’s post got me to wondering: sleep mode uses 10µA and wake takes 30µA. Where’s that extra 20µA going? A detective story, but spoilers: by the end, wake mode is going to consume under 13 µA. A THREAD! 1/?
(original)
Replying to @bateskecom
haha maybe longer; the new firmware has both more features and some low power improvements; I’m half tempted to start a second battery test in the coming weeks!
(original)
Hey there cats and kittens, it’s your Sensor Watch Week Five update! In which we attempt to answer the question: “Can Sensor Watch really last a full year on battery?” Short answer: I think so! Longer answer: I’m afraid we need to use… MATH! (and SCIENCE!)https://www.crowdsupply.com/oddly-specific-objects/sensor-watch/updates/sleep-mode-battery-tests-and-a-sunrise-sunset-simulator
(original)
Replying to @josecastillo
Promising things for trying this: the screen is identical, and the board outline is similar. Less promising: there’s no room for the QFN chip (you’d need the BGA package), and less room for stuff on top of the board. Sensor boards would def not fit. Alas, this looks like a no go.
(original)
Replying to @keesplattel and @adafruit
oh interesting! I’d be curious what chip is inside. I also found several on DigiKey that might be fit for purpose: https://www.digikey.com/short/m91wdtct
(original)
Replying to @carbontwelve
I imagine so, yes! I found a chip on @digikey that seems tuned to this purpose — boosts 1.8~5.5V DC to 220V AC for an EL lamp — and the current involved is just 45µA. https://www.digikey.com/en/products/detail/microchip-technology/MIC4832YML-TR/1834690
(original)
Replying to @brentwgraham
There’s definitely an EL driver chip on there boosting the voltage; it must be under that smaller epoxy blob on the left. I can see one trace going to one of the EL terminals, and another escaping to the backside where it connects to the inductor on the right.
(original)
Replying to @bitshiftmask
I tossed it on the scope and it’s pretty much exactly 1 KHz. Agreed it’s very impressive — a lot of engineering went into these little gadgets!
(original)
Replying to @josecastillo
…where it showed me a waveform that’s 300 volts peak to peak, with a RMS voltage of ~100V. So in addition to the slightly different board outline, I sense we’d need a pretty specialized chip to boost our 3 volt coin cell to the level required to drive that pretty blue backlight.
(original)
After getting many questions about Sensor Watch compatibility with EL backlit versions of the Casio, I picked one up just to see what’s involved. According to my multimeter, it involves high voltage. At least 70 volts AC? Just to be sure I plugged it into our oscilloscope… (1/2)
(original)
taking some last-minute screenshots for today’s #SensorWatch backer update. If you’ve ever wondered how I measure current consumption on the watch: it’s a purpose-built sensor board that powers the gadget from the 9-pin connector + a fake coin cell. Oh, and a Nordic PPK2 :)
(original)
Replying to @josecastillo
Could have been two! But I’ll take Wordle 236 3/6*
🟨⬛⬛🟩🟩
⬛🟩🟩🟩🟩
🟩🟩🟩🟩🟩(original)
seeing as I’m going to fire up the tumbler anyway, I figured I’d print a few simple rings in bronze-fill just to see how they turn out. You won’t be able to fit any gadgets inside these, but hey, maybe they’ll polish up nice.
(original)
RT @glowascii: Thanks for the interview, @TheMagPi! Really interesting getting to reflect on my journey, how I got into electronics and how…
(original)
There’s something super uncanny about watching an organic shape come out of the 3D printer line by line. It’s like: I get what you’re doing, robot, but my human brain doesn’t like it.
(original)
Replying to @theoraculum_
I think so, but TBH I haven’t worked much with magnetometers. Can you get a compass heading with just a magnetometer, or do you also need an accelerometer / gyro? Personally I’d love to see a 9-DOF IMU in there, a real ‘kitchen sink’ kind of sensor that can do it all.
(original)
Replying to @femtoduino
it’s a good idea, the problem with that is I’m actually not good at html 😬
(original)
Replying to @josecastillo
oh shit I almost forgot: marketing. https://www.crowdsupply.com/oddly-specific-objects/sensor-watch
(original)
Replying to @MattTexEckerle
I ended up using some public domain code, a C library called SUNRISET.C by Paul Schlyter. It’s actually period-appropriate for a late-80s wristwatch hack; the code dates from 1989! https://github.com/joeycastillo/Sensor-Watch/blob/main/movement/lib/sunriset/sunriset.c
(original)
y’all. I wrote a javascript! It’s a Sensor Watch Sunrise/Sunset face demo; just click the “Set Location Register” button above the console, and then press the Mode button to go to the rise/set face. The “Alarm” button moves to the following rise/set time. https://joeycastillo.sdf.org/sunrise-sunset/watch.html
(original)
Replying to @josecastillo
It looks like a little flower. Wordle 235 4/6*
⬛🟨⬛⬛⬛
🟨🟨🟨⬛⬛
⬛🟩⬛🟩🟩
🟩🟩🟩🟩🟩(original)
also: I’ve set the “day one” face to count the days of our cursed pandemic era, but I’m uncertain where it began. My sense is that 1/1/2020 marked the beginning of the end of the world, but I could also make a case for anywhere from late 2019 to 3/11/2020.
Thoughts on day zero? https://twitter.com/josecastillo/status/1491126432273408000(original)