Tweets
Replying to @josecastillo
real-time clock and external interrupts are in. I’m cribbing a lot of this from Sensor Watch, but nothing more so than the core run loop. one year in, this main.c has stood the test of time. (so far, the app just sits in low-power STANDBY mode and waits for button presses)
(original)
Replying to @bitshiftmask
thanks! It’s based heavily on lessons learned from the Sensor Watch framework, which has scaled pretty well; everything from the earliest test apps to the Movement firmware all use the same underlying paradigm. Anyway i’ll be working on the new thing here: https://github.com/joeycastillo/gossamer
(original)
Replying to @bitshiftmask
My goal is a really simple framework for writing low-power, bare-metal firmware in C for SAMD and SAML chips… but hand-waving away some subtle differences, so I can easily build for different chips (focus right now is the D11, D21, L21 and L22)
(original)
hey, it’s me, a person who doesn’t need another project! but I need to write some firmware for solar thing, and I want to use something more lightweight than Arduino. so here goes nothing. I’m calling it “gossamer” and so far I’m at blinky.
(original)
just ordered a pile of stuff from @adafruit for solar project! Weekly Ask an Engineer livestream always brings a discount code; this week, 10% off with code “gassensor”. Pick you up a gas sensor, and while you’re there, grab an LCD FeatherWing for 10% off! https://www.adafruit.com/product/5581
(original)
Replying to @josecastillo
Loving both worlds, at least at the moment; still it is a bit whiplash-inducing.
(original)
for _dayjob lately I’m working with SwiftUI, which is bonkers powerful and lets you sorta bind things to other things until your software emerges fully formed… then I get home and return to C-land, where I divide clocks down to single-digit hertz in a quest to save microamperes.
(original)
RT @RealSexyCyborg: Reminder- your Go Bag should have a watch in case you need to turn your phone off to preserve battery power and/or plac…
(original)
RT @molecularist: My 5yo watch on left just gave up the ghost for good. I’m not up for spending big bucks for the new one. So I’ve gone ret…
(original)
ADVISORY: if you emailed me in the last week and it didn’t go through, please try again. (i fucked my shit up.)
also, PUBLIC SERVICE ADVISORY: don’t forget to update your MX records when you move DNS servers. it’s not enough that your website loads; you have one more thing to do.(original)
Replying to @josecastillo
Battery test, day 315: 2.81 volts. Fifty days to one-year battery life and the red line (old firmware) is tracking *astonishingly* close to the Blue Line of Hand-Wavy Expectations. New firmware remains steady: 3.08 volts at day 210. Next check in 20 days; we’ll have 1 month left.
(original)
Replying to @josecastillo
(realistically it wouldn’t draw 6µA in this use case; Sensor Watch only gets away with it because it can run straight off a 3 V coin cell. Any high capacity battery that can recharge from a solar panel would need to be regulated down to 3.3 V, which is inherently less efficient.)
(original)
Replying to @josecastillo
CODA: it actually occurs to me, Sensor Watch may just be the lowest power dev board I have in my possession. AND it breaks out five GPIO pins and an I²C bus. How hilarious would it be to have a watch movement plugged into a battery and a solar panel to run this art installation…
(original)
Replying to @josecastillo
Anyway at this point I feel like there’s nothing else to pull off the board; it’s just the regulator and associated pull-up, caps for the power rails and the crystal oscillator. It’s not quite the 6µA standby of Sensor Watch, but for my application, it just might work :) /thread
(original)
Replying to @josecastillo
with that, our stripped down Feather M0 is down to consuming just 53.64 microamperes in standby. Considering where we started — 127.61 µA — we’ve cut our current consumption by more than half, or depending how you look at it, more than DOUBLED our expected battery life!
(original)
Replying to @josecastillo
classic Ohm’s Law problem: current = voltage ÷ resistance, so 3.7 volts ÷ 200,000 ohms = 0.0185 milliamperes, or 18.5 µA. For most folks, a totally reasonable amount of power to spend for a feature as useful as battery monitoring. But we don’t need it! Off come the two resistors.
(original)
Replying to @josecastillo
Back to the schematic, I’m zeroing in on one thing in particular: this voltage divider at the right. Useful feature! For the cost of two 100kΩ resistors, you get a LiPo battery voltage monitor on pin D9. It also presents as a 200kΩ battery slowlydrainer. How much will it drain?
(original)
Replying to @josecastillo
with the voltage regulator swapped, we’re down to just over 69 microamperes. nice! But I know that this microcontroller can go lower than that. What else can we do here?
(original)
Replying to @josecastillo
So, to the hot plate we go. Since Adafruit’s schematics are all open source, it’s easy to locate the voltage regulator: it’s up top by the logo (though I’m also removing the LiPo charge controller, down by the reset button, since I’ll be charging with an external solar charger).
(original)
Replying to @josecastillo
but engineering is about tradeoffs, and if I know I’m not going to be using this LDO for any power hungry things, I can get by with less. This AP7354 maxes out at 150mA output, but it promises “ultra low quiescent current”, which is exactly what I’d like for this application.
(original)
Replying to @josecastillo
the Feather M0 uses an AP2112 voltage regulator, which is a fine choice, especially for a gadget like the Feather where folks can use it so many different ways. With 600mA output, there’s plenty of power budget left over to run something like a GPS or some 7-segment LED displays.
(original)
Replying to @josecastillo
Piping 3.7 volts from my Nordic Power Profiler into the battery pin of a stock feather M0, I’m drawing just shy of 128 microamperes, or 0.128 mA. Okay, but I’d like to get that lower. And at the suggestion of Ladyada herself, I have my sights set on the voltage regulator…
(original)
Replying to @josecastillo
the gist of what we’re trying to do: blink an LED for a half second every 15 seconds, while consuming as little power as possible in between. we do this by setting the SAM D21’s SLEEPDEEP bit, and then hanging out at __WFI until a timer interrupt wakes us. https://gist.github.com/joeycastillo/97678bb1c151f4943203cfffb21a71eb
(original)
sunday evening project: low power stuff. I’d planned to build a whole elaborate gadget for this solar thing I need do this fall, but I’m realizing there’s no way I’m going to build it in time. INSTEAD, I’m going to try to retrofit an @adafruit Feather M0 for lower power usage. 🧵
(original)
Replying to @guidoism, @PCBWayOfficial and @Raspberry_Pi
I would imagine soonish; I need to dedicate a weekend to it before more Sensor Watch boards come in to test and ship. (I’m juggling _dayjob work and fulfilling the Crowd Supply campaign, but I really want to make moves on the Open Book before fall turns to winter)
(original)
Replying to @guidoism, @PCBWayOfficial and @Raspberry_Pi
I would imagine soonish; I need to dedicate a weekend to it before more Sensor Watch boards come in to test and ship. (I’m juggling _dayjob work and fulfilling the Crowd Supply campaign, but I really want to make moves on the Open Book before fall turns to winter)
(original)
Replying to @heyspacebuck
I get more comments on this shirt than any other! Artist friends, musician friends; once a random person in the security line at JFK asked if she could take a picture to send a friend. I love it!
(original)
Replying to @josecastillo
UPDATE: that could not have gone better. Assembled and fully functional in 30 minutes flat, including the automatic flashing of the language chip at first boot (which took all of 60 seconds). Full video at the link! https://twitter.com/josecastillo/status/1571337869998067713
(original)
LIVE from the Oddly Specific Kitchen Table: assembling the @PCBWayOfficial-sponsored Raspberry Pi Pico Open Book! https://twitter.com/i/broadcasts/1OyKAVPjrvaGb
(original)
Replying to @josecastillo
it’ll be streamyard to twitter, and I can answer any questions folks have if you ask them in this thread or the one that (hopefully) pops up at 10:15
(original)
ok screw it, this gadget isn’t getting built unless I buckle down and build it. If I can get the livestream working, in 10 minutes’ time I’m going to build a Pi Pico book prototype live, right here in real time. I’ve had one (1) margarita and I’m pretty sure I have all the parts.
(original)
Replying to @jeremy_soller
it is funny that the paste icon became a clipboard. I could have sworn there was a paste icon that looked like a jar of rubber cement — which would’ve been more literal — but a physical clipboard seems completely outside the metaphor.
(original)
Replying to @josecastillo
oh my gosh y’all thirty years later IT’S STILL SCISSORS. (also: the icon of a printer in google docs doesn’t so much “print”, as download a PDF. 🧐)
(original)
sometimes I feel bad for kids these days not understanding the floppy disk in the “save” icon, but then tonight my dad described designing newsletters in his day by physically cutting and pasting printed lines of text.
(original)
so I have a system of 4-letter codes for project names (sensor watch, SWAT; eBook wing, BOWI). ANYWAY while searching old spreadsheets I ran across the bill of materials (BOM) for the PyPen and realized it’s probably unwise to keep a file called “PYPE BOM Estimate” in the cloud.
(original)
Replying to @minut_e
Not custom; it’s this software called Manager that’s honestly more focused on the accounting side, but I’ve found its inventory system to be robust enough for the simple kinds of things I make. I may eventually outgrow it, but for now it’s really helping! https://www.manager.io/
(original)
Replying to @josecastillo
I have almost all the parts on hand to make 20 kits of what I’m calling the “developer preview” edition… AAA batteries, mostly 1206 parts. kinda chunky, kinda clunky, but fully functional, and a good baseline for starting to hack on the software side — if I like this prototype.
(original)
bought myself a couple weeks of Sensor Watch downtime: until more boards come in, I can’t ship anything. Might build the latest Open Book prototype tomorrow. it’s been on my desk for five weeks because I wanted to live stream assembling it… but maybe I just need to get ’er done.
(original)
the thing I love about my new inventory and accounting system is that it handles tracking of deliverables. the thing I hate about it is the same thing.
(original)
Replying to @tablatronix
they really want to punish you for not ejecting your disk properly!
(original)
Replying to @oakdevtech
omg @PaintYourDragon you’re my hero
(original)
Replying to @josecastillo
it’s ${CURRENT_YEAR}, there should be a way to tell my system that I know what the fsck I’m doing. (script in alt text; you may have to allow either Terminal or osascript to use accessibility features in the security prefpane)
(original)
Question to fans of the UF2 bootloader: any idea how to stop this from happening? I have an AppleScript (in followup tweet) to get rid of them, but after today’s marathon firmware flashing session, it’s taking a minute to dispense with over 400 of these…
(original)
Replying to @JeremySCook
Actually by the 150th board, I ditched the foot pedal and improved the bash script: now it just waits in a loop until the board shows up on USB, then flashes the firmware and waits for the next board. Only slightly faster, but every little bit counts!
(original)
RT @MakeAugusta: I just counted in all of the parts yesterday. It’s going to be a big run.
(original)
Replying to @DLX
I will ask the @crowd_supply folks! I need to write a backer update and this will be good info to include.
(original)
Replying to @josecastillo
stacked, separated and triple counted. These’ll go out to Mouser first thing tomorrow.
(original)
Replying to @josecastillo
Finally have a final answer for the first round of shippening: 384 Sensor Watch boards, 58% of backer orders, will be in this first round. But fret not ye 42%! All the parts are in for the fall run at @MakeAugusta; it should be getting underway in time for a round two next month.
(original)
Replying to @a2
the positive reviews really sealed the deal.
(original)
Final setup for Sensor Watch shippening: baby heat sealer, a USB cable and a CircuitPython-powered foot pedal that presses “Enter” when I tap my foot. Then a bash script — http://shipboards.sh — copies the UF2 firmware to the board and reports success or dings for failure.
(original)