Arduino Mega 2560 Smart Sensor System with Bluetooth and LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes various sensors, an LCD display, a Bluetooth module, an LED, a solar panel, and an Arduino Mega 2560 microcontroller. The circuit is designed to interface with multiple sensors and display data on an LCD screen, with communication capabilities via Bluetooth.
Component List
HC-SR04 Ultrasonic Sensor
- Description: Measures distance by using ultrasonic waves.
- Pins: VCC, TRIG, ECHO, GND
Bluetooth HC-06
- Description: Enables wireless communication via Bluetooth.
- Pins: VCC, GND, TXD, RXD
SW-420 Vibration Sensor
- Description: Detects vibrations and outputs a digital signal.
- Pins: vcc, Ground, Digital output
Rotary Potentiometer
- Description: Variable resistor used to adjust voltage.
- Pins: leg1, wiper, leg2
- Properties:
- Resistance: 10000 Ohms
LED: Two Pin (red)
- Description: Emits red light when powered.
- Pins: cathode, anode
LCD Display (16 pin)
- Description: Displays alphanumeric characters.
- Pins: VSS, VDD, VO, RS, R_W, E, DB0, DB1, DB2, DB3, DB4, DB5, DB6, DB7, A, K
Solar Panel
- Description: Converts sunlight into electrical energy.
- Pins: +, -
Arduino Mega 2560
- Description: Microcontroller board used for interfacing with various sensors and modules.
- Pins: IOREF, RESET, 3V3, 5V, GND, VIN, A0-A15, D0-D53, AREF, SDA, SCL
Water Sensor
- Description: Detects the presence of water and outputs a signal.
- Pins: Signal, VCC, GND
Wiring Details
HC-SR04 Ultrasonic Sensor
- VCC: Connected to VDD of LCD Display, vcc of SW-420 Vibration Sensor, and leg2 of Rotary Potentiometer
- TRIG: Connected to D9 PWM of Arduino Mega 2560
- ECHO: Connected to D10 PWM of Arduino Mega 2560
- GND: Connected to GND of Bluetooth HC-06, Ground of SW-420 Vibration Sensor, VSS and R_W of LCD Display, leg1 of Rotary Potentiometer, + of Solar Panel, GND of Water Sensor, and GND of Arduino Mega 2560
Bluetooth HC-06
- VCC: Connected to VCC of Water Sensor and 5V of Arduino Mega 2560
- GND: Connected to GND of HC-SR04 Ultrasonic Sensor
- TXD: Connected to D0 RX0 of Arduino Mega 2560
- RXD: Connected to D1 TX0 of Arduino Mega 2560
SW-420 Vibration Sensor
- vcc: Connected to VCC of HC-SR04 Ultrasonic Sensor
- Ground: Connected to GND of HC-SR04 Ultrasonic Sensor
- Digital output: Connected to A0 of Arduino Mega 2560
Rotary Potentiometer
- leg1: Connected to GND of HC-SR04 Ultrasonic Sensor
- wiper: Connected to VO of LCD Display
- leg2: Connected to VCC of HC-SR04 Ultrasonic Sensor
LED: Two Pin (red)
- cathode: Connected to GND of Arduino Mega 2560
- anode: Connected to D13 PWM of Arduino Mega 2560
LCD Display (16 pin)
- VSS: Connected to GND of HC-SR04 Ultrasonic Sensor
- VDD: Connected to VCC of HC-SR04 Ultrasonic Sensor
- VO: Connected to wiper of Rotary Potentiometer
- RS: Connected to D12 PWM of Arduino Mega 2560
- R_W: Connected to GND of HC-SR04 Ultrasonic Sensor
- E: Connected to D11 PWM of Arduino Mega 2560
- DB4: Connected to D5 PWM of Arduino Mega 2560
- DB5: Connected to D4 PWM of Arduino Mega 2560
- DB6: Connected to D3 PWM of Arduino Mega 2560
- DB7: Connected to D2 PWM of Arduino Mega 2560
Solar Panel
- +: Connected to GND of HC-SR04 Ultrasonic Sensor
- -: Connected to A8 of Arduino Mega 2560
Arduino Mega 2560
- D9 PWM: Connected to TRIG of HC-SR04 Ultrasonic Sensor
- D10 PWM: Connected to ECHO of HC-SR04 Ultrasonic Sensor
- D0 RX0: Connected to TXD of Bluetooth HC-06
- D1 TX0: Connected to RXD of Bluetooth HC-06
- A0: Connected to Digital output of SW-420 Vibration Sensor
- D13 PWM: Connected to anode of LED: Two Pin (red)
- D12 PWM: Connected to RS of LCD Display
- D11 PWM: Connected to E of LCD Display
- D5 PWM: Connected to DB4 of LCD Display
- D4 PWM: Connected to DB5 of LCD Display
- D3 PWM: Connected to DB6 of LCD Display
- D2 PWM: Connected to DB7 of LCD Display
- A8: Connected to - of Solar Panel
- A5: Connected to Signal of Water Sensor
- 5V: Connected to VCC of Bluetooth HC-06 and VCC of Water Sensor
- GND: Connected to GND of HC-SR04 Ultrasonic Sensor, GND of Bluetooth HC-06, Ground of SW-420 Vibration Sensor, VSS and R_W of LCD Display, leg1 of Rotary Potentiometer, + of Solar Panel, GND of Water Sensor, and cathode of LED: Two Pin (red)
Water Sensor
- Signal: Connected to A5 of Arduino Mega 2560
- VCC: Connected to VCC of Bluetooth HC-06
- GND: Connected to GND of HC-SR04 Ultrasonic Sensor
Documented Code
Arduino Mega 2560 Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This code is a basic template for the Arduino Mega 2560. The setup function is used to initialize any settings or configurations, and the loop function contains the main code that runs repeatedly.