FREE Shipping in the USA.       All Products in Stock for Same Day Shipping.       ⭐⭐⭐⭐⭐ Rated on Amazon.

 

Wireless Oxygen Sensor Using Bluetooth

bluetooth oxygen sensor

 

Customers often ask us for a solution to measuring oxygen, carbon dioxide or other gases wirelessly for an experiment. Some want to measure gas inside a sealed container like a terrarium for a scientific project. Some want to be able to mount the sensor outdoors. 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.

Don't like to read? Watch the how-to video here.

About Bluetooth

If you’ve ever used a Bluetooth device, you know how easy it is to work with. You simply need to pair the device (called a slave) with a Bluetooth receiver (called the master). Once the slave and master connect, the only limitation 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 less than 50 feet. The maximum range will depend on obstacles (walls, metal, etc.) between them as well as potential electromagnetic interference.

For this 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.

wireless bluetooth wiring diagram

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.

wireless bluetooth wiring diagram 1

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.

Watch the Video

Parts Used in this Project

Sensor Devkit:
https://gaslab.com/products/oxygen-sensor-luminox-lox-o2?variant=7040558694435

GasLab Software:
https://gaslab.com/pages/software-downloads

DSD Tech Bluetooth Modules:
https://www.amazon.com/DSD-TECH-HC-05-Pass-through-Communication/dp/B01G9KSAF6

DSD Tech Software:
http://www.dsdtech-global.com/2017/11/dsd-tech-bluetooth-config-tool.html

3.3V USB FTDI Cable:
https://www.amazon.com/Serial-Adapter-Female-FT232RL-Windows/dp/B07R45QJVR

5VDC Rechargeable Power Supply:
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/SIQUK-Housing-Connector-Rainbow-Assortment/dp/B07CVYPDGS


Older Post Newer Post