Air Velocity Sensor Breakout - FS3000 Hookup Guide

Pages
Contributors: QCPete, Ell C
Favorited Favorite 0

Introduction

Need to keep track of the airflow in your data center or around your servers? How about making sure your HVAC and air control systems are functioning at full capacity? Or, if you're more fun, what about figuring out how fast your RC airplane is going? Well, the new SparkFun Air Velocity Sensor Breakout - FS3000 can help you with all that and more! It's super easy, super Qwiic to hookup, and super fun to play with. Let's have a look!

SparkFun Air Velocity Sensor Breakout - FS3000-1005 (Qwiic)

SparkFun Air Velocity Sensor Breakout - FS3000-1005 (Qwiic)

SEN-18377
$49.95

Required Materials

To follow along with this tutorial, you will need the following materials. You may not need everything though depending on what you have. Add it to your cart, read through the guide, and adjust the cart as necessary.

Suggested Reading

If you aren't familiar with the Qwiic system, take a look here for an overview.

Qwiic Connect System

We also recommend taking a look at the following tutorials if you aren't familiar with the concepts covered in them.

What is an Arduino?

What is this 'Arduino' thing anyway? This tutorials dives into what an Arduino is and along with Arduino projects and widgets.

Installing Arduino IDE

A step-by-step guide to installing and testing the Arduino software on Windows, Mac, and Linux.

Logic Levels

Learn the difference between 3.3V and 5V devices and logic levels.

Hardware Overview

FS3000

The FS3000 is a surface-mount type air velocity module utilizing a MEMS thermopile-based sensor. It features a digital output with 12-bit resolution and comprises a “solid” thermal isolation technology and silicon carbide coating to protect it from abrasive wear and water condensation. For more in depth information on this chip, please refer to the datasheet.

FS3000 Sensor is highlighted

Qwiic Connectors

Our Qwiic Ecosystem makes sensors pretty much plug and play. There are two Qwiic connectors on either side of the Qwiic Air Velocity Sensor board to provide power and I2C connectivity simultaneously.

The I2C address of the board is 0x28.

Qwiic connectors on either side of the board

Pins

Power

Ideally, power will be supplied via the Qwiic connectors on either side of the board. Alternatively, power can be supplied through the header along the bottom side of the board labeled 3V3 and GND. The input voltage range should be between 2.7-3.3V. The usual current draw is around 10mA.

Power pins are the two pins on the far right of the six pins at the bottom of the board

I2C

The I2C pins break out the functionality of the Qwiic connectors. Depending on your application, you can connect to these pins via the plated through holes for SDA and SCL.

I2C Pins are the two pins in the middle of the six pins at the bottom of the board

VCM and ADCR

VCM is an output from the sensor that provides a common bias voltage. With a power supply voltage at 3.3V (usual for Qwiic), the VCM pin will output 1.25V. The current datasheet does not provide any more information about this pin, however, it is most likely a bias voltage used with some sort of analog gain stage internal to the sensor (prior to it's internal ADC). This can be useful for unique more advanced projects that may benefit from having a known bias voltage tied to another analog system.

ADCR stands for ADC Reference. This is an input to the FS3000 which allows you to provide a reference voltage for the sensor's internal ADC. Note, you must first cut the "ADC-REF" jumper (on the bottom side of the board) before providing a custom voltage to this pin. By default, it is connected to VDD.

VCM and ADCR pins are the two pins on the far right of the six pins at the bottom of the board

Jumpers

LED

If power consumption is an issue, cutting this jumper will disable the Power LED on the front of the board.

LED Jumper is located on the right side of the board

ADC-REF

Cut the ADC-REF jumper to provide your own custom ADC reference voltage on the ADCR header pin. By default (jumper closed), it is connected to VDD.

ADC Ref Jumper is at the top of the board

I2C

The Sparkfun Air Velocity Sensor has pull up resistors attached to the I2C bus; if multiple sensors are connected to the bus with the pull-up resistors enabled, the parallel equivalent resistance will create too strong of a pull-up for the bus to operate correctly. As a general rule of thumb, disable all but one pair of pull-up resistors if multiple devices are connected to the bus. If you need to disconnect the pull up resistors they can be removed by cutting the traces on the corresponding jumpers highlighted below.

I2C Jumper is on the left side of the board

Board Outline

The board measures 1" x 1"

Hardware Hookup

Using the Qwiic system, assembling the hardware is simple. All you need to do is connect your Air Velocity Sensor Breakout to your chosen development board with a Qwiic cable or adapter cable. Otherwise, you can use the I2C pins broken out if you do not have a Qwiic connector on your development board or if you do not want to use a Qwiic connection. If you are not using a Qwiic-enabled board, make sure your input voltage and logic are either running at 3.3V or you are shifting the logic level from whatever logic your controller runs at to 3.3V.

Plug the qwiic connector to the sensor and the redboard - voila!

Software Setup and Programming

Note: Make sure you are using the latest stable version of the Arduino IDE on your desktop.

If this is your first time using Arduino, please review our tutorial on installing the Arduino IDE. If you have not previously installed an Arduino library, please check out our installation guide.

SparkFun has written a library to work with the Qwiic Air Velocity Sensor. You can obtain this library through the Arduino Library Manager by searching for "FS3000". Find the one written by SparkFun Electronics and install the latest version. If you prefer downloading libraries manually, you can grab them from the GitHub Repository or by clicking on the button below.

Readings

The FS3000 has a response time of 125ms. In the provided example, we are only taking readings from the sensor once per second, so this is well above the response time. If you wish to take a higher frequency of readings, make sure to add in at least a 125ms delay in between each read.

To calculate or understand airflow and how it relates to diameter, you can use this tool.

Functions

Below is a list of the functions that can be used with the Air Velocity Sensor, along with a description of what each function does and how to use it.

  • FS3000() - Base constructor
  • begin() -- Initialize the sensor. Returns false if sensor is not detected.
  • isConnected() -- Returns true if I2C device ack's
  • readRaw() -- Read from sensor, checksum, return raw data (409-3686)
  • readMetersPerSecond() -- Read from sensor, checksum, return m/s (0-7.23)
  • readMilesPerHour() -- Read from sensor, checksum, return mph (0-33ish)
Note: If you are using a board with an Apollo core, please note that 100KHz on the Apollo 2.1.1 doesn't currently work. You will need to use 400KHz, or jump back to Apollo 2.1.0.

Example Code

Once you've installed the FS3000 library, you should see File > Examples > SparkFun_FS3000_Arduino_Library > Example01_BasicReadings to open the example sketch.

Finding the example


Alternatively, you can copy and paste the code below into a fresh Arduino sketch.

language:c
/******************************************************************************
  Example_01_BasicReadings.ino

  Read values of air velocity from the FS3000 sensor, print them to terminal.
  Prints raw data, m/s and mph.
  Note, the response time on the sensor is 125ms.

  SparkFun FS3000 Arduino Library
  Pete Lewis @ SparkFun Electronics
  Original Creation Date: August 5th, 2021
  https://github.com/sparkfun/SparkFun_FS3000_Arduino_Library

  Development environment specifics:

  IDE: Arduino 1.8.15
  Hardware Platform: SparkFun Redboard Qwiic
  SparkFun Air Velocity Sensor Breakout - FS3000 (Qwicc) Version: 1.0

  Artemis Redboard @ 400KHz (Core v2.1.0) 
  (note, v2.1.1 has a known issue with clock stretching at 100KHz)  

  Do you like this library? Help support SparkFun. Buy a board!

    SparkFun Air Velocity Sensor Breakout - FS3000 (Qwicc)
    https://www.sparkfun.com/products/18377

  Hardware Connections:
  Use a qwiic cable to connect from the Redboard Qwiic to the FS3000 breakout (QWIIC).
  You can also choose to wire up the connections using the header pins like so:

  ARDUINO --> FS3000
  SDA (A4) --> SDA
  SCL (A5) --> SCL
  3.3V --> 3.3V
  GND --> GND

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/

#include <Wire.h>
#include <SparkFun_FS3000_Arduino_Library.h> //Click here to get the library: http://librarymanager/All#SparkFun_FS3000

FS3000 fs;

void setup()
{
  Serial.begin(115200);
  Serial.println("Example 1 - Reading values from the FS3000");

  Wire.begin();

  if (fs.begin() == false) //Begin communication over I2C
  {
    Serial.println("The sensor did not respond. Please check wiring.");
    while(1); //Freeze
  }
  Serial.println("Sensor is connected properly.");
}

void loop()
{
    Serial.print("FS3000 Readings \tRaw: ");
    Serial.print(fs.readRaw()); // note, this returns an int from 0-3686

    Serial.print("\tm/s: ");
    Serial.print(fs.readMetersPerSecond()); // note, this returns a float from 0-7.23

    Serial.print("\tmph: ");
    Serial.println(fs.readMilesPerHour()); // note, this returns a float from 0-16.17

    delay(1000); // note, repsone time on the sensor is 125ms
}

Set your Board and Serial Port, and then upload the sketch to your Arduino. Then open the serial monitor. Make sure your baud rate is set to 115200. You'll begin to see output, including raw data and translated miles per second and miles per hour.

Serial Monitor Output

Note that peak in the middle of the readings? That's where I pointed the sensor at the fan!

Troubleshooting

Resources and Going Further

For more on the Air Velocity Sensor Breakout, check out some of the links below:

Need some inspiration for your next project? Check out some of these related tutorials:

AS726X NIR/VIS Spectral Sensor Hookup Guide

It's now easier than ever to measure and characterize how different materials absorb and reflect different wavelengths of light. The AS726X spectral sensors allow you to detect wavelengths in the visible range (VIS) and near infrared range (NIR)!

Qwiic Proximity Sensor (VCNL4040) Hookup Guide

The SparkFun Qwiic Proximity Sensor is a great, qualitative proximity (up to 20 cm) and light sensor. This hookup guide covers a few examples to retrieve basic sensor readings.

Programming the SparkFun Edge with Arduino

Running low-power machine learning examples on the SparkFun Edge can now be done using the familiar Arduino IDE. In this follow-up to the initial Edge tutorial, we'll look at how to get three examples up and running without the need to learn an entirely new SDK.

SparkFun Qwiic 3-Axis Accelerometer (ADXL313) Hookup Guide

Let's get moving with the SparkFun Triple Axis Digital Accelerometer Breakout - ADXL313 (Qwiic), a low cost, low power, up to 13-bit resolution, 3-axis accelerometer with a 32-level FIFO stack capable of measuring up to ±4g. This hookup guide will get users started reading measurements from the ADXL313, by Analog Devices, with an Arduino microcontroller, Jetson Nano, or Raspberry Pi.