I’m attempting to drive a unipolar motor as bipolar and I am not seeing anywhere near the speed that I think I should.
I have tried full step and 1/32 microstep and no luck. The motor is specified to go up to 300 RPM with at least 60in-oz of torque. However I am seeing the motor without load begin to stutter around 110RPM.
I’m not very experienced with steppers, but I think the problem may be that this motor is designed for Bi-Phase driving. I’ve attached a graphic from the specifications for illustration.
Any suggestions on how to drive these at rated speed (with the simple step and dir signals) are greatly appreciated!
How are you powering your stepper motor driver and what do you have the current limit set to? How is your stepper motor connected to the driver, and what is the motor’s rated current? What are you using as your main controller? In general, the key to getting high step rates with a stepper motor is to ramp the speed up gradually; you cannot just start from rest at full speed. Have you tried ramping up the step rate?
Thanks for your response and sorry for my omission of key facts!
I am powering the motor with +12v from a PC power supply. The motor’s rated current is 2A and I have operated the driver just under maximum current. (I did not measure the voltage, I simply turned down the current until the motor stopped to discover which way was down on the trim pot. I then turned it up to maximum and backed off slightly since I read the max current was 2.2A from the driver. The motor got slightly warm to the touch but never hot.) I have the motor connected to the DRV8825 utilizing only the end taps on the windings, the center taps are left “floating.” So to reference the picture A, C, D, and F are used to drive the motor. At present I do not have the exact connections to the driver at hand. If this is critical I can post that information.
I did run a program where I started at 20RPM in 1/32 step mode and incremented the RPM by 1 every second. The program also reported the current RPM to a PC over a serial connection. I noted the “shakyness” around 100RPM and erradic behavior at 130RPM.
For reference I am driving the DRV8825 with an mbed development board utilizing a PWM channel. I am using a pulse width of 2uS as I read that it requires 1.6uS (Think I have that number right.)
You should absolutely not be assuming that one extreme of the potentiometer corresponds to 2.2 A, and even if it did, the driver cannot deliver more than around 1.5A per coil without additional cooling. Can you try setting the current limit to something appropriate and see what happens? You should also try ramping up the speed a lot faster than 1 RPM per second. Other ways to get more speed from a stepper motor involve using a higher voltage and more current (e.g. putting a heat sink on the driver so that you can deliver closer to the stepper motor’s rated voltage).
Wow, you’re not letting me get away with being lazy at all!
My 1RPM/Sec test was not for any real application just to check functionality. Also, I do have heatsinks to apply to the drivers, but I have not applied them hey. I will do this before performing any further testing.
I’ll get back to this in a few days and report my progress.
I have finally gotten back to this and I am seeing some very strange behavior. SO either I’m doing something wrong (most likely) or there is something wrong with the driver.
I am measuring the current from the circled via on the bottom of the board and it goes as high as 3.3V and as low as 0V with the pot at the other extreme. Is this normal?
Another odd thing is that the driver chip does not get very hot even when the Vref is 3.3V.
I have the driver strapped into full step mode when doing the measurements.
I then set the Vref to 0.8V and tested the motor. It does not even run smoothly when attempting to run at 20 RPM. Now for where I could be stupid… My calculation for 20 RPM in full step mode has the PWM set up with a period of 15000 uS with a pulse width of 2 uS.
Yes. You can see from the schematic that the VREF pin is just the output of a potentiometer with one side tide to 3.3V and the other to ground.
This might be because it’s going into thermal shutdown too fast. Are you actively doing anything with the sleep, enable, or reset pins?
Can you describe in more detail what you mean by “does not run smoothly”? Previously you implied that the “shakiness” started at 100 RPM; has that behavior now changed?
At this point, to help you I think I need to know about the details of your system. Can you tell me how you are powering everything and how you have everything connected? A picture would be very helpful. Also, how many steps/revolution, is your stepper motor (I cannot confirm your RPM calculation without knowing this) and what is its rated voltage? Finally, can you post the simplest program that demonstrates the problem (I’m imagining something that is only 10 or 20 lines long)?
By the way, the pulse width needs to be at least 1.9 us on the step pin; there is no real benefit to having it be that short, though. I suggest you just make it be high for half the period and low for half the period, which should always keep you safely above the 2 us requirement.
The code is running on an mbed ARM development board and the basic code is as follows:
PwmOut motorSim(p21);
int main()
{
motorPulse.rise(&revolution); // Currently not used
motorSim.period_us(15000);
motorSim=0.5f; // Set duty cycle to 50%
//motorSim.pulsewidth_us(2); - Old code
wait(10);
I have the reset and sleep pins tied to +3.3V and in the test Vref is set to 0.8V. I checked the driver heat with my highly calibrated finger and it is not even warm to the touch, so I would think that thermal shut down is not the case, but I’m pretty green here. (I’m being a bit lazy about attaching the heat sinks I have since I need to mix a 2 part thermal adhesive and I want to attach several but don’t want to commit to it if I can’t get decent performance from the drivers.)
The motor is rated at 4V and 2A per coil with a 1.8 degree per full step (200 steps/revolution, by my calculation).
I have connected Vmot to a +12V line from a PC power supply (off of one of the HDD/CDROM supplies)
I should also let you know that the black block in the video is an optointerruptor that is currently not connected to my proto board. I am planning on using it to directly measure the motor RPM once I can get it running smoothly to make sure it is performing as I expect.
The shaky performance at 100 RPM has changed but I suspect that is because I switched from 1/32 microstepping to full step. (I did divide the period by 32 when in microstepping mode.)
When I went to full stepping I saw the erradic performance and thought it might have been because I left the DIR pin floating, so I strapped it to ground where is still is.
Sorry for omitting that detail. (As you might guess I’m a very “iterative” developer.)
Can you post some pictures of your board and setup? Can you put a multimeter in line with one of your stepper motor coils and tell me what current you measure when in full-step mode and the step input held high or low (i.e. while not stepping)?
If you have another driver you can easily test, the simplest approach might just be to see if it behaves the same way. If not, then the first driver is probably damaged.
It was an incredibly stupid mistake on my part. I was not using a common ground over the logic portion of the driver. My mbed processor is getting power and ground from USB and I had some lines tied to that ground but I was using my motor power supply ground as the main logic ground for the board.
Now that I have that worked out the motor runs smooth as silk at 100RPM!
Now time for more testing. Thanks for all of your help!
When I put the new driver in and it performed exactly the same right off the bat I want back to the most reliable source for the error… me!
I checked all of my signal wiring and found the ground issue. I also had some pins using +5V for logic high and others at +3.3V. So, I had the driver good and confused!