Vibration at low speed May 17, 2016 01:09PM |
Registered: 7 years ago Posts: 4 |
// Private Functions void StepperMove(tStepperMotor* Motor) { // TMR2 interrumpts every 50us. // StepperMotor_Update is called every ~600us (from main) int speed = (TOP_SPEED - Motor->Speed); if (++Motor->SpeedCounter >= speed) { Motor->SpeedCounter = 0; if (Motor->PendingSteps > 0) { Step(Motor, FORWARD); } else if (Motor->PendingSteps < 0) { Step(Motor, BACKWARD); } else { Motor->Moving = NO; Motor->Hold.Status = ShouldRelease; } } }A third option I thought would be to energize using a PWM (simulated using Timer) with an increasing Duty Cycle, starting with a very small duty and then increasing it up to 100%. At speed 10, that would mean (40-10)x600us = 18ms between steps. Slowly energizing the phase using a duty cycle would mean slower current build-up and less transitory...? At higher speeds that would not matter because I'd be stepping faster than what the inertia overshoot might affect my rotation and phase changes. (?)
Re: Vibration at low speed May 17, 2016 02:19PM |
Registered: 11 years ago Posts: 1,049 |
Re: Vibration at low speed May 17, 2016 02:31PM |
Registered: 7 years ago Posts: 4 |
Re: Vibration at low speed May 17, 2016 03:30PM |
Registered: 10 years ago Posts: 14,672 |
Re: Vibration at low speed May 18, 2016 12:06PM |
Registered: 7 years ago Posts: 4 |
Re: Vibration at low speed May 18, 2016 06:16PM |
Registered: 11 years ago Posts: 5,780 |