|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
|||
|
|||
|
IR Seeker help?
We have been successful in writing code for our IR seeker for the past 2 years, and i was wondering if anyone knows how to measure distance? i read in the discription on the seeker that it gives you a signal strength measurement, but i cant seem to find it anywhere, any help would be appreciated
![]() |
|
#2
|
|||||
|
|||||
|
Re: IR Seeker help?
Here's a simple test: Set up the rangefinder (the proper name, BTW) at one end of a tape measure, attached to your controller, which is printing out the readings from that sensor to a screen. Put a target at some short distance, say 6", and note what the reading is. Move the target to some other distance within range and note the reading then. That will give you a couple of calibration points. Repeat as needed (you want several points), and plot all the points. You should be able to generate an equation for distance based on reading. Then all you need to do is use that equation in your code.
|
|
#3
|
|||
|
|||
|
Re: IR Seeker help?
Yes, ive tried this, but im not using a rangefinder, im using the IR Seeker from Hitechnic, for this years ftc game, it only gives me a number 1-9 and i know that those are the numbers for which section of its 240 degree range the seeker senses IR light.
|
|
#4
|
|||||
|
|||||
|
Re: IR Seeker help?
Quote:
If you're right, you'll see the signal change (get stronger) as you move closer with the IR source. If not, then you may want to find some other way of measuring distance. |
|
#5
|
|||
|
|||
|
Re: IR Seeker help?
We just have no way of measuring how strong the signal is, once we can do that we can measure distance, the Hitechnic website said there was a way to measure intensity and power of a signal but gives no RobotC examples.
|
|
#6
|
|||||
|
|||||
|
Re: IR Seeker help?
Do you have any access at all to an oscilloscope?
If you do, you should be able to use that. If not, it may be worthwhile to get access to one--it's a handy little device when it comes to measuring sensor and circuit output, even handier than a multimeter for some circuits. |
|
#7
|
|||||
|
|||||
|
Re: IR Seeker help?
http://www.hitechnic.com/blog/ir-seeker/hockey-bot/
or http://www.hitechnic.com/cgi-bin/com...on&key=NSK1042 And the RobotC function calls are here... http://bricxcc.sourceforge.net/nbc/n...nic_a_p_i.html Last edited by Jared Russell : 23-09-2011 at 19:30. |
|
#8
|
||
|
Re: IR Seeker help?
Quote:
In this case, a logic analyzer would be a better tool. Quote:
http://botbench.com/blog/2011/09/10/...er-suite-v2-1/ These are the RobotC sensor drivers by Xander Soldaat. The first directory has examples on how to read the sensors. Here is a snippet from HTIRS2-test1.c that shows how to read the direction, and the strength: Code:
// read the current modulated signal direction
_dirAC = HTIRS2readACDir(HTIRS2);
// read the AC sensor strengths, where acS1 - acS5 are the 5 internal IR sensors
if (!HTIRS2readAllACStrength(HTIRS2, acS1, acS2, acS3, acS4, acS5 ))
break; // I2C read error occurred
Last edited by biojae : 24-09-2011 at 02:27. |
|
#9
|
|||||
|
|||||
|
Re: IR Seeker help?
Chuck,
There is no real distance info in the intensity of the received signal. You could/should be able to use two receivers positioned so that there is some distance between them. You only have 9 segment positions but that might be enough to approximate a distance from two sensors. |
|
#10
|
|||||
|
|||||
|
Re: IR Seeker help?
Why not spend $15 and save yourself a lot of hassle?
http://www.robotshop.com/ca/producti...-02&lang=en-US Be aware, however, that while these are excellent rangefinders, they aren't that good when trying to find the distance to diamond plate or other shiny surfaces... darn physics. Jason |
|
#11
|
||||
|
||||
|
Re: IR Seeker help?
Quote:
More importantly, It likely wouldn't be legal. It uses a non-visible light LED while only visible light LEDs are allowed in custom circuits <R5>c32. Also, the infrared LED could cause trouble if another robots IR seeker picks it up, which could be seen as a violation of <R5>d7. However, I am not capable of making an official ruling, the Q&A forum would be the place for that. |
|
#12
|
|||
|
|||
|
Re: IR Seeker help?
Chuck,
Dunno if you still need help. I just got to our IR seeker code, and like you, want the robot to stop when in the parking zones near the beacon. In testing on my bench, and using the HTIRS2readACDir() call from Xander's library/driver, the maximum I've gotten for any one sector of the five (and the brightest sector DOES vary by about 5 lsb for the same distance when I rotate the head in place) is about 142. This is with the IR beacon the game will use, with a fresh 9v battery in it. HOWEVER, the IR Seeker seems to return 0 if you're saturated/too close. That seems to be about 9-12 inches. So, the kids and I are writing this to center on zone 8 (it's about 6 deg wide) and have mounted the seeker transversely to the roll axis of the robot (i.e. sideways to the direction of forward travel). There exists evidence on the web to explain why... anyway, we've got a event-loop-and-event-list pattern going with some statemachine-like code to implement a PD hunt/seek on the zone 8 - and slow down the drive motors down to 20 percent at over 130 mean brightness on zone 8 (mean between reply array 4th and 5th element). We stop after the sensor reports 0 after exceeding 130 (and presumably park in the parking zone).We haven't scrimmaged yet (that's in early Jan here in AZ), and we'll be testing this algorithm this weekend. If you're not at your competition yet, hope it helps :/ |
|
#13
|
|||
|
|||
|
Re: IR Seeker help?
well, the alg needs some fine tuning ('close' readings are about 180-190), and the seeker is really hard to use, IMO, over long distances, and I can't put my finger on why.
I think this would be a lot easier with two seeker heads. |
|
#14
|
||||
|
||||
|
Re: IR Seeker help?
FTC question regarding IR. The field docs show a "master" and "slave" IR beacon set up on the schematic. We have beacons from last year "Get Over It", are these the same ones? We're just setting them up now and i want to make sure they haven't changes things up. Last year we got screwed over during a match when the battery on our beacon went too low and the beacon stopped broadcasting. Our bot couldn't find it and spent the auton going in a circle. We lost big points on that. TIA
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|