Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 7

NAAN MUDHALVAN

FACULTY DEVELOPMENT PROGRAM INDUSTRY 4.0 – 2024


REPORT TITLE

SMART CRADLE SYSTEM IOT


SUBMITTED BY
MANOJPRABHAKARAN G 853 - GOLDEN POLYTECHNIC COLLEGE

LECTURER / MECHANICAL

VINAYAGAMURTHI KAR 522 - MURUGESAN INSITITUTE OF TECHNOLOGY

SENIOR LECTURER / MECHANICAL

VENUE: 149-GOVERNMENT POLYTECHNIC COLLEGE, VANAVASI.

DATE: 18.06.2024 TO 24.06.2024

2024 - 2025
SMART CRADLE SYSTEM IOT
ABSTRACT
The primary aim of implementing a Smart Cradle System using IoT (Internet of Things) technology is
to enhance infant safety, comfort, and parental peace of mind through advanced monitoring and automated
control capabilities. Specifically, the aims include:

MATERIAL REQUIRED
 Sensors
 Actuators
 Microcontroller
 IoT Gateway
 Cloud Platform
 User Interface
SOFTWARE REQUIRED
ARDUINO IDE
ESP8266 PROCESSOR

BLOCK DIAGRAM
CIRCUIT DIAGRAM

PROCEDURE
 Hardware Setup:

 Connect the sensors (temperature, humidity, motion) to the ESP8266 board using digital or analog pins,
ensuring they are powered and grounded properly.
 Connect actuators (fan, humidifier, etc.) to appropriate output pins of the ESP8266 board, ensuring they
can be controlled through relays or directly if they support low current operation.
 Programming:
 Use Arduino IDE or PlatformIO with ESP8266 libraries to program the microcontroller.
 Implement code to read sensor data (temperature, humidity, motion) and control actuators based on
predefined thresholds or commands received.

 Wi-Fi Connectivity:
 Configure the ESP8266 to connect to your local Wi-Fi network using its built-in Wi-Fi capabilities.
 Implement MQTT or HTTP protocols for communication between the ESP8266 and a cloud platform or
local server for data logging and remote control.

 Cloud Integration:
 Use platforms like AWS IoT, Google Cloud IoT, or Adafruit IO to store sensor data and manage device
interactions.
 Implement secure communication protocols (e.g., HTTPS, MQTT over TLS) to protect data transmitted
over the internet.

 User Interface:
 Develop a mobile application (using platforms like Blynk, Thinger.io, or custom app development) or
web interface to visualize sensor data, receive alerts, and control actuators remotely.
 Integrate push notifications or email alerts for abnormal conditions detected by sensors (e.g., high
temperature, no motion).

 Testing and Calibration:


 Test the system thoroughly to ensure sensors are accurately detecting environmental conditions and
actuators respond appropriately to commands.
 Calibrate sensors if necessary to improve accuracy and reliability.

 Security:
 Implement security best practices, such as using secure protocols for communication,
encrypting sensitive data, and implementing authentication mechanisms to prevent
unauthorized access.
CODING
#include <ESP8266WiFi.h>
#include <DHT.h> // Include DHT sensor library
#include <ESP8266HTTPClient.h>

#define DHTPIN D4 // DHT sensor data pin (D4 on NodeMCU)


#define DHTTYPE DHT11 // DHT sensor type (DHT11 or DHT22)

const char* ssid = "your_SSID"; // Your WiFi network SSID


const char* password = "your_PASSWORD"; // Your WiFi network password

const char* serverUrl = "http://your_server_ip/api"; // Replace with your


server URL or endpoint

DHT dht(DHTPIN, DHTTYPE);

void setup() {
Serial.begin(115200);
delay(10);

pinMode(DHTPIN, INPUT);
dht.begin();

connectWiFi();
}

void loop() {
float temperature = dht.readTemperature(); // Read temperature in
Celsius
float humidity = dht.readHumidity(); // Read humidity

// Replace with your own logic based on sensor readings


if (temperature > 25.0) {
// Control the fan or AC based on temperature
controlFan(true); // Turn on fan
} else {
controlFan(false); // Turn off fan
}

// Send data to server or cloud platform


sendDataToServer(temperature, humidity);

delay(10000); // Delay for 10 seconds


}
void connectWiFi() {
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {


delay(500);
Serial.print(".");
}

Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}

void controlFan(bool state) {


// Replace with your actuators control logic (e.g., fan control)
// Example code to control a GPIO pin connected to a relay or transistor
// digitalWrite(FAN_PIN, state ? HIGH : LOW);
// Replace FAN_PIN with your GPIO pin number for fan control
}

void sendDataToServer(float temperature, float humidity) {


if (WiFi.status() == WL_CONNECTED) {
HTTPClient http;
String url = serverUrl + "?temperature=" + String(temperature) +
"&humidity=" + String(humidity);

Serial.print("Sending data to server: ");


Serial.println(url);

http.begin(url); // Specify request destination


int httpResponseCode = http.GET(); // Send the request

if (httpResponseCode > 0) {
Serial.print("HTTP Response code: ");
Serial.println(httpResponseCode);
} else {
Serial.print("Error sending HTTP request: ");
Serial.println(httpResponseCode);
}

http.end(); // Free resources


} else {
Serial.println("WiFi not connected.");
}
}

CONCLUSION
The Smart Cradle System project demonstrates the effective integration of IoT technology to enhance
infant care and safety. By leveraging sensors, actuators, and a cloud-based platform, the system provides
caregivers with real-time monitoring, alerts, and automated controls. Future enhancements could include
additional sensor integration, AI-driven analytics, and further customization options based on user feedback.

You might also like