Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino UNO microcontroller, two L9110 motor driver ICs, four hobby motors, an HC-SR04 ultrasonic sensor, a GP2Y1010AU0F dust sensor, various LEDs, resistors, and an electrolytic capacitor. The circuit is designed to control motors, read distance measurements from the ultrasonic sensor, and monitor dust levels with the dust sensor. LEDs are used for indication purposes.
Component List
Microcontroller
- Arduino UNO: A microcontroller board based on the ATmega328P. It has 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header, and a reset button.
Motor Drivers
- L9110: A dual-channel motor driver IC capable of driving a small DC motor in either direction.
Motors
- Motor amarillo motorreductor hobby: A yellow hobby gear motor that operates on a DC voltage.
Sensors
- HC-SR04 Ultrasonic Sensor: An ultrasonic distance sensor that can measure distances from 2cm to 400cm with an accuracy of 3mm.
- GP2Y1010AU0F: An optical air quality sensor designed to sense dust particles.
LEDs
- LED: Two Pin (green): A basic green LED with an anode and cathode.
- LED: Four Pin: An RGB LED with a common anode and separate cathodes for the red, green, and blue elements.
Resistors
- Resistor (220 Ohms): A resistor with a resistance of 220 Ohms.
- Resistor (150 Ohms): A resistor with a resistance of 150 Ohms.
Capacitors
- Electrolytic Capacitor (1 µF): A polarized capacitor with a capacitance of 1 microfarad.
Wiring Details
Arduino UNO
- Digital Pin 12 (D12) connected to the anode of the green LED.
- Digital Pin 2 (D2) connected to the TRIG pin of the HC-SR04 Ultrasonic Sensor.
- Digital Pin 3 (D3) connected to the ECHO pin of the HC-SR04 Ultrasonic Sensor.
- Digital Pin 8 (D8) connected to the B-IB and A-IB pins of one L9110 motor driver.
- Digital Pin 1 (D1) connected to the B-IA and A-IA pins of the other L9110 motor driver.
- Digital Pin 7 (D7) connected to the B-IA and A-IA pins of one L9110 motor driver.
- Digital Pin 13 (D13) connected to the B-IB and A-IB pins of the other L9110 motor driver.
- Analog Pin 0 (A0) connected to the Vout pin of the GP2Y1010AU0F dust sensor.
- Digital Pin 4 (D4) connected to the LED pin of the GP2Y1010AU0F dust sensor.
- 5V pin connected to the VCC pins of the HC-SR04 Ultrasonic Sensor, both L9110 motor drivers, and one side of the 220 Ohm resistor.
- GND pin connected to the GND pins of the HC-SR04 Ultrasonic Sensor, both L9110 motor drivers, the green LED, and the GP2Y1010AU0F dust sensor.
L9110 Motor Drivers
- Each L9110 has its MOTOR A and MOTOR B pins connected to the corresponding pins of two hobby motors.
- VCC and GND pins connected to the 5V and GND of the Arduino UNO, respectively.
Motors
- Each motor has one pin connected to the MOTOR A or MOTOR B output of the L9110 motor driver and the other pin to GND.
HC-SR04 Ultrasonic Sensor
- TRIG and ECHO pins connected to Digital Pins 2 and 3 of the Arduino UNO, respectively.
- VCC and GND pins connected to the 5V and GND of the Arduino UNO, respectively.
GP2Y1010AU0F Dust Sensor
- VCC and S-GND pins connected to the 5V and GND of the Arduino UNO, respectively.
- Vout pin connected to Analog Pin 0 (A0) of the Arduino UNO.
- LED pin connected to Digital Pin 4 (D4) of the Arduino UNO.
- V-LED pin connected to one side of the 220 Ohm resistor, the other side connected to the 5V of the Arduino UNO.
LEDs
- The anode of the green LED connected to Digital Pin 12 (D12) of the Arduino UNO, cathode to GND.
- The common anode of the four-pin LED connected to the 5V of the Arduino UNO through a 150 Ohm resistor.
- The cathodes of the red, green, and blue elements of the four-pin LED connected to Digital Pins 11 (D11), 10 (D10), and 9 (D9) of the Arduino UNO through 150 Ohm resistors, respectively.
Resistors
- 220 Ohm resistor connected between the 5V of the Arduino UNO and the V-LED pin of the GP2Y1010AU0F dust sensor.
- 150 Ohm resistors connected between the common anode of the four-pin LED and the 5V of the Arduino UNO, and between the cathodes of the red, green, and blue elements of the four-pin LED and the Digital Pins 11 (D11), 10 (D10), and 9 (D9) of the Arduino UNO, respectively.
Electrolytic Capacitor
- Connected between the VCC and S-GND pins of the GP2Y1010AU0F dust sensor.
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
}
void loop() {
}
This code is a template and does not contain any specific functionality. It is expected that the user will fill in the setup()
and loop()
functions with code to initialize the circuit's components and define the main behavior of the circuit, respectively.