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 / 5944
5943  |  5945
Subject: 
Re: Distance Sensor
Newsgroups: 
lugnet.robotics
Date: 
Sat, 31 Jul 1999 16:04:35 GMT
Viewed: 
1053 times
  
In lugnet.robotics, Greg Majewski writes:
Hello,
Very sorry if this topic has already been brought up; I don't read this group,
and don't even have a Mindstorms kit.
I was thinking about how to make a distance sensor the other day, and I came
up
with a very simple idea, though I can not test it to see if it works:
Create a large wheel out of hinge plates and have a touch sensor placed on one
of the sides of the "wheel," so that every time the wheel turns once, the
touch
sensor is set off once. You could find out how much distance one rotation of
the wheel covers. So, you could measure things with the wheel, or program it
to
go a specific distance. Say the wheel moved one foot every rotation, and you
wanted the vehicle the wheel was attatched to to move ten feet. The touch
sensor could then be programmed to stop the vehicle from moving after it had
been triggered ten times. This could also work in another way: Have the
vehicle
travel along a straight line, like up against a wall or something. When the
vehicle hit the end of the line, you could somehow see how many times the
touch
sensor had been activated, then figure out the distance, not that it would be
terribly useful though :) I hope everyone got the point I'm trying to get
across, and again, I'm very sorry if this topic has already been discussed.
Greg "I think the wallpaper's looking at me funny" Majewski
citrusx__@yahoo.com
http://www.geocities.com/TimesSquare/Dome/1888/

This idea will work, but there are easier ways to do this.

By far the easiest solution is to buy one or more rotation ("angle"?) sensors
from Lego.  I overpaid for mine, but I've heard that you can get these for
about $17 US from Lego Shop at Home.  (Sorry, I don't have the URL handy...)
These sensors can be connected to an axle, and provide four "counts" per
rotation.  The RCX converts this into a 16-bit number that counts either up or
down depending on the direction of rotation.

You can also make your own rotation sensor.  One design works like you suggest
-- connect a switch so that it gets pressed once (or more) per revolution of a
wheel.  With this approach, you can tell how far you've turned, but not which
direction, so you really can't tell where you are this way.

An extension of this idea uses two identical sensors which are 90 degrees out
of phase with each other.  This means that each switch is pressed for one half
of a revolution of your wheel, but not at the exact same time.  In the first
quadrant of revolution, neither switch is pressed.  In the second quadrant,
switch A is pressed.  In the third, both switch A and B are pressed, and in the
fourth quadrant, only switch B is pressed.  You monitor the state of the two
switches, and you can tell which direction you are turning based on which
switch turns on or off first.  (This is basically how most wheel encoders work,
internally, including the Lego angle sensor.)

Another technique is to use the light wheel that comes with the Extreme
Creatures kit and the Space Shuttle, and several other "Light" kits from Lego.
This piece has an LED that rotates past eight holes, so you can feed the light
output from one or more of the holes up to a light sensor to detect when the
wheel rotates past.  Again, you cannot tell which direction you're going unless
you use two light sensors.  But this requires a power connection to the light
wheel and a sensor input for each light sensor.

I've found that the most important design consideration for any Lego robot is
to conserve the few sensor inputs and motor outputs that you have available.
The solutions listed above all require at least two sensor inputs to do the job
that the angle sensor will do using only one sensor input, and are considerably
more bulky and less reliable than the single Lego part.  Also, you have to
write your own RCX code to constantly monitor the home-brew rotation sensors,
which uses RCX memory and processor time.  By contrast, the angle sensor is
supported natively by the RCX firmware, so you can just read it to get a
distance measurement in one step.  And because of the rather unusual way that
the RCX "operating system" code works, there is essentially no additional
processor overhead (that wouldn't have been wasted anyway) involved in the use
of the angle sensors.

It is interesting to design these devices out of discrete Lego components in
order to understand the principles that make them work.  But do yourself a
favor and buy a couple of angle sensors when you buy Mindstorms.  These are
really necessary for a huge variety of robotics applications, and it's really a
shame that TLG didn't include a pair of them in the basic RIS.



Message has 1 Reply:
  RE: Distance Sensor
 
(...) Or in any of the expasion packs either. DUH! Cheers, Ralph Hempel - P.Eng ---...--- The train stops at the train station, The bus stops at the bus station, So why am I sitting at a work station? ---...--- Reply to: rhempel at bmts dot com (...) (25 years ago, 31-Jul-99, to lugnet.robotics)

Message is in Reply To:
  Distance Sensor
 
Hello, Very sorry if this topic has already been brought up; I don't read this group, and don't even have a Mindstorms kit. I was thinking about how to make a distance sensor the other day, and I came up with a very simple idea, though I can not (...) (25 years ago, 31-Jul-99, to lugnet.robotics)

9 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
    

Custom Search

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