Arduino Mega 2560 Controlled Joystick Interface with LCD Display and Dual Servo Actuation
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 as the central microcontroller. The circuit features various components such as an LCD screen with I2C interface, an analog joystick, rotary potentiometers, servos, pushbuttons, an SD module, and a 9V battery for power supply. The circuit is designed to interface with input devices (joystick, potentiometers, and buttons) and output devices (LCD screen and servos), and it has storage capabilities through the SD module.
Component List
Arduino Mega 2560
- Microcontroller board based on the ATmega2560
- Offers numerous digital and analog I/O pins
Analog Joystick (Wokwi Compatible)
- Provides two-axis analog input and a pushbutton switch
Rotary Potentiometer
- Variable resistor with a 10k Ohm value
- Used to provide analog input based on its rotational position
LCD screen 16x2 I2C
- Alphanumeric liquid crystal display with 16 characters by 2 lines
- Uses I2C communication for interfacing with the microcontroller
Servo (2 instances)
- Rotary actuators that can be positioned precisely
- Controlled by PWM signals
9V Battery
- Provides power to the circuit
Pushbutton (3 instances)
- Simple switch mechanism for control and input
SDmodule
- Memory card interface module for data storage and retrieval
Wiring Details
Arduino Mega 2560
5Vconnected to VCC of LCD screen, Joystick, SD module, and leg1 of PotentiometerGNDconnected to GND of LCD screen, Joystick, SD module, Servos, and leg2 of PotentiometerA0connected to VERT of JoystickA1connected to HORZ of JoystickA2connected to wiper of PotentiometerD21/SCLconnected to SCL of LCD screenD20/SDAconnected to SDA of LCD screenD2 PWMconnected to pulse of first ServoD3 PWMconnected to pulse of second ServoD52connected to SCK of SD moduleD50connected to MISO of SD moduleD51connected to MOSI of SD moduleD26connected to CS of SD moduleD24,D25,D23connected to Pin 1 (in) of Pushbuttons
Analog Joystick (Wokwi Compatible)
VCCconnected to 5V of Arduino Mega 2560GNDconnected to GND of Arduino Mega 2560VERTconnected to A0 of Arduino Mega 2560HORZconnected to A1 of Arduino Mega 2560SELconnected to D22 of Arduino Mega 2560
Rotary Potentiometer
leg1connected to 5V of Arduino Mega 2560wiperconnected to A2 of Arduino Mega 2560leg2connected to GND of Arduino Mega 2560
LCD screen 16x2 I2C
SCLconnected to D21/SCL of Arduino Mega 2560SDAconnected to D20/SDA of Arduino Mega 2560VCCconnected to 5V of Arduino Mega 2560GNDconnected to GND of Arduino Mega 2560
Servo (2 instances)
pulseconnected to D2 PWM and D3 PWM of Arduino Mega 2560 respectivelyvccconnected to + of 9V Batterygndconnected to GND of Arduino Mega 2560
9V Battery
+connected to vcc of Servos-connected to GND of Arduino Mega 2560
Pushbutton (3 instances)
Pin 1 (in)connected to D24, D25, D23 of Arduino Mega 2560 respectivelyPin 3 (out)connected to GND of Arduino Mega 2560
SDmodule
SCKconnected to D52 of Arduino Mega 2560MISOconnected to D50 of Arduino Mega 2560MOSIconnected to D51 of Arduino Mega 2560CSconnected to D26 of Arduino Mega 2560VCCconnected to 5V of Arduino Mega 2560GNDconnected to GND of Arduino Mega 2560
Documented Code
Arduino Mega 2560 - sketch.ino
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Arduino Mega 2560 - documentation.txt
(No additional documentation provided)