Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino Mega 2560 and BTS7960 Motor Driver Controlled High RPM DC Motor System

View and Edit Project In Cirkit DesignerImage of Arduino Mega 2560 and BTS7960 Motor Driver Controlled High RPM DC Motor System

Circuit Documentation

Summary

This circuit involves an Arduino Mega 2560 microcontroller interfacing with a BTS7960 motor driver to control an RS 775 DC motor. The circuit also includes a MW LRS-350-24 power supply and a Step Down Buck converter to provide the necessary voltage levels. The Arduino Mega 2560 is programmed to control the motor driver via PWM signals.

Component List

  1. TB6600

    • Description: Stepper motor driver
    • Pins: ENA-, ENA+, DIR-, DIR+, PUL-, PUL+, B-, B+, A-, A+, GND, VCC
  2. Arduino Mega 2560

    • Description: Microcontroller board
    • Pins: IOREF, RESET, 3V3, 5V, GND, VIN, A0-A15, D0-D53, AREF, SDA, SCL
  3. RAMPS1.4

    • Description: RepRap Arduino Mega Pololu Shield
    • Pins: 2B, 2A, 1A, 1B, S, GND, VCC, SDA, SCL, 12V5A, 12V11A, THERM0-THERM2, 5V, D11, D6, D5, D4, D1, D2, A3, A4, A9, D40, D42, A11, A5, A10, D44, A12, D52, D50, D53, D51, D49, D32, D47, D45, D43, D41, D39, D37, D35, D33, D31, D29, D27, D25, D23, D17, D16, PS-ON, MS1, MS2, MS3, Vmot, VDD, DIR, STEP, SLP, RESET, ENABLE, 12V
  4. MW LRS-350-24

    • Description: 24V power supply
    • Pins: +24V Output, -24V Output, GND, N, L
  5. NEMA23

    • Description: Stepper motor
    • Pins: D, B, C, A
  6. BTS7960 Motor Driver

    • Description: High-power motor driver
    • Pins: Pin 1-12
  7. Step Down Buck converter

    • Description: Voltage regulator
    • Pins: IN+, IN-, OUT-, OUT+
  8. RS 775 DC MOTOR

    • Description: DC motor
    • Pins: V+, V-

Wiring Details

TB6600

Arduino Mega 2560

RAMPS1.4

MW LRS-350-24

NEMA23

BTS7960 Motor Driver

Step Down Buck converter

RS 775 DC MOTOR

Documented Code

// Define the PWM pins connected to the BTS7960 Motor Driver
const int pwmPin1 = 3; // Connected to Pin 7 on BTS7960
const int pwmPin2 = 5; // Connected to Pin 8 on BTS7960
const int pwmPin3 = 6; // Connected to Pin 9 on BTS7960
const int pwmPin4 = 7; // Connected to Pin 10 on BTS7960
const int pwmPin5 = 8; // Connected to Pin 11 on BTS7960
const int pwmPin6 = 9; // Connected to Pin 12 on BTS7960

void setup() {
  // Set PWM pins as output
  pinMode(pwmPin1, OUTPUT);
  pinMode(pwmPin2, OUTPUT);
  pinMode(pwmPin3, OUTPUT);
  pinMode(pwmPin4, OUTPUT);
  pinMode(pwmPin5, OUTPUT);
  pinMode(pwmPin6, OUTPUT);

  // Set all PWM pins to maximum value (255) for high RPM
  analogWrite(pwmPin1, 255);
  analogWrite(pwmPin2, 255);
  analogWrite(pwmPin3, 255);
  analogWrite(pwmPin4, 255);
  analogWrite(pwmPin5, 255);
  analogWrite(pwmPin6, 255);
}

void loop() {
  // No need to do anything in the loop, motor runs continuously at high RPM
}