To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 10826
10825  |  10827
Subject: 
Re: Rotation Sensors - slightly dissapointed...
Newsgroups: 
lugnet.robotics
Date: 
Fri, 25 Feb 2000 12:43:48 GMT
Viewed: 
1100 times
  
Stefan Elsner wrote in message ...

I think that motors need time to stop.

If you rotate a motor backwards until the Sensor shows 0, then turn it off,
it might go to -2 until it is fully stopped. So if you do a ClearSensor()
afterwards your motor is off by two counts and your code won't know it.
That's why I asked.

I developed a vector-based code in which I set a variable to the location I
want the motor to spin to, and mount the sensor directly on the gearmotor.
The idea is I can implement this code into any of my projects. When the
motor detects it has either a) slewed or b) the variable has changed (ie, I
told it to move), it will rotate until it gets within 8 counts (that is
changable through defines) and then move at slow-speed (pulsing on for 1/100
sec pulsing off for 1/100 sec) until it reaches the destination. If it
overshoots it backs up. The code always guarentees the motor will remain
where you told it to go - unless you apply a force to slew the motor beyond
what the motor can torque against...


I keep the position changes in a variable and always compare the sensor to
the variable. This keeps the error down to the two counts mentioned above
and it won't accumulate.

Sounds kind of like what I'm doing.

    Iain
--
tokama       http://www.oxford.net/~hendryjr
ICQ UIN      5362826
AIM          Linjerflyg
h e n d r y j r  AT  o x f o r d  DOT  n e t
(Remove bibiphoque to reply)



Message is in Reply To:
  Re: Rotation Sensors - slightly dissapointed...
 
I think that motors need time to stop. If you rotate a motor backwards until the Sensor shows 0, then turn it off, it might go to -2 until it is fully stopped. So if you do a ClearSensor() afterwards your motor is off by two counts and your code (...) (25 years ago, 25-Feb-00, to lugnet.robotics)

16 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