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

Arduino Mega 2560-Based Safety Monitoring and Control System with Temperature Sensor and Relay Module

View and Edit Project In Cirkit DesignerImage of Arduino Mega 2560-Based Safety Monitoring and Control System with Temperature Sensor and Relay Module

Circuit Documentation

Summary

This circuit is designed around an Arduino Mega 2560 R3 microcontroller. It integrates various input devices such as pushbuttons, emergency stop buttons, a 3-position switch, and a DHT11 humidity and temperature sensor. The circuit also includes a 5V 8-channel relay module for controlling external devices. The system is powered by an 8V power supply and includes safety mechanisms to stop operations in case of emergency conditions.

Component List

  1. Mega 2560 R3

    • Description: Arduino Mega 2560 R3 microcontroller board.
    • Pins: ICSP port GND, ICSP port Reset, ICSP port MOSI, ICSP port SCK, ICSP port +VCC, ICSP port MISO, SCL, SDA, AREF, GND, D13 (PWM), D12 (PWM), D11 (PWM), D10 (PWM), D9 (PWM), D8 (PWM), D7 (PWM), D6 (PWM), D5 (PWM), D4 (PWM), D3 (PWM), D2 (PWM), D1 (TX0), D0 (RX0), D14 (TX3), D15 (RX3), D16 (TX2), D17 (RX2), D18 (TX1), D19 (RX1), D20 (SDA), D21 (SCL), + 5VCC, D22, D23, D24, D25, D26, D27, D28, D29, D30, D31, D32, D33, D34, D35, D36, D37, D38, D39, D40, D41, D42, D43, D44, D45, D46, D47, D48, D49, D50, D51, D52, D53, NC, IOREF, Reset, +3V3, +VCC IN, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, USB port.
  2. DHT11 Humidity and Temperature Sensor

    • Description: Sensor for measuring humidity and temperature.
    • Pins: VDD, DATA, NULL, GND.
  3. 5V 8 Channel Relay Module

    • Description: Relay module for controlling external devices.
    • Pins: NC, COM, NO, GND, VCC, JD-VCC, IN8, IN7, IN6, IN5, IN4, IN3, IN2, IN1.
  4. Emergency STOP

    • Description: Emergency stop button.
    • Pins: NC.
  5. Pushbutton STOP

    • Description: Pushbutton for stopping operations.
    • Pins: NC, NO.
  6. 8V Power Supply

    • Description: Power supply providing 8V.
    • Pins: +, -.
  7. 3 Position Switch

    • Description: Switch with three positions.
    • Pins: 23, 11, 24, 12.
  8. Pushbutton

    • Description: General-purpose pushbutton.
    • Pins: Pin 3 (out), Pin 4 (out), Pin 1 (in), Pin 2 (in).
  9. Rocker Switch (SPST)

    • Description: Single-pole single-throw rocker switch.
    • Pins: 1, 2.

Wiring Details

Mega 2560 R3

DHT11 Humidity and Temperature Sensor

5V 8 Channel Relay Module

Emergency STOP

Pushbutton STOP

8V Power Supply

3 Position Switch

Pushbutton

Rocker Switch (SPST)

Code Documentation

#include <DHT.h>

// Pin Definitions
#define SW0 22
#define SW1 23
#define SW2 24
#define SW3 25
#define SW4 26
#define SW5 27
#define PS1 28
#define PS2 29
#define LL 30
#define LS 31
#define AEV 32
#define L1 33
#define DHTPIN 34
#define DHTTYPE DHT11

#define OUT0 40