Go to Post Strive for excellence in everything you do, but also recognize it in others when you see it, rather than try to drag it down. - Joe G. [more]
Home
Go Back   Chief Delphi > Technical > Control System
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 10-01-2006, 19:04
polyBot polyBot is offline
Registered User
no team
 
Join Date: Jan 2006
Location: New York
Posts: 4
polyBot is an unknown quantity at this point
Ultrasonic Range Finder

Hi, I was wondering if the minirc from ifirobotics is capable to generate and accept signals to and from an ultrasonic range finder. And if so, how to go about doing so. Please help.
  #2   Spotlight this post!  
Unread 10-01-2006, 19:16
mechanicalbrain's Avatar
mechanicalbrain mechanicalbrain is offline
The red haired Dremel gnome!
FRC #0623 (Ohm robotics)
Team Role: Electrical
 
Join Date: Apr 2005
Rookie Year: 2004
Location: Virginia
Posts: 1,221
mechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond repute
Send a message via AIM to mechanicalbrain Send a message via Yahoo to mechanicalbrain
Re: Ultrasonic Range Finder

I see no reason why not. It uses PWM just like a full sized RC, all you need is a PWM ultrasonic sensor. I recomend either the VEX sensor or Parallax's.
__________________
"Oh my God! There's an axe in my head."
623's 2006 home page
random mechanicalbrain slogans


Last edited by mechanicalbrain : 10-01-2006 at 19:20.
  #3   Spotlight this post!  
Unread 10-01-2006, 19:24
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: Ultrasonic Range Finder

Well it depends on the rangefinder. I have seen ultrasonic rangefinders that output everything from pwm, to serial data. Specifically what rangefinder are you looking at?
__________________
1139 Alumni
  #4   Spotlight this post!  
Unread 10-01-2006, 19:33
polyBot polyBot is offline
Registered User
no team
 
Join Date: Jan 2006
Location: New York
Posts: 4
polyBot is an unknown quantity at this point
Re: Ultrasonic Range Finder

Thanks. Now, I'm having a problem firing and receiving data from the ultrasonic range finder. Currently using srf05 from acroname

:http://www.acroname.com/robotics/parts/R271-SRF05.html

It takes a 40 kHz frequency. How do I generate this using the first default code? And how can I get the PWM signal back? Thanks a lot for help.
  #5   Spotlight this post!  
Unread 10-01-2006, 19:41
MikeDubreuil's Avatar
MikeDubreuil MikeDubreuil is offline
Carpe diem
FRC #0125 (Nu-Trons)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Boston, MA
Posts: 967
MikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond repute
Send a message via AIM to MikeDubreuil
Re: Ultrasonic Range Finder

Quote:
Originally Posted by polyBot
Thanks. Now, I'm having a problem firing and receiving data from the ultrasonic range finder. Currently using srf05 from acroname

:http://www.acroname.com/robotics/parts/R271-SRF05.html

It takes a 40 kHz frequency. How do I generate this using the first default code? And how can I get the PWM signal back? Thanks a lot for help.
You have to use two I/O pins from the mini-RC. One to send a 10uS pulse and the other to listen for an echo. When I find the code for it I'll try to post it. I'm having a difficult time finding an up to date version.
__________________
"FIRST is like bling bling for the brain." - Woodie Flowers
  #6   Spotlight this post!  
Unread 10-01-2006, 22:58
John Gutmann John Gutmann is offline
I'm right here
AKA: sparksandtabs
FRC #0340 (GRR)
Team Role: Mechanical
 
Join Date: Feb 2005
Rookie Year: 2004
Location: rochester
Posts: 804
John Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant future
Send a message via AIM to John Gutmann Send a message via MSN to John Gutmann Send a message via Yahoo to John Gutmann
Re: Ultrasonic Range Finder

Why do you need the range finder?

If it is to find how far from the goal you are then there is an easier method. If you plan on using the CMU cam then have a constant in the program for the height of the light and then just derive the angle from the PWM signal of the servo. THen all you need is to do some trig
  #7   Spotlight this post!  
Unread 10-01-2006, 23:10
Shu Song's Avatar
Happy Birthday! Shu Song Shu Song is offline
Melodious Footware
AKA: *Crash!* Shuuuuuuuuuuuu
FRC #0639 (Code Red Robotics)
Team Role: Mentor
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Ithaca, NY
Posts: 539
Shu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud of
Send a message via AIM to Shu Song
Re: Ultrasonic Range Finder

Quote:
Originally Posted by sparksandtabs
Why do you need the range finder?

If it is to find how far from the goal you are then there is an easier method. If you plan on using the CMU cam then have a constant in the program for the height of the light and then just derive the angle from the PWM signal of the servo. THen all you need is to do some trig
Having the RC do trig calculations takes up a lot of time and might make the program very slow. Whats most of the time done to get around that is to store a table of essential trig values and just have the RC look the values whenever you need them. Now it becomes an O(1) operation and speeds up the code a lot.

But as you've probably guessed by now, you can't possibly store the sin/cos values of every angle so you must round your angles to the nearest 5 or 10 degrees, adding more error on top of whatever calculation you're already doing.

The ultra sound provides for a more accurate range measurement with minimal error.
__________________
Code Red Robotics - Team 639
Ithaca High School| Ithaca | New York | USA | Earth | Sol System | Milky Way | Universe | Some Alien's Locker

WINNER of the 2005 Finger Lakes Regional, thanks to teams 191 and 494.
WINNER of the 2004 Canadian Regional, thanks to teams 33 and 1112
WINNER of Delphi: Driving Tomorrow's Technology Award at the 2007 Finger Lakes Regional.
  #8   Spotlight this post!  
Unread 10-01-2006, 23:15
mechanicalbrain's Avatar
mechanicalbrain mechanicalbrain is offline
The red haired Dremel gnome!
FRC #0623 (Ohm robotics)
Team Role: Electrical
 
Join Date: Apr 2005
Rookie Year: 2004
Location: Virginia
Posts: 1,221
mechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond repute
Send a message via AIM to mechanicalbrain Send a message via Yahoo to mechanicalbrain
Re: Ultrasonic Range Finder

Quote:
Originally Posted by sparksandtabs
Why do you need the range finder?

If it is to find how far from the goal you are then there is an easier method. If you plan on using the CMU cam then have a constant in the program for the height of the light and then just derive the angle from the PWM signal of the servo. THen all you need is to do some trig
Actually I've been looking at using ultrasonics to detect other robots in autonomous mode and hopefully avoid them. With the field as open as it is and a bunch of robots moving to similar goals the last thing we want is a game of chicken between two blind robots.

Quote:
Originally Posted by Shu Song
The ultra sound provides for a more accurate range measurement with minimal error.
Mmmmm more or less.... I don't know if you ever used them in Physics class or not but from playing with them they tend to by pretty finicky.
One, you have to assume their's nothing between you and the wall.
Two, you are facing the wall almost vertically, they don't like angles that much.
Three, that they have the range. The Parallax sensor I referenced had a range of 3.35 meters and that's pretty darn good for a ultrasonic sensor.
I admit I haven't actually used one in a robot application but we use them routinely in our physics class. They tend to be best at hitting a flattish surface at close range.
__________________
"Oh my God! There's an axe in my head."
623's 2006 home page
random mechanicalbrain slogans


Last edited by mechanicalbrain : 10-01-2006 at 23:27.
  #9   Spotlight this post!  
Unread 11-01-2006, 00:09
Shu Song's Avatar
Happy Birthday! Shu Song Shu Song is offline
Melodious Footware
AKA: *Crash!* Shuuuuuuuuuuuu
FRC #0639 (Code Red Robotics)
Team Role: Mentor
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Ithaca, NY
Posts: 539
Shu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud ofShu Song has much to be proud of
Send a message via AIM to Shu Song
Re: Ultrasonic Range Finder

Quote:
Originally Posted by mechanicalbrain
Mmmmm more or less.... I don't know if you ever used them in Physics class or not but from playing with them they tend to by pretty finicky.
One, you have to assume their's nothing between you and the wall.
Two, you are facing the wall almost vertically, they don't like angles that much.
Three, that they have the range. The Parallax sensor I referenced had a range of 3.35 meters and that's pretty darn good for a ultrasonic sensor.
I admit I haven't actually used one in a robot application but we use them routinely in our physics class. They tend to be best at hitting a flattish surface at close range.
lol, shows you how much I know about this stuff. I believe my team will be taking the trig table approach as we've had trouble with sensors to calibrate in the past. But this ultra sound sensor sounds like it would be just as much a paint to set up as doing the trig for it and compensating for the error.
__________________
Code Red Robotics - Team 639
Ithaca High School| Ithaca | New York | USA | Earth | Sol System | Milky Way | Universe | Some Alien's Locker

WINNER of the 2005 Finger Lakes Regional, thanks to teams 191 and 494.
WINNER of the 2004 Canadian Regional, thanks to teams 33 and 1112
WINNER of Delphi: Driving Tomorrow's Technology Award at the 2007 Finger Lakes Regional.
  #10   Spotlight this post!  
Unread 11-01-2006, 15:52
polyBot polyBot is offline
Registered User
no team
 
Join Date: Jan 2006
Location: New York
Posts: 4
polyBot is an unknown quantity at this point
Re: Ultrasonic Range Finder

When I pulse out (PWM) to the ultrasonic range finder, it seems that the device is firing too rapidly. And how should I go about recieving the signal back. Any ideas?
  #11   Spotlight this post!  
Unread 11-01-2006, 17:23
dcbrown dcbrown is offline
Registered User
AKA: Bud
no team
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Hollis,NH
Posts: 236
dcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud of
Re: Ultrasonic Range Finder

I'm using the SF04 which is similar.

I start a ping via:


iopin_sonar_out = 1; // start 10us pulse

/* wait 10us, @instruction is 100ns and there are 3 per loop */
/* loop counter = 100/3=33 */
for (counter=33; --counter != 0; ); /* ~10us delay */

iopin_sonar_out = 0; // end pulse

Then you wait for the output (echo) line to go high and time the pulse between going high until going low again. Ours is tied to one of the configurable interrupt lines and captures the system clock time in the interrupt routine at the two echo pulse edges then does the math.

You also have to wait some time between pulses, something like 50ms before you can start another ping.

See http://www.robot-electronics.co.uk/htm/srf05tech.htm for more info.

DCBrown
  #12   Spotlight this post!  
Unread 11-01-2006, 23:12
John Gutmann John Gutmann is offline
I'm right here
AKA: sparksandtabs
FRC #0340 (GRR)
Team Role: Mechanical
 
Join Date: Feb 2005
Rookie Year: 2004
Location: rochester
Posts: 804
John Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant futureJohn Gutmann has a brilliant future
Send a message via AIM to John Gutmann Send a message via MSN to John Gutmann Send a message via Yahoo to John Gutmann
Re: Ultrasonic Range Finder

I looked at a few rage finders and the graphs were not linear, wouldn't this propose a problem with having to do extra calculations?
  #13   Spotlight this post!  
Unread 12-01-2006, 11:53
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Ultrasonic Range Finder

We testing the ultrasonic for EasyC for FRC we found that the Vex Ultrasonic was very good for its size and cost. The unit can measure distance accurately upto 15' away.
  #14   Spotlight this post!  
Unread 12-01-2006, 18:02
polyBot polyBot is offline
Registered User
no team
 
Join Date: Jan 2006
Location: New York
Posts: 4
polyBot is an unknown quantity at this point
Re: Ultrasonic Range Finder

Ok. I've got the ultrasonic range finder firing and returning a signal via PWMs on the miniRC. Now the problem is, the range is only good for about 8 inches, beyond that, it outputs the maximum value (255). What could be the solution here?
  #15   Spotlight this post!  
Unread 29-01-2006, 09:54
MikeDubreuil's Avatar
MikeDubreuil MikeDubreuil is offline
Carpe diem
FRC #0125 (Nu-Trons)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Boston, MA
Posts: 967
MikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond repute
Send a message via AIM to MikeDubreuil
Re: Ultrasonic Range Finder

Quote:
Originally Posted by polyBot
Ok. I've got the ultrasonic range finder firing and returning a signal via PWMs on the miniRC. Now the problem is, the range is only good for about 8 inches, beyond that, it outputs the maximum value (255). What could be the solution here?
Polybot, that setup won't work because you need an accurate way to measure the time of the pulse width. Take a look at my SONAR software driver for a solution.
__________________
"FIRST is like bling bling for the brain." - Woodie Flowers
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
Camera Vision Range Muhnki Programming 7 05-02-2005 23:26
Camera Range Finding russell Programming 9 31-01-2005 19:54
Using and Coding an ultrasonic sensor Jaine Perotti General Forum 14 06-08-2004 14:13
Optical range sensor Ben Mitchell Technical Discussion 9 12-01-2002 00:11


All times are GMT -5. The time now is 08:23.

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