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 / 5638
5637  |  5639
Subject: 
Re: What is RPM of Gear Motor???
Newsgroups: 
lugnet.robotics
Date: 
Tue, 13 Jul 1999 23:23:01 GMT
Viewed: 
1049 times
  
In article
<Pine.SOL.3.91.990713140911.12481I-100000@teer13.acpub.duke.edu>, Luis
Villa <liv@duke.edu> wrote:

Well, this took me a while, but it appears that the rotation sensor is
reliably counting at nearly 2500 rpm. Here are the numbers:

~650 ticks per second. This count is not quite constant, but the error
is within 5 percent. The way it is geared, this could be either the
result of slop (very likely) or rotation sensor loss (no way of telling.)

60 seconds per minute gives 39000 ticks per minute. Again, due to my
setup, there is no way of measuring this exactly- the arm is blocked by a
bar on either side and cannot do an actual full revolution, which is why
I counted by the second and extrapolate here.

16 counts to the revolution gives ~2440 rpm. If anyone wants to try to
better this, please let me know, whether it works or not.

Luis

P.S. Dave, I have no idea why you are wrong, but if you can think of it
(since you are more familiar with the hardware than I am) I'd also love
to know. Also, the suggestion to sense a +2/+1/-1/-2 has a basic problem,
since there is no way to distinquish between +2 and -2, so unless you
declare a directionality in the code beforehand, you are stuck.


650 ticks per second works out to about 1.5 ms per tick.  I didn't think
the RCX sampled inputs that fast - I thought it was 3.0 ms per sample.  If
so, this would mean that the RCX is capable of adding 2 to the rotation
value during a single sample.  I'll have to look at the code again and see
what I missed.

The idea would be that you remember the direction of the last change (and
assume some arbitrary one first off)...

int dir = 1;
int rotation = 0;

void accumulate(delta)
{
  switch(delta % 3)
  {
    case 0:
      break;
    case 1:
      dir = 1;
      rotation++;
      break;
    case 2:
      rotation += dir * 2;
      break;
    case 3:
      dir = -1;
      roration--;
      break;
   }
}

If you're just slightly above 1 delta per sample period, then the
occasional delta of 2 will get accumulated just fine.  As you approach 2x
the sample frequency, things start to get risky.  An "instant" reverse
will continue to count in the old direction.  Of course you could probably
work out the system mechanically such that change of direction and a delta
of 2 could never happen in the same sample period.

--
reply to: dbaum at enteract dot com



Message has 1 Reply:
  Re: What is RPM of Gear Motor???
 
(...) Nope-it's not. I use LegOS, and that only adds 1- I know that particular section of code inside and out. Therefore, it must be the sampling time. Or a really egregious error on my part. (...) <snips much code> (...) Yes, but at this speed, you (...) (25 years ago, 13-Jul-99, to lugnet.robotics)

Message is in Reply To:
  Re: What is RPM of Gear Motor???
 
Well, this took me a while, but it appears that the rotation sensor is reliably counting at nearly 2500 rpm. Here are the numbers: ~650 ticks per second. This count is not quite constant, but the error is within 5 percent. The way it is geared, this (...) (25 years ago, 13-Jul-99, to lugnet.robotics)

16 Messages in This Thread:



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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
6 hours ago
Custom Search

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