04-20-2021 05:58 PM
Hi Folks, I need some help with my ultrasonic sensor that is not working, Im trying to get my ultra sonic sensor to measure the distance in a tank and to switch on a output for me, but the sensor only works occasionally, first i thought it may be a loose connection but then i found that when I have the trigger disconnected and in my hand it switches my output that i have connected through a shield. i found sometimes that even if the + & - are not connected to the sensor it gives a brief high on the output, any help would be appreciated.
04-21-2021 10:57 PM
Hi,
If you face difficulties during follows steps above, we can discuss at here for next step.
04-27-2021 12:05 PM
Hi, Ive double checked that the +/- are connected with correct polarity. Im unsure what you mean in step 2&3. Im new to Labview and Arduino so ive a very basic knowledge to programming
04-27-2021 01:48 PM - edited 04-27-2021 01:49 PM
The first thing to do when troubleshooting sensors is to read the sensor directly in the simplest way possible. You gave no info on the sensor but however you are reading its output you need to set it up so it's facing a solid, flat object that you are SURE will reflect its beam. Do NOT use water in a tank yet because you don't know if water will bounce your signal or what effect ripples on the water will have.
Most of the ultrasonic sensors work by triggering a pulse and then reading the return reflection. Then you calculate the distance by the time delay between the trigger and return pulse. I assume you are doing this in the Arduino so you should read the data from it directly and verify you are getting the signals you expect. A cheap oscilloscope would be great to use here if you have one. If not just read the value over and over while you move the target and make sure you're reading the distances correctly and not getting false measurements.
I would also suggest you go search for a tutorial on this. There are a LOT of them on this subject. For example:
Arduino - Ultrasonic Sensor - Tutorialspoint
If you still have trouble post the equipment you're using and the Arduino code. You could also try Arduino forums since your problem is very likely in the hardware or the C code, not LabVIEW.
Good luck! I did something similar with an HC-SR04 sensor connected to a Raspberry Pi and it worked pretty "well". Unfortunately, not "well" enough to track the water level in my WELL! ☹️
04-27-2021 06:25 PM
Hi NI quist,
Firstly thanks for your response, I'm also using a HC-SR04, I know I have it connected up correctly because it occasionally works when i have a solid object in front of it(Ive followed loads of tutiorals to get it working firstly), but the problem is that it only works intermittently and only when i have thew ECHO disconnected and when im touching the ECHO wire. that was fine just to get it working but now it wont work no matter what i do.
04-27-2021 09:59 PM
Hi,