Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino Mega 2560 Controlled Robotics Circuit with Motor Drivers and Actuators

Image of Arduino Mega 2560 Controlled Robotics Circuit with Motor Drivers and Actuators

Circuit Documentation

Summary

This circuit is designed to control a DC motor and a servo motor using an Arduino Mega 2560 microcontroller. It includes a motor driver (BTS7960) for the DC motor, a PCA9685 module for PWM control, an Adafruit TCA9548A I2C multiplexer for expanding I2C capabilities, and a L298N DC motor driver for controlling a linear actuator. The circuit is powered by a 12V battery, and a buck converter is used to step down the voltage for the servo motor. The Arduino Mega 2560 manages the control signals for the motors and communicates with the I2C devices.

Component List

  • Arduino Mega 2560: A microcontroller board based on the ATmega2560 with numerous digital and analog I/O pins.
  • DC Motor: A motor that converts electrical energy into mechanical rotation.
  • Servo: A rotary actuator that allows for precise control of angular position.
  • Linear Actuator: A device that creates motion in a straight line using electrical energy.
  • L298N DC Motor Driver: A module that can control two DC motors or one stepper motor.
  • Battery 12V: A power source for the circuit.
  • Adafruit TCA9548A: An I2C multiplexer that allows multiple I2C devices to be connected to the same I2C bus.
  • Motor Driver (BTS7960): A high-power motor driver capable of driving high current loads.
  • PCA9685: A 16-channel, 12-bit PWM I2C-bus LED controller.
  • Buck Converter: A DC-DC converter that steps down voltage from a higher level to a lower level.

Wiring Details

Arduino Mega 2560

  • D2 PWM connected to BTS7960 r pwm
  • D3 PWM connected to BTS7960 f pwm
  • GND connected to common ground
  • SDA connected to TCA9548A INPUTSDA
  • SCL connected to TCA9548A INPUTSCL
  • D24 connected to L298N IN1
  • D22 connected to BTS7960 r en
  • 5V connected to PCA9685 vcc
  • D25 connected to L298N IN2
  • D23 connected to BTS7960 f en

DC Motor

  • pin 1 connected to BTS7960 m+
  • pin 2 connected to BTS7960 m_

Servo

  • gnd connected to Buck Converter OUT-
  • vcc connected to Buck Converter OUT+
  • pulse connected to PCA9685 pwm

Linear Actuator

  • + connected to L298N OUT4
  • - connected to L298N OUT3

L298N DC Motor Driver

  • GND connected to common ground
  • 12V connected to Battery 12V +
  • 5V connected to PCA9685 vcc
  • ENA connected to PCA9685 pwm

Battery 12V

  • + connected to L298N 12V, BTS7960 5v, and Buck Converter IN+
  • - connected to common ground

Adafruit TCA9548A

  • INPUTSDA connected to Arduino Mega 2560 SDA
  • INPUTSCL connected to Arduino Mega 2560 SCL
  • 7SDA connected to PCA9685 sda
  • 7SCL connected to PCA9685 scl

Motor Driver (BTS7960)

  • r pwm connected to Arduino Mega 2560 D2 PWM
  • f pwm connected to Arduino Mega 2560 D3 PWM
  • gnd connected to common ground
  • r en connected to Arduino Mega 2560 D22
  • f en connected to Arduino Mega 2560 D23
  • m+ connected to DC Motor pin 1
  • m_ connected to DC Motor pin 2
  • 5v connected to Battery 12V +

PCA9685

  • gnd connected to common ground
  • vcc connected to Arduino Mega 2560 5V
  • sda connected to TCA9548A 7SDA
  • scl connected to TCA9548A 7SCL
  • pwm connected to L298N ENA

Buck Converter

  • IN+ connected to Battery 12V +
  • IN- connected to common ground
  • OUT+ connected to Servo vcc
  • OUT- connected to Servo gnd

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:

}

Note: The provided code is a template and does not contain any functional code for controlling the motors or interfacing with the I2C devices. The actual implementation should include initialization of the I2C bus, configuration of PWM outputs, and logic for motor control based on the application requirements.