Intro: A Pulse Oximeter Device Using Arduino Nano, MAX30100 and Bluetooth HC06.
today we are going to build a sensory device to read Oxygen level in the blood and the heart beat rates in a non invasive way using the MAX30100 sensor.
The MAX30100 is an Pulse Oximetry and heartrate monitor sensor solution. It combines two LEDs, a photodetector, optimized optics, and low-noise analog signal processing to detect pulse oximetry and heart-rate signals. The MAX30100 operates from 1.8V and 3.3V power supplies and can be powered down through software with negligible standby current, permitting the power supply to remain connected at all times.
For this article, I'm gonna use a Bluetooth module HC-06 (operating in a slave mode) associated with Arduino Nano. In this way, we can send the data read from the device to another device or to the Internet. In the initial proposal, a mobile application was developed in order to contemplate visualization of the data. However, this mobile Android application will not be covered in this article.
Let's get started!
Step 1: Material Necessary:
The material used in this experiment can be seen below:
- Arduino Nano
- Small Protoboard
- Wires and a set of jumpers
- Bluetooth Module HC-06
- Sensor MAX30100
- Two resistors 4.7k Ohm
Step 2: Wiring the MAX30100
First, we need to wire the MAX30100 in order to use it with Arduino. The schematic image above in this step will show how the wiring should be done.
Basically, we need to sod the wires with the pins available on the sensor. It will be necessary to remove the female part of the jumper for the soda to be made. The male part of the Jumper will be used to dock on the Arduino.
MAX30100 has the following pins:
VIN, SCL, SDA, INT, IRD, RD, GND.
For this purpose, we'll only use VIN, SCL, SDA, INT and GND inputs.
Tips: After performing the soda, it is good to insert some hot glue to protect the soda (as you can see in the image).
Step 3: Wire the Bluetooth HC-06 Module
In addition, we need to do the same for the Bluetooth HC06 module.
All information received in the Bluetooth module will be passed to the Arduino (in our case) via serial.
The module range follows the bluetooth communication standard, which is approximately 10 meters. This module works only in slave mode, that is, it allows other devices to connect to it, but does not allow itself to connect to other bluetooth devices.
The module has the 4 pins (Vcc, GND, RX e TX). The RX and TX are used to allows the communication with the microcontroller in a serial way.
During the execution, some problems were detected by simultaneously using the TX and RX outputs for Bluetooth together with the communication or serial via USB (which is used to power the Arduino and load the code) on the board.
Thus, during development, pins A6 and A7 were temporarily used to simulate serial communication. The SoftwareSerial Library was used to allow serial port operation via software.
Reference: Bluetooth Image wiring is from http://www.uugear.com/portfolio/bluetooth-communication-between-raspberry-pi-and-arduino
Step 4: Assemble the Device Structure, Following the Bluetooth Module, the LED and the Arduino on the Protoboard.
Next step is to put all the components in the protoboard and connect them in the right way.
You can do it now as you wish. If you want to use another microcontroller like Arduino Uno or a larger board, feel free to do so. I've used a smaller one, because I needed to have a compact device that would be possible to carry out the measurement and also send the data to another device.
First step: Attaching the Arduino in to the white board.
- Attach the Arduino Nano in the center of the protoboard.
Second step: Attaching the Bluetooth module in the Arduino.
- Connect the bluetooth module at the back of the board and also connect the wire in the Arduino as follows:
- RX from Bluetooth to the TX1 pin in the Arduino.
- TX from Bluetooth to the RX0 pin in the Arduino.
- GND from Bluetooth to the GND (pin besides the RX0 pin) in the Arduino.
- Vcc from Bluetooth to the 5V pin in the Arduino.
Third step: Attaching the MAX30100 sensor in the Arduino.
- VIN from MAX30100 to the 5V pin in the Arduino (same as we have in the Bluetooth step).
- SCL pin from MAX30100 to the A5 pin in the Arduino.
- SDA pin from MAX30100 to the A4 pin in the Arduino.
- INT pin from MAX30100 to the A2 pin in the Arduino.
- GND pin from MAX30100 to the GND pin in the Arduino (pin between VIN and RST).
- Plug one resistor. One leg in the same 5V pin we connected the Bluetooth and the other part in the A4 pin.
- Plug the second resistor. One leg in also connected in 5v pin and the other connect to the A5 pin.
Important: In order to get MAX30100 working properly, we need to pull those resistors respectively to the A4 and A5 pins. Otherwise, we may witness a sensor malfunction, such as a dim light and often the complete non-functioning of the same.
Fourth step: Adding a green led to know exactly when a heart rate was measured by the sensor.
- Plug the smallest leg of the green led (or other color you may prefer) to the GND pin (same as we connected the Bluetooth).
- Connect the other part to the D2 pin.
Step 5: Finishing Our Device Assemble.
At this point, we already have our device assembled, but not programmed . We have the bluetooth module connected to the Arduino, as well as the MAX30100 sensor, which will perform all data measurement and send it to the Bluetooth module, which in turn will send to another device.
For this article, the purpose was to demonstrate the assembly of the device. In the next few articles I'll cover how to program the device using the Arduino IDE. You can see in this image how the device will work, from reading data to viewing on your Android device.
You have finished making your own Pulse Oximeter device measurement just with a low cost. Stay tuned to the next article! :D