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
Adafruit publishes a wide range of writing and video content, including interviews and reporting on the maker market and the wider technology world. Our standards page is intended as a guide to best practices that Adafruit uses, as well as an outline of the ethical standards Adafruit aspires to. While Adafruit is not an independent journalistic institution, Adafruit strives to be a fair, informative, and positive voice within the community – check it out here: adafruit.com/editorialstandards
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.
Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.