Go to Post As it stands your design defies physics (and breaks 1 of Karthik's 2 Golden Rules). - JesseK [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-02-2012, 16:50
NS_Radication's Avatar
NS_Radication NS_Radication is offline
Student
AKA: Marco Schoener
FRC #1369 (Minotaur)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Tampa
Posts: 88
NS_Radication is an unknown quantity at this point
Question KoP Rangefinder

How do you wire and program a range finder from the KoP?

I have no idea whatsoever.

Thanks in advanced and Happy Competitions!
__________________
Team 1369
Senior
Head Programmer (Java)
Head Electrician
Reply With Quote
  #2   Spotlight this post!  
Unread 25-02-2012, 18:50
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,979
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: KoP Rangefinder

Search "ultrasonic" and read what's been written already, then come back with your questions, OK?
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #3   Spotlight this post!  
Unread 25-02-2012, 19:41
NS_Radication's Avatar
NS_Radication NS_Radication is offline
Student
AKA: Marco Schoener
FRC #1369 (Minotaur)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Tampa
Posts: 88
NS_Radication is an unknown quantity at this point
Re: KoP Rangefinder

I have reviewed the Jav API and the wiring diagrams. Some othe forums have said o plug it into the DSC D I/O slot, the Analog slot, and/or the Digital slot of the cRIO. I do not fully understand where to plug it in or how many inputs to plug in except for three of them. If anyone can show some sketch or detailed plugin info, then that old be much appreciated.

Thanks in advanced!
__________________
Team 1369
Senior
Head Programmer (Java)
Head Electrician
Reply With Quote
  #4   Spotlight this post!  
Unread 25-02-2012, 21:01
Lalaland1125 Lalaland1125 is offline
Registered User
AKA: Ethan Steinberg
FRC #2429
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2011
Location: La Canada
Posts: 29
Lalaland1125 is an unknown quantity at this point
Re: KoP Rangefinder

I am fairly sure you hook power to 5v power, ground to ground, and then read the analog signal with the analog sidecar.

Then, empirically find a voltage to unit conversion for whatever unit you would like to use( meters, feet, inches, yards, etc). (Use a ruler and write down the voltages at different distances).

Then read the voltage and apply that unit conversion to work with the distance sensor form code.

That's what our team is doing. (for some reason, the provided unit conversion was not very accurate)
Reply With Quote
  #5   Spotlight this post!  
Unread 25-02-2012, 21:05
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,979
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: KoP Rangefinder

Reading the analog (AN) signal using the Analog breakout on the cRio is the easiest way.

As a rough estimate, you get about 10 mV per inch. So a voltage of 1.44 volts is 144 inches or 12 feet. Then calibrate it as described above.
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #6   Spotlight this post!  
Unread 26-02-2012, 00:41
NS_Radication's Avatar
NS_Radication NS_Radication is offline
Student
AKA: Marco Schoener
FRC #1369 (Minotaur)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Tampa
Posts: 88
NS_Radication is an unknown quantity at this point
Re: KoP Rangefinder

Well, I want about 10 to 12 ft for shooting and I don't really understand hat you mean. Do you want me check the voltage emitted by distance to test?
__________________
Team 1369
Senior
Head Programmer (Java)
Head Electrician
Reply With Quote
  #7   Spotlight this post!  
Unread 26-02-2012, 11:35
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,979
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: KoP Rangefinder

OK, if you give the sensor +5 volts and ground, it will return a voltage between about 0.07 and 2.55 volts on the AN pin. That voltage, which you have to read into the cRio using a channel on the analog breakout, tells you the distance to the first solid object it encounters.

For example, if you read a voltage of 1.44 volts, you will be about 144 inches - 12 feet - from some object. You may need to measure for more exact voltages and distances.

What exactly that object IS can vary - it might be the backboard, it might be the fender, it might be another robot (or, if you mount it low enough, I suppose a ball). Sound waves are directional kind of like light from a flashlight, so where you point your sensor will affect which distance it 'sees'.

Smaller objects need to be closer to be sensed, larger objects can be further away. The upper limit for the KoP sensor is IIRC 256 inches, but verify that. Maxbotix makes similar sensors good to about 33 feet though.

Does that help?
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #8   Spotlight this post!  
Unread 28-02-2012, 23:12
ProgrammerMatt ProgrammerMatt is offline
Programmer-Electrical-Mechanical
FRC #0228 (Gus)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Southington
Posts: 138
ProgrammerMatt is just really niceProgrammerMatt is just really niceProgrammerMatt is just really niceProgrammerMatt is just really nice
Re: KoP Rangefinder

its not that simple, but most if not all sensors have a datasheet saying the mV/Inch and on the code side
Code:
analogin.getVoltage() / mV); //mV is the mV per inch you have to look up..
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 09:53.

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