Hi, I am using a set of DC motors for position control. I have worked with DC motors and position control on a larger scale (I’ve made robots for FIRST robotics, so thats the scale I am used to). I am using 775 motors controlled by L298 motor drivers and I am setting the speeds over PWM. As expected, when I run the motor at a low voltage, it doesn’t start by itself. I have to have it running at 50% power or more to get it to start spinning, and then I can bring it down to a lower voltage if I want it to run slower than the “starting” voltage. When the voltage is below the starting voltage and it hasn’t moved, there is a high pitched ringing noise (which I assume is the PWM signal). I understand that it is physically impossible to remove at least some baseline starting voltage, but does anyone have any experience on making this better?
Please post a link to the motor, or motor data sheet.
The L298 is an extremely inefficient dinosaur, and is a large part of the problem. Buy a modern motor driver that can handle the start/stall current of the motor, and most likely, your problems will go way.
I actually bought them on amazon from a crappy Chinese company so I don’t see a data sheet provided separately but here is the link for the actual motor.
What do you think? I am new to sourcing my own components, so please bare with me while I figure this all out
Also, if my motor does not seem like a good pick, can anyone recommend a replacement dc motor that will work with one of the motor drivers from Pololu that @jremington reccommended? In terms of how strong of a motor I need, I am winding 1/16" steel cable around a spool to pull a single head. I am going to have 8 of these working together to move the object which will be only 1-2 pounds. So, not much load. Thanks!!
Getting eight DC motors to work together (presumably at the same exact speed) is going to take some experiments and calibration I suspect. Why do you need so many?
I am recreating a cable driven parallel robot design that I saw. It uses eight cables to achieve 6 axis movement (all three translational and all 3 rotational) They actually will all run at their own independently calculated speeds. But these speeds don’t have to be maintained for long, they are just trying to reach a goal set by the encoder.
Don’t guess at how much torque the motor needs. You should measure or calculate the torque needed to move the load at the required speed. Then you can make an intelligent choice of motor. Pololu also has a section of motors.
Once the motor has been chosen, an appropriate driver can be selected.
What powersupply are you using and which current rated motor?
That poor L298 must be hemorrhaging.
Do you have a DMM, measure some motor currents and voltages.
How big a scale?
This motor driver should work for ONE of the linked motors from Amazon. The L298 driver is utterly hopeless.
The main motor that we used is a CIM motor.
I am new to the smaller robotics/electronics, so I am getting used to finding parts that work together.
That motor specs.
What happened to the other motor?
You are still going to have problems with that motor and the L298, 2.7A is free current, the load current will be higher, and with a stall current of 131A, you definitely need an efficient motor driver with current limit.
Then you’ll be using encoders and PID loops to control them and the issue you describe
won’t arise as the closed-loop control will do whatever is necessary to move the motors
to where there are programmed to be, using as much drive as needed.
Do you actually mean position control?
I am using PID loops. The issue arises when the target is within a distance that the PID loop’s output percentage is lower than the starting current required to get the motor to move.
The trouble with PID is it doesn’t know anything about the system it controls. It can be remarkably effective, but sometimes, as here, it is problematic.
You may have to write your own smarter controller that does comprehend the limitations of your motors.
Before that though, I’d try adding something that checks what the PID is asking for and add in a few milliseconds of full power to get a stopped motor moving before falling back to the PWM that the PID is requesting. It may well confuse the hell out of the PID though.
This is what I was thinking. I think that this should work, I’ll give it a test in a little bit
You can have a separate set of PID coefficients for low PWM numbers. For instance, increase the P term to get the motor started then load a lower value for P while it is running.
The issue arises when the target is within a distance that the PID loop’s output percentage is lower than the starting current required to get the motor to move.
You won’t get anywhere until you have the proper motor driver. So far, it seems clear that you do not.
If you are controlling position, how are you measuring position.
PID will be able to control the power of the motors but has no idea about how close the motor is to its STOP position.
Can you post a basic block diagram of how you project will work/look?
What is your overall concept/application?
Ah, then you forgot the I-term? Necessary for finishing a move.
Okay let me take a step back. I haven’t implemented the PID at all yet. That is purely conceptual and it is where I am going to go with the project once I get the motors spinning at whatever speed I want them to first. Once I get that done, I will be able to move on effectively to implementing the PID on this system. I am using encoders to measure the position of each motor.
I am recreating this machine that I saw from scratch: