Arduino-Controlled Robotics and Sensing Platform with Servo, Ultrasonic Sensor, and Flame Detection
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to interface various components with an Arduino UNO microcontroller. It includes a servo motor, an HC-SR04 ultrasonic sensor, a 5V mini water pump, a flame sensor, two DC motors, a 1-Channel Relay, an L298N DC motor driver, a 9V battery, a 12V battery, and two types of DC barrel jacks. The circuit is likely intended for a robotics or automation project that requires distance measurement, flame detection, motor control, and water pumping capabilities.
Component List
Servo
- Description: A motor with feedback control for precise angle positioning.
- Pins: Ground (GND), Power (VCC), Control Pulse (Pulse).
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: Various digital and analog I/O pins, power supply pins, and communication interfaces.
HC-SR04 Ultrasonic Sensor
- Description: A sensor for measuring distance using ultrasonic waves.
- Pins: Power (VCC), Trigger (TRIG), Echo (ECHO), Ground (GND).
5V Mini Water Pump
- Description: A small pump for moving water, operates at 5V.
- Pins: Positive (Positive Pin), Negative (Negative Pin).
Flame Sensor
- Description: A sensor for detecting the presence of a flame.
- Pins: Power (VCC), Ground (GND), Digital Output (D0), Analog Output (A0).
DC Motor
- Description: An electric motor that runs on direct current (DC) electricity.
- Pins: Terminal 1 (Pin 1), Terminal 2 (Pin 2).
1-Channel Relay (5V 10A)
- Description: An electromechanical switch that allows a low-power signal to control a higher power circuit.
- Pins: Normally Closed (NC), Signal (Signal), Common (C), Power (Power), Normally Open (NO), Ground (Ground).
L298N DC Motor Driver
- Description: A dual H-bridge motor driver for controlling the direction and speed of two DC motors.
- Pins: Motor Outputs (OUT1, OUT2, OUT3, OUT4), Power Supply (12V, GND, 5V), Control Inputs (ENA, IN1, IN2, IN3, IN4, ENB), Jumpers for enabling 5V (5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2).
9V Battery
- Description: A standard 9V battery for providing power.
- Pins: Positive (+), Negative (-).
12V Battery
- Description: A 12V battery for providing power to components requiring higher voltage.
- Pins: Positive (+), Negative (-).
2.1mm DC Barrel Jack
- Description: A connector for power supply adapters.
- Pins: Switch (Switch), Sleeve (Sleeve), Center (Center).
2.1mm Barrel Jack with Terminal Block
- Description: A connector that combines a barrel jack with a terminal block for easy connection to power sources.
- Pins: Positive (POS), Negative (NEG).
Wiring Details
Servo
- Ground (GND) connected to Arduino UNO GND.
- Power (VCC) connected to Arduino UNO 5V.
- Control Pulse (Pulse) connected to Arduino UNO Digital Pin 5 (D5).
Arduino UNO
- Ground (GND) connected to various components for common ground.
- 5V output used to power several 5V components.
- Digital pins (D2, D3, D4, D5, D7, D8, D9, D10, D12) used for control signals to sensors, relay, and motor driver.
HC-SR04 Ultrasonic Sensor
- Power (VCC) connected to Arduino UNO 5V.
- Trigger (TRIG) connected to Arduino UNO Digital Pin 4 (D4).
- Echo (ECHO) connected to Arduino UNO Digital Pin 3 (D3).
- Ground (GND) connected to Arduino UNO GND.
5V Mini Water Pump
- Positive (Positive Pin) connected to 1-Channel Relay Common (C).
- Negative (Negative Pin) connected to 9V Battery Negative (-).
Flame Sensor
- Power (VCC) connected to Arduino UNO 5V.
- Ground (GND) connected to Arduino UNO GND.
- Digital Output (D0) connected to Arduino UNO Digital Pin 2 (D2).
DC Motor (Instance 1)
- Terminal 1 (Pin 1) connected to L298N Motor Output 2 (OUT2).
- Terminal 2 (Pin 2) connected to L298N Motor Output 1 (OUT1).
DC Motor (Instance 2)
- Terminal 1 (Pin 1) connected to L298N Motor Output 4 (OUT4).
- Terminal 2 (Pin 2) connected to L298N Motor Output 3 (OUT3).
1-Channel Relay (5V 10A)
- Power (Power) connected to Arduino UNO 5V.
- Ground (Ground) connected to Arduino UNO GND.
- Signal (Signal) connected to Arduino UNO Digital Pin 12 (D12).
- Common (C) connected to 5V Mini Water Pump Positive (Positive Pin).
- Normally Open (NO) connected to 9V Battery Positive (+).
L298N DC Motor Driver
- Motor Outputs (OUT1, OUT2, OUT3, OUT4) connected to DC Motors.
- Power Supply (12V) connected to 12V Battery Positive (+).
- Ground (GND) connected to Arduino UNO GND.
- Control Inputs (ENA, IN1, IN2, IN3, IN4, ENB) connected to Arduino UNO Digital Pins (D7, D8, D9, D10).
- Jumpers (5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2) set to enable onboard 5V regulation.
9V Battery
- Positive (+) connected to 1-Channel Relay Normally Open (NO).
- Negative (-) connected to 5V Mini Water Pump Negative (Negative Pin).
12V Battery
- Positive (+) connected to L298N DC Motor Driver 12V.
- Negative (-) connected to 2.1mm Barrel Jack with Terminal Block Negative (NEG).
2.1mm Barrel Jack with Terminal Block
- Positive (POS) connected to 12V Battery Positive (+).
- Negative (NEG) connected to 12V Battery Negative (-).
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Note: The provided code is a template and does not contain any functional code. It needs to be populated with the logic to control the components based on the circuit's requirements.