Arduino UNO Controlled Motor and Servo System with Pushbutton Interface
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes various components such as an Arduino UNO, DC Mini Metal Gear Motor, Rocker Switch, Red Pushbuttons, a Servo, a 2x 18650 battery pack, and an H-Bridge (ponte h). The circuit is designed to control a motor and a servo using pushbuttons and a rocker switch, with the Arduino UNO serving as the central microcontroller.
Component List
DC Mini Metal Gear Motor
- Description: A small DC motor with metal gears for increased durability and torque.
- Pins: IN1, IN2
Rocker Switch
- Description: A switch that can toggle between two states.
- Pins: 1, 2
Arduino UNO
- Description: A microcontroller board based on the ATmega328P.
- Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
Red Pushbutton
- Description: A pushbutton switch that can be used to provide user input.
- Pins: Pin 2, Pin 1, Pin 3, Pin 4
H-Bridge (ponte h)
- Description: A motor driver that allows control of the direction and speed of a motor.
- Pins: OUT4-Motor2, OUT3-Motor2, OUT2-Motor1, OUT1-Motor1, 5V, GND, 12V, IN3, IN1, IN2, IN4
Servo
- Description: A small servo motor for precise control of angular position.
- Pins: GND, VCC, PWM
2x 18650 Battery Pack
- Description: A battery pack that holds two 18650 lithium-ion batteries.
- Pins: vcc, gnd
Wiring Details
DC Mini Metal Gear Motor
- IN1 is connected to OUT4-Motor2 of the H-Bridge.
- IN2 is connected to OUT3-Motor2 of the H-Bridge.
Rocker Switch
- Pin 1 is connected to the common ground (GND) shared by the Arduino UNO, H-Bridge, Servo, and Red Pushbuttons.
- Pin 2 is connected to gnd of the 2x 18650 Battery Pack.
Arduino UNO
- D2 is connected to Pin 4 of a Red Pushbutton.
- D3 is connected to Pin 4 of another Red Pushbutton.
- D4 is connected to IN3 of the H-Bridge.
- D5 is connected to IN4 of the H-Bridge.
- D9 is connected to PWM of the Servo.
- D10 is connected to Pin 4 of another Red Pushbutton.
- D11 is connected to Pin 4 of another Red Pushbutton.
- GND is connected to the common ground (GND) shared by the Rocker Switch, H-Bridge, Servo, and Red Pushbuttons.
- 5V is connected to VCC of the Servo.
Red Pushbuttons
- Pin 2 of all Red Pushbuttons are connected together and to the common ground (GND) shared by the Rocker Switch, H-Bridge, Servo, and Arduino UNO.
- Pin 4 of one Red Pushbutton is connected to D2 of the Arduino UNO.
- Pin 4 of another Red Pushbutton is connected to D3 of the Arduino UNO.
- Pin 4 of another Red Pushbutton is connected to D10 of the Arduino UNO.
- Pin 4 of another Red Pushbutton is connected to D11 of the Arduino UNO.
H-Bridge (ponte h)
- GND is connected to the common ground (GND) shared by the Rocker Switch, Servo, and Arduino UNO.
- 12V is connected to vcc of the 2x 18650 Battery Pack.
- OUT4-Motor2 is connected to IN1 of the DC Mini Metal Gear Motor.
- OUT3-Motor2 is connected to IN2 of the DC Mini Metal Gear Motor.
- IN3 is connected to D4 of the Arduino UNO.
- IN4 is connected to D5 of the Arduino UNO.
Servo
- GND is connected to the common ground (GND) shared by the Rocker Switch, H-Bridge, and Arduino UNO.
- VCC is connected to 5V of the Arduino UNO.
- PWM is connected to D9 of the Arduino UNO.
2x 18650 Battery Pack
- vcc is connected to 12V of the H-Bridge.
- gnd is connected to Pin 2 of the Rocker Switch.
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:
}
Additional Documentation (documentation.txt)
This document provides a comprehensive overview of the circuit, including a summary, component list, wiring details, and documented code.