├── Photos ├── Diagrams │ ├── FLOWCHART.png │ ├── Circuit Diagram.png │ └── Plan - design.png ├── sensors │ ├── pulse sensor │ │ ├── ecg-2.PNG │ │ ├── heartbeat sensor.PNG │ │ └── heartbeat ecg graph.PNG │ ├── rf sensor │ │ └── HC-12 test.PNG │ ├── temp sensor │ │ ├── temp sensor.PNG │ │ ├── temp_sensor-1.PNG │ │ └── temp_sensor-1.1.png │ └── gps sensor │ │ ├── gps - converted.PNG │ │ ├── gps with date.PNG │ │ └── gps - raw data (nmea).PNG ├── Integrations │ ├── level-1 integration.PNG │ ├── gps and hc-12 integrated.PNG │ ├── lm-35 and HC-12 integrated.PNG │ ├── pulse and hc-12 integrated.PNG │ ├── temp and heartbeat combined.PNG │ ├── pulse and hc-12 integrated - 1.PNG │ ├── temp and heartbeat combined-1.PNG │ └── pulse,lm-35 and hc-12 integrated.PNG └── final implementations │ ├── Sensor Diagram.png │ ├── Final Implementation.PNG │ └── Level-1 implementation.PNG ├── codes ├── Level 3 implementation (Control Unit level) │ └── Control_Room_Code.ino ├── Blynk connectivity (IOT) │ └── gps_lm35_and_pulse_all_IOT.ino ├── Level 2 implementation (Squadron's level) │ └── second_base.ino └── Level 1 implementation (Soldier's level) │ └── level-1_implementation__all_sensors_.ino ├── README.md └── LICENSE /Photos/Diagrams/FLOWCHART.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/Diagrams/FLOWCHART.png -------------------------------------------------------------------------------- /Photos/Diagrams/Circuit Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/Diagrams/Circuit Diagram.png -------------------------------------------------------------------------------- /Photos/Diagrams/Plan - design.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/Diagrams/Plan - design.png -------------------------------------------------------------------------------- /Photos/sensors/pulse sensor/ecg-2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/sensors/pulse sensor/ecg-2.PNG -------------------------------------------------------------------------------- /Photos/sensors/rf sensor/HC-12 test.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/sensors/rf sensor/HC-12 test.PNG -------------------------------------------------------------------------------- /Photos/sensors/temp sensor/temp sensor.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/sensors/temp sensor/temp sensor.PNG -------------------------------------------------------------------------------- /Photos/Integrations/level-1 integration.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/Integrations/level-1 integration.PNG -------------------------------------------------------------------------------- /Photos/sensors/gps sensor/gps - converted.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/sensors/gps sensor/gps - converted.PNG -------------------------------------------------------------------------------- /Photos/sensors/gps sensor/gps with date.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/sensors/gps sensor/gps with date.PNG -------------------------------------------------------------------------------- /Photos/sensors/temp sensor/temp_sensor-1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/sensors/temp sensor/temp_sensor-1.PNG -------------------------------------------------------------------------------- /Photos/final implementations/Sensor Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/final implementations/Sensor Diagram.png -------------------------------------------------------------------------------- /Photos/sensors/temp sensor/temp_sensor-1.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/sensors/temp sensor/temp_sensor-1.1.png -------------------------------------------------------------------------------- /Photos/Integrations/gps and hc-12 integrated.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/Integrations/gps and hc-12 integrated.PNG -------------------------------------------------------------------------------- /Photos/Integrations/lm-35 and HC-12 integrated.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/Integrations/lm-35 and HC-12 integrated.PNG -------------------------------------------------------------------------------- /Photos/Integrations/pulse and hc-12 integrated.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/Integrations/pulse and hc-12 integrated.PNG -------------------------------------------------------------------------------- /Photos/sensors/pulse sensor/heartbeat sensor.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/sensors/pulse sensor/heartbeat sensor.PNG -------------------------------------------------------------------------------- /Photos/Integrations/temp and heartbeat combined.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/Integrations/temp and heartbeat combined.PNG -------------------------------------------------------------------------------- /Photos/sensors/gps sensor/gps - raw data (nmea).PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/sensors/gps sensor/gps - raw data (nmea).PNG -------------------------------------------------------------------------------- /Photos/sensors/pulse sensor/heartbeat ecg graph.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/sensors/pulse sensor/heartbeat ecg graph.PNG -------------------------------------------------------------------------------- /Photos/Integrations/pulse and hc-12 integrated - 1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/Integrations/pulse and hc-12 integrated - 1.PNG -------------------------------------------------------------------------------- /Photos/Integrations/temp and heartbeat combined-1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/Integrations/temp and heartbeat combined-1.PNG -------------------------------------------------------------------------------- /Photos/final implementations/Final Implementation.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/final implementations/Final Implementation.PNG -------------------------------------------------------------------------------- /Photos/final implementations/Level-1 implementation.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/final implementations/Level-1 implementation.PNG -------------------------------------------------------------------------------- /Photos/Integrations/pulse,lm-35 and hc-12 integrated.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parithoshpoojary/soldiers-health-monitoring-and-position-tracking-system/HEAD/Photos/Integrations/pulse,lm-35 and hc-12 integrated.PNG -------------------------------------------------------------------------------- /codes/Level 3 implementation (Control Unit level)/Control_Room_Code.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void setup() 5 | { 6 | Serial.begin(9600); 7 | while (!Serial); 8 | Serial.println("LoRa Receiver"); 9 | if (!LoRa.begin(433E6)) { 10 | Serial.println("Starting LoRa failed!"); 11 | while (1); 12 | } 13 | } 14 | 15 | void loop() { 16 | char line[200]; 17 | char* LoRaData = line; 18 | // try to parse packet 19 | int packetSize = LoRa.parsePacket(); 20 | if (packetSize) 21 | { 22 | // received a paket 23 | Serial.println(""); 24 | Serial.println("..................................."); 25 | Serial.println("Received packet: "); 26 | 27 | // read packet 28 | while (LoRa.available()) 29 | { 30 | // LoRaData = LoRa.readString(); 31 | LoRaData = (char)LoRa.read(); 32 | for(int i = 0, j; LoRaData[i]!= '\0' ;++i) 33 | { 34 | while(!(LoRaData[i] >= 'a' && LoRaData[i] <= 'z') && !(LoRaData[i] >= 'A' && LoRaData[i] <= 'Z') && !(LoRaData[i]=='\0')) 35 | { 36 | for(j = 1; LoRaData[j]!='\0'; ++j) 37 | { 38 | LoRaData[j] = LoRaData[j+1]; 39 | } 40 | LoRaData[j] = '\0'; 41 | } 42 | } 43 | Serial.print(LoRaData); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /codes/Blynk connectivity (IOT)/gps_lm35_and_pulse_all_IOT.ino: -------------------------------------------------------------------------------- 1 | #define BLYNK_PRINT SwSerial 2 | #include 3 | #include 4 | 5 | SoftwareSerial SwSerial(10, 11); // RX, TX 6 | 7 | #include 8 | 9 | char auth[] = "tJ5y3HY03zV4vi31dGaL2HVsBOdm-VkC"; 10 | 11 | WidgetLCD lcd(V1); 12 | WidgetMap myMap(V0); 13 | String GPSLabel = "BLYNK"; 14 | 15 | BlynkTimer timer; 16 | 17 | int Signal; 18 | int S; 19 | WidgetLCD lcd1(V4); 20 | 21 | static const int RXPin = 4, TXPin = 5; // GPIO 4=D2(conneect Tx of GPS) and GPIO 5=D1(Connect Rx of GPS) 22 | static const uint32_t GPSBaud = 9600; //if Baud rate 9600 didn't work in your case then use 4800 23 | 24 | TinyGPSPlus gps; // The TinyGPS++ object 25 | SoftwareSerial ss(RXPin, TXPin); // Serial connection to the GPS module 26 | 27 | // This function sends Arduino's up time every second to Virtual Pin (5). 28 | // In the app, Widget's reading frequency should be set to PUSH. This means 29 | // that you define how often to send data to Blynk App. 30 | void sendSensor() 31 | { 32 | int analogValue = analogRead(A0); //reading the sensor on A0 33 | float millivolts = (analogValue/1024.0) * 3300; //3300 is the voltage provided by NodeMCU 34 | float celsius = millivolts/10; 35 | Blynk.virtualWrite(V5, celsius); 36 | } 37 | void setup() 38 | { 39 | // Debug console 40 | SwSerial.begin(9600); 41 | 42 | // Blynk will work through Serial 43 | // Do not read or write this serial manually in your sketch 44 | Serial.begin(9600); 45 | ss.begin(GPSBaud); 46 | Blynk.begin(Serial, auth); 47 | 48 | // Setup a function to be called every second 49 | timer.setInterval(1000L, sendSensor); 50 | timer.setInterval(1000L, pulseSen); 51 | timer.setInterval(1000L, periodicUpdate); 52 | timer.setInterval(60*1000, reconnectBlynk); 53 | } 54 | 55 | void periodicUpdate() { 56 | String line1, line2; 57 | //LCD 58 | lcd.clear(); 59 | if (gps.location.isValid() && (gps.location.age() < 3000)) { 60 | //position current 61 | line1 = String("lat: ") + String(gps.location.lat(), 6); 62 | line2 = String("lng: ") + String(gps.location.lng(), 6); 63 | lcd.print(0, 0, line1); 64 | lcd.print(0, 1, line2); 65 | //update location on map 66 | myMap.location(2, gps.location.lat(), gps.location.lng(), GPSLabel); 67 | } else { 68 | //position is lost 69 | lcd.print(0, 0, "GPS lost"); 70 | } 71 | } 72 | 73 | void updateGPS() { 74 | //read data from GPS module 75 | while (ss.available() > 0) { 76 | gps.encode(ss.read()); 77 | } 78 | } 79 | 80 | void reconnectBlynk() { 81 | if (!Blynk.connected()) { 82 | Serial.println("Lost connection"); 83 | if(Blynk.connect()) Serial.println("Reconnected"); 84 | else Serial.println("Not reconnected"); 85 | } 86 | } 87 | 88 | void pulseSen() 89 | { 90 | lcd1.clear(); 91 | Signal = analogRead(A1); 92 | S = (Signal/8); 93 | lcd1.print(0,0,S); 94 | 95 | } 96 | 97 | void loop() 98 | { 99 | Blynk.run(); 100 | timer.run(); 101 | if(Blynk.connected()) 102 | { 103 | Blynk.run(); 104 | } 105 | updateGPS(); 106 | } 107 | -------------------------------------------------------------------------------- /codes/Level 2 implementation (Squadron's level)/second_base.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #define USE_ARDUINO_INTERRUPTS false // Set-up low-level interrupts for most acurate BPM math. 6 | #include // Includes the PulseSensorPlayground Library. 7 | 8 | SoftwareSerial HC12(6,7); // HC-12 TX Pin, HC-12 RX Pin 9 | 10 | String inc; 11 | 12 | 13 | int val; 14 | int tempPin = A0; //TempSensor connected to ANALOG PIN 0. 15 | 16 | const int PulseWire = A1; // PulseSensor PURPLE WIRE connected to ANALOG PIN 1. 17 | const int LED13 = 13; // The on-board Arduino LED, close to PIN 13. 18 | int Threshold = 550; // Determine which Signal to "count as a beat" and which to ignore. 19 | // Use the "Gettting Started Project" to fine-tune Threshold Value beyond default setting. 20 | // Otherwise leave the default "550" value. 21 | 22 | PulseSensorPlayground pulseSensor; 23 | 24 | void setup() 25 | { 26 | Serial.begin(9600); 27 | HC12.begin(9600); // Serial port to HC12 28 | pulseSensor.analogInput(PulseWire); 29 | pulseSensor.blinkOnPulse(LED13); //auto-magically blink Arduino's LED with heartbeat. 30 | pulseSensor.setThreshold(Threshold); 31 | while (!Serial); 32 | Serial.println("LoRa Sender"); 33 | 34 | if (!LoRa.begin(433E6)) 35 | { 36 | Serial.println("Starting LoRa failed!"); 37 | while (1); 38 | } 39 | if (pulseSensor.begin()) 40 | { 41 | Serial.println(); //This prints one time at Arduino power-up, or on Arduino reset. 42 | } 43 | } 44 | 45 | void loop() 46 | { 47 | val = analogRead(tempPin); //Reads the Temperature value from the sensor. 48 | float temp = ((val/1024.0)*5000); 49 | float cel = temp/10; //Converts the temo to Celsius. 50 | float farh = (cel*9)/5 + 32; //Converts the temp value to Fahrenheit. 51 | 52 | //int myBPM = pulseSensor.getBeatsPerMinute(); // Calls function on our pulseSensor object that returns BPM as an "int". 53 | int myBPM = 70.0; 54 | if (pulseSensor.sawStartOfBeat()) 55 | { // Constantly test to see if "a beat happened". 56 | } 57 | 58 | Serial.println("Sending packet: "); 59 | 60 | // send packet 61 | LoRa.beginPacket(); //Starts the sequence of sending a packet. 62 | LoRa.print("Soldier's Data:"); 63 | while(HC12.available()) //Checks if there's data in HC-12. 64 | { 65 | inc = (String)LoRa.write(HC12.read()); 66 | } 67 | LoRa.print(inc); 68 | LoRa.print("\n"); 69 | LoRa.print("Squadron's Data:"); 70 | LoRa.print(" Temperature:"); 71 | LoRa.print(cel); //Sending the Temperature data of the Squadron. 72 | LoRa.print("C"); 73 | LoRa.print(" BPM:"); 74 | LoRa.print(myBPM); //Sending the BPM data of the Squadron. 75 | 76 | Serial.print("Sent the Soldier's data and the Squadron's data."); //Prints the statement on the Serial monitor. 77 | Serial.println(""); 78 | 79 | LoRa.endPacket(); //End's the sequence of sending a packet. 80 | 81 | delay(1000); 82 | } 83 | -------------------------------------------------------------------------------- /codes/Level 1 implementation (Soldier's level)/level-1_implementation__all_sensors_.ino: -------------------------------------------------------------------------------- 1 | /*LIBRARIES*/ 2 | 3 | #define USE_ARDUINO_INTERRUPTS false //pulse sensor playground library use this intrerupts and we need it to make it false in order to be sure that we will not use intrerupts 4 | #include //Pulse Sensor library 5 | #include //GPS library 6 | #include //this library allow to use not dedicated pins for serial comunication,create a sw serial communication 7 | 8 | /*VARIABLES*/ 9 | char buf[70]; 10 | 11 | /*LM35_Temperature_sensor*/ 12 | 13 | const int LM35_sensor_output = A0; //assigning analog pin A0 to variable 'LM35_sensor_output' 14 | float temp; //variable for temperature in Celsius 15 | float vout; //temporary variable to hold sensor digital reading 16 | int contor_apelare = 0; 17 | 18 | /*Pulse_sensor_Variables*/ 19 | int Beat_per_minutes = 0; //variable for pulse 20 | const int OUTPUT_TYPE = SERIAL_PLOTTER; //the format of our pulse sensor output, choseed by us to being a serial monitor output0 (not mandatory in our program) 21 | 22 | const int Pulse_sensor_output = A1; //analog Input. Connected to the pulse sensor output 23 | const int treshhold = 550; //the trashhold used to helping us reading the pulse waves (heart beat moments) 24 | 25 | byte samplesUntilReport; //the number of samples remaining to read until we want to report a sample over the serial connection. 26 | const byte SAMPLES_PER_SERIAL_SAMPLE = 10; //after 10 samples measurment we will calculate the Pulse 27 | 28 | /*GPS_Variables*/ 29 | 30 | double latidude = 0; //variable for latitude 31 | double longitude = 0; //variable for longitude 32 | int years, mounth,days; //variables for date 33 | int hours,minutes,seconds; //variables for time 34 | static const uint32_t GPSBaud = 9600; //define the GPS baudrate for serial communication 35 | static const int RXPin = 4, TXPin = 3; //asign of the rx and tx pins to the variables RXPin,TXPin for our sw serial communication with GPS 36 | SoftwareSerial gps_bus(RXPin, TXPin); //the serial connection to the GPS sw serial comm 37 | 38 | /*HC-12_Variables*/ 39 | SoftwareSerial HC12(6, 7); // HC-12 TX Pin, HC-12 RX Pin 40 | 41 | /*FUNCTION OBJECT FOR DEDICATED LIBRARY*/ 42 | 43 | PulseSensorPlayground pulseSensor; //the object created for pulse library 44 | TinyGPSPlus GPS; //the object created for GPS library 45 | 46 | /*COMMUNICATION SETUP AND OTHERS SETUP*/ 47 | void setup() 48 | { 49 | pinMode(LM35_sensor_output,INPUT); // configuring pin A0 as input 50 | Serial.begin(9600); //sets the data rate in bits per second (baud) for serial monitor communication 51 | HC12.begin(9600); // Serial port to HC12 52 | gps_bus.begin(GPSBaud); //sets the data rate in bits per second (baud) for sw serial communication with GPS 53 | 54 | // Configure the PulseSensor manager. 55 | pulseSensor.analogInput(Pulse_sensor_output); //assignation of the variable to the analog pin(A1) of arduino 56 | pulseSensor.setSerial(Serial); //set the serial monitor to output data 57 | pulseSensor.setOutputType(OUTPUT_TYPE); //set the output type 58 | pulseSensor.setThreshold(treshhold); //set the trashhold 59 | 60 | 61 | samplesUntilReport = SAMPLES_PER_SERIAL_SAMPLE; // Skip the first SAMPLES_PER_SERIAL_SAMPLE in the loop(). 62 | 63 | 64 | if (!pulseSensor.begin()) // Now that everything is ready, start reading the PulseSensor signal. 65 | { 66 | Serial.print("Pulse sensor start reading the pulse"); 67 | } 68 | } 69 | 70 | /*MAIN FUNCTION*/ 71 | void loop() 72 | { 73 | 74 | if(contor_apelare == 25) 75 | { 76 | vout = analogRead(LM35_sensor_output); 77 | vout = analogRead(LM35_sensor_output); 78 | vout = vout * 5 / 1023; 79 | temp = vout / 0.01; 80 | contor_apelare = 0; 81 | } 82 | 83 | if (pulseSensor.sawNewSample()) 84 | { 85 | contor_apelare++; 86 | if (--samplesUntilReport == (byte) 0) 87 | { 88 | 89 | samplesUntilReport = SAMPLES_PER_SERIAL_SAMPLE; 90 | 91 | if (pulseSensor.sawStartOfBeat()) 92 | { 93 | 94 | Beat_per_minutes = pulseSensor.getBeatsPerMinute(); 95 | Beat_per_minutes = pulseSensor.getBeatsPerMinute(); 96 | } 97 | 98 | } 99 | 100 | if (gps_bus.available() > 0) // check for gps data on the serial comm 101 | { 102 | GPS.encode(gps_bus.read()); // encode gps data 103 | if (GPS.location.isUpdated()) 104 | { 105 | 106 | /*LOCATION*/ 107 | // Latitude in degrees (double) 108 | latidude = GPS.location.lat(); 109 | char str_lat[10]; 110 | dtostrf(latidude,4,6,str_lat); 111 | sprintf(buf, "Latitude = %s \r", str_lat); 112 | HC12.write(buf); 113 | /*Serial.print("Latitude = "); 114 | Serial.print(latidude, 6);*/ 115 | 116 | // Longitude in degrees (double) 117 | longitude = GPS.location.lng(); 118 | char str_lon[10]; 119 | dtostrf(longitude,4,6,str_lon); 120 | sprintf(buf, " Longitude = %s\r\n", str_lon); 121 | HC12.write(buf); 122 | /*Serial.print(" Longitude = "); 123 | Serial.println(longitude, 6);*/ 124 | 125 | /*DATE*/ 126 | // Year (2000+) (u16) 127 | years = GPS.date.year(); 128 | char str_year[10]; 129 | dtostrf(years,4,0,str_year); 130 | sprintf(buf, "Year:%s", str_year); 131 | HC12.write(buf); 132 | /*Serial.print("Year = "); 133 | Serial.print(years);*/ 134 | 135 | // Month (1-12) (u8) 136 | mounth = GPS.date.month(); 137 | char str_month[10]; 138 | dtostrf(mounth,4,0,str_month); 139 | sprintf(buf, " Month:%s\r", str_month); 140 | HC12.write(buf); 141 | /*Serial.print(" Month = "); 142 | Serial.print(mounth);*/ 143 | 144 | // Day (1-31) (u8) 145 | days = GPS.date.day(); 146 | char str_day[10]; 147 | dtostrf(days,4,0,str_day); 148 | sprintf(buf, " Day:%s\r\n", str_day); 149 | HC12.write(buf); 150 | /*Serial.print(" Day = "); 151 | Serial.println(days);*/ 152 | 153 | /*TIME/*/ 154 | // Hour (0-23) (u8) 155 | hours = GPS.time.hour(); 156 | hours = hours + 5; 157 | char str_hour[10]; 158 | dtostrf(hours,4,0,str_hour); 159 | sprintf(buf, "Hour:%s", str_hour); 160 | HC12.write(buf); 161 | //Serial.print("Hour = "); 162 | //Serial.print(hours);*/ 163 | 164 | // Minute (0-59) (u8) 165 | minutes = GPS.time.minute(); 166 | char str_min[10]; 167 | dtostrf(minutes,4,0,str_min); 168 | sprintf(buf, " Minutes:%s", str_min); 169 | HC12.write(buf); 170 | //Serial.print(" Minute = "); 171 | //Serial.print(minutes);*/ 172 | 173 | // Second (0-59) (u8) 174 | /*seconds = GPS.time.second(); 175 | char str_sec[10]; 176 | dtostrf(seconds,4,0,str_sec); 177 | sprintf(buf, " Seconds:%s\r\n", str_sec); 178 | HC12.write(buf); 179 | //Serial.print(" Second = "); 180 | //Serial.println(seconds);*/ 181 | 182 | /*Pulse*/ 183 | char str_bpm[10]; 184 | dtostrf(Beat_per_minutes,4,2,str_bpm); 185 | sprintf(buf, "BPM: %s \r\n", str_bpm); 186 | HC12.write(buf); 187 | /*Serial.print("BPM: "); 188 | Serial.println(Beat_per_minutes);*/ 189 | 190 | /*Temperature*/ 191 | char str_temp[10]; 192 | dtostrf(temp,4,2,str_temp); 193 | sprintf(buf, "Temperature = %s °C\r\n\n", str_temp); 194 | HC12.write(buf); 195 | /*Serial.print("Temperature = "); 196 | Serial.print(temp); 197 | Serial.println(" °C"); 198 | Serial.println(" ");*/ 199 | 200 | Serial.println("Sent Soldier's Data."); 201 | } 202 | 203 | } 204 | 205 | } 206 | 207 | } 208 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Soldiers Health Monitoring and Position Tracking System 2 | 3 | The Soldier Health Monitoring and Position Tracking System allows the military personnel to track the current GPS position of a soldier and also checks the health status including body temperature and heartbeat of a soldier. 4 | 5 | ### Introduction 6 | 7 | In this modern era, enemy warfare is one of the most significant factors in any nation’s security. Nation’s security mainly depends on these three specialized uniformed services: The Army, the Air Force, and the Navy. Soldiers are a very essential part of these security systems. During any special operation or mission that’s been carried out by these services, soldiers involved tends to get injured or get lost on the battlefield. As the soldier plays a significant role in national security, we cannot afford to let them get lost, or have any delayed medics reach the injured ones. So, to protect these soldiers we should have some technology that monitors and tracks the soldiers in real-time and help minimize the time of search operation, and rescue operation efforts of the control unit. 8 | 9 | So, to support this idea, the project presents an effectual system that is capable of monitoring the health vitals of soldiers and at the same time able to record their current position using necessary sensors. The data collected from the sensors are then transmitted to the next level of the hierarchy using wireless RF modules. This system enables the control room unit to track the location and monitor the health vitals of the soldiers constantly using the wireless body sensor network, and the GPS receiver at frequent intervals. Arduino associated with the control room constantly monitors the data received from the different subsystems of the proposed design and triggers a warning if any values cross the set threshold values. Live health monitoring and position tracking of the soldiers will ensure that they are safe on the battlefield and if any abnormalities are found in the values received to the control unit node, they make sure that relief is sent from the control unit node or the squadron leader’s node within a minimum amount of time. 10 | 11 | ##### This system in particular will be useful for individuals, who involve in missions or in special operations. 12 | 13 | ### Extra libraries 14 | The extranal librarires used in the project. 15 | 16 | - TinyGPS++ : https://github.com/mikalhart/TinyGPSPlus 17 | - PulseSensorPlayground : https://github.com/WorldFamousElectronics/PulseSensorPlayground 18 | - LoRa: https://www.arduino.cc/reference/en/libraries/lora/ 19 | 20 | ###### Clone the repos and add the folder to the *libraries* folder in Arduino IDE. 21 | 22 | ### METHODOLOGY 23 | 24 | #### Components Required 25 | * Arduino UNO (x3) 26 | * Temperature Sensor - LM35 (x2) 27 | * Pulse Sensor - RC-A-4015 (x2) 28 | * GPS Receiver - Neo-6M (x2) 29 | * HC-12 RF module 30 | * SX-1278 RF LoRa module 31 | * 9V 3A Battery 32 | * Breadboard and jumper wires 33 | 34 | #### Components Descriptions 35 | 36 | * #### HC-12 Sensor 37 | HC-12 wireless serial port communication module is a new-generation multichannel embedded wireless data transmission module. The HC-12 is a half-duplex 20 dBm (100 mW) transmitter paired with a receiver that has -117 dBm (2×10-15 W) sensitivity at 5000 bps. Paired with an external antenna, these transceivers are capable of communicating up to and possibly slightly beyond 1 km in the open and are more than adequate for providing coverage throughout a typical house. Its wireless working frequency band is 433.4-473.0MHz, multiple channels can be set, with the stepping of 400 KHz, and there are totally 100 channels. 38 | 39 | * #### SX-1278 40 | The SX1278 transceiver feature the LoRa long range modem that provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption. Using Semtech’s patented LoRa modulation technique SX1278 can achieve a sensitivity of over -148dBm using a low cost crystal and bill of materials. The high sensitivity combined with the integrated +20dBm power amplifier yields industry leading link budget making it optimal for any application requiring range or robustness. LoRa also provides significant advantages in both blocking and selectivity over conventional modulation techniques, solving the traditional design compromise between range, interference immunity and energy consumption. 41 | 42 | #### WORKING 43 | The system has two sections, hardware and software. The system consists of 3 nodes i.e Soldier’s node, Squadron leader’s node, and Control unit node. At all the nodes Arduino constantly monitors and records data from the several sensors connected to the system, and communicates with other nodes using wireless RF modules present in the system. 44 | 45 | ###### The hierarchy of obtaining data from the soldier is divided into three segments: 46 | 1. Soldier's Node - Level 1 47 | 2. Squadron's Node - Level 2 48 | 3. Control unit Node - Level 3 49 | 50 |

51 | 52 |

53 | 54 | The block diagram below explains how the nodes and all the internal sensors are connected. 55 | 56 |

57 | 58 |

59 | 60 | Circuit Diagram for the project. 61 |

62 | 63 |

64 | 65 | 66 | A breif explaination of all the nodes are given below: 67 | ### Soldier's Node 68 | This node comprises of body sensor networks (BSN) i.e a temperature sensor and a pulse sensor. These sensors are used to monitor the health vitals of soldiers. Temperature sensor (LM35) is used for monitoring the temperature of the soldier and his surrounding environment, and the pulse sensor (RC-A-4015) monitors the pulse rate of the soldiers as beats per minute (BPM). If there is any variance among the sensed values and the defined threshold values, then it is considered as an exigency. Along with the BSN, a GPS receiver is also added to the node, so as to locate/monitor the soldier’s position. All the data incoming from the sensors are processed and recorded by the micro controller and sent via the wireless RF transceiver module present in the system to the next node i.e Squadron leader’s node. The RF module used in the soldier’s node is HC12, as the communication range between soldier’s node and the squadron leader’s node is short as they are hardly few kms apart. 69 | Additionally, to connect this node to the internet, we use the Blynk application. With the help of a USB and the laptop, we are able to connect this node to the internet. While this node is connected to the internet, the data from the sensors are uploaded to the Blynk cloud, and concurrently sent to the dashboard created to interface with the project via the cloud. 70 | 71 | 72 | ### Squadron's Node 73 | This node also comprises of body sensor networks (BSN) i.e a temperature sensor and a pulse sensor. These sensors are used to monitor the health vitals of the Squadron leader. Temperature sensor (LM35) is used for monitoring the temperature of the squadron leader and his surrounding environment, and the pulse sensor (RC-A-4015) monitors the pulse rate of the squadron leader as BPM. If there is any variance among the sensed values and the defined threshold values, then it is considered as an exigency. All the data coming from the sensors are processed and recorded by the micro controller and sent via the wireless RF transceiver module present in the system to the final node i.e Control unit node. Before sending the recorded data, foremost thing done by this node is receiving the data sent from the soldier’s node through the HC12 module present in the system. Subsequently after receiving the soldier’s data, both the data combined together i.e soldier’s data and the squadron leader’s data are sent through the RF module present in the system. Now, for sending the data to the control unit node, which is very far away from the squadron leader’s node, we use wireless RF Long Range (LoRa) module i.e SX1278, using this RF module we are easily able to send the data of both the soldier’s and the squadron leader to the control unit node which is up to ~ (25kms - 30kms) apart from each other. 74 | 75 | ### Control Unit Node 76 | This node includes the wireless RF LoRa module i.e SX1278, where it receives the data of both nodes i.e soldier’s and squadron leaders, from the squadron leader’s node. This node is just about monitoring, storing, and analyzing the received data from the other two node i.e Soldier’s node and the squadron leader’s node. 77 | Additionally, the control unit node is provided with an extra feature, where they can monitor soldier’s directly through the internet using a graphical interface/dashboard. This is possible using the blynk application on the mobile phone available at control unit node, provided the soldier’s module is also connected to the internet. 78 | 79 | 80 | ### APPLICATIONS 81 | * #### Defence Forces 82 | ###### The project can be implemented in battle field or high altitude areas where health and location of soldiers is the most basic information which should be known to the control room. 83 | 84 | * #### Civilians 85 | ###### This project can also be utilized by individuals who work in remote areas or high altitudes wherein the most basic information should be known to someone dear to them or their guardian’s. 86 | 87 | ### Conclusion and Future Scope 88 | Soldier’s being an important part of our nation’s security, their health vitals and their location needs to be regularly monitored for their safety and their efficient working. Wireless communication with IoT makes the whole experience of monitoring soldiers health vitals and their location, smart efficient and fast. Technologies like IoT has fundamentally reformed the way we live and work, it has made our life easier. Above proposed system not only monitors real-time health and location data of the soldiers but also provides necessary data to help us determine the last position and the health data of the soldiers if he gets lost, so as to track him down and send help. This system increases the efficiency of the soldiers working in the field and also reduces the effort of search and rescue operation led by control room unit at the same time. All in all, the system being compact and less in weight makes it more ideal for the soldier’s and the squadron leaders to carry the system with them, which in turns helps the control unit node to monitor their data of in real-time, even if they are kilometers apart. 89 | 90 | There is an enormous horizon of possibilities which could be offered - new designs, advanced system could be introduced to improve the conditions and efficiency of the system, and by introducing AI/ML algorithms we can predict out in near future if any soldier might require medical attention beforehand, other than this it can also predict whether a component or sensor might need attention or replacement. Other improvements that can be included is implementing advanced security protocols/techniques on the wireless RF modules so as to make the whole process of transmission and receiving sensors data more secure and reliable. 91 | 92 | ## Contributing 93 | 94 | To contribute to the repository, open an issue or a pull request. 95 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------