Adafruit’s SGP30 gas sensor is calibrated out of the box to measure a large range of volatile organic compounds (VOCs) and CO2. It can actually measures with 10x more precision than the previous generation of sensors. It peaks at 60,000 PPB for VOCs. The temperature and humidity are automatically compensated for. Probably the best part is that unlike other sensors which require a 24-48 “burn in” this one requires less than 20 seconds on startup to warm up and stabilize. Since VOCs include alcohol and acetone (a by-product of ketone production) this sensor is fun to use as a breath tester. This post will focus on how to connect, enclose and view the output of the breath tester.
The Trinket M0 has a REPL>>> console which we can use to press the enter key when ready to test and view the results. After 30 seconds of gathering breath samples the code will select the highest VOC reading detected and display it for us. If we were trying to find a correlation to blood ketones and breath acetone we could record this high VOC value to the results of a blood ketone meter like the Precision Xtra from Abbott. After collecting data lots of samples from both devices we could come up with a possible correlation from breath readings to blood ketones.
Adafruit sells small modular snap boxes. These are great for a breath tester as the lid pops open to let the humidity out. All that is needed to modify the case is a 3/32″ drill bit for the mounting bolts (M2 size x 10mm). The uni-bit on the left can be used to for drill out space for a USB plug and the 1/4″ hole required for the straw. The nice thing about using drinking straws is that they are an easy way for people to share the breath tester and not share germs.
Once the components are soldered and secure in the enclose we connect via the micro USB cable to upload the code and watch the console. Here is an example from a OS/X command line. I usually just search for /dev/*modem* to find the Trinket device.
$ cp code.txt /Volumes/CIRCUITPY
$ screen /dev/tty.usbmodem1421
We are angry, frustrated, and in pain because of the violence and murder of Black people by the police because of racism. We are in the fight AGAINST RACISM. George Floyd was murdered, his life stolen. The Adafruit teams have specific actions we’ve done, are doing, and will do together as a company and culture. We are asking the Adafruit community to get involved and share what you are doing. The Adafruit teams will not settle for a hash tag, a Tweet, or an icon change. We will work on real change, and that requires real action and real work together. That is what we will do each day, each month, each year – we will hold ourselves accountable and publish our collective efforts, partnerships, activism, donations, openly and publicly. Our blog and social media platforms will be utilized in actionable ways. Join us and the anti-racist efforts working to end police brutality, reform the criminal justice system, and dismantle the many other forms of systemic racism at work in this country, read more @ adafruit.com/blacklivesmatter
Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.