Tweets
Pocket Op Amp Lab 2! IMO everyone should build one of these. Spent a morning playing with the old heart rate gadget; finally starting to grok how op amps amplify analog signals. In this case the AVR128DB’s two op amps take my faint heartbeat and amplify it to 4V peak to peak. 1/3
(original)
Replying to @GregDavill
One of the earliest bugs I remember writing happened in my high school school C class. The assignment was to implement the quick sort algorithm, so obviously I named my function
qsort
. Ended up having to go to office hours to figure out what was happening.(original)
Rewatched the 1993 film Hocus Pocus last night. So fun, so camp; also passes the Bechdel Test in a matter of *seconds*.
(original)
at a starbucks in connecticut where they are playing mariah carey’s “all i want for christmas is you” and i am sorry but IT IS EARLY OCTOBER. i haven’t even had a chance to get spooky yet.
(original)
Replying to @theavalkyrie
ever since I read an article a few years back positing this theory, my headcanon is that jack is transmasc, rose is queer as all get-out, and secretly that’s the love story James Cameron actually set out to tell
(original)
Replying to @josecastillo
basically, when the non-inverting input is higher than the inverting input, the output quickly saturates to its maximum value, and vice versa. The AVR128 can also configure the resistor ladder to tweak the reference voltage at IN-, and vary the duty cycle. I just think it’s neat.
(original)
i maked a comparator! This may be op amps 101, but it’s cool to finally start to grok what’s going on with them. Yellow line is the AVR128’s DAC output / op amp non-inverting input. The inverting input gets 1/2 of VDD from the internal resistor ladder. Cyan line is op amp output.
(original)
Replying to @DonBiederman, @MicrochipMakes and @technoblogy
I got this one from @adafruit! They’re super sharp, quite affordable, and so smol! https://www.adafruit.com/product/4383
(original)
finally got around to cleaning my workbench today, and found stratified layers of projects I got the parts for and never built. Decided to take the time and build this Pocket Op Amp Lab, designed by @technoblogy. Stoked to use this to learn about op amps! http://www.technoblogy.com/show?3CHT
(original)
Tweaked the pulsometer widget this morning: ditched the lookup table in favor of doing the math on-board, which has the added benefit of being able to support arbitrary screen refresh rates. I don’t mind saying it: this looks pretty pretty at 16 Hz 😃 https://github.com/joeycastillo/Sensor-Watch/commit/9d4367565b20ef9d42f793fc00daa575c46b0e3c
(original)
Replying to @josecastillo
“Men will literally traverse the vast infinite, murdering alternate versions of themselves that made different choices, instead of going to therapy.”
(original)
Rick and Morty is just a long running “men will literally X instead of going to therapy” joke. “Turn themselves into a pickle” / “fracture space and time” / “clone their loved ones” / “build a wall around infinity” / “blow up the wall around infinity, causing millions of deaths.”
(original)
Pulsometer widget for the Sensor Watch. This is to some extent pretty basic: you use a finger to count 30 pulses on the wrist; then there’s a lookup table that converts that amount of time to a heart rate. Turns out an index finger is a pretty good sensor! https://github.com/joeycastillo/Sensor-Watch/commit/0f349cb52e7436303f61a3dd2dde2f40d3dc05c3
(original)
Replying to @ajbauer
it’s like looking into a mirror
(original)
i doubt i’m ever going to be able to make a proper heart rate sensor board for the watch. but tomorrow I am totally going to write code for a pulsometer complication: https://blog.crownandcaliber.com/fitness-health-watches-pulsometer/
(original)
Replying to @tahnok
complication sounds complicated, but! this sent me down a rabbit hole of watch terminology, and now I’m thinking that instead of Launcher, the app that manages all the screens could be called Movement. https://www.watchmaster.com/en/journal/watch-knowledge/watch-glossary-a-to-z#wgM
(original)
Replying to @mikiexx
The screen’s a little constrained for it, but then I’m also not a game dev! Would be stoked if someone wanted to make one tho :)
(original)
soon: https://twitter.com/BNONews/status/1445120484270649345
(original)
Replying to @josecastillo
this is very work in progress; the API needs work, I don’t know how I feel about the nomenclature of launcher / widget, and there are definitely bugs; in fact, I spotted a memory leak while writing this thread. But hey, everything starts somewhere, and this is a start!
(original)
Replying to @josecastillo
Example of a widget. It all happens in four functions: setup (called @ boot), activate (prepare to go on screen), loop (handle events, update the display) and resign (prepare to go away). You can pick which widgets you want in a config file when you build. https://github.com/joeycastillo/Sensor-Watch/blob/83192b3a580c19eb694ca7951650db87eeb582ad/launcher/widgets/clock/simple_clock_widget.c
(original)
Weekend project: the Launcher. Building on previous watch library work, it’s an app that manages the display of user-created widgets. Here it’s Clock, Settings (to set the LED color) and Time Set. My hope is to make it a framework for folks to build simple screens for the watch.
(original)
Replying to @NiVZ
I’d rock the pink! It’s the clear / translucent bands that really sell me; currently rocking the gunmetal gray variety with @tahnok’s beat time app, but so far all the ones I’ve managed to find have a watch band in black. https://www.ebay.com/itm/183499601254
(original)
Replying to @NiVZ
haha $40 was a bit steep, especially since I already have a few different styles from eBay that I haven’t yet turned :)
(original)
Wandering in Bushwick with my sis; stopped at a small boutique. I’ve never seen the blue or pink varieties IRL, but it’s fun to know that they’re both compatible with the Sensor Watch board swap.
(original)
Replying to @_nitz
I tend to need something with a bit more energy. https://mobile.twitter.com/vonrosceau/status/1389740375275888640
(original)
Replying to @josecastillo
teh code. Blink works directly with the SLCD hardware; still using ASF for the animation bits. I’d love to replace all that code with our own stuff. but I’m trying to balance my time between writing new things, rewriting old things and getting things done. https://github.com/joeycastillo/Sensor-Watch/commit/84c0fbfa2a68dc3c29b989947567d111e70a037b
(original)
Replying to @keesplattel
yea the more I look at it, the more I realize, it’s just not possible with the F-91W LCD layout and this chip’s animation function. Which, like, isn’t surprising; I’m already pushing this little piece of glass so far beyond what it was originally designed for :)
(original)
Replying to @ThomasCountz
Thanks! I actually do have a design for one of these chips sitting on my bench, but I haven’t gotten around to assembling it or figuring out if it will work. It should definitely fit on a sensor board inside the watch; I just haven’t assembled it yet :) https://twitter.com/josecastillo/status/1436762909456150531
(original)
Replying to @keesplattel
Would be cool but alas the order is set in the silicon by the com/seg mapping, and my segment lines aren’t laid out for it. basically these two are the first two frames, then segments F and G, then segments A and B. You can mask out segments, but it kinda just zigzags up or down.
(original)
Replying to @josecastillo
this will be useful to flash (some) letters to show an error condition (E, S, or b for battery?). The animation tho is a bit awkward because the segments aren’t in a good order. I feel lucky that it lined up with the seconds display at all, as I didn’t design around this feature.
(original)
Replying to @elmor34
Oh the Casio F-91W lasts seven years on a coin cell, but they had a bunch of very smart engineers designing a very carefully considered low-power design. I’m just a dude with a soldering iron and no prior experience writing firmware 😬
(original)
Replying to @josecastillo
the one new bit of code is the tick animation. Basically, on the SAM L22, there are a few segments that have special powers. In my case, the green segments can blink autonomously, and the red can animate. Once an animation is set, no CPU intervention is required to keep it going.
(original)
Replying to @josecastillo
this is mostly just tying two bits of functionality together in a way I didn’t expect: the ability to display a message while asleep, and the new recurring alarm function. Displaying a message takes very little power, and the alarm can wake the device once a minute to update it.
(original)
I’ve figured out how I’m going to give the watch excellent battery life AND a great UI. This display of current time + ticking animation consumes ~10µA. That’s 1.2 years of battery life. I imagine this as a “screen saver” mode, showing basic info until you press a button to wake.
(original)
Replying to @tahnok
Hope you don’t mind that I just merged it in! It was my experiment in implementing sub-second resolution, since the RTC peripheral doesn’t offer that function natively. https://github.com/joeycastillo/Sensor-Watch/commit/20db34a9c0fa3d12b2042774e541fc0bcb7fb2b6
(original)
Replying to @groguard
Sad to hear this but it’s totally understandable. I will say the Giant Board was a crowning achievement, and you did truly inspiring work. Wishing you the best in your next chapter!
(original)
here we go again!
(original)
Replying to @rglenn
I’m just using a Sensirion SCD-30 with @adafruit’s standard CircuitPython library. haven’t dug into the details, but I sense it’s doing a better job than the sensors that estimate based on VOC concentrations.
(original)
I have a CO₂ sensor running in the shop, mostly to monitor peak CO₂ levels when folks are around. Somehow tho it never occurred to me to look at the troughs. The number never goes below 420 ppm. because that’s how much CO₂ is in the air now. that’s the most there’s ever been. https://twitter.com/aallan/status/1443676316000210950
(original)
Replying to @mattk
One thing I’m realizing: for some applications (like the light meter I’m working on) timekeeping doesn’t matter, so I could save significant power by using the L22’s ultra low power RC oscillator. Obviously not accurate, but plenty good to run the LCD / offer periodic interrupts.
(original)
Someone in a GitHub comment suggested that I look for my unobtanium chip on AliExpress, and I’m confused. Is there any way this is legit? In the midst of a global chip shortage, is it possible this AliExpress seller has 865,000 of these just laying around? https://www.aliexpress.com/item/4000775253513.html
(original)
Using only a GIF, what does it look like inside your head? https://twitter.com/k8em0/status/1443439404870037508
(original)
Replying to @mattk
There’s a FREQCORR register in the SAM L22’s RTC peripheral, i haven’t written any code around it yet but it’s been thought about :)
(original)
Replying to @josecastillo
like I tried to think of a similar “we’re doing something actively bad for the world” announcement, and the first thing that came to mind was “We’re buying whatever-the-opposite-of-carbon-offsets are,” and it took me a second to realize that that’s basically this.
(original)
twitter does a lot of things that make me consider moving to another platform, but if they actually did this, I think most of my feed would jump ship. https://twitter.com/TheSmarmyBum/status/1443259893411049475
(original)
Replying to @willianpaixaoo and @tahnok
Not sure yet! My goal at the moment is to deliver the hardware + a well-constructed SDK that empowers folks to build their own software for the watch. Specific features like that are out of scope for me right now, tho eventually I’ll prolly want to build my own great watch app :)
(original)
my sis knows what’s up.
(original)
Replying to @josecastillo
also I should clarify, because I realize I may have worded this poorly: @tahnok’s app is awesome, and was never wrong at all! It showed full beats, sans the fractional part, which didn’t require fast updates. I just added the fractional bits today while playing with the new code.
(original)
Replying to @attiegrande
You can, and it is! Indirectly anyway. There’s a clock controller that divides the 32.768 kHz crystal output down to 1024 Hz, which it feeds to the real-time clock. The RTC then divides it in half ten times to count seconds. These interrupts are all from its last eight divisions.
(original)
Replying to @josecastillo
Question: does this chew up more battery power? Answer: Yes, but only about 15 microamperes worth. It’s still using the low power RTC peripheral to deliver these periodic interrupts (from 1 to 128 Hz at powers of two), so we avoid the overhead of using a timer/counter peripheral.
(original)