Circuit Documentation
Summary
This circuit is designed to interface various components with an Arduino Nano microcontroller. It includes a flame sensor, an ultrasonic sensor, a servo motor, two DC motors, a motor driver, a relay module, a water pump, and a 12V battery. The circuit is likely intended for a robotics or automation project that requires flame detection, distance measurement, motor control, and water pumping capabilities.
Component List
Flame Sensor
- Pins: VCC, GND, D0, A0
- Description: A sensor that detects the presence of a flame or fire.
Arduino Nano
- Pins: D1/TX, D0/RX, RESET, GND, D2 to D13, VIN, 5V, A0 to A7, AREF, 3V3
- Description: A compact microcontroller board based on the ATmega328P.
L298N DC Motor Driver
- Pins: OUT1, OUT2, 12V, GND, 5V, OUT3, OUT4, ENA, IN1, IN2, IN3, IN4, ENB
- Description: A module for controlling the direction and speed of DC motors.
DC Motor
- Pins: pin 1, pin 2
- Description: An electric motor that runs on direct current (DC) electricity.
Servo
- Pins: GND, VCC, PWM
- Description: A rotary actuator or linear actuator that allows for precise control of angular or linear position.
HC-SR04 Ultrasonic Sensor
- Pins: VCC, TRIG, ECHO, GND
- Description: A sensor that measures distance by emitting ultrasonic waves and measuring the time taken for the echo to return.
Battery 12V
- Pins: +, -
- Description: A 12V power source for the circuit.
Water Pump
- Pins: VCC, GND
- Description: A device that moves water from one place to another.
12V Single Channel Relay
- Pins: NC, COM, NO, IN, GND, VCC
- Description: An electrically operated switch that allows you to turn on or off a circuit using a low power signal.
Wiring Details
Flame Sensor
- VCC connected to Arduino Nano 5V
- GND connected to Arduino Nano GND
- A0 connected to Arduino Nano A0
Arduino Nano
- 5V connected to Flame Sensor, HC-SR04, Servo, Relay VCC, L298N ENA and ENB
- GND connected to Flame Sensor, HC-SR04, Water Pump, Relay GND
- A0 connected to Flame Sensor A0
- D2 connected to L298N IN1
- D3 connected to L298N IN2
- D4 connected to L298N IN3
- D5 connected to L298N IN4
- D6 connected to Servo PWM
- D7 connected to Relay IN
- D8 connected to HC-SR04 TRIG
- D9 connected to HC-SR04 ECHO
L298N DC Motor Driver
- 12V connected to Battery 12V +
- GND connected to Battery 12V -
- ENA, ENB connected to Arduino Nano 5V
- IN1 connected to Arduino Nano D2
- IN2 connected to Arduino Nano D3
- IN3 connected to Arduino Nano D4
- IN4 connected to Arduino Nano D5
- OUT1, OUT2 connected to DC Motor 1
- OUT3, OUT4 connected to DC Motor 2
DC Motor 1
- pin 1 connected to L298N OUT3
- pin 2 connected to L298N OUT4
DC Motor 2
- pin 1 connected to L298N OUT1
- pin 2 connected to L298N OUT2
Servo
- VCC connected to Arduino Nano 5V
- GND connected to Arduino Nano GND
- PWM connected to Arduino Nano D6
HC-SR04 Ultrasonic Sensor
- VCC connected to Arduino Nano 5V
- TRIG connected to Arduino Nano D8
- ECHO connected to Arduino Nano D9
- GND connected to Arduino Nano GND
Battery 12V
- + connected to L298N 12V and Relay NO
- - connected to L298N GND
Water Pump
- VCC connected to Relay COM
- GND connected to Arduino Nano GND
12V Single Channel Relay
- VCC connected to Arduino Nano 5V
- GND connected to Arduino Nano GND
- IN connected to Arduino Nano D7
- NO connected to Battery 12V +
- COM connected to Water Pump VCC
Documented Code
Arduino Nano Code (sketch.ino)
void setup() {
}
void loop() {
}
Note: The provided code is a template and does not contain any functional code specific to the circuit's operation. It will need to be populated with the appropriate setup and loop functions to control the connected components.