PIR motion detectors
When you approach a particular object, you notice that the lights are on, or you walk in a shop with anti-theft protection, then you are most likely tracked by motion detectors. If you want to build such a device or want to introduce it as an addition to your design, a passive infrared sensor is a very good solution. Dedicated to Arduino PIR sensors allow easy connection to any Arduino board and immediate use. The field of view of such sensors allows to detect a moving object at a distance of up to 7 m, with a detection angle of 120°. Depending on the model, the sensor requires an auxiliary voltage of 3.3 V, 5.0 V or 12.0 V.
If you are building a robot, or if you want to expand your car with systems that support its collision-free parking, then ultrasonic sensors will work great. The principle of such a sensor is based on time measurement from the moment when the ultrasonic wave sent by the sensor is reflected from an obstacle to the moment when the wave returns to the sensor. In the 65-piece set with a plastic storage box you will find the HC-SR04 sensor, which enables the detection of external objects at a distance of 2 cm to 200 cm. To connect the sensor to Arduino, it is easiest to use one binary output and one input with hardware PWM function.
Infrared distance sensors
When you need to take measurements of several tens of cm, it is worth considering the use of distance infrared sensors. Their principle of operation is similar to ultrasonic sensors. Infrared sensors send a beam of radiation in the form of infrared light, whose wavelength ranges from 700 to 1050 nm. After the reflection of the beam from the object, the beam returns to the sensor. Depending on the design of the sensor - analog or digital - we can measure the distance of the object from the sensor, or detect the presence or absence of the object.
Time of Flight" type sensors
If the distance measurement function is included in your project and high measurement accuracy is required, ToF (Time of Flight) sensors will be a very good solution. Unlike ultrasonic and infrared sensors, the ToF sensor uses laser beam emission. It does not have a conical form, but is generated as a thin line. The sensor measures the time from sending the beam to its return to the sensor after reflection. ToF sensors do not exhibit non-linear characteristics, which can occur in ultrasonic sensors.