CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

ultra low speed PWM motor control

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
hazardmike
Guest







ultra low speed PWM motor control
PostPosted: Wed Feb 17, 2010 2:32 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Feb 17, 2010 3:02 pm     Reply with quote

I would use Google to find sample projects for telescope motor drive
systems:
http://www.ai.uga.edu/mc/alcor/
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Wed Feb 17, 2010 3:15 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Feb 17, 2010 8:12 pm     Reply with quote

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







PostPosted: Thu Feb 18, 2010 3:15 am     Reply with quote

Feedback is the answer.
I have built telescope control systems. Smile
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
PostPosted: Mon Feb 22, 2010 3:58 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Feb 25, 2010 12:17 pm     Reply with quote

#hazardmike,

I could move the motor with a duty cycle of 5.25%, its the slowest i can get ...

how is your work?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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