Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

STM32H7-Based Multi-Sensor Monitoring System with GSM Alert and LCD Display

View and Edit Project In Cirkit DesignerImage of STM32H7-Based Multi-Sensor Monitoring System with GSM Alert and LCD Display

Circuit Documentation

Summary

The circuit in question is a multifunctional embedded system designed around the STM32H7 microcontroller. It interfaces with a variety of sensors and modules to perform tasks such as temperature and humidity measurement, real-time clock tracking, gas detection, heart rate and blood oxygen level monitoring, and user interaction through pushbuttons and an LCD display. The system is powered by a 12V battery and includes communication capabilities through a GSM module. The circuit is designed to read sensor data, process it, and display the results on an LCD screen, as well as send alerts via GSM when certain conditions are met.

Component List

Battery 12V

A power source for the circuit providing a 12-volt supply.

Pushbutton

A momentary switch that allows user input when pressed.

Buzzer

An audio signaling device that can emit a tone when powered.

Speaker

A transducer that converts electrical signals into audible sound.

DS3231 RTC

A real-time clock module for keeping track of the current time and date.

IR Sensor

An infrared sensor used for proximity or motion detection.

MKE-S14 DHT11 Temperature and Humidity Sensor

A sensor that measures ambient temperature and humidity.

GSM SIM900

A GSM/GPRS module for cellular communication.

MQ-2 Sensor

A gas sensor used for detecting levels of combustible gases.

MAX30102 HR + SpO2 Sensor

A sensor for measuring heart rate and blood oxygen levels.

Temperature Sensor

A sensor for measuring temperature.

LCD Display 16x2

A liquid crystal display capable of showing 16 characters per line on 2 lines.

STM32H7 Microcontroller

A high-performance microcontroller that serves as the central processing unit for the circuit.

Wiring Details

Battery 12V

Pushbuttons

Buzzer

Speaker

DS3231 RTC

IR Sensor

MKE-S14 DHT11 Temperature and Humidity Sensor

GSM SIM900

MQ-2 Sensor

MAX30102 HR + SpO2 Sensor

Temperature Sensor

LCD Display 16x2

STM32H7 Microcontroller

Documented Code

#include "stm32f1xx_hal.h"

// Function prototypes
void SystemClock_Config(void);
void init_GPIO(void);
void init_I2C(void);
void init_UART(void);
void read_DHT11(void);
void read_RTC(void);
void read_PulseOximeter(void);
void read_BodyTemp(void);
void check_SmokeDetector(void);
void handle_Buttons(void);
void send_GSM_Alert(void);
void update_LCD(void);

int main(void) {
    HAL_Init();
    SystemClock_Config();
    init_GPIO();
    init_I2C();
    init_UART();

    while (1) {
        read_DHT11();
        read_RTC();
        read_PulseOximeter();
        read_BodyTemp();
        check_SmokeDetector();
        handle_Buttons();
        update_LCD();
        HAL_Delay(1000); // Delay for 1 second
    }
}

void init_GPIO(void) {
    // Initialize GPIO pins for all components
}

void init_I2C(void) {
    // Initialize I2C communication
}

void init_UART(void) {
    // Initialize UART communication
}

void read_DHT11(void) {
    // Read data from DHT11 sensor
}

void read_RTC(void) {
    // Read time from RTC Module
}

void read_PulseOximeter(void) {
    // Read data from Pulse Oximeter
}

void read_BodyTemp(void) {
    // Read data from Body Temperature Sensor
}

void check_SmokeDetector(void) {
    // Check smoke detector status
}

void handle_Buttons(void) {
    // Handle push button inputs
}

void send_GSM_Alert(void) {
    // Send alert via GSM Module
}

void update_LCD(void) {
    // Update the LCD display with new data
}

void SystemClock_Config(void) {
    // Configure the system clock
}

This code provides the basic structure for the embedded system's operation. It includes initialization functions for the GPIO pins, I2C and UART communication, and functions to read from the various sensors. The main function contains an infinite loop that continuously reads sensor data, checks the status of the smoke detector, handles button inputs, updates the LCD display, and sends alerts via the GSM module. The actual implementation of these functions will depend on the specific hardware connections and the desired behavior of the system.