Author Archives: Avra Saslow

Remote Industrial VOC Sensor Using Ethernet

via SparkFun: Commerce Blog

For a while now, I've been curious just how poor the air quality around me gets when I'm soldering. It never really feels like it's that good, and I always try to limit the my time and exposure to the fumes, but it would be interesting to actually gather the numbers.

When the new MicroMod Ethernet Function board came across my desk, I knew it would be ideal for testing out this curiosity (and not just because of the lack of soldering needed to set the project up!). I wanted to use the Ethernet function board with the Environmental Function board and the MicroMod Teensy Processor as it's probably the quickest way to put together this project. The Ethernet adds value to the project because it makes it applicable in an end-use industrial environment. It would be great to monitor the air quality of the soldering station here at SparkFun all day, from my desk, as people come and go to solder. I chose the Teensy Processor board as they've got a really easy Ethernet library to use for this W5500 chip.

SparkFun MicroMod Ethernet Function Board - W5500

SparkFun MicroMod Ethernet Function Board - W5500

SparkFun MicroMod Environmental Function Board

SparkFun MicroMod Environmental Function Board

SparkFun MicroMod Teensy Processor

SparkFun MicroMod Teensy Processor


The Hookup

The Hookup is about as simple as it gets! All you need is a screwdriver. However, I will say that when using two function boards like we're doing, it's important to make sure they are fully set in the M.2 connector, and also to tighten all of the screws equally (not move from one to the other).

alt text

The Code The code is also fairly simple, it's just a mixture of creating a web server and sending the VOC levels from the SGP40 to that server.

  Industrial air quality remote sensor

 A simple web server that shows the VOC levels using a Teensy Processor board,
 the MicroMod Ethernet Function board and the MicroMod Environmental Function board. 

 Taken by Paul Clark's SGP40 code and the built in Arduino example for an Ethernet
 web server, thanks to David A. Mellis, Tom Igoe and Arturo Guadalupi


#include <SPI.h>
#include <Ethernet.h>
#include "SparkFun_SGP40_Arduino_Library.h" // Click here to get the library: http://librarymanager/All#SparkFun_SGP40
#include <Wire.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = {
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
IPAddress ip(192, 168, 1, 177);

SGP40 mySensor; //create an object of the SGP40 class

// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);

void setup() {
  Ethernet.init(10);  // For the Teensy

  // Open serial communications and wait for port to open:
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  Serial.println("Ethernet WebServer Example");

  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);

  // Check for Ethernet hardware present
  if (Ethernet.hardwareStatus() == EthernetNoHardware) {
    Serial.println("Ethernet shield was not found.  Sorry, can't run without hardware. :(");
    while (true) {
      delay(1); // do nothing, no point running without Ethernet hardware
  if (Ethernet.linkStatus() == LinkOFF) {
    Serial.println("Ethernet cable is not connected.");

  // start the server
  Serial.print("server is at ");


  if (mySensor.begin() == false)
    Serial.println(F("SGP40 not detected. Check connections. Freezing..."));
    while (1)
      ; // Do nothing more


void loop() {
  // listen for incoming clients
  EthernetClient client = server.available();
  if (client) {
    Serial.println("new client");
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c =;
        // if you've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println("Connection: close");  // the connection will be closed after completion of the response
          client.println("Refresh: 5");  // refresh the page automatically every 5 sec
          client.println("<!DOCTYPE HTML>");
          clinet.println("VOC Index is");
          client.println("<br />");
        if (c == '\n') {
          // you're starting a new line
          currentLineIsBlank = true;
        } else if (c != '\r') {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
    // give the web browser time to receive the data
    // close the connection:
    Serial.println("client disconnected");


Okay, time to test it out and see how the air quality changes when we solder! I found that it took a bit of time for the SGP40 to just calibrate to the room's natural VOC level. And there's probably some specific distance that the sensor should sit from the soldering station, but I thought since I sit so close to the fumes, the sensor should be equally close. Turns out, even with the lead free solder, the VOC levels still skyrocketed above the normal VOC numbers.

Project Test

I suppose I'm not surprised; soldering is still introducing new compounds into the air that add to the VOC level. But it was still a good way to build an air quality sensor that can be monitored from anywhere in the building - not just at the soldering station on the serial monitor. And in this case, ethernet was one of the fastest ways to bring this project into the internet space. There are, of course, other ways to build a similar unit, depending on what you have...this could have also been done with a single Ethernet function board and a Qwiic environmental sensor. And of course, there are always ways to make an HTML web server page more spiffy, so that's something to explore too.

My question for you is what other applications might you chose Ethernet over other IoT protocols? When does it serve you best? Comment below, thanks for following along, and happy hacking!

comments | comment feed

Precision Meets Customization Meets…You! Meet the MicroMod GNSS Carrier Board!

via SparkFun: Commerce Blog

As you can probably tell with the last few product releases, we're really excited about all things geospatial. One of our larger recent product releases, the new SparkFun MicroMod GNSS Carrier Board, exemplifies everything that is so revolutionary in that space right now. This board, equipped with the ZED-F9P chip from u-blox, sits at the convergence of highly-precise and highly-configurable. Plus, being a MicroMod board, it is part of a highly-customizable ecosystem that makes it easy to utilize different processors depending on your specific project needs.

SparkFun MicroMod GNSS Carrier Board (ZED-F9P)

SparkFun MicroMod GNSS Carrier Board (ZED-F9P)


Overview of the board

The ZED-F9P chip on the SparkFun MicroMod GNSS Carrier Board is a top-of-the-line module for high accuracy GNSS and GPS location solutions, including RTK, capable of 10mm, three-dimensional accuracy. With this board you will be able to know where your (or any object's) X, Y, and Z location is, roughly within the width of your fingernail! The ZED-F9P is unique in that it is capable of both rover and base station operations. Utilizing the M.2 and Qwiic connectors, no soldering is required to connect it to the rest of your system. However, we still broke out 0.1"-spaced pins in case you prefer to use a breadboard to attach additional peripherals.

To properly utilize this kind of module, you'll want to use an antenna that can get a clear view of the sky. It will need to be one that is robust enough to be outside, has long cable, and has an SMA connector.

The Taoglas AA.200 MagmaX2 Multiband GNSS Magnetic Mount Antenna is a good choice for the job. It can access most major constellations including GPS (L1/L2/L5), GLONASS (G1/G2/G5), Galileo(E1/E5a/E5b) and BeiDou(B1/B2). The AA.200 antenna is an active multiband GNSS magnetic mount antenna that exhibits excellent gain and good radiation pattern stability. The combination of these elements help ensure the best possible positional accuracy for systems where RTK is enabled and disabled.

MagmaX2 Active Multiband GNSS Magnetic Mount Antenna - AA.200

MagmaX2 Active Multiband GNSS Magnetic Mount Antenna - AA.200


Lastly, you'll need to pick up a processor board of your choosing; you can use our comparison chart to decide, or try a few out!

SparkFun MicroMod Artemis Processor

SparkFun MicroMod Artemis Processor

SparkFun MicroMod Teensy Processor

SparkFun MicroMod Teensy Processor

SparkFun MicroMod ESP32 Processor

SparkFun MicroMod ESP32 Processor

SparkFun MicroMod RP2040 Processor

SparkFun MicroMod RP2040 Processor

SparkFun MicroMod SAMD51 Processor

SparkFun MicroMod SAMD51 Processor

SparkFun MicroMod nRF52840 Processor

SparkFun MicroMod nRF52840 Processor

SparkFun MicroMod STM32 Processor

SparkFun MicroMod STM32 Processor


As usual, we produced a product showcase that goes through the board specs and capabilities in depth. We also included a more complete understanding of the many different GNSS technologies that the ZED-F9P chip utilizes, as well as different software platforms to make full use of the module.

The showcase highlights all the satellite constellations the ZED-F9P can communicate with!

How to configure using u-center

For any board based on u-blox chip, using u-center, a Windows free software tool, is an easy way to configure your receiver. We have a robust beginner tutorial on connecting your receiver with u-center through configuring your COM port and baudrates. Make sure that your antenna has a clear view of the sky, and once you're connected you'll see a breadth of data appear.

u-center dashboard
The u-center main dashboard

There are two things to note in the next screenshot - firstly, that the receiver is acquiring data from multinational satellite constellations, meaning it is a proper GNSS tool. You can see on the right hand side that is communicating with GPS, GLONASS, Galileo, and BeiDou satellites. You can also see, in the second screenshot, that the module sis communicating with 25 satellite units at the moment, so it is gathering a lot of information. The other thing to note, is that without any correction data, the module is within 2 meters of accuracy. We have a tutorial on using NTRIP to stream correction data to your device using both u-center and other platforms.

accuracy without NTRIP
Without any correction data, the ZED-F9P module is still within 2 meters of accuracy!

Not only is the module receiving data from 25 SVs, but they are from each of the international satellite constellations.

There are multiple menus to utilize within u-center, one of which is the maps menu. By using Google Maps Static API, you can visualize the module spatially, as well as add speed vectors and scales. You'll need to add billing information to your Google Developer profile for the API to work properly.

google map
Go to Tools -> Preferences -> Access Tokens to add your Static Google API key.

There's also preferences for creating a Google Earth Server that will track in real time where your module is.

A key use case for a receiver as precise as this one is the ability to geofence, or create a boundary for the module's location. If the module leaves that boundary, then the user is notified that it has left that radius. U-center makes it easy to set this tool up. Within the configuration menu, you can set the latitude and longitude of the location, as well as radius that will serve as the boundary. Then, in the messages menu, under NAV, you'll be able to track whether the module is inside or outside of that radius you set up.

setup geofence
Within u-center, it's easy to set a boundary for geofencing.

test geofence
You can watch if your module is inside or outside of your designated geofence!

U-center is a dense but extremely useful program for utilizing your GNSS receiver to it's full potential. There's tons more information not included in this blog, like logging data into a database, utilizing camera view, and so much more. If you're interested in these features, check out the in-depth user guide, or comment below on what parts of the software you'd like us to dig into to help you with your projects. In the meantime, put that brand new MicroMod GNSS Carrier Board to good use, and track where it is (and isn't) at all times. Happy Hacking!

comments | comment feed

Home Automation with a Raspberry Pi and Homebridge

via SparkFun: Commerce Blog

It’s officially 2022, and I want to wish you all a safe and happy New Year!

The New Year is, of course, a wonderful time to reset and reflect on all facets of life, but it is also an ideal opportunity to scheme up and prepare for any project ideas that you might want to explore this year. Imagining the creative electronic endeavors you would like to engage in this year can be done in many different ways. It could be as simple as learning a new concept, like FPGA or GNSS, or brainstorming ways to get started using unfamiliar technology, or setting aside the time to work on that large-scale project you’ve always wanted to build.

For me, as it becomes ever more apparent that our time working at home isn’t going away anytime soon, I am increasingly interested in home automation. Many of you might be too, especially since I imagine some of you have bought or received some of the latest in tech over the holidays - an Alexa, a Google Home, or a Ring.

It feels like a golden age to be interested in home automation, as many of the Tech Giants are finally developing connections between their software and tangible hardware solutions. For example, since Apple has developed HomeKit, it has expanded the Apple ecosystem to be compatible with hundreds of third party devices out there. You could easily set up HomeKit in your home to build automations for your sprinklers, your security systems, your lights - nearly anything.

However, there are still hundreds of smart devices that aren’t packaged nice and neat within the Tech Giant’s software systems - they are tied to their own walled ecosystems. So if you’ve recently received an Apple HomeKit, Google Home, or Amazon Alexa, how can you connect nearly any smart accessories and service you want without worry of incompatible software?

The answer lies with a Raspberry Pi and an operating system called Homebridge. Too vague of an answer? Not to fret, we’ll jump right into what that entails!

So what is Homebridge?

Homebridge, as perfectly described by David Ludlow from The Ambient, is,

“Homebridge is, as the name suggests, a bridge between HomeKit and other smart home devices. A lightweight NodeJS server that emulates the iOS HomeKit API, Homebridge is open-source software that provides the support that's lacking from the platform."

HOOBS is a more user-friendly dashboard, or a user interface (UI), that runs on Homebridge.

What this mean is that Homebridge is an operating system that can be flashed onto your Raspberry Pi instead of a traditional OS like Raspbian. It allows you, through its simple user interface dashboard, to install any number of plugins and connect to it larger home automation systems like HomeKit. They have ~3,000 plugins and counting, so nearly any smart accessory that you could buy can be easily connected to your overall automation systems. Plus, it has a large community behind the framework, so there's a good chance someone has built a plugin for you smart device, and if not, you can write one yourself.


If you have a Raspberry Pi and are interested in creating more home automations for yourself, I found this tutorial an excellent resource for instructions on how to flash the OS onto the Pi, load the dashboard, install plugins, and connect into HomeKit.

The first place to start is with downloading the OS; you can install the traditional Homebridge version, or HOOBS, which has a more buffed out UI.

From there, you can use the tutorial as a starting point to set up your system and extend it your specific needs, either with using different plugins, or different systems other than HomeKit (Alexa or Google Home).

Let us know if you end up using Homebridge + a Raspberry Pi to build home automations using your new tech toys! We'd be interested to hear which plugins interest you the most, and what you think of the overall system. Hopefully, this inspires some projects to keep you busy and learning at home in the New Year. Happy home automation hacking!

comments | comment feed

Finding Missing Objects with GPS

via SparkFun: Commerce Blog

You know how wonderful it is that our products have crisp, high resolution, large photos? You can zoom in and see every single aspect and component on the PCB. Well, that's thanks to SparkFun's meticulous photographer, Juan. He came to me a few weeks ago with a problem he was facing in one of his other interests: disc golf.

alt text
Juan showing off how it's done!

For those unfamiliar with disc golf, it's a game that is played pretty much the same as it sounds. It follows similar rules as golf...there are "holes," which are baskets, and instead of using a golf club and balls, one uses a frisbee to throw at the target. Similar to golf, it's played over a vast area of land between brush and trees, and there are different discs that fly better for long distance vs. short distance.

It's clear, once you understand the game, that it could be problematic to lose a disc if you had a bad throw, and it would be quite time consuming to find it if it flew into a swamp or thick brush. Juan and I wanted to build a better method for locating a disc when a throw goes awry.

I realized that this problem extends to any object that might be subjected to getting lost, and there are many different technologies that could be used to locate something. So, we decided we would try out a plethora of different technologies to find the best one for the specific purpose of finding a lost disc. That means it has to be as lightweight and inconspicuous as possible, as a heavy build would completely mess up the way a disc flies, and thus, your accuracy.

Different discs
Different disc types for different distances

First try with the obvious choice for positioning: GPS

My first thought was if you need to find the position of an object, the best method to do that would be with GPS. The SparkFun XA1110 Qwiic GPS Breakout was the smallest module I could find that would be able to do basic positioning. However, the footprint and weight start to add up when you consider that in conjunction, the module requires both a microcontroller and power. But, it's easy to build an interface with Blynk to track the module's location from an app or the web.

SparkFun GPS Breakout - XA1110 (Qwiic)

SparkFun GPS Breakout - XA1110 (Qwiic)


Juan and I visited our local disc golf course and tested out just how heavy and cumbersome it would be to attach a microcontroller and module on the underside of disc. Some immediate issues came up: The weight definitely affects the throw, and the the module would need an extra casing to protect from impact damage and environmental damage (possibly water, dust, etc.)

Disc Golf
Will the disc make it into the target? Probably not, as I threw it

So, off the bat, it seems that while GPS has the capabilites to track a disc, the footprint is too large to make much sense. I suppose that means we should look at other means of technology to find a better method...perhaps an RFID sticker that could be attached to the disc to ensure it doesn't affect the game? Or maybe an Airtag that's lightweight and can be integrated into the Apple ecosystem? We'll try those out next time, so stay tuned, and if you have ideas, feel free to help us save some experimentation time in the comments!

comments | comment feed

DIY Rat Race to the Pub with the LTE GNSS Breakout Board

via SparkFun: Commerce Blog

Rob, Cassy and I all have jam-packed life schedules, but always enjoy coming together to enjoy a drink and talk about the mysteries of the ancient Roman aqueducts, or speakeasies in London.

In an attempt to meet up more often, we decided to build a pop-up party planner that would help us to find each other's locations and all meet at the same place.

However, there's a catch to this pop-up planner: Whoever arrives last has to buy the first round of drinks, so it's critical that once a text message is received, we race to the coordinates.

Of course, the perfect board for this is the new SparkFun LTE GNSS Breakout - SARA-R5, because it combines a 5G-ready wireless IoT device using the UBX-R5 cellular chipset, with the ability to gather positional data with the M8 GNSS receiver chipset. This is really ideal, because what good is knowing where you are, or something else is, if you can't communicate that to others? This breakout board specifically addresses that.

SparkFun LTE GNSS Breakout - SARA-R5

SparkFun LTE GNSS Breakout - SARA-R5


It's like peanut butter and jelly; GNSS and cellular!

We set out to develop the device in an enclosed briefcase for maximum transportability and discreteness, that sends the positional data of its location whenever the big red "party time" button is pressed. We also used the Artemis RedBoard and an external antenna for the project.

Party Planner

Essentially, the project combines two of the focal examples that come in the Arduino library: Example 1, which gathers the positional data, and Example 6, which sends SMS messages using the SARA. Now, it's triggered by the button to collect the positional data and communicate that via SMS, so it's really just simple code design - a button triggers data collection, which is then communicated cellularly.


It's also a helpful reminder that you don't always have to build code from scratch. One of the most efficient ways to develop the software for your project is to piece together code snippets for your specific needs!

So, whether you too want a party planner for your friends, or you want to develop an asset tracker for your unmanned vehicles, you can utilize the SparkFun LTE GNSS Breakout - SARA-R5 for whatever unique project you might have.

And be sure to watch the video to see who has to buy the first round...

comments | comment feed

Introducing the Machine Learning @ Home Kit Hookup Guide

via SparkFun: Commerce Blog

This past spring, we were excited to announce our newest kit for the NVIDIA Jetson Nano lineup - the Machine Learning @ Home Kit.

SparkFun Machine Learning @ Home Kit for NVIDIA Jetson Nano

SparkFun Machine Learning @ Home Kit for NVIDIA Jetson Nano


As a refresher, you can check out the in-depth description of the new kit in our on-demand NVIDIA GTC session.

This robust kit is a progression from the baseline NVIDIA DLI Course Kit and supplements it with the addition of Qwiic sensors, displays, and motor controls to enhance the capabilities of your machine learning models. This enables you utilize machine output and interaction in your everyday life.

We're now releasing the "living hookup guide" that accompanies this kit and walks you through real home applications that you can implement yourself.

This guide is an extension of NVIDIA's Getting Started with AI on Jetson Nano course, so it's important to review that as well. With the kit's half dozen additional hardware pieces to use in your machine learning models, there are countless project that can be built. Thus, this hookup guide will be "living", meaning it will be iterated upon periodically and projects will be added along the way. Plus, it will teach you how to actually deploy the DLI course projects beyond an example in Jupyter Notebooks!

So check out this newest hookup guide with your kit in hand, extend your knowledge, and get started building and deploying home automation machine learning models in your life!

comments | comment feed