Handheld Ultrasonic Rangefinder

Results

Testing issues

When testing the MCU program with the hardware, we noticed that the receiver would instantly register a pong whenever the button was pushed to send the ping. As a result, distances of insanely small values were being reported. It ended up being a hardware problem when we wired the two transducers. The feed lines to the transducers were very close physically and it ended up that they were interfering with each other. This problem was not initially noticed when testing with the signal generator. In order to fix this, we rerouted some of the wires on the solder board and moved the transmitting source from PortD.6 to PortD.7 (on the other side of the MCU from the receiving pin). This improved the interference issue and we were no longer seeing spikes on the receiver at the same time as the transmitted ping.

Even though we were able to get rid of some of the noise by rerouting some of the wires on the board, we still had some inexplicable noise. We had thought that if we increased the gain of the signal from the receiving transducer and fed it through multiple Schmitt triggers to clean up the signal, we would be better off. Unfortunately, the gain also increased the amplitude of the noise to the point where it was giving us erroneous measurements. Since we were using a variable power supply as the power source of our board during testing, we noticed that if we decreased the supply voltage from 18 volts down to 9 volts, the noise was reduced. It so happened that the extra gain in the transmitter (from the 18 volts) caused the noise that was being registered by the receiver. By reducing the gain, the noise was reduced and we were able to get more accurate measurements.

By doing this, however, our effective range decreased. This was not really that much concern because a large range with incorrect measurements is useless. A small range with correct measurements is much more desirable.

Accuracy

Initially, we were hoping for a range of a few meters. This would have been possible using a higher voltage supplied by the batteries. The effective range is also directly proportional to the voltage of the batteries. If the batteries start losing power, the gain of the ping will decrease, leading to shorter ranges that can be measured. However, during testing, we noticed that higher voltage supplies caused more noise and interference with the receiver. By using only one 9 volt battery as the power source, our device only has a maximum range of about 20 centimeters.

Orientation of the device with the object that is reflecting the pulse also affects accuracy. Since ultrasound is very directional, aiming the device at an object or wall at an angle will result in the reflection not being picked up by the receiving transducer. Optimal operation requires that the device be pointed perpendicular to an object with a flat surface.

Testing the device led to measurements that were quite accurate. Measurements were only a few millimeters off from actual distances. Calibrating the device incorrectly led to proportionately incorrect measurements. The accuracy of the speed calculations were a little harder to judge since we did not have an accurate alternative mean of measuring speed.

Safety considerations and usability

Because the frequency of the transducers is beyond the range of hearing for humans, there is no safety concern regarding the transducers. The 40 kHz frequency may, however, affect the hearing of other animals.

Another safety concern has to do with the usability of the device in dark conditions. Initially, we had purchased a backlit LCD so the device could be used in the dark. Even though the LCD had a controller that was in the same family as the LCDs that we used in the past (along with an almost identical spec sheet), the LCD did not work. Instead of spending time trying to debug our LCD, we just used one provided by the lab. Alternatively, we could have implemented an audible sound that would indicate to the user how far away he or she was from an object.

Impact on other people’s designs

Because the rangefinder does not radiate any RF frequencies and only radiates inaudible pulses, our design did not affect other people’s designs in the lab (as far as we know). It is possible that our 40 kHz pulses could have caused interference with any other group using similar transducers, but we received no complaints.