Raspberry Pi and Arduino-Based Smart Home Automation System with Battery Backup
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a complex circuit involving various components such as a Raspberry Pi, GPIO Expander, sensors, motors, and other peripherals. The circuit is designed to interface multiple sensors and actuators with microcontrollers to perform various tasks. The documentation includes a component list, wiring details, and embedded code for the microcontrollers.
Component List
Raspberry Pi 4B
- Pins: 3V3, 5V, GPIO2, GPIO3, GND, GPIO4, GPIO14, GPIO15, GPIO17, GPIO18, GPIO27, GPIO22, GPIO23, GPIO24, GPIO10, GPIO9, GPIO25, GPIO11, GPIO8, GPIO7, ID_SD, GPIO5, GPIO6, GPIO12, GPIO13, GPIO19, GPIO16, GPIO26, GPIO20, GPIO21, ID_SC, TR01_TAP, TR00_TAP, TR03_TAP, TR02_TAP, RUN, GLOBAL_EN
- Description: A powerful single-board computer used for various applications.
- Purpose in Circuit: Central processing unit for the circuit.
GPIO Expander
- Pins: 5v, GND, 5V, TXD, RXD, GPIO18, GPIO23, GPIO24, GPIO25, CE0, CE1, EEC, GPIO12, GPIO16, GPIO20, GPIO21, GPIO26, GPIO19, GPIO13, GPIO6, GPIO5, EED, SCLK, MISO, MOSI, 3V3, GPIO22, GPIO27, GPIO17, GPIO4, SCL, SDA
- Description: Expands the number of GPIO pins available.
- Purpose in Circuit: Provides additional GPIO pins for connecting more sensors and actuators.
Outlet
- Pins: None
- Description: Standard electrical outlet.
- Purpose in Circuit: Power supply.
Female Socket
- Pins: Positive, Negative, socket
- Description: A socket for connecting power.
- Purpose in Circuit: Power connection interface.
12V 18 Ah UPS Battery
- Pins: Negative, Positive
- Description: Uninterruptible power supply battery.
- Purpose in Circuit: Provides backup power.
Buck Converter
- Pins: IN+, IN-, OUT+, OUT-
- Description: Converts higher voltage to a lower voltage.
- Purpose in Circuit: Voltage regulation.
Monitor
- Pins: None
- Description: Display screen.
- Purpose in Circuit: Visual output.
Type C Charger
- Pins: Negative, Positive
- Description: USB Type-C charger.
- Purpose in Circuit: Power supply.
Mini Diaphragm Water Pump
- Pins: Positive, Negative
- Description: Small water pump.
- Purpose in Circuit: Fluid movement.
MG996R
- Pins: GND, VCC, SIG
- Description: Servo motor.
- Purpose in Circuit: Actuation.
L298N DC Motor Driver
- Pins: OUT1, OUT2, 12V, GND, 5V, OUT3, OUT4, 5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2, ENA, IN1, IN2, IN3, IN4, ENB
- Description: Dual H-Bridge motor driver.
- Purpose in Circuit: Motor control.
DC Motor
- Pins: None
- Description: Standard DC motor.
- Purpose in Circuit: Mechanical movement.
IR Sensor
- Pins: out, gnd, vcc
- Description: Infrared sensor.
- Purpose in Circuit: Object detection.
Arduino UNO
- 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
- Description: Microcontroller board.
- Purpose in Circuit: Control unit for sensors and actuators.
Max30100
- Pins: None
- Description: Pulse oximeter and heart-rate sensor.
- Purpose in Circuit: Health monitoring.
MLX90614
- Pins: SDA, SCL, GND, VIN
- Description: Infrared temperature sensor.
- Purpose in Circuit: Temperature measurement.
HC-SR04 Ultrasonic Sensor
- Pins: VCC, TRIG, ECHO, GND
- Description: Ultrasonic distance sensor.
- Purpose in Circuit: Distance measurement.
Relay Module 5V-30V
- Pins: common contact, normally open, normally closed, trigger, V-, V+
- Description: Relay switch.
- Purpose in Circuit: Switching high-power devices.
40 Fan 12V
- Pins: +12V, -12V
- Description: Cooling fan.
- Purpose in Circuit: Cooling.
Charger
- Pins: None
- Description: Battery charger.
- Purpose in Circuit: Charging the battery.
Wiring Details
Raspberry Pi 4B
- No direct connections specified in the net list.
GPIO Expander
- GPIO18 connected to ENA of L298N DC motor driver.
- GND connected to IN- of Buck converter, gnd of IR sensor, gnd of another IR sensor.
- GPIO23 connected to IN1 of L298N DC motor driver.
- GPIO24 connected to IN2 of L298N DC motor driver.
- GPIO25 connected to out of IR sensor.
- GPIO16 connected to TRIG of HC-SR04 Ultrasonic Sensor.
- GPIO20 connected to ECHO of HC-SR04 Ultrasonic Sensor.
- GPIO21 connected to TRIG of another HC-SR04 Ultrasonic Sensor.
- GPIO19 connected to TRIG of another HC-SR04 Ultrasonic Sensor.
- GPIO13 connected to ENB of L298N DC motor driver.
- GPIO6 connected to ECHO of another HC-SR04 Ultrasonic Sensor.
- GPIO5 connected to ECHO of another HC-SR04 Ultrasonic Sensor.
- MISO connected to out of IR sensor.
- GPIO27 connected to IN4 of L298N DC motor driver.
- GPIO17 connected to IN3 of L298N DC motor driver.
- SCL connected to SIG of MG996R.
Outlet
- No direct connections specified in the net list.
Female Socket
- Positive connected to OUT+ of Buck converter.
- Negative connected to OUT- of Buck converter.
12V 18 Ah UPS Battery
- Positive connected to Positive of female socket.
- Negative connected to Negative of female socket.
Buck Converter
- IN+ connected to Positive of 12V 18 Ah UPS Battery.
- IN- connected to Negative of 12V 18 Ah UPS Battery.
- OUT+ connected to Positive of female socket.
- OUT- connected to Negative of female socket.
Monitor
- No direct connections specified in the net list.
Type C Charger
- Positive connected to OUT+ of Buck converter.
- Negative connected to OUT- of Buck converter.
Mini Diaphragm Water Pump
- Positive connected to normally closed of Relay module 5v-30v.
- Negative connected to OUT- of Buck converter.
MG996R
- GND connected to OUT- of Buck converter.
- VCC connected to OUT+ of Buck converter.
- SIG connected to SCL of GPIO Expander.
L298N DC Motor Driver
- ENA connected to GPIO18 of GPIO Expander.
- IN1 connected to GPIO23 of GPIO Expander.
- IN2 connected to GPIO24 of GPIO Expander.
- IN3 connected to GPIO17 of GPIO Expander.
- IN4 connected to GPIO27 of GPIO Expander.
- **ENB