Go to Post To put it simply: An adult coach impacts a team for two minutes. An adult mentor impacts a team for a lifetime. - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 23-01-2012, 19:15
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Ultrasonic sensor help needed

Hey guys
Been playing around with the ultrasonic sensor for a few days now. We have it set up plugged into the analog port 1. I initially used the labview example to test it, but the number given never changed. Today, I worked with new code that I found online. Attached is this code. It correctly gets the voltage like it is programmed and displays it to the dashboard, but in lays a tougher problem. Once again the number never changes. The voltage shown sticks at something like 4.56 for the sensor and never changes if I move it around.

Any ideas?
Attached Thumbnails
Click image for larger version

Name:	Ultrasonic code picture.jpg
Views:	70
Size:	15.2 KB
ID:	11535  
Reply With Quote
  #2   Spotlight this post!  
Unread 23-01-2012, 20:27
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Ultrasonic sensor help needed

Your code looks fine. How did you wire the sensor? Do you have a DMM that you can use to measure the sensor independently?
Reply With Quote
  #3   Spotlight this post!  
Unread 23-01-2012, 20:38
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Ultrasonic sensor help needed

We soldered pwm wires to the sensor according to the diagram given on the sensor website for analog, so it's correct. The soldered wires are a part of a pwm cable that ends with a male connector. This male connector is then connected to a female to female pwm cable that is put into the analog breakout on the cRIO.

We do probably have a DMM lying around. How would i go about testing the sensor?
Reply With Quote
  #4   Spotlight this post!  
Unread 23-01-2012, 21:21
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: 7,011
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: Ultrasonic sensor help needed

Quote:
Originally Posted by jhellr13 View Post
We do probably have a DMM lying around. How would i go about testing the sensor?
Verify that there is +5 volts on the +5 pin, with the black DMM lead on the GND pin. If not, check both. Verify correct polarity at the same time.

If yes, then put something about feet from the sensor - the ceiling makes a nice target if you're working on a table. The voltage at tha AN pin, again with the black DMM lead on the GND pin, should be about 0.6 volts - more precisely, it should be 0.01 volt per inch. 60" = 0.6 V

If all that is fine, the sensor is working properly.
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #5   Spotlight this post!  
Unread 23-01-2012, 21:32
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Ultrasonic sensor help needed

Quote:
Originally Posted by DonRotolo View Post
Verify that there is +5 volts on the +5 pin, with the black DMM lead on the GND pin. If not, check both. Verify correct polarity at the same time.

If yes, then put something about feet from the sensor - the ceiling makes a nice target if you're working on a table. The voltage at tha AN pin, again with the black DMM lead on the GND pin, should be about 0.6 volts - more precisely, it should be 0.01 volt per inch. 60" = 0.6 V

If all that is fine, the sensor is working properly.
Thanks for the help. I'll try this tomorrow.

What should I do if the sensor still remains at the constant 4.56 volts or so?
Reply With Quote
  #6   Spotlight this post!  
Unread 23-01-2012, 22:01
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: 7,011
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: Ultrasonic sensor help needed

Quote:
Originally Posted by jhellr13 View Post
Thanks for the help. I'll try this tomorrow.

What should I do if the sensor still remains at the constant 4.56 volts or so?
Get another one, 'cause that one's bit the dust.

All assumes that you know what you're saying when you wrote "so its correct". Maybe have someone look real carefully for solder bridges and other issues?
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #7   Spotlight this post!  
Unread 23-01-2012, 22:03
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Ultrasonic sensor help needed

Quote:
Originally Posted by DonRotolo View Post
Get another one, 'cause that one's bit the dust.

All assumes that you know what you're saying when you wrote "so its correct". Maybe have someone look real carefully for solder bridges and other issues?
I sure hope it's fine! Do you think it may be a "dead" one because of the constant voltage it shows?
Reply With Quote
  #8   Spotlight this post!  
Unread 23-01-2012, 22:33
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: 7,011
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: Ultrasonic sensor help needed

My suspicion is that you're reading the supply voltage. Particularly because the sensor has a maximum range of 255 inches (2.55 volts). But it's fed with about 5 volts...

Little solder globs can do that sort of thing. As can little 'hairs' of copper wire. and so on.
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #9   Spotlight this post!  
Unread 23-01-2012, 22:37
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Ultrasonic sensor help needed

Quote:
Originally Posted by DonRotolo View Post
My suspicion is that you're reading the supply voltage. Particularly because the sensor has a maximum range of 255 inches (2.55 volts). But it's fed with about 5 volts...

Little solder globs can do that sort of thing. As can little 'hairs' of copper wire. and so on.
Thanks. I'll check it out tomorrow
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 22:21.

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