Skip to main content

Quick Start

Connect the breakout over Qwiic, install the library, and print the nitric oxide (NO) concentration in ppm.

You program the controller connected to this breakout. The breakout itself is not flashed: its ATtiny404 runs factory firmware.

The board is 3.3 V only and has no regulator. The header and both Qwiic connectors share one 3.3 V supply. Do not connect 5 V to 3V3 or to the signal pins.

1. Connect the breakout board​

Plug a Qwiic cable into either Qwiic connector on the board and into the Qwiic connector on your controller. Leave the ADDRESS switch as it came, so the board answers at its default address, 0x30.

NULA DeepSleepSoldered Electrochemical NO Gas Sensor Breakout (Qwiic)
Qwiic connectorQwiic connector
Wiring diagram: the NULA DeepSleep connected to the Soldered Electrochemical NO Gas Sensor Breakout (Qwiic) with a Qwiic cable

Without Qwiic: breadboard wiring​

The board is not breadboard compatible, so wire it through its header pads with jumper wires. Use the SDA1/SCL1 pair on the top edge: it is the bus the board answers on. SDA2/SCL2 is the board's internal bus.

NULA DeepSleepSoldered Electrochemical NO Gas Sensor Breakout (Qwiic)
GNDGND
3V33V3
IO8SDA1
IO9SCL1
Wiring diagram: the NULA DeepSleep connected to the Soldered Electrochemical NO Gas Sensor Breakout (Qwiic): GND to GND, 3V3 to 3V3, IO8 to SDA1, IO9 to SCL1

2. Install the library​

Install Electrochemical Gas Sensor Soldered from its GitHub repository.

🔗Soldered Electrochemical Gas Sensor Arduino library

Verified Arduino library at commit c4df54b

→

Tip: downloading from GitHub. On the library's GitHub page, click the green Code button and choose Download ZIP, then add it in Arduino IDE with Sketch → Include Library → Add .ZIP Library....

3. Run the first example​

Open bridgeBoard from the library's examples. It creates the sensor at 0x30, the board's default address, so the library talks to the board's ATtiny404 bridge. It starts the sensor and prints a reading, waiting 2.5 seconds between readings.

Change SENSOR_CO to SENSOR_NO before you upload. SENSOR_NO is the library's preset for this board's SGX-4NO-250 cell. SENSOR_CO sets up the front end for a carbon monoxide cell, with another bias, gain and sensitivity, so its result is not NO in ppm.

The listing is the library's file at the pinned commit. Only comment lines are left out: the three that name the old connector, and the header lines that link other products' store pages.

The sketch's comment says LMPEN is hardwired to GND. On this board a 10 kΩ resistor pulls LMPEN to GND, and the pin is also wired to the ATtiny404 and the header. Either way you pass no pin for it: at 0x30 to 0x37 the library ignores the constructor's third argument.

Select Board
bridgeBoard.ino
/**
**************************************************
*
* @file bridgeBoard.ino
* @brief See how to init a sensor on the new ATtiny404 bridge board revision,
*
* To successfully run the sketch:
* - Set the desired address using the jumpers on the back of the board
* (address = 0x30 + jumper offset, giving a range of 0x30-0x37)
* - Run the sketch and open serial monitor at 115200 baud!
*
* Note: on this board revision, LMPEN is hardwired to GND, so there's
* no configPin argument to pass - the constructor's third argument
* is ignored whenever the address falls in the bridge range (0x30-0x37).
*
*
* @authors @ soldered.com
***************************************************/

// Include the required library
#include "Electrochemical-Gas-Sensor-SOLDERED.h"

// Any additional boards on the same bus just need a different jumper setting
// (0x30-0x37), same as twoSensors.ino does for legacy boards with 0x49/0x4A/0x4B.
ElectrochemicalGasSensor sensor(SENSOR_CO, 0x30);

void setup()
{
Serial.begin(115200); // For debugging

// Init the breakout
if (!sensor.begin())
{
// Can't init? Notify the user and go to infinite loop
Serial.println("ERROR: Can't init the sensor! Check connections and jumper address!");
while (true)
delay(100);
}

Serial.println("Sensor initialized successfully!");
}

void loop()
{
// Make the reading
double reading = sensor.getPPM();

// If PPB is more relevant for your sensor, you can use:
// double reading = sensor.getPPB();

// Print the reading with 5 digits of precision
Serial.print("Sensor reading: ");
Serial.print(reading, 5);
Serial.println(" PPM");

// Wait a bit before reading again
delay(2500);
}

4. Check the result​

Open the Serial Monitor at 115200 baud. When the board answers, you see this (readings in clean air; yours will differ):

Serial MonitorAutoscrollShow timestampNewline115200 baud
Message (Enter to send message to the board)
Sensor initialized successfully!
Sensor reading: 0.00630 PPM
Sensor reading: 0.00622 PPM
Sensor reading: 0.00573 PPM
Sensor reading: 0.00601 PPM

Each Sensor reading: line is one reading, with the NO concentration in ppm to five decimals and PPM at the end. The library reports a negative result as 0.00000.

If you see ERROR: Can't init the sensor! Check connections and jumper address! instead, the board did not answer at 0x30.

5. If it does not work​

Continue with Troubleshooting and retry this smallest example after each change.