Arduino-Controlled Flame-Detecting Robot with Water Pump Activation
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to control a set of gearmotors, a servomotor, and a mini water pump, with the capability to detect flames using flame sensors. It is powered by a 9V battery pack and uses an Arduino UNO as the central microcontroller to manage inputs and outputs. A 5V relay is used to control the mini water pump, and an L293D motor driver is used to control the gearmotors. The servomotor is directly controlled by the Arduino UNO. The flame sensors provide digital outputs to the Arduino, which can be used to trigger specific actions within the system.
Component List
Microcontroller
- Arduino UNO: A microcontroller board based on the ATmega328P, with a variety of digital and analog I/O pins.
Motor Driver
- L293D Motor Driver: A motor driver IC capable of driving two DC motors or one stepper motor.
Motors
- Gearmotor DC Wheels Left: A DC gearmotor used to drive the left wheel of a vehicle or robot.
- Gearmotor DC Wheels Right: A DC gearmotor used to drive the right wheel of a vehicle or robot.
- Servomotor SG90: A small and lightweight servomotor for precise angular movement.
Sensors
- Sensor SHT113 Flame: Flame detection sensors that provide both analog and digital outputs.
Power Supply
- Battery AAx6 9V: A battery pack consisting of six AA batteries to provide a 9V power supply.
Actuators
- Mini Water Pump: A small pump for moving water, controlled via a relay.
- 5V Relay: An electromechanical switch used for turning the mini water pump on and off.
Miscellaneous
- Comment: Placeholder for additional notes or comments in the circuit design.
Wiring Details
Arduino UNO
Vinconnected to the common terminal of the 5V relay and the VCC of the 9V battery pack.GNDconnected to the ground of various components including sensors, relay, servomotor, and battery pack.5Vconnected to the VCC of the 5V relay and flame sensors.D11connected to pin 8 of the L293D motor driver.D10connected to pin 7 of the L293D motor driver.D9connected to pin 6 of the L293D motor driver.D8connected to pin 5 of the L293D motor driver.D6connected to the SIG pin of the Servomotor SG90.D5connected to the In pin of the 5V relay.D4,D3,D2connected to the D0 pins of the flame sensors.
L293D Motor Driver
Pin 3connected to the VCC of the 9V battery pack.Pin 4connected to the ground of the 9V battery pack.Pin 8,Pin 7,Pin 6,Pin 5connected to the Arduino UNO for control signals.Pin 10,Pin 9connected to the right gearmotor.Pin 12,Pin 11connected to the left gearmotor.
Gearmotors
- Left Gearmotor: Connected to pins 12 and 11 of the L293D motor driver.
- Right Gearmotor: Connected to pins 10 and 9 of the L293D motor driver.
Servomotor SG90
SIGconnected to D6 of the Arduino UNO.VCCandGNDconnected to the 5V and ground of the Arduino UNO, respectively.
Flame Sensors
A0(Analog output) not connected in this configuration.D0(Digital output) connected to D4, D3, and D2 of the Arduino UNO for different instances.GNDandVCCconnected to the ground and 5V of the Arduino UNO, respectively.
Mini Water Pump
VCCconnected to the Normally Open pin of the 5V relay.GNDconnected to the ground of the circuit.
5V Relay
Common terminalconnected to the Vin of the Arduino UNO and VCC of the 9V battery pack.GNDandVCCconnected to the ground and 5V of the Arduino UNO, respectively.Inconnected to D5 of the Arduino UNO.Normally Openconnected to the VCC of the mini water pump.
Documented Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
The provided code is a template for the Arduino UNO with empty setup() and loop() functions. The setup() function is intended for initialization code that runs once when the system starts, and the loop() function contains the main logic of the program that runs repeatedly. Specific functionality must be implemented within these functions to control the motors, read sensor inputs, and activate the relay for the water pump based on the desired behavior of the circuit.