Hi, this for the What sensors are best project (https://www.sciencebuddies.org/science- ... ar-sensors)
The project need the ultrasonic distance sensor with 3 pins(https://www.jameco.com/z/28015-Parallax ... =Avantlink)
However, in my country, the only ones available (and that are cheaper) are the 4 and 6 pin ones (https://botshop.co.za/products/hc-sr04- ... z4QAvD_BwE)
The Question:
Would I be able to (with research) configure the 4 pin to work as the 3 pin would?
Configuration of substitute component
Moderators: kgudger, bfinio, MadelineB, Moderators
-
- Posts: 2
- Joined: Thu Jul 06, 2023 4:17 am
- Occupation: Student
-
- Expert
- Posts: 761
- Joined: Mon Aug 12, 2013 2:41 pm
- Occupation: Science Buddies Staff
- Project Question: Expert
- Project Due Date: n/a
- Project Status: Not applicable
Re: Configuration of substitute component
Hi, yes, you can do any of our projects that involve an ultrasonic sensor with either the 3-pin PING sensor or the 4-pin HC-SR04 sensor. We have tutorials for both sensors on our YouTube channel, and you only need to change a few lines of code to switch from the PING to the HC-SR04:
https://youtu.be/zACmjwvbils
https://youtu.be/n-gJ00GTsNg
As you noted, the HC-SR04 is much cheaper. In my experience, it works just as well as the PING when detecting large, flat objects like a wall or big piece of cardboard etc. It does not work as well on smaller or irregularly shaped objects like the human hand. So if you are building a robot that is driving around and only needs to detect walls, that is fine. If you are building an interactive Arduino project where somebody needs to move their hand back and forth in front of the sensor, it may not always work as well. If you are doing a project to compare different sensors, then of course that is fine, because the whole point is to compare sensor performance!
https://youtu.be/zACmjwvbils
https://youtu.be/n-gJ00GTsNg
As you noted, the HC-SR04 is much cheaper. In my experience, it works just as well as the PING when detecting large, flat objects like a wall or big piece of cardboard etc. It does not work as well on smaller or irregularly shaped objects like the human hand. So if you are building a robot that is driving around and only needs to detect walls, that is fine. If you are building an interactive Arduino project where somebody needs to move their hand back and forth in front of the sensor, it may not always work as well. If you are doing a project to compare different sensors, then of course that is fine, because the whole point is to compare sensor performance!