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.
About 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.
![Bluetooth model](https://cdn.shopify.com/s/files/1/0019/5952/files/bluetooth.png?v=1686153987)
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.
More Options
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.
Wireless Sensor Development Kits
For those looking for an entire comprehensive suite of hardware and software components that allows quick prototyping and validation, a wireless sensor development kit can be used.
These development kits enable seamless integration of various gas sensors, facilitating the monitoring of environmental conditions, industrial processes, or health parameters with minimal setup time. The inclusion of pre-configured modules and sample codes also can significantly reduce development time, allowing engineers to focus on refining their applications rather than dealing with foundational setup.
Additionally, wireless sensor development kits like the CM-200 often support a range of communication protocols and standards, ensuring compatibility and scalability for future expansions. By offering a robust platform for innovation and experimentation, these kits play a crucial role in advancing the Internet of Things (IoT) ecosystem, driving technological progress and enabling smarter, more connected solutions across various industries.
Parts Used in our Project
Sensor Devkit:
https://www.co2meter.com/products/25-percent-oxygen-sensor?variant=51335834580
GasLab Software:
https://www.co2meter.com/pages/downloads
DSD Tech Bluetooth Modules:
https://www.amazon.com/DSD-TECH-HC-05-Pass-through-Communication/dp/B01G9KSAF6
DSD Tech Software:
https://www.deshide.com/product-details.html?pid=344887&_t=1665215327
3.3V USB FTDI Cable:
https://www.amazon.com/Serial-Adapter-Female-FT232RL-Windows/dp/B07R45QJVR
5VDC Rechargeable Power Bank:
https://www.amazon.com/gp/bestsellers/wireless/7073960011/
Crimping Tool:
https://www.amazon.com/Crimping-Ratcheting-Terminal-Crimper-SN-28B/dp/B08FBCM5V4
USB to Power Connector:
https://www.amazon.com/CERRXIAN-Terminal-Solderless-Converter-Extension/dp/B07PDP1HCN
Assorted Connectors:
https://www.amazon.com/CHENBO-Connector-Housing-Assortment-Terminal/dp/B077X8XV2J/