Arduino Mega 2560-Based Dual Servo Motor Control with Capacitive Proximity Sensors
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino Mega 2560 microcontroller, two Micro servo 9G motors, and two LJC18A3-B-Z/BY Capacitive Proximity Sensors. The Arduino Mega 2560 serves as the central controller, interfacing with the servos and sensors to perform various tasks. The servos are used for precise mechanical movements, while the proximity sensors detect the presence of objects.
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.
Micro servo 9G (x2)
- Description: A small and lightweight servo motor used for precise control of angular position.
- Pins: GND, +5V, PWM.
LJC18A3-B-Z/BY Capacitive Proximity Sensor (x2)
- Description: A sensor that detects the presence of nearby objects without physical contact.
- Pins: VO (BLU), VI (BRN), SIG (BLK).
Wiring Details
Arduino Mega 2560
- 5V Pin:
- Connected to +5V pin of both Micro servo 9G motors.
- Connected to VI (BRN) pin of both LJC18A3-B-Z/BY Capacitive Proximity Sensors.
- GND Pin:
- Connected to GND pin of both Micro servo 9G motors.
- Connected to VO (BLU) pin of both LJC18A3-B-Z/BY Capacitive Proximity Sensors.
- D2 PWM Pin:
- Connected to PWM pin of one Micro servo 9G motor.
- D3 PWM Pin:
- Connected to PWM pin of the other Micro servo 9G motor.
- D4 PWM Pin:
- Connected to VI (BRN) pin of both LJC18A3-B-Z/BY Capacitive Proximity Sensors.
- D5 PWM Pin:
- Connected to SIG (BLK) pin of one LJC18A3-B-Z/BY Capacitive Proximity Sensor.
- D6 PWM Pin:
- Connected to SIG (BLK) pin of the other LJC18A3-B-Z/BY Capacitive Proximity Sensor.
Micro servo 9G (1)
- +5V Pin:
- Connected to 5V pin of Arduino Mega 2560.
- GND Pin:
- Connected to GND pin of Arduino Mega 2560.
- PWM Pin:
- Connected to D2 PWM pin of Arduino Mega 2560.
Micro servo 9G (2)
- +5V Pin:
- Connected to 5V pin of Arduino Mega 2560.
- GND Pin:
- Connected to GND pin of Arduino Mega 2560.
- PWM Pin:
- Connected to D3 PWM pin of Arduino Mega 2560.
LJC18A3-B-Z/BY Capacitive Proximity Sensor (1)
- VI (BRN) Pin:
- Connected to 5V pin of Arduino Mega 2560.
- VO (BLU) Pin:
- Connected to GND pin of Arduino Mega 2560.
- SIG (BLK) Pin:
- Connected to D5 PWM pin of Arduino Mega 2560.
LJC18A3-B-Z/BY Capacitive Proximity Sensor (2)
- VI (BRN) Pin:
- Connected to 5V pin of Arduino Mega 2560.
- VO (BLU) Pin:
- Connected to GND pin of Arduino Mega 2560.
- SIG (BLK) Pin:
- Connected to D6 PWM pin of Arduino Mega 2560.
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:
}
Additional Documentation (documentation.txt)