|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||||
|
|||||
|
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.
Last edited by mechanicalbrain : 10-01-2006 at 19:20. |
|
#3
|
||||
|
||||
|
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?
|
|
#4
|
|||
|
|||
|
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
|
|||||
|
|||||
|
Re: Ultrasonic Range Finder
Quote:
|
|
#6
|
||||
|
||||
|
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
|
|||||
|
|||||
|
Re: Ultrasonic Range Finder
Quote:
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. |
|
#8
|
|||||
|
|||||
|
Re: Ultrasonic Range Finder
Quote:
![]() Quote:
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. Last edited by mechanicalbrain : 10-01-2006 at 23:27. |
|
#9
|
|||||
|
|||||
|
Re: Ultrasonic Range Finder
Quote:
|
|
#10
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
||||
|
||||
|
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
|
||||
|
||||
|
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
|
|||
|
|||
|
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
|
|||||
|
|||||
|
Re: Ultrasonic Range Finder
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |