Hello, I am helping my daughter (8th grader) with self driving car project - https://www.sciencebuddies.org/science- ... riving-car.
Our aim is to try 3 or more distance sensors such as HC-SR04 and collect data and prove which sensor is best. What we are confused about is:
1. What sensors like HC-SR04 can work with the blue robot kit.
2. Do we have to have 3 programs for 3 sensors or we can actually have a single program handling 3 sensors.
Our thought is, we will put one sensor and collect data and than replace sensor and collect data for same condition.
Please advice.
Thanks
Jigar
Not sure what all to buy...
Moderators: AmyCowen, kgudger, bfinio, MadelineB, Moderators
-
- Expert
- Posts: 748
- 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: Not sure what all to buy...
Hi Jigar,
The only two popular ultrasonic sensors that I'm familiar with are the PING and the HC-SR04. They have very similar functionality but have a key difference that requires adjustment to the code. The PING uses a single pin for both the trigger and the return pulses. The Arduino code switches the code from an output to an input after the trigger pulse is sent. You can find example code for this sensor in the Arduino IDE (I think under File > Examples > 06.Sensors > PING). The HC-SR04 uses separate pins for trigger and echo pulses, so requires two Arduino pins to operate. You cannot just plug it in and use the exact same code, you need to adapt the code to use two different pins.
It would also be possible to write a single program that uses two or more sensors at once.
Hope that helps, please write back if you have more questions.
-Ben
The only two popular ultrasonic sensors that I'm familiar with are the PING and the HC-SR04. They have very similar functionality but have a key difference that requires adjustment to the code. The PING uses a single pin for both the trigger and the return pulses. The Arduino code switches the code from an output to an input after the trigger pulse is sent. You can find example code for this sensor in the Arduino IDE (I think under File > Examples > 06.Sensors > PING). The HC-SR04 uses separate pins for trigger and echo pulses, so requires two Arduino pins to operate. You cannot just plug it in and use the exact same code, you need to adapt the code to use two different pins.
It would also be possible to write a single program that uses two or more sensors at once.
Hope that helps, please write back if you have more questions.
-Ben
Re: Not sure what all to buy...
Hello Ben,
Thank you for your inputs.
I have one more question on the same line of what materials to buy. On the Science Buddies experiment page under the materials section, a BlueBot kit and an Arduino as well as HC-RS04 sensor must be purchased separately. While researching, we came across other kits like the ELEGOO R3 with the HC-RS04 and Arduino along with the kit. We find this kit cheaper.
https://www.amazon.com/dp/B07KPZ8RSZ/re ... F9kZXRhaWw
Our aim for this project is to test different distance sensors on a miniature self-driving car, so comparing the costs, can we use the ELEGOO R3 kit instead of the BlueBot kit?
Thanks
Jigar
Thank you for your inputs.
I have one more question on the same line of what materials to buy. On the Science Buddies experiment page under the materials section, a BlueBot kit and an Arduino as well as HC-RS04 sensor must be purchased separately. While researching, we came across other kits like the ELEGOO R3 with the HC-RS04 and Arduino along with the kit. We find this kit cheaper.
https://www.amazon.com/dp/B07KPZ8RSZ/re ... F9kZXRhaWw
Our aim for this project is to test different distance sensors on a miniature self-driving car, so comparing the costs, can we use the ELEGOO R3 kit instead of the BlueBot kit?
Thanks
Jigar
-
- Expert
- Posts: 748
- 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: Not sure what all to buy...
Hi - you should be able to do this project with another kit like the one you linked, just be aware that the instructions on the Science Buddies website are all written specifically for our BlueBot kit. So you will not be able to follow our wiring diagrams directly, and since we have not tested the other kits, we will not really be able to answer questions about them - you would need to contact Elegoo for customer support.