Arduino Mega 2560 Controlled Automation System with 8-Channel Relay and Nextion Touch LCD Interface
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question is designed to control various devices such as relays, actuators, pumps, a loudspeaker, a heating plate, a thermistor, and a touch LCD, using an Arduino Mega 2560 as the central microcontroller. The circuit is powered by multiple power supply units (PSUs), including a 5V PSU, a 24V DC power supply, a 9V SMPS, and a 12V PSU. Safety is ensured with the inclusion of a circuit breaker. The Arduino Mega 2560 interfaces with a Nextion Touch LCD for user interaction and controls an 8-channel relay module to manage power distribution to the connected devices. Solid State Relays (SSRs) are used for controlling high-power devices like the heating plate and actuators. The circuit is designed for applications that require interfacing with various sensors and actuators, possibly for automation or control systems.
Component List
- Arduino Mega 2560: A microcontroller board based on the ATmega2560, with numerous digital and analog I/O pins.
- 5V PSU: A power supply unit that provides a 5V output.
- 5V 8-Channel Relay: An 8-channel relay module that allows the Arduino to control multiple high-power devices.
- Nextion Touch LCD 2.4": A touch-enabled LCD display for user interface.
- 24V DC Power Supply: A power supply unit that provides a 24V DC output.
- Circuit Breaker: A safety device that automatically stops the flow of current in an electric circuit as a safety measure.
- Loudspeaker: An electroacoustic transducer that converts an electrical audio signal into a corresponding sound.
- Pump: A device used for moving fluids, such as liquids or slurries.
- SSR (Solid State Relay): An electronic switching device that switches on or off when an external voltage is applied across its control terminals.
- Actuator: A device that converts energy (typically electrical) into motion.
- Plucker: A device typically used in poultry processing to remove feathers.
- Heating Plate: A device that generates heat for various applications.
- Thermistor: A type of resistor whose resistance varies significantly with temperature.
- SMPS_9V_UP15S09: A switch-mode power supply that provides a 9V output.
- 12V PSU: A power supply unit that provides a 12V output.
- Flush Switch: A switch used to activate a system or device.
- Power 220V: The main AC power supply.
Wiring Details
Arduino Mega 2560
- GND: Connected to the GND of SMPS_9V_UP15S09.
- VIN: Connected to the +V of SMPS_9V_UP15S09.
- D17 PWM/RX2: Connected to TX of Nextion Touch LCD 2.4".
- D16 PWM/TX2: Connected to RX of Nextion Touch LCD 2.4".
- Digital Pins (D50, D48, D46, D44, D42, D51, D49, D47): Connected to IN2, IN4, IN6, IN7, IN8, IN1, IN3, IN5 of the 5V 8-Channel Relay respectively.
5V PSU
- 5V+: Provides power to the VCC of the 5V 8-Channel Relay and VCC of Nextion Touch LCD 2.4".
- GND: Connected to the GND of the 5V 8-Channel Relay and GND of Nextion Touch LCD 2.4".
- N: Connected to the Neutral of the power network.
- L: Connected to the Live wire of the power network through the Circuit Breaker.
5V 8-Channel Relay
- VCC: Powered by the 5V PSU.
- GND: Common ground with the 5V PSU.
- IN1-IN8: Controlled by various digital pins of the Arduino Mega 2560.
- NO (Normally Open) Contacts: Connected to various devices like Thermistor, SSRs, Pumps, Loudspeaker.
- C (Common) Contacts: Connected to the 12V+ of the 12V PSU.
Nextion Touch LCD 2.4"
- VCC: Powered by the 5V PSU.
- GND: Common ground with the 5V PSU.
- RX: Connected to D16 PWM/TX2 of Arduino Mega 2560.
- TX: Connected to D17 PWM/RX2 of Arduino Mega 2560.
Power Supply 24VDC
- L: Connected to the Live wire of the power network through the Circuit Breaker.
- N: Connected to the Neutral of the power network.
- E: Connected to the Earth ground.
- V+: Provides power to SSRs.
- V-: Common ground with SSRs.
Circuit Breaker
- +: Connected to the Live wire of the power network.
- -: Connected to the Neutral wire of the power network.
SSR (Solid State Relay)
- +: Controlled by the 5V 8-Channel Relay and provides power to devices like Heating Plate, Actuators, Plucker.
- -: Common ground with the 12V PSU and connected devices.
Actuator
- +: Controlled by SSR.
- -: Common ground with SSR.
Heating Plate
- +: Controlled by SSR.
- -: Common ground with SSR.
Thermistor
- +: Controlled by the 5V 8-Channel Relay.
- -: Common ground with SSR.
- Sw1: Connected to NO of the 5V 8-Channel Relay.
- Sw2: Controlled by SSR.
SMPS_9V_UP15S09
- Neutral: Connected to the Neutral of the power network.
- Live: Connected to the Live wire of the power network through the Circuit Breaker.
- GND: Common ground with Arduino Mega 2560.
- -V: Connected to GND of Arduino Mega 2560.
- +V: Connected to VIN of Arduino Mega 2560.
12V PSU
- 12V+: Provides power to the C contacts of the 5V 8-Channel Relay.
- GND: Common ground with SSRs and connected devices.
- 12V OK, PE, N, L: Power status and protection connections.
Flush Switch
- GND: Connected to the Neutral wire of the power network.
- VCC: Connected to the Live wire of the power network through the Circuit Breaker.
Power 220V
- Neutral Wire: Connected to the Neutral of the power network.
- Hot Wire: Connected to the Live wire of the power network through the Circuit Breaker.
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:
}
The provided code for the Arduino Mega 2560 is a template with empty setup() and loop() functions. The setup() function is intended for initialization code that runs once at startup, and the loop() function contains the main logic that runs continuously. Actual implementation code needs to be added to control the connected devices based on the application requirements.