Ultrasonic sensors also have some advantages over light sensors. In one second light will travel 299,792,458 meters (299,792.458 Km), about three quarters the distance from the Earth to the Moon.Īdvanced light sensors make use of lasers, combine that with the high-speed electronics and the cost of light sensors can be substantially higher than ultrasonic sensors.In one second sound will travel 343 meters (0.343 Km), a little longer than three American football fields placed end-to-end.And because the speed of light is so much quicker than sound, light sensors can respond very quickly and can be queried more often.īut light sensors also require advanced electronics, capable of measuring the incredibly small time differences encountered when working with light. They can be made very small and can be waterproof.
Light sensors have several advantages over their ultrasonic counterparts. We have already seen this used in a very advanced way when we discussed using LiDAR a while back. Light is also a popular method of building a distance sensor. The most well-known application of this principle is RADAR, which uses microwaves. Sound is only one of many different mediums that you can use to do this trick. The HC-SR04 used ultrasonic sound at a frequency of about 40 kHz, too high for us humans to hear but potentially audible to some animals. The time delay between the sending of the signal and its reception is used to calculate the distance to the target.The sensor receives the reflected signal.The target reflects the signal back to the sensor.A signal is transmitted at the target from the sensor.We have discussed these types of sensors before, including an extensive article about using the popular HC-SR04 ultrasonic distance sensor.Īll of these types of sensors use the same basic principle, they just execute it differently: It even finds a home in hands-free bathroom fixtures. It’s used extensively in robotics but also finds use in a variety of different applications such as security sensors, process control designs, quadcopters, and vehicle safety systems. We’ll also compare the spec sheets to see where each sensor shines.Ĭome and get a good seat for the match and we’ll get started! Distance Sensingĭistance Sensing is a common and even critical function in many modern designs. We’ll compare both devices for accuracy in the 10 – 100 cm range, against both reflective and absorbent surfaces. We’ll compare the performance of these sensors in the special DroneBot Workshop Distance Tester, constructed especially for this article and video! One of them uses lasers and is extremely small, and the other is our old friend the HC-SR04 which chirps out ultrasonic sound waves. I’ve got a bit of a different type of experiment going on in the workshop today, it’s a battle between two types of distance sensors.