Skip to content

This project provides a cost-effective and robust solution for controlling brushed DC motors in mobile robotics applications, specifically designed as a replacement for commercial dual-channel brushed Electronic Speed Controllers (ESCs).

Notifications You must be signed in to change notification settings

khaderafeez/Arduino-Based-Dual-Channel-Brushed-Motor-Controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Arduino-Based Dual-Channel Brushed Motor Controller (ESC Replacement)

Project Overview

This project provides a cost-effective and robust solution for controlling brushed DC motors in mobile robotics applications, specifically designed as a replacement for commercial dual-channel brushed Electronic Speed Controllers (ESCs). It leverages an Arduino Uno microcontroller, an RC receiver, and readily available L298N motor driver modules to achieve differential steering (tank-style control) for a robot.

Components and Functionality

Circuit Diagram

Below is the circuit diagram illustrating the connections between the Arduino Uno, L298N motor drivers, RC receiver, motors, and power sources.

Roborace Circuit Diagram

The system is built around an Arduino Uno, which acts as the central controller, interpreting commands from an RC receiver and translating them into motor control signals for L298N motor drivers.

1. Power System

  • 12V Battery: Main power source for the motors, providing the necessary voltage and current for robust operation.
  • 9V Battery (HIW): Dedicated power supply for the Arduino Uno, ensuring stable and isolated power for the microcontroller, free from motor noise.
  • 30A Drone Brushless ESC or Any 5V Supply (Optional/Auxiliary): Likely used as a source of regulated 5V (via its BEC) for other low-power components or auxiliary systems, if needed.

2. Control System

  • Arduino Uno: The brain of the robot.
    • Receives PWM signals from the RC receiver (e.g., Flysky FS-IA6).
    • Executes custom control logic to interpret joystick inputs (throttle and steering).
    • Generates PWM and digital signals to command the motor drivers.
  • FS-IA6 Receiver: Receives radio commands from a remote control transmitter. It outputs PWM signals corresponding to joystick positions, which are read by the Arduino.

3. Motor Drive System

  • L298N Motor Driver Modules (LBT_1 & LBT_2): These H-bridge modules interface the Arduino's low-power control signals with the high-power requirements of the DC motors.
    • Two L298N modules are used, typically one for the "LEFT SIDE" motors and one for the "RIGHT SIDE" motors.
    • Each L298N channel is controlled using a "sign-magnitude" PWM scheme, allowing for variable speed and direction.
    • If the robot uses four motors (two per side), the motors on each side are wired in parallel to a single channel of the respective L298N module.

How it Replaces Commercial ESCs (e.g., PowerMax 20-D)

Commercial dual-channel brushed ESCs like the PowerMax 20-D integrate RC signal interpretation and motor driving into a single unit. This project replicates that functionality by:

  • Receiving RC Input: Just like a commercial ESC, it takes standard RC PWM signals from a receiver.
  • Customizable Control Logic: Instead of proprietary firmware, the Arduino's open-source code allows for complete customization of how RC inputs translate into motor commands.
  • Driving Brushed Motors: The L298N modules provide the necessary power stage to drive brushed DC motors with precise speed and direction control.

Motivation and Impact

This project was born out of a critical need within a robotics club participating in various competitions like robo-race and robo-soccer. With 8 robots and only 3 commercial PowerMax 20-D ESCs, the team faced significant challenges:

  1. Limited Resources: The scarcity of ESCs meant that only a few robots could be fully operational at any given time, hindering practice and development for the entire team.
  2. High Cost of Failure: Commercial ESCs are expensive. Continuous, high-stress usage during competitions and practice often led to ESC failures due to overheating or overcurrent, quickly depleting the team's prize money and budget.
  3. Dependence on Commercial Units: Relying solely on commercial ESCs created a bottleneck and financial strain.

By developing and implementing this Arduino-based solution, the robotics club achieved:

  • Significant Cost Savings: L298N modules are considerably cheaper than commercial ESCs, allowing the club to equip all 8 robots with motor controllers for a fraction of the cost.
  • Enhanced Practice Time: With more operational robots, the team could conduct extensive practice sessions, allowing members to gain more hands-on experience and refine their driving skills.
  • Improved Reliability and Repairability: The modular nature of the Arduino + L298N setup meant that if a component failed, it could be quickly and cheaply replaced, minimizing downtime and financial impact.
  • Increased Competitiveness: The ability to practice more effectively and maintain a larger fleet of robots directly contributed to improved performance and winning more competitions.

This project transformed a significant constraint into a strategic advantage, fostering innovation and resourcefulness within the robotics club.

Usage

  1. Wiring: Connect the FS-IA6 receiver, L298N motor drivers, and motors to the Arduino Uno as per the pin definitions in the code. Ensure proper power connections from the 12V and 9V batteries.
  2. Calibration: Adjust the CH_MID_UPPER, CH_MAX, CH_MID_LOWER, and CH_MIN constants in the code to match the actual pulse width values from your specific RC transmitter at neutral, full forward, and full backward positions.
  3. Upload Code: Compile and upload the Flysky_BTS_Roborace.ino code to your Arduino Uno.
  4. Test: Power up the robot and test the controls with your RC transmitter.

About

This project provides a cost-effective and robust solution for controlling brushed DC motors in mobile robotics applications, specifically designed as a replacement for commercial dual-channel brushed Electronic Speed Controllers (ESCs).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages