Joey Castillo is starting to develop a quite the range of Oddly Specific Objects.
From his hugely well received Open Book project, which aims to do away with the DRM that dominates the digital reader platform, to his beautifully named Hiking Log — it's a hiking logger, craftily disguised as... well, yeah... a log.
Despite the tongue-in-cheek naming of these projects, there's no joking about in how they tend to deliver on their objectives. So it's with a more serious eye that Castillo has now turned his attention on to thinking about ways to help get a handle on some of the highs — and lows — of health tracking, through temperature monitoring, and other tell tale signs that our bodies might use to indicate that something isn't quite right with us.
Rather than leave us looking like Pinhead himself, Castillo swapped out the pin headers normally found along the sides of this strikingly familiar board outline to allow this Feather to be neatly tucked inside the brim of your cap, just as you might have done in times of yesteryear.
However, unlike a bird feather that might potentially be carrying some nasty avian flu, this Feather is intended to help in the fight against such nasties!
The last week has seen us take a look at one of the the lower power family members of the ever popular Microchip SAM product range, the SAM L21. Sibling to the well-known SAM D21, there's an olympic athlete in that family tree that Castillo has put into place here, in choosing the SAM D51 to pull all his peripherals into playing nicely with each other!
Here's a full feature set:
- Microchip ATSAMD51G19A — This capable microcontroller should serve well as a platform for whatever sensor solutions Castillo can come up with!
- One STEMMA port, and one STEMMA-QT port — Give some nice connectivity with existing hardware
- 4 MB QSPI Flash — Ooodles of space for code and data storage!
- On-board side-view NeoPixel — Handy for some eye catching status feedback!
- A Diodes Inc PAM8301 mono D-Class Amp — For those important alerts, nothing beats a bit of "beep beep"!
- A Maxim DS3231 RTC — Although the SAM D51 supports RTC operation with it's internal low power clock allowing it to keep tabs on time, backed by an on board battery, the DS3231, with it's incredibly accurate built in crystal, is a plug-and-play RTC option that's been proven time and time again!
The SAM D51 is a phenomenal powerhouse of a part. Finding widespread reception within the Adafruit Grand Central range of boards, along with the very cool, dual-display MONSTERM4SK, it's been proven to be a processor that can handle practically anything you can chuck at it, including the somewhat resources peckish CircuitPython environment!
With a fairly busy schematic, there's a lot going on inside this Fez-mounted feather board. If all you're after is temperature data, this is a functional logger in its own right! With all the flash you can shake a stick at, and a standalone RTC for recording date and time stamps to denote your data points, this board can quite happily log away the low and hight it sees on it's 10K NTC thermistor.
A thermistor is a simple way to get some real world data, but given the hugely non-linear response of these parts, and the less than optimal interface against the target body, this data is probably best left suited to serving as a reference of what the ambient conditions were up to, more than anything that indicates the state of the patient!
Thankfully, the D51 has oodles of memory with which to store and process the Steinhart Hart coefficients and equation that lets Castillo work out the temperature from the measured resistance value. Proper measurement is never as straightforward as it first seems, but it's worth making the effort when working with this field of exploration — biology offers only a subtle set of signs and signals for us to make sense of when to comes to sniffing out symptoms that something is amiss.
I mentioned earlier that you might also find the SAM D51 used here, on the awesome MONSTERM4SK, designed by Phil Burgess (@paintyourdragon). One good turn deserves another when it comes to inspiration, and the unique pinout that was selected for the expansion header on the MONSTERM4SK board has some advantages that make it incredibly well suited to being used as a sensor expansion interface in this application.
Owing to the pin function selection matrix functionality found within the D51, careful consideration in the choice of pins routed to this connector can give a software reconfigurable function, such that it can serve as a SERCOM port — SPI, I2C, UART — a slew of analog inputs, additional GPIO or a mixture of, all depending on what the pins are set up to do.
As laid out below, it's hard to think of many sensors on the market that would require much more support than what is available with this header!
This opens up the door to a whole world of daughter boards, perfect for testing out new sensor technologies, without needing to respin the main processor board each time. With biological sensing notoriously tricky to tease reliable data out from, being able to rapidly iterate through new sensor ideas and implementations is an increasingly important part of this project.
Sometimes, however, you just need to go to the shop to get some milk, so you take the push bike. Sure, It's a little lower frills, but it gets the job done, and it's a hell of a lot cheaper to produce, and maintain.
With a component selection that you can solder together without the need for a reflow oven — well, maybe save for the LIS2DH accelerometer! — this minimalist version of it's fully-featured, feather-shaped family member still serves as a solid platform for sensor applications.
The SAM D51 is replaced by its bare-bones baby brother, the SAM D11. Still a Cortex MCU, this SOIC shaped sibling dials down the power consumption thanks to it's M0+ core.
With the same on board 10K NTC thermistor found on the larger sensor cap board, this little logger can still keep tabs on temperature, perhaps limited only by its lack of external SPI Flash.
Instead, data points here will have to be dealt to the internal flash memory of the device, with core functional code still leaving a few Kb for sample data!
With the core logger functionality locked down, the sensor boards are as free to be as oddly specific as it sees fit.
With experiments already underway for add-ons such as this pulse oximetry daughterboard, Castillo it making headway on the sensing capabilities of his high tech headwear.
By using a phototransistor to measure the difference in intensity of reflected light for both red, and infrared wavelengths, you can work out the oxygen content of blood as it flows beneath the skin that is being illuminated. With a high enough sampling rate, you can also determine pulse rate, so it's a very cost effective method — needing only two LEDs, an the phototransistor.
It's such a popular method, that manufacturers now often sell bi-color, dual LED packages, with outputs optimized for this very application, such as the SunLED XZM2MRTNI45SC2C used on this board.
That's just one potential idea, and is a pretty spartan suggestion of what sort of sensors could suffice.
At the other end of the feature set spectrum, the I2C Combination board (seen below) is a great example of the extent of what you can tether to the other end of that 9-pin extension cable
Packed out with parts, this board makes use of both the analog, and I2C interfaces found on the expansion header. Not only is there an ADXL345 tri-axial accelerometer, but there's also a tiny SOT23-6 PAM831 D-Class, mono channel amplifier, to drive the surface mount speaker placed next to it.
While it's not going to be able to offer you audiophile grade output, the SAM D51 should be more than able to serenade you with some subtle, synthesized tones.
With the inclusion of a high spec ADT7410 on this board, here is where the really useful temperature data is going to come from. With a default 13-bit ADC readout to monitor and digitize temperature to a 0.0625°C resolution (user adjustable to 16-bit maximum!) and a wide range of guaranteed accuracy (±0.4°C from −40°C to +105°C @ 3V), this is a solid choice, with medical applications cited at the top of its intended industry list.
Product development can be hard, and effective testing even harder, so we're glad to see that Castillo is committed to the cause, with his steadfast work ethic seeing him spending hours soaking away in his hot tub, trying to trip the temperature alarm trigger points of his logger. It's a chore we're sure, but we're happy to see his commitment to the task — someone has got to put in the extra hours in these tough working conditions, so Castillo is really taking one for the team here!
If you're looking to keep tabs on your temperatures, you can try out this tech by tricking out your own trilby — jump on over to Castillo's project GitHub page, where you can find the hardware files, along with code examples for the CircuitPython environment running on the boards.