Go to Post Are they Robots? Of course they aren't robots; they are obviously and unambiguously robots. - gblake [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 11 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 23-09-2011, 18:26
chuckmerja chuckmerja is offline
Registered User
FRC #1696 (RoboRevolution)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2004
Location: Montana
Posts: 21
chuckmerja is an unknown quantity at this point
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
__________________
2005 - Sacto quarterfinalist
2006 - Sil Valley quarterfinalist
2007 - AZ semifinalist, 2 judges awards, Woodie Flowers Award
2008 - smallest team from smallest school in FIRST - 3 person team!! - Seattle semifinalist
2009 - let's just say this bot would not have qualified for a trip to Mars
2010 - redoubled quality effort - won quality award and WINNER Utah Regional (first MT team to win an FRC regional) also won state FTC tourney (team 724)
2011 - Finalist UTAH regional
Reply With Quote
  #2   Spotlight this post!  
Unread 23-09-2011, 18:34
EricH's Avatar
EricH EricH is offline
New year, new team
FRC #1197 (Torbots)
Team Role: Engineer
 
Join Date: Jan 2005
Rookie Year: 2003
Location: SoCal
Posts: 19,814
EricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond repute
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.
__________________
Past teams:
2003-2007: FRC0330 BeachBots
2008: FRC1135 Shmoebotics
2012: FRC4046 Schroedinger's Dragons

"Rockets are tricky..."--Elon Musk

Reply With Quote
  #3   Spotlight this post!  
Unread 23-09-2011, 18:44
chuckmerja chuckmerja is offline
Registered User
FRC #1696 (RoboRevolution)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2004
Location: Montana
Posts: 21
chuckmerja is an unknown quantity at this point
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.
__________________
2005 - Sacto quarterfinalist
2006 - Sil Valley quarterfinalist
2007 - AZ semifinalist, 2 judges awards, Woodie Flowers Award
2008 - smallest team from smallest school in FIRST - 3 person team!! - Seattle semifinalist
2009 - let's just say this bot would not have qualified for a trip to Mars
2010 - redoubled quality effort - won quality award and WINNER Utah Regional (first MT team to win an FRC regional) also won state FTC tourney (team 724)
2011 - Finalist UTAH regional
Reply With Quote
  #4   Spotlight this post!  
Unread 23-09-2011, 18:58
EricH's Avatar
EricH EricH is offline
New year, new team
FRC #1197 (Torbots)
Team Role: Engineer
 
Join Date: Jan 2005
Rookie Year: 2003
Location: SoCal
Posts: 19,814
EricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond repute
Re: IR Seeker help?

Quote:
Originally Posted by chuckmerja View Post
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.
You may want to try doing that test with an IR source aiming at a known section (the same section--let's just say section 1) from various differences. You'll probably want an oscilloscope to look at the signal itself, instead of just an output number.

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.
__________________
Past teams:
2003-2007: FRC0330 BeachBots
2008: FRC1135 Shmoebotics
2012: FRC4046 Schroedinger's Dragons

"Rockets are tricky..."--Elon Musk

Reply With Quote
  #5   Spotlight this post!  
Unread 23-09-2011, 19:09
chuckmerja chuckmerja is offline
Registered User
FRC #1696 (RoboRevolution)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2004
Location: Montana
Posts: 21
chuckmerja is an unknown quantity at this point
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.
__________________
2005 - Sacto quarterfinalist
2006 - Sil Valley quarterfinalist
2007 - AZ semifinalist, 2 judges awards, Woodie Flowers Award
2008 - smallest team from smallest school in FIRST - 3 person team!! - Seattle semifinalist
2009 - let's just say this bot would not have qualified for a trip to Mars
2010 - redoubled quality effort - won quality award and WINNER Utah Regional (first MT team to win an FRC regional) also won state FTC tourney (team 724)
2011 - Finalist UTAH regional
Reply With Quote
  #6   Spotlight this post!  
Unread 23-09-2011, 19:13
EricH's Avatar
EricH EricH is offline
New year, new team
FRC #1197 (Torbots)
Team Role: Engineer
 
Join Date: Jan 2005
Rookie Year: 2003
Location: SoCal
Posts: 19,814
EricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond reputeEricH has a reputation beyond repute
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.
__________________
Past teams:
2003-2007: FRC0330 BeachBots
2008: FRC1135 Shmoebotics
2012: FRC4046 Schroedinger's Dragons

"Rockets are tricky..."--Elon Musk

Reply With Quote
  #7   Spotlight this post!  
Unread 23-09-2011, 19:28
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
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.
Reply With Quote
  #8   Spotlight this post!  
Unread 24-09-2011, 02:25
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: IR Seeker help?

Quote:
Originally Posted by EricH View Post
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.
The HiTechnic IRSeeker is an I2C sensor.
In this case, a logic analyzer would be a better tool.

Quote:
Originally Posted by Jared341 View Post
And the RobotC function calls are here...
http://bricxcc.sourceforge.net/nbc/n...nic_a_p_i.html
Those are the NXC (Not eXactly C) documents.

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
// You want to use the AC readings as the IR beacons that are on the field are modulated at 1200hz
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!

Last edited by biojae : 24-09-2011 at 02:27.
Reply With Quote
  #9   Spotlight this post!  
Unread 25-09-2011, 00:28
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,792
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
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.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
Reply With Quote
  #10   Spotlight this post!  
Unread 25-09-2011, 01:15
dtengineering's Avatar
dtengineering dtengineering is online now
Teaching Teachers to Teach Tech
AKA: Jason Brett
no team (British Columbia FRC teams)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Vancouver, BC
Posts: 1,831
dtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond reputedtengineering has a reputation beyond repute
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
Reply With Quote
  #11   Spotlight this post!  
Unread 25-09-2011, 13:56
PAR_WIG1350's Avatar
PAR_WIG1350 PAR_WIG1350 is offline
Registered User
AKA: Alan Wells
FRC #1350 (Rambots)
Team Role: Alumni
 
Join Date: Dec 2009
Rookie Year: 2009
Location: Rhode Island
Posts: 1,189
PAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond repute
Re: IR Seeker help?

Quote:
Originally Posted by dtengineering View Post
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
$15 for the sensor, $40 more to interface it with the NXT, plus the analog inputs are only designed to read 0-3.3 volt signals (This might not be an issue, the rangefinders data sheet wouldn't load)

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.
__________________
Reply With Quote
  #12   Spotlight this post!  
Unread 27-12-2011, 22:42
kz2zx kz2zx is offline
Ruthlessly Insufficient
FTC #5246
Team Role: Coach
 
Join Date: Sep 2011
Rookie Year: 2011
Location: AZ
Posts: 14
kz2zx will become famous soon enough
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 :/
Reply With Quote
  #13   Spotlight this post!  
Unread 29-12-2011, 23:02
kz2zx kz2zx is offline
Ruthlessly Insufficient
FTC #5246
Team Role: Coach
 
Join Date: Sep 2011
Rookie Year: 2011
Location: AZ
Posts: 14
kz2zx will become famous soon enough
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.
Reply With Quote
  #14   Spotlight this post!  
Unread 07-01-2012, 21:57
cosmo's Avatar
cosmo cosmo is offline
Registered User
no team
 
Join Date: Apr 2011
Location: AK
Posts: 5
cosmo is an unknown quantity at this point
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
__________________
Reply With Quote
Reply


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


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

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