Circuit Documentation
Summary
This circuit integrates various components with an Arduino Leonardo (Rev3b) to create a system capable of interfacing with sensors, actuators, and display modules. The primary components include an HC-SR04 Ultrasonic Sensor, a Buzzer Module, a Servo motor, an I2C LCD 16x2 Screen, and an MQ-135 Air Quality Sensor. The Arduino Leonardo serves as the central processing unit, controlling the inputs and outputs of the circuit. The circuit is designed to measure distances using the ultrasonic sensor, display information on the LCD screen, react to air quality changes, and provide auditory feedback through the buzzer.
Component List
Arduino Leonardo (Rev3b)
- Microcontroller board based on the ATmega32u4
- Features digital I/O pins, analog input pins, PWM pins, and dedicated SDA/SCL pins for I2C communication
- Provides 5V and 3.3V power outputs and ground connections
HC-SR04 Ultrasonic Sensor
- Ultrasonic distance measuring module
- Requires VCC, GND, TRIG, and ECHO connections
Buzzer Module
- An audible signaling device
- Operates with Vcc, GND, and an I/O pin for signal input
Servo
- A rotary actuator or linear actuator that allows for precise control of angular or linear position
- Requires VCC, GND, and PWM signal input
I2C LCD 16x2 Screen
- A 16x2 character LCD display with an I2C interface
- Requires SCL, SDA, VCC, and GND connections
MQ-135 Air Quality Sensor
- A sensor for detecting a wide range of gases, including NH3, NOx, alcohol, benzene, smoke, and CO2
- Requires VCC, GND, and can provide both analog and digital outputs
Wiring Details
Arduino Leonardo (Rev3b)
- 5V connected to VCC of HC-SR04, Servo, Buzzer Module, and I2C LCD Screen
- GND connected to GND of all components
- D4/A6 connected to I/O of Buzzer Module
- D5 PWM connected to ECHO of HC-SR04
- D6 PWM/A7 connected to TRIG of HC-SR04
- D7 connected to PWM of Servo
- 3V3 connected to VCC of MQ-135 Sensor
- A0 connected to A0 of MQ-135 Sensor
- SDA connected to SDA of I2C LCD Screen
- SCL connected to SCL of I2C LCD Screen
HC-SR04 Ultrasonic Sensor
- VCC connected to 5V of Arduino Leonardo
- GND connected to GND of Arduino Leonardo
- TRIG connected to D6 PWM/A7 of Arduino Leonardo
- ECHO connected to D5 PWM of Arduino Leonardo
Buzzer Module
- Vcc connected to 5V of Arduino Leonardo
- GND connected to GND of Arduino Leonardo
- I/O connected to D4/A6 of Arduino Leonardo
Servo
- VCC connected to 5V of Arduino Leonardo
- GND connected to GND of Arduino Leonardo
- PWM connected to D7 of Arduino Leonardo
I2C LCD 16x2 Screen
- SCL connected to SCL of Arduino Leonardo
- SDA connected to SDA of Arduino Leonardo
- VCC (5V) connected to 5V of Arduino Leonardo
- GND connected to GND of Arduino Leonardo
MQ-135 Air Quality Sensor
- VCC connected to 3V3 of Arduino Leonardo
- GND connected to GND of Arduino Leonardo
- A0 connected to A0 of Arduino Leonardo
Documented Code
No code has been provided for the microcontroller. The documentation of the code would typically include a description of the functionality, setup, and loop functions, as well as any functions or libraries used to interface with the components. Since no code is available, this section cannot be completed.