Arduino Mega 2560 Controlled Robotic Arm with Joystick and Battery Power
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino Mega 2560 microcontroller, four servo motors, a 12V battery, and a KY-023 Dual Axis Joystick Module. The circuit is designed to control the servo motors based on the input from the joystick module.
Component List
Arduino Mega 2560
- Description: A microcontroller board based on the ATmega2560.
- Pins: IOREF, RESET, 3V3, 5V, GND, VIN, A0-A15, D21/SCL, D20/SDA, D19/RX1, D18/TX1, D17 PWM/RX2, D16 PWM/TX2, D15/RX3, D14/TX3, D0 RX0, D1 TX0, D2 PWM, D3 PWM, D4 PWM, D5 PWM, D6 PWM, D7 PWM, D8 PWM, D9 PWM, D10 PWM, D11 PWM, D12 PWM, D13 PWM, AREF, SDA, SCL, D52, D50, D48, D46, D44, D42, D40, D38, D36, D34, D32, D30, D28, D26, D24, D22, D53, D51, D49, D47, D45, D43, D41, D39, D37, D35, D33, D31, D29, D27, D25, D23.
Servo Motor (x4)
- Description: A motor that can be controlled to rotate to a specific angle.
- Pins: gnd, vcc, pulse.
12V Battery
- Description: A power source providing 12V.
- Pins: -, +.
KY-023 Dual Axis Joystick Module
- Description: A joystick module that provides analog output for X and Y axes and a digital output for the switch.
- Pins: GND, +5V, VRx, VRy, SW.
Wiring Details
Arduino Mega 2560
- VIN: Connected to the + pin of the 12V Battery.
- GND: Connected to the - pin of the 12V Battery.
- A0: Connected to the VRx pin of the KY-023 Dual Axis Joystick Module.
- D3 PWM: Connected to the pulse pin of the first Servo Motor.
- D5 PWM: Connected to the pulse pin of the second Servo Motor.
- D6 PWM: Connected to the pulse pin of the third Servo Motor.
- D9 PWM: Connected to the pulse pin of the fourth Servo Motor.
Servo Motor (1)
- vcc: Connected to the + pin of the 12V Battery.
- gnd: Connected to the - pin of the 12V Battery.
- pulse: Connected to the D3 PWM pin of the Arduino Mega 2560.
Servo Motor (2)
- vcc: Connected to the + pin of the 12V Battery.
- gnd: Connected to the - pin of the 12V Battery.
- pulse: Connected to the D5 PWM pin of the Arduino Mega 2560.
Servo Motor (3)
- vcc: Connected to the + pin of the 12V Battery.
- gnd: Connected to the - pin of the 12V Battery.
- pulse: Connected to the D6 PWM pin of the Arduino Mega 2560.
Servo Motor (4)
- vcc: Connected to the + pin of the 12V Battery.
- gnd: Connected to the - pin of the 12V Battery.
- pulse: Connected to the D9 PWM pin of the Arduino Mega 2560.
12V Battery
- +: Connected to the VIN pin of the Arduino Mega 2560 and the vcc pins of all Servo Motors.
- -: Connected to the GND pin of the Arduino Mega 2560 and the gnd pins of all Servo Motors.
KY-023 Dual Axis Joystick Module
- +5V: Connected to the + pin of the 12V Battery.
- GND: Connected to the - pin of the 12V Battery.
- VRx: Connected to the A0 pin of the Arduino Mega 2560.
Documented Code
sketch.ino
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
documentation.txt