Arduino Beginner Tutorial – Creating IR proximity sensor with Arduino easily

HC-SR04 is an ultrasonic distance sensor that is quite popular and can be purchased easily and cheaply in the market.  Prices proximity sensor HC-SR04 ultrasonic ranging between 20-40 thousand rupees. I will make a tutorial about making proximity sensor with Arduino and an ultrasonic distance sensor HC-SR04. Sensor HC-SR04 is used to measure the distance between the sensor with the obstacle in front of it and the results will be displayed in the serial monitor in centimeters.

Tools needed
1.Arduino Board (In this experiment, using Arduino Uno)
2.4 pieces Jumper Male – Female
3.ultrasonic distance sensor HC-SR04

To connect the ultrasonic distance sensor HC-SR04 with Arduino, consider the following scheme.
Here is a line of program code Arduino to make a proximity sensor with arduino and HC-SR04 ultrasonic sensor.

To try proximity sensor with Arduino and HC-SR04, you can use the serial monitor (Ctrl + Shift + M), it will show the distance between the sensor and the obstacle in front of him. on our program above code to read only up to a distance of 350cm, if more than that it will display a description of the “Out of Range” on the serial monitor.


No comments.

Leave a Reply