![]() |
Ultrasonic sensor help needed
1 Attachment(s)
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? |
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?
|
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? |
Re: Ultrasonic sensor help needed
Quote:
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. |
Re: Ultrasonic sensor help needed
Quote:
What should I do if the sensor still remains at the constant 4.56 volts or so? |
Re: Ultrasonic sensor help needed
Quote:
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? |
Re: Ultrasonic sensor help needed
Quote:
|
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. |
Re: Ultrasonic sensor help needed
Quote:
|
| All times are GMT -5. The time now is 11:31. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi