Introduction: IOT Based Health Monitoring System
A microcontroller-based device with appropriate bio-medical sensors will be attached to patient to provide constant cloud-based monitoring. The vital signs i.e. temperature and pulse rate of human body which are major clues to detect any health problem will be sensed by respective sensors supported by NodeMCU in a Wi-Fi environment and the data will be sent to ThingSpeak cloud where the data will be analysed to look for any irregularity. In case of any irregularity a notification will be sent to doctors and nurses.
By this system, patients can be kept under proper constant monitoring without being dependent on any human’s responsibility at a very low cost. This will also reduce any possible errors and help the doctor to quickly respond to the situation.
Step 1: Connection
Things you will need:-
1. Breadboard
2. NodeMCU
3. Pulse sensor
4. DS18B20 waterproof temperature sensor
5. Jumper wires
6. 4.7k ohm resistor for DS18B20
Now, setup your connection as per the circuit given in the image.
Step 2: Coding and Thingspeak
Upload the code and setup your thingspeak channel to receive the data (you can easily find a lot of tutorials regarding this on internet, still if you have any issues you can leave a comment below) .
Make sure the field 1 is for BPM and field 2 is for temperature on your thingspeak channel and then, select NodeMCU as your board (you will have to download this board as it is not added by default, you can go through this guide to setup your IDE: https://www.instructables.com/id/Quick-Start-to-N... ).
Now, upload the code and make sure to edit the WiFi credentials and the thingspeak API key accordingly in the code before uploading.
Step 3: Optional
You can generate email alerts accordingly:
https://in.mathworks.com/help/thingspeak/analyze-c...
Here is the guide to set it up.
Code:
channelID=Your_channel_ID;
iftttURL='Your_IFTTT_URL';
readAPIKey='read_API_key';
bpm=thingSpeakRead(channelID,'Fields',1,'ReadKey',readAPIKey);
temp=thingSpeakRead(channelID,'Fields',2,'ReadKey',readAPIKey);
tempf=(temp*9/5)+32;
if (bpm<60 | bpm>100 | temp<36.1 | temp>37.2)
webwrite(iftttURL,'value1',bpm,'value2',temp,'value3',tempf);
end
11 Comments
8 months ago
I executed this program and it is working fine with temperature sensor but I am facing problems with Pulse sensor, not getting values for pulse sensor.
1 year ago
Can i use LM35 as temperature sensor
Tip 1 year ago
Where is the circuit diagram properly? idk how to make connections, please help!
Question 1 year ago
who to add the OLED in your Project
Question 1 year ago on Step 3
hai sir my self sreenivas , i working on same project in that project i writen the code and everything and output will be coming but thingspeak is not receiving the data, OLED is display the output
iam also checking the on your code in that code BPM is 0.34 in this type of value is coming and iam added the OLED Display at that time Thingspeak is not receiving the Data,
so what iam asking what 's the problem in that code
this is my whatsapp number sir 8247033250
1 year ago
compiled successfully but for pulse rate getting values like 0.34 and 0.36 ..pls help
Reply 1 year ago
There may be some issue with connections try setting up a individual circuit setup just for pulse sensor and edit the code accordingly. This will help you to isolate the problem and identify it easily.
1 year ago
there is an error called LWIP_OPEN_SRC. how to rectify it
Reply 1 year ago
Can you share some screenshots and more details.
2 years ago
Nice design. Any plans for future development?
Reply 2 years ago
Sure, but that depends if I get assistance cause I don't have an electronics background basically.