To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 1649
1648  |  1650
Subject: 
Re: non-linear motor speed problem
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Tue, 11 Mar 1997 17:41:48 GMT
Original-From: 
Chuck McManis <cmcmanis@netcom.IHATESPAMcom>
Reply-To: 
cmcmanis@netcom.com^AvoidSpam^
Viewed: 
1704 times
  
Peter Harrison wrote:
The servos I am using turn out to have a _very_ non-linear
response to the speed set by the PWM routines. [...]

So:   why do I get this motor response?

Several reasons. Understand that PWM has the effect of controlling
the amount of power fed to the motor, power is related to current
in a quadratic (p = i^2r), and your current is related to the
voltage applied and the motor parameters (inductance and coil
resistance). So linear response isn't in the cards. This is
further aggravated by operating under no-load which causes the
motor to be limited by back emf (as opposed to stall current)
and well you will pretty much get either full on or full off
behaviour. As you add load, this will reduce the frequency
response of the motor and you will still get non-linear changes
in speed but you will flatten the curve out tremendously.

      what can I do about it?

First, consider operation under load. If that doesn't make a
difference then you've got motors with a lot more torque than
you need. But even so ...

      would the frequency of the PWM make a big difference?

Yes, the motors are in effect an LR tank circuit and they have
a resonant frequency, however I don't think this is the problem
in your case.

      should I build an external speed controller?

Of course :-) Or you can buy an RC one (a bit pricey though)

I have no real low speed control and so can not get a PI
control working smoothly.

Actually the 6811 can be used as a PID controller
however you will need to either increase the PWM resolution or
rewrite the motor routines to be PFM based instead.

So let's assume your optical feedback paths are connect to TIC1 and
TIC2, then you could set the interrupt controller to interrupt on
the rising edge (or falling, or both) of these inputs. Then, to
travel at speed 'n', you set a 'pulses per unit' target (where
unit is probably a multiple of milliseconds) Now you will have
to add three interrupt service routines:
tic1 = accumulate counts from input
tic2 = accumulate counts from input
'systick' = monitor counts/target and adjust output.

Basically systick runs every millisecond (as long as you don't
print to the LCD which disables interrupts while writing) It
snapshots the current tick accumulations (based on your units)
and compares those units to the target numbers. If they are low
it turns on the motor bits, if they are high it turns off the
motor bits. Finally it resets the accumulations, adding in any
'excess' that had come in during the previous sample (this keeps
the count accurate). I used this technique on a 'Wild Cougar'
R/C car with moderate success. The trick is that the better your
tick resolution (that is the more ticks/millisecond you can get)
the better you speed control will be.

--Chuck

--
cmcmanis@netcom.com              http://www.professionals.com/~cmcmanis
All opinions in the non-included text above are the sole opinions of
the author.



Message is in Reply To:
  non-linear motor speed problem
 
I am using servos converted to plain gearmotors as the motive power for my baby bot. Finally I worked out how to add shaft encoders to them. (Found a small opto switch to poke through the inside of the case on the first gear). The servos I am using (...) (28 years ago, 11-Mar-97, to lugnet.robotics.handyboard)

3 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR