Arduino-Based Health Monitoring System with GSM and LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to monitor various physiological parameters using multiple sensors and display the data on an LCD screen. It also includes a GSM module for sending SMS alerts and a relay module to control a steam generator. The circuit is built around an Arduino UNO microcontroller, which reads data from the sensors and controls the other components.
Component List
Arduino UNO
- Description: Microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
GSR Sensor
- Description: Galvanic Skin Response sensor to measure skin conductivity.
- Pins: GND, VCC, OUT
AD8232 HeartRate Monitor
- Description: Heart rate monitor sensor.
- Pins: GND, 3.3v, OUTPUT, LO-, LO+, SDN, RA, LA, RL
DFrobot DHT22 Temperature & Humidity Sensor V2
- Description: Temperature and humidity sensor.
- Pins: Signal, VCC, GND
16x2 I2C LCD
- Description: 16x2 character LCD with I2C interface.
- Pins: GND, VCC, SDA, SCL
SIM 800L
- Description: GSM module for sending SMS.
- Pins: NFT, RING, VCC, DTR, RST, MIC +, RXD, MIC-, TXD, SPK+, GND, SPK-
12V Power Supply
- Description: Power supply providing 12V.
- Pins: +, -
Myoware 2.0 Muscle Sensor
- Description: Muscle sensor to measure muscle activity.
- Pins: VIN, GND, ENV
Relay Module
- Description: Relay module to control high voltage devices.
- Pins: NC, COM, INPUT, GND, VCC
Buzzer Module
- Description: Buzzer for audio alerts.
- Pins: GND, Vcc, I/O
LED: Two Pin (red)
- Description: Red LED for visual alerts.
- Pins: cathode, anode
Resistor
- Description: 220 Ohms resistor.
- Pins: pin1, pin2
Wiring Details
Arduino UNO
- 5V: Connected to VCC of 16x2 I2C LCD, RELAY MODULE, DFrobot DHT22 Temperature & Humidity Sensor V2, Buzzer Module, SIM 800L
- 3.3V: Connected to VIN of Myoware 2.0 Muscle Sensor, 3.3v of AD8232 HeartRate Monitor
- GND: Connected to GND of 16x2 I2C LCD, RELAY MODULE, DFrobot DHT22 Temperature & Humidity Sensor V2, Buzzer Module, SIM 800L, AD8232 HeartRate Monitor, Myoware 2.0 Muscle Sensor, 12V Power Supply
- Vin: Connected to + of 12V Power Supply
- A0: Connected to OUT of GSR SENSOR
- A1: Connected to OUTPUT of AD8232 HeartRate Monitor
- A2: Connected to SDA of 16x2 I2C LCD
- A3: Connected to SCL of 16x2 I2C LCD
- A5: Connected to ENV of Myoware 2.0 Muscle Sensor
- D11: Connected to TXD of SIM 800L
- D10: Connected to RXD of SIM 800L
- D9: Connected to pin1 of Resistor
- D8: Connected to I/O of Buzzer Module
- D7: Connected to INPUT of RELAY MODULE
- D2: Connected to Signal of DFrobot DHT22 Temperature & Humidity Sensor V2
GSR Sensor
- GND: Connected to GND
- VCC: Connected to 5V
- OUT: Connected to A0 of Arduino UNO
AD8232 HeartRate Monitor
- GND: Connected to GND
- 3.3v: Connected to 3.3V
- OUTPUT: Connected to A1 of Arduino UNO
DFrobot DHT22 Temperature & Humidity Sensor V2
- Signal: Connected to D2 of Arduino UNO
- VCC: Connected to 5V
- GND: Connected to GND
16x2 I2C LCD
- GND: Connected to GND
- VCC: Connected to 5V
- SDA: Connected to A2 of Arduino UNO
- SCL: Connected to A3 of Arduino UNO
SIM 800L
- GND: Connected to GND
- VCC: Connected to 5V
- TXD: Connected to D11 of Arduino UNO
- RXD: Connected to D10 of Arduino UNO
12V Power Supply
- -: Connected to GND
- +: Connected to Vin of Arduino UNO
Myoware 2.0 Muscle Sensor
- VIN: Connected to 3.3V
- GND: Connected to GND
- ENV: Connected to A5 of Arduino UNO
Relay Module
- GND: Connected to GND
- VCC: Connected to 5V
- INPUT: Connected to D7 of Arduino UNO
Buzzer Module
- GND: Connected to GND
- Vcc: Connected to 5V
- I/O: Connected to D8 of Arduino UNO
LED: Two Pin (red)
- cathode: Connected to GND
- anode: Connected to pin2 of Resistor
Resistor
- pin1: Connected to D9 of Arduino UNO
- pin2: Connected to anode of LED
Code Documentation
#include <DHT.h>
#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>
// Pin Definitions
const int gsrPin = A0; // GSR Sensor
const int ecgPin = A1; // ECG Sensor
const int dhtPin = 2; // DHT22
const int emgPin = A5; // EMG Sensor
const int relayPin = 7; // Relay for steam generator
const int buzzerPin = 8; // Buzzer
const int ledPin = 9; // Red LED
// GSM Module Pins
SoftwareSerial gsmSerial(10, 11); // RX, TX
// DHT Sensor Initialization
DHT dht(dhtPin, DHT22);
// LCD Display Initialization
LiquidCrystal_I2C lcd(0x27, 16, 2);
// Timing Variables
unsigned long startTime;
const unsigned long maxDuration = 20 * 60 * 1000; // 20 minutes
const unsigned long alertTime = 15 * 60 * 1000; // 15 minutes
void setup() {
Serial.begin(9600);
gsmSerial.begin(9600);
dht.begin();
pinMode(relayPin, OUTPUT);
pinMode(buzzerPin, OUTPUT);
pinMode(ledPin, OUTPUT);
digitalWrite(relayPin, LOW); // Turn off steam generator
digitalWrite(buzzerPin, LOW); // Turn off buzzer
digitalWrite(ledPin, LOW); // Turn off LED
lcd.begin(16, 2); // Initialize the LCD with 16 columns and 2 rows
lcd.backlight();
startTime = millis();
}
void loop() {
unsigned long currentTime = millis();
if (currentTime - startTime >= maxDuration) {
digitalWrite(relayPin, LOW); // Turn off steam generator
return; // Stop the loop after 20 minutes
}
if (currentTime - startTime >= alertTime) {
digitalWrite(buzzerPin, HIGH); // Turn on buzzer
}
// Read Sensors
int gsrValue = analogRead(gsrPin);
int ecgValue = analogRead(ecgPin);
float temperature = dht.readTemperature();
int emgValue = analogRead(emgPin); // Read EMG sensor
// Control Steam Generator based on Temperature
if (temperature < 40) {
digitalWrite(relayPin, HIGH); // Turn on steam generator
} else if (temperature > 46) {
digitalWrite(relayPin, LOW); // Turn off steam