Looking for a way to:
- Measuring oxygen, carbon dioxide or other gases wirelessly for an experiment?
- Measure gas inside a sealed container like a terrarium for a scientific project?
- Mount a gas sensor outdoors for remote monitoring?
As long as you’re less than 30 feet away from the sensor, the simplest and least expensive way to do this is with Bluetooth.
If you’ve ever used a Bluetooth device like a mouse, a smartwatch or a remote control you know how easy it is to work with. Simply pair the Bluetooth device (called a slave) with a Bluetooth receiver (called the master). Once the slave and master connect or "pair", the only limitation for communication is the distance between them.
Theoretically, a Bluetooth signal in the 2.4GHz band can travel over a kilometer between master and slave devices. In reality, the range of a Bluetooth connection is about 10 meters or 30 feet. The maximum range will depend on obstacles (walls, metal, etc.) between them as well as potential electromagnetic interference.
Most Bluetooth devices have a receiver or transmitter on a chip with an antennae mounted inside. However, for devices that don't include Bluetooth, many companies make receivers and transmitters that can be purchased separately.
Our goal was to remotely monitor the ambient air using an oxygen gas sensor. The serial signal from the sensor is sent to a Bluetooth transmitter module, picked up by a duplicate Bluetooth receiver module, then sent to a PC using an FTDI to USB cable. Power for the sensor and both Bluetooth modules is provided using a cell phone USB battery pack.
The same configuration could be used with any gas sensor that has a serial output.
For our project we used a pair of DSD Tech HC-05 Bluetooth modules, although there are many similar ones available online. What we like about this brand is that while it is rated at 3.3VDC it is tolerant of the 5VDC power from a rechargeable battery pack. In addition, it comes with free configuration software and is inexpensive.
Connecting the Sensor
Step 1: Connect the sensor, the Bluetooth module and the power supply. We made a wiring harness using Molex connectors, but as long as you follow the diagram, you can connect them any way you want. The important thing to remember is to cross the Tx (transmit) and Rx (receive) points on the devices. When the Bluetooth module is blinking quickly, you know you have power.
In some cases it would be better to use a 3.3VDC power supply instead of a 5VDC cell phone power pack. However, since both the DS Tech Bluetooth modules (3.3-6VDC) and the LuminOX oxygen sensor (4.5-5.5VDC) have voltage regulators on board the 5VDC power pack will work fine. If you're using different hardware, you should select your power supply voltage output accordingly.
Step 2: Connect the Bluetooth module to the USB cable. This is a special FTDI cable that allows you to communicate serially (Tx/Rx) via a USB port to a virtual COMM port on your PC. The FTDI cable has some electronics built-in that not only convert USB to serial, but also steps the 5VDC USB power down to 3.3VDC for the Bluetooth module. Note that FTDI cables come in both 3.3VDC and 5VDC flavors, so make sure you get the right one.
Step 3: Install the Bluetooth configuration software. You’re going to need this to convert one of the Bluetooth modules into a “master.” We used the DSD Tech Bluetooth modules because the free software is easy to use, but if you’re using a different Bluetooth module make sure it also comes with software.
Step 4: Set the Bluetooth module on the USB cable into AT command (setup) mode. While holding down the setup button on the module, power the module by plugging in the USB cable and connecting the power lead. The slow blink pattern will tell you the Bluetooth module is ready to accept AT (setup) commands.
Step 5: Run the Bluetooth configuration software. Start the program, select the COM# port for the module, and click “Open” to start the software. If the software sees the Bluetooth module, you will see “OPEN UART Success.” Otherwise, pick a different COM# port and try again. Next, select the Bluetooth module model number from the tab list, then click “Test.” If the software returns “Receive: OK” the module is in AT mode. Otherwise, retry step 4.
Step 6: Set the Bluetooth module on the USB cable to “master.” Change the Role from Slave to Master and click “Set.”
Step 7: Reboot the new master Bluetooth module. Disconnect power, wait a few seconds, and then reconnect the power. In a few seconds the Bluetooth master will find the slave module and the blink pattern will change to double blinks for both. If they cannot connect, go back to step 4 and try again.
Step 8: Start the GasLab software. Select the COM# port, select the Series/Model for your sensor, and click “Connect.” To take a reading, click the “Read” button.
Once you have the sensor connected to the GasLab software, you can take readings, configure or calibrate the sensor, or start data logging. For more information on how to use GasLab, refer to the manual.
Note that while we used a 25% oxygen sensor in this example, it could be used for any of our gas sensor development kits. If you don’t need wireless Bluetooth, you can also purchase any development kit with a USB FTDI cable so you’ll be up and running your sensor within minutes.
Watch the Video
Parts Used in this Project
DSD Tech Bluetooth Modules:
DSD Tech Software:
3.3V USB FTDI Cable:
5VDC Rechargeable Power Bank:
USB to Power Connector: