Ultrasonic Proximity Sensor

neopixel ring

Overview

The HC-SR04 ultrasonic sensor that we have in hackSpace, uses sonar to determine distance to an object like bats or dolphins do. Sensor uses non-contact range detection from 2cm to 4m, with a high accuracy up to 3mm. However, there are better ultrasonic sensors, which can be accurate even up to 1mm. In action is not affected by sunlight or black material like sharp rangefinders are (although acoustically soft materials like cloth can be difficult to detect). A good example of the sensor could be a car-park counter, which detects if the car has parked at the space.

This is a 4-pin sensor VCC and is connected to +5V. Then in the middle we have two signal pins TRIG and ECHO, one of them transmit the signal and the other one collects the data. The both can be connected to any digital pin on the Arduino. Lastly we have GND that will be connected to the negative side of our circuit (GND) on the Arduino.

 

Health & safety

  • Ensure you are familiar with all H&S rules that apply to the environment you are working in.
  • Identify where first aid can be found in your work space
  • Keep all components dry and free from liquid spillages
  • To avoid static, make sure your work surface is sufficiently earthed