Go to Post While those ideals might exist in black and white perfection; in the real world, with very rare exception, they can only be implemented as compromises in shades of gray. - gblake [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 03-03-2006, 12:51
SomeoneKnows SomeoneKnows is offline
SomeoneKnows
AKA: Vince Thompson
FRC #1752 (Team Tonka)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: KC Missouri
Posts: 19
SomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of light
Vex Ultrasonic Sensor not responding

I've downloaded the Sensor Test code from the VexLabs site and have it compiled and running on my Vex controller. I have the Optical Encoder, Line Follower sensor, and Light sensor all working properly. I'm not getting any response from the Ultrasonic sensor.

I'm using MPLAB, C18 compiler, and Vex version of IFI Loader. I'm using the Vex_library_auton_debug.lib library. In the IFI Loader's Com Terminal Window I see everything responding properly but no response from the Ultrasonic Sensor.

Is there any way to tell if this sensor is dead?

Vince
  #2   Spotlight this post!  
Unread 03-03-2006, 16:38
SomeoneKnows SomeoneKnows is offline
SomeoneKnows
AKA: Vince Thompson
FRC #1752 (Team Tonka)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: KC Missouri
Posts: 19
SomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of light
Re: Vex Ultrasonic Sensor not responding

OK, I have it working now. Either it's working because I reseated the connectors or most likely I happened to lean into the robot at the right distance for the sonic sensor's test code to cause the led to go on. It seems to have a narrow band of distance at around one foot that it is responding to. I was most likely either too close or too far away for the test code to display when I tried earlier.

Vince
  #3   Spotlight this post!  
Unread 03-03-2006, 17:58
Alex698's Avatar
Alex698 Alex698 is offline
Sparky
FRC #2449 (Out of Orbit Robotics)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Arizona
Posts: 114
Alex698 is a jewel in the roughAlex698 is a jewel in the roughAlex698 is a jewel in the rough
Send a message via AIM to Alex698
Re: Vex Ultrasonic Sensor not responding

how well does the sensor work for you? ie distance how close to a target can you get and how far?
__________________
Eat, Sleep, Build Robots
  #4   Spotlight this post!  
Unread 06-03-2006, 03:58
SomeoneKnows SomeoneKnows is offline
SomeoneKnows
AKA: Vince Thompson
FRC #1752 (Team Tonka)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: KC Missouri
Posts: 19
SomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of lightSomeoneKnows is a glorious beacon of light
Re: Vex Ultrasonic Sensor not responding

The documentation claims 3cm up to 3m range. The source code toggles an LED when the values are (fltHiResCounter >= 16) && (fltHiResCounter <= 19). This seems to correspond with about the distance I was standing away from the sensor. 16cm to 19cm may not be the exact distance but seems to be close to where I am when it turns on and off.

I have added some printf statements to my code that print out once a second and the values seem close to distances I would expect. I still have more testing to do.

Vince
  #5   Spotlight this post!  
Unread 06-03-2006, 08:21
MikeDubreuil's Avatar
MikeDubreuil MikeDubreuil is offline
Carpe diem
FRC #0125 (Nu-Trons)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Boston, MA
Posts: 967
MikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond reputeMikeDubreuil has a reputation beyond repute
Send a message via AIM to MikeDubreuil
Re: Vex Ultrasonic Sensor not responding

If you need extra help with the SONAR range finder you can take a look at the driver I wrote. I found that the Vex Range Finder was generally a better product than the Parallax unit. Both are equally accurante but the Vex unit had a longer range. Since the Vex unit has the protective covering it's ready to be mounted on a robot.

I would watch out for your use of printfs while using a range finder. I would keep the printfs at about 1/second. Otherwise, I have experienced poor distance accuracy.
__________________
"FIRST is like bling bling for the brain." - Woodie Flowers
  #6   Spotlight this post!  
Unread 17-12-2007, 03:09
dmatsumoto dmatsumoto is offline
Registered User
no team (Robot Stew)
Team Role: Coach
 
Join Date: Aug 2007
Rookie Year: 2007
Location: CA
Posts: 2
dmatsumoto is an unknown quantity at this point
Re: Vex Ultrasonic Sensor not responding

Bringing this thread back from the dead...

I am just starting to use the Vex ultrasonic module, but haven't had much luck. The inventor manual insert pages give different information than the sample code. The former implies that the "output" wires go to the output port of the Vex controller, and the "input" wires go to the interrupt port. However, the sample code says that the "input" wire goes to digital output 11, and the "output" wire goes to interrupt 1.

I've tried both ways (hopefully not a bad idea), and neither work. In the sample code "ultrasonictest.ecp", the PrintToScreen doesn't execute because my terminal window doesn't display anything. If I comment out all of the ultrasonic function calls, the PrintToScreen call works properly.

Can someone please shed some light on this discrepancy?
  #7   Spotlight this post!  
Unread 18-12-2007, 16:48
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,393
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
Re: Vex Ultrasonic Sensor not responding

Input to digital port 11, output to Inter 1 is correct.

int distance;

StartUltrasonic(1,11);

while (1) {
distance = GetUltrasonic(1,11);
PrintToScreen("Distance = %d\r",distance);
}

That should do it.
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
Cyber Stangs VEX team in the newspaper! crazykid234 FIRST In the News... 2 14-02-2006 19:03
Vex navigation with ultrasonic and encoders GlennGraham Electrical 4 13-01-2006 12:58
VEX UltraSonic and Encoder SOLD OUT... Chris_Elston Electrical 5 09-01-2006 13:22
Milwaukee VEX League Kevin Kolodziej Off-Season Events 7 05-11-2005 17:58
VEX Robotics vexrobotics FIRST Tech Challenge 8 30-03-2005 23:25


All times are GMT -5. The time now is 22: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