MOTOR CONTROL

“Designing and Prototyping a Dynamic Motor Speed Control System for Unstable Load Transportation”

Overview

This project required both individual and team efforts to design, simulate, and build a motorized platform capable of transporting a vertically unstable aluminum bar across variable distances without tipping or falling. The system utilized a small rotary motor and an Arduino-based control strategy to manage the platform’s motion. The assignment emphasized the integration of mechanical design, simulation, and motor control techniques to create a functional and reliable prototype. It also included a competitive aspect, challenging teams to optimize their designs for speed while maintaining load stability.

 

Learning Objectives

1. Motor Speed Control: Implement control strategies to maintain constant rotor speed and ensure stable motion of the platform.

2. Dynamic System Simulation: Use SolidWorks to simulate multibody dynamics and validate the stability of the system under motion.

3. Prototyping and Testing: Develop a physical prototype to test and refine the motor control system.

4. System Optimization: Minimize transportation time while maintaining the stability of a dynamically unstable load.

5. Collaboration and Documentation: Work collaboratively to design and build the system, and document the process, iterations, and outcomes in a design portfolio.

Initial Motor Testing

n class, we collaborated in pairs to develop a conceptual understanding of how to control the motor for our project. Over several sessions, we analyzed the motor’s maximum RPM and explored control methods using Arduino IDE. We utilized code to serially print the motor’s RPM, allowing us to observe how RPM varied with different input function values. The motor’s maximum RPM was approximately 250, dropping to around 200 when bearing the average cart load in the class.

We also worked on programming the motor to run at both constant and variable velocities, including acceleration and deceleration. This code was later adapted to control our cart.

Individual Design

The individual design component requires us to create and simulate a multibody dynamic model in SolidWorks to optimize the motion of a motor control system for transporting a vertical aluminum bar.

On the left is the car I design, itensures stability and functionality by incorporating several key features. Holes are cut into the base to partially recess the wheels, lowering the centroid and improving balance for the top-heavy load. The motor, hidden beneath the platform, drives a belt-and-pulley system connected to one wheel, which transfers rotational motion to the other wheels through the rigid frame, ensuring synchronized movement. The symmetrical layout of the base and wheels further enhances stability, while the compact placement of components keeps the design streamlined and efficient. These features collectively meet the project requirements for transporting a vertically unstable load with controlled motion and minimized risk of toppling.

Motion Study

To ensure the beam remained stable on the cart, the vehicle needed to move at a varying velocity while maintaining a specific maximum acceleration limit. This involved simulating multibody dynamics and conducting motion studies in SolidWorks by adding linear motion segments, rotational motion in the motor, and analyzing the results for forces and reaction forces in the Y component.

And below is an image of plots of the maximum acceleration and reaction forces:

Code

This code controls motors for stable and precise transport of a vertical aluminum bar, meeting the assignment’s requirements. It uses PWM for smooth acceleration and deceleration, with encoder feedback for real-time speed monitoring and adjustment. The system ensures non-uniform velocity with controlled acceleration, preventing the bar from toppling and showcasing Arduino IDE for precise motor control.

Setup and Initialization

The setup() function initializes the encoder and motor control pins, attaching an interrupt to pin 2 to monitor encoder pulses and determine the rotation direction. PWM outputs are configured on pins 5 and 6 for motor control, while serial communication is set up for speed monitoring. The interrupt calls myFunction() to update the encoder count based on direction changes.

Motor Control Logic

In the loop(), Motor 1 is accelerated to the target speed (vnew) using accelerateMotor(), runs briefly while its speed is measured and printed via getSpeed(), and then decelerated to a stop with decelerateMotor(). After a pause, the same sequence is applied to Motor 2. The process ensures smooth acceleration and deceleration, maintaining system stability. The program stops after both motors complete their cycles.

Speed Calculation and Utility Functions

The getSpeed() function calculates motor speed by measuring the change in encoder counts over time and scaling it to RPM. accelerateMotor() and decelerateMotor() smoothly adjust PWM values in steps (step) with delays (delayStep) to prevent abrupt speed changes. These functions provide stable motor operation and precise control, meeting the project requirements for smooth motion.

Troubleshooting

Initially, we encountered issues with our circuit connection, which led to the Arduino Uno being damaged during testing. This setback required us to pause and carefully evaluate the wiring to identify the root cause of the problem. After pinpointing the incorrect connections, we acquired a replacement Arduino Uno from EPIC. With the new board, we meticulously rechecked and reassembled the circuit, ensuring all components were properly connected. This troubleshooting process taught us the importance of careful setup and debugging, ultimately allowing us to successfully complete the task with a functional system.

The challenges highlighted in the video, such as the cart's instability and loose circuitry, provided valuable troubleshooting insights. Removing the grip belts, which caused instability despite improving traction, taught us the importance of evaluating design trade-offs. Adding axle gears to align the wheels demonstrated the value of precision in mechanical connections.

 

Relocating the circuitry to the underside of the cart resolved interference issues, emphasizing the need for careful spatial planning and secure component placement. These experiences reinforced the importance of iterative testing, strategic problem-solving, and balancing functionality with design constraints for robust system performance.

Final Product

Here is an image of our completed cart, and below is a video showcasing it traveling a distance of 5 feet in both directions: