-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with Motor Control in CCW direction #14
Comments
Considering the possibility that the erratic behavior is due to overheating drivers. See motor manual for specs. The motor has a phase resistance of 7.0 ohms. With only USB power (5V), it should try to pull ~0.714 amps. The motor is only rated for 0.65amps, but that difference seems relatively negligible and the behavior suggests more of a software related issue. |
Tried speeding up the I2C bus on the Raspberry Pi using sudo modprobe -r i2c_bcm2708 && sudo modprobe i2c_bcm2708 baudrate=400000 but that didn't seem to work. |
I tried running the The example sets up a stepper like this: myStepper = mh.getStepper(200, 1) # 200 steps/rev, motor port #1
myStepper.setSpeed(30) # 30 RPM I modified the parameters like so: myStepper = mh.getStepper(400, 2) # 400 steps/rev, motor port #2
myStepper.setSpeed(30) # 30 RPM and the motor wigged out, erratically twitching back and forth. I tried reducing the speed to 5 RPM: myStepper = mh.getStepper(400, 2) # 400 steps/rev, motor port #2
myStepper.setSpeed(5) # 5 RPM And surprisingly, the Then I tried running the example at 1RPM myStepper = mh.getStepper(400, 2) # 400 steps/rev, motor port #2
myStepper.setSpeed(1) # 1 RPM Movement became more erratic and I couldn't kill the process. Shortly after the pi died from a dead battery, so it's possible the odd behavior was power related. |
I'm still working through the MotorHAT library, and don't fully understand all the code yet. But wondering why this snippet is repeated twice... first on lines 89-91 and then again on lines 114-116. |
Among other things, it seems that a bit of the erratic behavior and backwards jitter is a result of light counter torque applied to the motor shaft. This is evident when pinching the motor shaft by hand. |
The Adafruit MotorHat seems to have issues driving the stepper motor in the CCW (counter-clockwise ) direction. The movement is smooth in the CW (clockwise) direction, but erratic when moving CCW. A simple test script shows it skips a microstep every 8th step or so, and even in single step mode it still produces erratic behavior and can even move backwards every few steps when being driven too quickly.
It seems many others have had similar issues with the Adafruit-Motor-HAT-Python-Library. Check out the issues and pull requests.
Currently the distributed image for the sweep-3d-scanner is using:
However, these solutions don't seem to remedy the issues with CCW stepper motion. Instead, the process of resetting the base of the scanner must be accomplished at a slow speed such that the erratic motor movement is manageable.
A proper solution would permit a much faster base reset.
The text was updated successfully, but these errors were encountered: