Go to Post You know you've been involved with robotics too long when you see a remote-controlled traffic barrel coming up behind people and honking - and it doens't faze you. - GaryVoshol [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 29-01-2006, 19:02
eugenebrooks eugenebrooks is offline
Team Role: Engineer
AKA: Dr. Brooks
no team (WRRF)
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Livermore, CA
Posts: 601
eugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond repute
Ball speed trap using 2005 RC

An interrupt/timer example that implements a ball speed trap using banner sensors can be found at:
www.srvhsrobotics.org/eugenebrooks/
in the file SpeedTrap2005.zip.

Teams might find this code useful in confirming that your ball shooter does not exceed 12 meters/sec. This code builds and runs on the 2004/2005 RC that you might have laying around from last year.

Many teams will have "narrow beam" banner sensors and reflective tape laying about around previous years as well and can quickly cobble a speed trap using these. Set up your banner sensors so that the digital inputs see a "1" when the light beam is clear of any obstruction. The sensor at the start of the speed trap is wired to digital input 01. The sensor at the end is wired to digital input 02. The code assumes a 19 inch separation between the beams, but you can adjust the calibration to any desired distance. The results are printed on the computer display with two digits behind the decimal point (truncated). The result is also shown on the user mode led display on the OI, in tenths of meters per second (rounded), making a selfcontained instrument without an attached computer possible.

Have fun,
Eugene

Last edited by eugenebrooks : 29-01-2006 at 19:08.
  #2   Spotlight this post!  
Unread 04-02-2006, 22:43
DanDon's Avatar
DanDon DanDon is offline
ohhh MY god
AKA: Dan Hoizner
FRC #0375 (The Robotic Plague)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Staten Island, NY
Posts: 1,432
DanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond repute
Send a message via ICQ to DanDon Send a message via AIM to DanDon Send a message via MSN to DanDon
Re: Ball speed trap using 2005 RC

Quote:
Originally Posted by eugenebrooks
An interrupt/timer example that implements a ball speed trap using banner sensors can be found at:
www.srvhsrobotics.org/eugenebrooks/
in the file SpeedTrap2005.zip.

Teams might find this code useful in confirming that your ball shooter does not exceed 12 meters/sec. This code builds and runs on the 2004/2005 RC that you might have laying around from last year.

Many teams will have "narrow beam" banner sensors and reflective tape laying about around previous years as well and can quickly cobble a speed trap using these. Set up your banner sensors so that the digital inputs see a "1" when the light beam is clear of any obstruction. The sensor at the start of the speed trap is wired to digital input 01. The sensor at the end is wired to digital input 02. The code assumes a 19 inch separation between the beams, but you can adjust the calibration to any desired distance. The results are printed on the computer display with two digits behind the decimal point (truncated). The result is also shown on the user mode led display on the OI, in tenths of meters per second (rounded), making a selfcontained instrument without an attached computer possible.

Have fun,
Eugene
Hi Eugene,

We downloaded your code to our 2004 RC, and hooked up the banner sensors to digital inputs 1 and 2 (After making sure that the sensors were wired such that they read 1 when open.).

The only output we are receiving is from the call
Code:
printf("SpeedTrap2005, assuming a 19 inch light beam separation\r");
The only logical reason for this that I can find is that
Code:
if(GetSpeedTrapCycle() != SpeedTrapCycleCount)
is never evaluating to true. Can you think of any reasons for this?

Thanks,
__________________
  #3   Spotlight this post!  
Unread 06-02-2006, 00:59
Kris Verdeyen's Avatar
Kris Verdeyen Kris Verdeyen is offline
LSR Emcee/Alamo Game Announcer
FRC #0118 (Robonauts)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 2001
Location: Houston, TX
Posts: 699
Kris Verdeyen has a reputation beyond reputeKris Verdeyen has a reputation beyond reputeKris Verdeyen has a reputation beyond reputeKris Verdeyen has a reputation beyond reputeKris Verdeyen has a reputation beyond reputeKris Verdeyen has a reputation beyond reputeKris Verdeyen has a reputation beyond reputeKris Verdeyen has a reputation beyond reputeKris Verdeyen has a reputation beyond reputeKris Verdeyen has a reputation beyond reputeKris Verdeyen has a reputation beyond repute
Re: Ball speed trap using 2005 RC

We built the hardware to do this early in the build season - two banner sensors on a board. For that to work, we had to assume that we were looking at a brightly colored ball. Of course, with no shooter to test, and with plenty of robot software to make, the software guys focused their energies in more predictible ways.

Which is why I'm so thankful for this code - it worked like a champ, when we finally decided to hook up our trap. For it to work with our shooter, we put a yellow and black ball in so that it was spinning along its equator, and had the yellow side to the sensors.

Also, our setup spacing was larger than the 19" that was quoted in the code. In order to adjust it, I took the long magic number (four million something), and scaled it for our length (five million something).

Has anyone come up with a good way to calibrate or verify these guys yet? Our numbers are close to what we were expecting, but there might be something that I haven't considered that's bumping it off 2 m/s or something.
__________________
...Only a few people are awake and they live in a state of constant total amazement. -JP Shanley, Joe vs. the Volcano
  #4   Spotlight this post!  
Unread 08-02-2006, 12:24
eugenebrooks eugenebrooks is offline
Team Role: Engineer
AKA: Dr. Brooks
no team (WRRF)
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Livermore, CA
Posts: 601
eugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond repute
Re: Ball speed trap using 2005 RC

Use banner sensors that throw a tight beam and set them up with retro-reflective tape so that when a ball is not blocking the beam the sensor activates. Adjust the sensor so that it just activates reliably when the beam is bouncing off the reflective tape, and so that a ball in the beam causes the sensor to change state reliably. When the ball goes through it breaks the beam, interrupting the RC to get the time value from the timer. You will not get as clean a signal off the ball itself...

Other than the possibility that you have not wired the sensors correctly, you need to wire the power input to 12 volts, and the signal output and ground to the digital input port on the RC. It also might be the case that you have not adjusted the sensor properly. You can see whether this is the case by the little indicator light on the sensor.

The best way to calibrate the sensor is to print out the time in raw clock ticks and time a long interval with a stop watch. With the time carefully calibrated, you can then measure the distance between the light beams and do the appropriate arithmetic. The code provided assumes that the clock rate of the timer is accurate, and it should be checked.

The sensor has two signal outputs, one that is high and one that is low when the beam is not blocked by the ball, and it is not all that important which one is used but the two sensors must be wired consistently...

In case you want to know, the sensor code is recording start-stop triggers and printing the speed only once for each event. If no beam interrupts are seen, in the proper order, nothing is printed.

Eugene

Last edited by eugenebrooks : 08-02-2006 at 12:29.
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
Speed Sensor for Ball Shooter Justin Stiltner Electrical 15 28-01-2006 14:40
Ball Compression? Veselin Kolev Technical Discussion 2 23-01-2006 15:47
**FIRST EMAIL**/No Limits Global Exhibition at 2005 World Exposition Rich Wong FIRST E-Mail Blast Archive 0 27-07-2005 12:40
Ball Shooter Squall Rules/Strategy 7 11-01-2005 14:47


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

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