|
|
View previous topic :: View next topic |
Author |
Message |
hazardmike Guest
|
ultra low speed PWM motor control |
Posted: Wed Feb 17, 2010 2:32 pm |
|
|
Hi all
I have a working PWM 10 bit motor controller - drives a dc brushed motor that is nominally 10 RPM or so. I want to control it down to 1/4 RPM with some accuracy - say 5%.
I can point to example systems (GotoNova, SS2K telescope controllers) that already do this for 150RPM motors but below settings of about 100 which corresponds to 4 RPM, the motor stalls.
Other than add an additional coarse PWM overlay on top of the high frequency one I am already using, I can't think of another way to drive the motor smoothly at very low speeds. All I really want is a dynamic range of about X150.
Anyone got any ideas ? While not a PIC implementation problem as such, this seemed a good place to start.
Cheers
Mike |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Wed Feb 17, 2010 3:15 pm |
|
|
I think, there are two diferent problems:
- Even with inifinite PWM resolution (=setting output voltages very exactly), you most likely need a positional
feedback to achieve constant speed in the "ultra low" range.
- Finite PWM resolution is the other problem. I've achieved good results with fractional modulation schemes. The
pwm value is changed between n and n+1 to increase the resolution. The fractional part of the pwm control value
is added in an accumulator. In case of accumulator overflow, the pulse width is increased once by one count. |
|
|
jaimechacoff
Joined: 14 Feb 2010 Posts: 24 Location: Santiago, Chile
|
|
Posted: Wed Feb 17, 2010 8:12 pm |
|
|
I am doing something very similar with a PIC18F4550 and 2 motors
I have done all the routines, now I am trying to put everything in one chip.
PWM + Encoder + Trapezoidal Ramp + PID + USB connection
and the idea is from here:
http://www.jrkerr.com/icproducts.html
They have used the PIC18F2331 because (maybe), it is the proper one to control servo motors... but its expensive.
Quote: |
The PIC-SERVO SC Motion Control Chip is a complete servo motion control system based on the PIC18F2331 microcontroller. It executes all of the real time processes (PID servo filter, motion profiling, commutation, error monitoring, communications) needed for controlling your motor. The simple serial NMC communications protocol lets you easily connect your microcontroller or PC host computer to multiple controller chips. (The address space supports up to 254 controllers.) The coordinated motion control support allows your host computer to precisely coordinate the motion of up to 16 motors. The same Windows test utilities and libraries used with our motion control boards can be used with your own custom boards designed with the PIC-SERVO SC. |
|
|
|
Ttelmah Guest
|
|
Posted: Thu Feb 18, 2010 3:15 am |
|
|
Feedback is the answer.
I have built telescope control systems.
Mine have been for rather larger scopes than the controls being talked about here, but the same basic problems apply.
The key is that you implement a full 'servo' drive algorithm, not simple PWM. The 'position' controller continuously sends to the motor controller, a string of 'move to here' commands. The motor controller, compares 'here' to it's current position, and uses a PID (or usually a slightly 'enhanced' version of this, with an extra baseline term, reflecting a longer term integral of required power), to apply power to the motor, to move to the next position. It will often end up applying momentarily quite high PWM power levels to start the movement, being throttled back by the 'D' term, since the movement is so small, almost immediately. So 'looking at the waveforms', you will see momentary bursts of high power, not a stable PWM.....
You absolutely 'require' the feedback. You can't get even close to the required control range without it, especially since the loads _will_ change across different parts of the sky, and just with minute variations in the gears...
The only systems running without feedback, are those using steppers (or in the past, their old relatives synchronous AC drives). With these, the speed range is usually limited (for example the Losmandy drive system, only gives 16* sidereal as it's maximum rate), while servo based based systems (the Gemini on the same mount), will normally offer at least 64*. The systems mentioned by the original poster, are both servo based. The SS2K, in particular, was 'well written', with software configurable adjustment of the servo parameters available, allowing it to cope with a wide range of mounts (unfortunately, it's 'replacement from Vixen, is not as good.....).
If the original poster wants to talk 'off group', I have some basic servo code, that is not covered by the commercial agreements that cover most of the stuff I do, and while it will need massive tweaking, depending on the number of pulses per rev that can be implemented from the encoders, and the motor speeds he actually has, it would provide a starting point. It was based on a Maxon motor assembly, with 81:1 reduction to the output shaft, and a 15 pulse encoder on the motor (giving 1215 pulses per output shaft revolution, and 4860 quadrature edges).
The same approach is used even on very cheap systems. If you look at the basic Meade scopes, they have the optical encoders, basically from a cheap mouse attached to the motors, and the main controller sends position commands to these via a modified high voltage I2C bus. Celestron do basically the same, but using a asynch serial instead.
Best Wishes |
|
|
hazardmike Guest
|
ultralow PWM speeds |
Posted: Mon Feb 22, 2010 3:58 pm |
|
|
Hi
Thanks for the responses.
The key message I get from this is to use PID servoing to get the ultralow speeds. This is where I am at - I have the trapezoid and speed code implemented but am now moving through the hardware routines to verify it, increasing in complexity as I go. I was just surprised at the dropout of the motor at high speeds before reaching the low speeds I require.
For example I am planning to use 50ms servo times on a 150 rpm motor driving a 360 tooth worm wheel, around 10Nm and I am aiming for steady-state speed of 1/4 rpm. This will use a 2000ppr encoder to close the loop on the motor drive shaft.
I shall get on with this and see how it progresses.
Cheers
Mike |
|
|
jaimechacoff
Joined: 14 Feb 2010 Posts: 24 Location: Santiago, Chile
|
|
Posted: Thu Feb 25, 2010 12:17 pm |
|
|
#hazardmike,
I could move the motor with a duty cycle of 5.25%, its the slowest i can get ...
how is your work? |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|