In this project a biofeedback system is developed using a wearable to control things (actuators). The wearable was a pulse sensor which senses the human pulse using an Infrared emitter and collector diodes. The actuator in this project is a DC Motor fan. The wireless technology used in this project was a Nordic 2.4 GHz transceiver module.
Difficulty Level: Intermediate
Note: The reader should have minimum knowledge about Arduino and Sensors.
–Arduino Pro Mini (or any other Arduino boards)-2
-Nordic 2.4 GHz transceiver module-2
-FTDI to USB breakout board-2
-Breadboard and some wires
Step 1: Pulse Sensor (Sensor Node)
Pulse sensor which is also known as photolethysmograph is used for non-invasive heart rate monitoring. This type sensor can also be used to measure blood-oxygen levels. In this project we will be measuring heart rate of the person who ever want to control the things. More details can be found out here.
Working: The sensor works on the principle of Infrared light emission and receiving. As the heart beats, it pumps oxygenated blood into the arteries such that arterial blood has a pulsating nature. As the volume rises and falls it is synchronous to each heartbeat. A doctor measures this pulsing rate on a patient’s wrist, which usually is the same as the heart rate.
In the sensor we are using in this project, it has an internal amplifier which will condition the signal. Once the pulse is detected, it will start giving analog values to the Arduino microcontroller. Using this values we will try to control the motor which is connected on the other node. The data will be wirelessly transmitted to the controller node using 2.4GHz transceiver module.
In the below diagram, sensor and transmitter modules are connected to Arduino pro mini. It is very important to note that how the transmitter SCK, MISO and MOSI pins should be connected to SCK, MISO, MOSI pins on Arduino. If you have a different model of Arduino, please check the documentation of your board to identify the respective pin numbers.
Step 2: Motor Control (Controller Node)
On the controller side, follow the same pin numbers as in the previous diagram for connecting receiver module to Arduino. Then connect the h-bridge module input pins (generally names as In1,In2). Use a battery or power supply module to power the H-Bridge module through power pins (V+,V-/GND) on the h-bridge circuit board. Now connect the output pins (Out1 near the screw terminals) to the motor as shown in the below circuit.
Step 3: Software Code
You can download the code from here https://github.com/sriharshakunda/Biofeedback-Wearable-Motor-Control. Using Arduino ide, upload the transmitter side code to sensor node and receiver side code to controller node where the motor is attached. Note that you have to change pin numbers for motor controller (h-bridge module) as per your connections. In Figure 4 the pins are connected to digital pins of 2 and 3 on Arduino board. Once you upload the code, connect the transmitter and receiver to different computers and open the serial monitor in Arduino ide. Put your finger on the pulse sensor. It will take 5-10 seconds before you receive reliable data. Any movement of your finger while measuring the pulse will cause faulty values. You should see whatever the values that has been printed in the serial monitor on the transmitter side will be shown in the serial monitor over receiver side. Whenever the pulse rate increases the threshold level for motor control, the motor will start to spin. In the same way you can control many different applications. This is a simple application to control things with biological feedback from wearable devices.