Arduino Mega 2560 Controlled Motor System with LCD Display and Keypad Interface
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino Mega 2560 microcontroller interfacing with various components including a motor driver, a planetary gearbox motor, a rotary encoder, an LCD display, a membrane matrix keypad, and a power supply. The Arduino Mega 2560 controls the motor driver to drive the motor and reads inputs from the rotary encoder and keypad. The LCD display is used to show relevant information.
Component List
MRB Planetary Gearbox Motor
- Description: A motor with a planetary gearbox for precise control.
- Pins: +, -
Rotary Encoder
- Description: A device that converts the angular position or motion of a shaft to an analog or digital signal.
- Pins: SHEILD, B PHASE, 0V, VCC, A PHASE
LCD 20x4 I2C
- Description: A 20x4 character LCD display with I2C interface.
- Pins: GND, 5V, SCA, SCL
4X4 Membrane Matrix Keypad
- Description: A keypad with 4 rows and 4 columns for user input.
- 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: IOREF, RESET, 3V3, 5V, GND, VIN, A0-A15, D0-D53, AREF, SDA, SCL
Power Supply
- Description: A power supply to provide necessary voltage and current to the circuit.
- Pins: +, -
Wiring Details
MRB Planetary Gearbox Motor
- + connected to Motor Driver Motor Phase A
- - connected to Motor Driver Motor Phase B
Rotary Encoder
- VCC connected to Arduino Mega 2560 5V and LCD 20x4 I2C 5V
- 0V connected to Arduino Mega 2560 GND, LCD 20x4 I2C GND, and Motor Driver Ground
- B PHASE connected to Arduino Mega 2560 D3 PWM
- A PHASE connected to Arduino Mega 2560 D2 PWM
LCD 20x4 I2C
- GND connected to Arduino Mega 2560 GND and Rotary Encoder 0V
- 5V connected to Arduino Mega 2560 5V and Rotary Encoder VCC
- SCA connected to Arduino Mega 2560 D20/SDA
- SCL connected to Arduino Mega 2560 D21/SCL
4X4 Membrane Matrix Keypad
- R1 connected to Arduino Mega 2560 D30
- R2 connected to Arduino Mega 2560 D32
- R3 connected to Arduino Mega 2560 D34
- R4 connected to Arduino Mega 2560 D36
- C1 connected to Arduino Mega 2560 D38
- C2 connected to Arduino Mega 2560 D40
- C3 connected to Arduino Mega 2560 D42
- C4 connected to Arduino Mega 2560 D44
Motor Driver
- Positive connected to Power Supply +
- Ground connected to Power Supply - and Arduino Mega 2560 GND
- Motor Phase A connected to MRB Planetary Gearbox Motor +
- Motor Phase B connected to MRB Planetary Gearbox Motor -
- Direction connected to Arduino Mega 2560 D7 PWM
- PWM connected to Arduino Mega 2560 D8 PWM
Power Supply
- + connected to Motor Driver Positive
- - connected to Motor Driver Ground
Documented Code
Arduino Mega 2560 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