Arduino Mega-Controlled Robotic Motor with LCD Interface and Keypad Input
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question is designed to control a MRB Planetary gearbox motor using an Arduino Mega 2560 microcontroller. The system includes a rotary encoder for position feedback, an LCD (20x4 with I2C interface) for display purposes, and a 4x4 membrane matrix keypad for user input. A motor driver is used to interface the motor with the Arduino, allowing for control over the motor's direction and speed through PWM signals. The power supply provides the necessary voltage and current to the motor driver and other components.
Component List
MRB Planetary Gearbox Motor
- Description: A motor with a built-in planetary gearbox.
- Pins:
+(Power),-(Ground)
Rotary Encoder
- Description: An encoder that provides feedback on the motor's position.
- Pins:
SHEILD,B PHASE,0V,VCC,A PHASE
LCD 20x4 I2C
- Description: A 20x4 character LCD display with an I2C interface.
- Pins:
GND,5v,SCA,SCL
4X4 Membrane Matrix Keypad
- Description: A keypad with 16 buttons arranged in a 4x4 matrix.
- Pins:
R1,R2,R3,R4,C1,C2,C3,C4
Motor Driver
- Description: A driver module to control the motor.
- Pins:
Positive,Ground,Motor Phase A,Motor Phase B,Direction,PWM
Arduino Mega 2560
- Description: A microcontroller board based on the ATmega2560.
- Pins: Multiple digital and analog pins, power pins, and communication pins.
Power Supply
- Description: Provides power to the circuit.
- Pins:
+(Positive),-(Ground)
Wiring Details
MRB Planetary Gearbox Motor
+connected to Motor DriverMotor Phase A-connected to Motor DriverMotor Phase B
Rotary Encoder
VCCconnected to Arduino Mega 25605V0Vconnected to Arduino Mega 2560GNDB PHASEconnected to Arduino Mega 2560D3 PWMA PHASEconnected to Arduino Mega 2560D2 PWM
LCD 20x4 I2C
GNDconnected to Arduino Mega 2560GND5vconnected to Arduino Mega 25605VSCAconnected to Arduino Mega 2560D20/SDASCLconnected to Arduino Mega 2560D21/SCL
4X4 Membrane Matrix Keypad
R1connected to Arduino Mega 2560D30R2connected to Arduino Mega 2560D32R3connected to Arduino Mega 2560D34R4connected to Arduino Mega 2560D36C1connected to Arduino Mega 2560D38C2connected to Arduino Mega 2560D40C3connected to Arduino Mega 2560D42C4connected to Arduino Mega 2560D44
Motor Driver
Positiveconnected to Power Supply+Groundconnected to Power Supply-Directionconnected to Arduino Mega 2560D7 PWMPWMconnected to Arduino Mega 2560D8 PWMMotor Phase Aconnected to MRB Planetary Gearbox Motor+Motor Phase Bconnected to MRB Planetary Gearbox Motor-
Power Supply
+connected to Motor DriverPositive-connected to Motor DriverGround
Documented Code
Arduino Mega 2560
File: sketch.ino
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
File: documentation.txt
(No additional documentation provided for the code)
This concludes the documentation for the given circuit. The wiring details provide a clear connection map for each component, and the code section provides the initial setup for the Arduino Mega 2560, which will be further developed to control the motor, read inputs from the keypad, and display information on the LCD.