Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Solar-Powered Climate Control System with Arduino and ESP8266

Image of Solar-Powered Climate Control System with Arduino and ESP8266

Circuit Documentation

Summary

This circuit is designed to interface various components including an Arduino Mega 2560, an ESP8266 NodeMCU, relay modules, a charge controller, a 12V battery, a solar panel, a power inverter, a buzzer, an LCD display, a 4x4 membrane matrix keypad, pushbuttons, and a DHT22 sensor. The Arduino Mega 2560 serves as the central processing unit, controlling relays, reading user inputs from the keypad and pushbuttons, and communicating with the ESP8266 NodeMCU for potential IoT capabilities. The ESP8266 NodeMCU is also interfaced with a DHT22 sensor for environmental data. The circuit is powered by a solar panel charging a 12V battery through a charge controller, which also manages the power distribution to the load and the power inverter.

Component List

  • Arduino Mega 2560: A microcontroller board based on the ATmega2560, with numerous digital and analog I/O pins.
  • ESP8266 NodeMCU: A Wi-Fi enabled microcontroller module with GPIO pins.
  • KY-019 Relay Module 1 Channel: A relay module that allows for the control of high power devices.
  • Charge Controller: Manages the charging of the 12V battery from the solar panel and provides power to the load.
  • 12V Battery: Stores electrical energy for use by the circuit.
  • Solar Panel: Converts solar energy into electrical energy to charge the battery.
  • Power Inverter: Converts DC power from the battery to AC power for AC loads.
  • LCD Display 16x4 I2C: An alphanumeric liquid crystal display with an I2C interface.
  • 4X4 Membrane Matrix Keypad: A keypad with 16 buttons arranged in a 4x4 matrix.
  • Pushbutton: A simple switch mechanism for controlling some aspect of a machine or a process.
  • Buzzer: An audio signaling device.
  • 40 Fan 12v: A 12V fan for cooling purposes.
  • DHT22: A sensor for measuring temperature and humidity.

Wiring Details

Arduino Mega 2560

  • 5V connected to ESP8266 NodeMCU VIN, LCD Display VCC, and both KY-019 Relay Modules 5V.
  • GND connected to ESP8266 NodeMCU GND, LCD Display GND, buzzer GND, both KY-019 Relay Modules GND, and both pushbuttons Pin 1.
  • D15/RX3 connected to ESP8266 NodeMCU TX.
  • D14/TX3 connected to ESP8266 NodeMCU RX.
  • SDA connected to LCD Display SDA.
  • SCL connected to LCD Display SCL.
  • D49 connected to KY-019 Relay Module S.
  • D47 connected to KY-019 Relay Module S.
  • D45, D43, D41, D39, D37, D35, D33, D31 connected to corresponding C4, C3, C2, C1, R4, R3, R2, R1 pins of the 4X4 Membrane Matrix Keypad.
  • D27 connected to buzzer PIN.
  • D25 connected to pushbutton Pin 4.
  • D23 connected to pushbutton Pin 4.

ESP8266 NodeMCU

  • VIN connected to Arduino Mega 2560 5V.
  • GND connected to Arduino Mega 2560 GND.
  • TX connected to Arduino Mega 2560 D15/RX3.
  • RX connected to Arduino Mega 2560 D14/TX3.
  • D0 connected to DHT22 Out.
  • 3V3 connected to DHT22 +.
  • GND connected to DHT22 -.

KY-019 Relay Module 1 Channel (x2)

  • 5V connected to Arduino Mega 2560 5V.
  • GND connected to Arduino Mega 2560 GND.
  • S connected to Arduino Mega 2560 D49 or D47.
  • NC of one relay connected to 40 Fan 12v +12V.
  • COM of one relay connected to Charge Controller Battery Positive and 12V Battery VCC.
  • COM of the other relay connected to Power Inverter +.

Charge Controller

  • Solar Positive connected to Solar Panel +.
  • Solar Negative connected to Solar Panel -.
  • Battery Positive connected to KY-019 Relay Module COM and 12V Battery VCC.
  • Battery Negative connected to 40 Fan 12v -12V and 12V Battery GND.
  • Load Positive connected to Power Inverter -.
  • Load Negative connected to Power Inverter +.

12V Battery

  • VCC connected to Charge Controller Battery Positive and KY-019 Relay Module COM.
  • GND connected to Charge Controller Battery Negative.

Solar Panel

  • + connected to Charge Controller Solar Positive.
  • - connected to Charge Controller Solar Negative.

Power Inverter

  • - connected to Charge Controller Load Positive.
  • + connected to Charge Controller Load Negative and KY-019 Relay Module COM.

LCD Display 16x4 I2C

  • SDA connected to Arduino Mega 2560 SDA.
  • SCL connected to Arduino Mega 2560 SCL.
  • VCC connected to Arduino Mega 2560 5V.
  • GND connected to Arduino Mega 2560 GND.

4X4 Membrane Matrix Keypad

  • C4, C3, C2, C1, R4, R3, R2, R1 connected to corresponding Arduino Mega 2560 D45, D43, D41, D39, D37, D35, D33, D31.

Pushbutton (x2)

  • Pin 4 connected to Arduino Mega 2560 D25 or D23.
  • Pin 1 connected to Arduino Mega 2560 GND.

Buzzer

  • PIN connected to Arduino Mega 2560 D27.
  • GND connected to Arduino Mega 2560 GND.

DHT22

  • Out connected to ESP8266 NodeMCU D0.
  • + connected to ESP8266 NodeMCU 3V3.
  • - connected to ESP8266 NodeMCU GND.

Documented Code

Arduino Mega 2560 Code (sketch.ino)

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

ESP8266 NodeMCU Code

No code provided for the ESP8266 NodeMCU.


This documentation provides an overview of the circuit, including the components used, their wiring connections, and the code for the Arduino Mega 2560. The ESP8266 NodeMCU code is not included in the provided inputs.