Go to Post I'd rather have our robot not fall over. - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-01-2006, 12:12
GlennGraham's Avatar
GlennGraham GlennGraham is offline
Registered User
AKA: Glenn Graham
FLL #0006 (Shark Bait!)
Team Role: Coach
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Beaverton, Oregon
Posts: 20
GlennGraham is an unknown quantity at this point
Vex navigation with ultrasonic and encoders

I'm a 3 year veteran FLL coach and I am starting to investigate what Vex has to offer "out of the box". I've been working with the Starter Kit and added tank treads, encoders, and the ultrasonic sensor. I'm using MPLAB for code development and the libraries installed with easyC. I'm trying to test the envelope of the encoders and sonic sensor to see what they can and can't do using the routines provided in the easyC libraries.

With the encoders hooked directly to the motors running at top speed, if start the encoders, start the motors, execute a while (count < 100) loop, stop the counting, stop the motors, I find the the ending counts are 104 and 106. At that rate, can the encoders achieve single count resolution? Could be skipped counts and I'm looking into whether I can improve things by adjusting the code.

With the ultrasonic sensor, I find that it works pretty well if it faces a smooth, flat, solid surface but gets pretty "iffy" with anything else (hand, leg, cat, etc.). Is this typical? I also noticed that the "cone" of sensitivity is pretty narrow. I was hoping for about 20-30 degrees but its more like 10-15. I suspect I would need to use several to cover a wide enough area to track a moving person/robot/cat.

If anyone has been spent time to characterize the limitations of the sensors I would really enjoy reading an overview of what they have learned. If not, I will be writing one later once I have more experience with them.
  #2   Spotlight this post!  
Unread 11-01-2006, 13:43
Gdeaver Gdeaver is offline
Registered User
FRC #1640
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2001
Location: West Chester, Pa.
Posts: 1,357
Gdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond repute
Re: Vex navigation with ultrasonic and encoders

In Easy C I found there is some latency with the encoder value assignment. In other words there probably will be a couple of clicks between a right and left read. Alternate the encode read oder to compensate. With the sonar sensor you get the time for the first returned wave. To cover a larger area and gather more info on the robot world mount the sonar sensor on a servo and read step read step thru the servo's range. This works very well for IR sensors. You can differentiate between a furniture leg and a wall.
  #3   Spotlight this post!  
Unread 11-01-2006, 14:42
skimoose's Avatar
skimoose skimoose is offline
Parent/Mentor/Engineer
AKA: Arthur Dutra
FRC #0228 (GUS)
Team Role: Electrical
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Meriden, Connecticut
Posts: 568
skimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond reputeskimoose has a reputation beyond repute
Re: Vex navigation with ultrasonic and encoders

Quote:
Originally Posted by GlennGraham
With the ultrasonic sensor, I find that it works pretty well if it faces a smooth, flat, solid surface but gets pretty "iffy" with anything else (hand, leg, cat, etc.). Is this typical?
Our experience with the ultrasonic was similar when we tried to "see" a scale vision tetra. We were scanning with a pan servo and with the small target the sensor was iffy over 26". The sensor was mounted at a angle to best pick up the return from the tetra, but it was still iffy. A cereal box gave a solid return out past 60". The specs say the sensor range is ten feet, so I was happy with these results. The sensor works very well for following a wall, but we need to do more work with spotting objects which aren't very large.

We're just starting to work more seriously with the encoders, so I'll wait a while to comment on those.
__________________

2009 CT Regional Motorola Quality Award
2010 VRC Connecticut Championship Winners & Amaze Award
2010 VRC Championship Divisional Energy Award
2010 WPI Regional Winner
2010 WPI Regional Engineering Inspiration Award
2011 WPI Regional Chairman's Award
2012 WPI Regional Finalists
  #4   Spotlight this post!  
Unread 11-01-2006, 17:31
GlennGraham's Avatar
GlennGraham GlennGraham is offline
Registered User
AKA: Glenn Graham
FLL #0006 (Shark Bait!)
Team Role: Coach
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Beaverton, Oregon
Posts: 20
GlennGraham is an unknown quantity at this point
Re: Vex navigation with ultrasonic and encoders

Thanks,

I'm going to lock the encoder shafts and try to get a good characterization of the latency between reads. My first thought is that I will probably have to read left, read right, read left and then compare the average of left with the value of right if my goal is to match motor speeds. Also, dropping the speed when it gets close to the destination value might reduce the overrun.

Sweeping the sensor with a servo sounds like a fun next step. Set up an array, record the sensor values, then identify the position and value of the smallest (closest) reading to get the heading.
  #5   Spotlight this post!  
Unread 13-01-2006, 12:58
GlennGraham's Avatar
GlennGraham GlennGraham is offline
Registered User
AKA: Glenn Graham
FLL #0006 (Shark Bait!)
Team Role: Coach
 
Join Date: Jan 2006
Rookie Year: 2003
Location: Beaverton, Oregon
Posts: 20
GlennGraham is an unknown quantity at this point
Re: Vex navigation with ultrasonic and encoders

Short update - I'm having fun with the ultrasonic sensor but I'm surprised at how long it takes to get a reading. I've mounted the sensor on a axle which is turned by a servo motor like the old WWII radar dishes. I pan it through 180 degrees measuring the bearig and distance of the closest echo measured. It can pick up a liter pop bottle at about 2 feet away pretty well but its range drops off quickly for anything smaller or less solid. To scan without gaps it needs to take readings at about every 15 degrees. Just stepping through the locations without taking readings is pretty quick (a second or two) but when taking readings it pauses noticeably at each point so the scan takes around 8 - 10 seconds. It can find and approach a stationary pop bottle but wouldn't keep up with someone walking a couple of paces ahead or a slow moving robot. Oh well, it will still have its uses but not for what I was hoping for. If anyone figures out how to get better performance, please let us know.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VEX UltraSonic and Encoder SOLD OUT... Chris_Elston Electrical 5 09-01-2006 13:22
VEX Optical Shaft encoders in FRC sanddrag FIRST Tech Challenge 8 04-10-2005 07:52


All times are GMT -5. The time now is 02:01.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi