Difference: ReportOnUltrasonicDistanceMeasurements (2 vs. 3)

Revision 32017-05-01 - uli

Line: 1 to 1
 
META TOPICPARENT name="Ultra-sonicDistanceMeasurement"

Report of Ultrasonic Distance Measurement Project

Added:
>
>
The Arduino is a small intelligent integrated circuit board with its brain (processor) as the ATMEGA microcontroller. With the right codes and correct circuit integration it can control all components (shields) attached to it to perform a specific task.

We started with the basic task in Arduino programming, which is the blinking LED program. We achieved this by writing codes to send 0(LOW) and 1(HIGH) voltage signals to defined pins on the board after particular time interval (1 second). The LED goes on for 1 second and goes off for another second, and the process iterates infinitely. We run the codes both on the online simulator and the Arduino board, and it worked perfectly. Codes to this program are attached to the mail tagged [BL].

Later, the project was shared among us to contribute to parts of the robot, after we had a class session to learn basic Linux commands and installation of the software. We (Richmond and Enoch) were given the ultra-sonic distance measurement sensor as our part.

We learned that the ultra-sonic distance measurement sensor calculates the distance between itself and an obstacle in front of it by sending ultra-sonic waves to the obstacle, and the waves are returned to the sensor. Based on the time of travel of the waves back and forth, the distance will be calculated, with the velocity of the medium of travel as a constant (with the equation distance = velocity x time). We calculated the time it will take for the waves to reach an obstacle at a 1m range and back in air, and we found out it was approximately 2940ms. We also found out that the time it will take for the same distance in vacuum will be 0ms, since waves do not travel in vacuum.

You then asked us to find out the library used for the sensor and the parameter it takes. We discovered library to be the NewPing library, and the parameters are the TRIGGER, ECHO and the MAX_DISTANCE, which send signals, receive signals and set timeout respectively.

Next, we wrote a program for a LED to give an SOS (Morse) signal. The Morse signal follow the pattern three short blinks, three long blinks, three short blinks, and the cycles iterates infinitely. We wrote the program and it worked perfectly, both on the simulator and on the Arduino board. Codes to this program are attached to the mail tagged [SOS].

Recently (this week) we used to the NewPing library to write codes to calculate the distance between the sensor and an obstacle. We observed the distance change on the terminal as we alternate the distance by moving an object to and fro the sensor. Codes to this program is attached to the mail tagged [UDM].

We then taped the sensor to the servo motor which was programmed by the servo contributors (Ruth and Matilda), and we merged the codes to calculate the distance and the angle the servo motor turns. So as the servo motor turns between an angle of 0deg and 180deg, the distance between objects before the sensor and the angle of oscillation of the servo motor is printed to the terminal. Codes to this program is attached to the mail tagged [UDMwS].

This part of the project encouraged us, and we were so happy to see the eye and neck of the robot work perfectly together.

20170429_111108.png 20170429_114856.png 20170429_115852.png
Ultrasonic sensor connected to Arduino Ultrasonic sensor mounted on servo motor Combined experiment: ultrasonic sensor on servo connected
to Arduino
 Week 1 & 2 reports

Week 1

Line: 35 to 54
 
<--/commentPlugin-->
Deleted:
<
<
META FILEATTACHMENT attachment="20170429_111108.jpg" attr="" comment="" date="1493635893" name="20170429_111108.jpg" path="20170429_111108.jpg" size="3135296" user="uli" version="1"
META FILEATTACHMENT attachment="20170429_114856.jpg" attr="" comment="" date="1493635923" name="20170429_114856.jpg" path="20170429_114856.jpg" size="3365343" user="uli" version="1"
META FILEATTACHMENT attachment="20170429_115852.jpg" attr="" comment="" date="1493635954" name="20170429_115852.jpg" path="20170429_115852.jpg" size="3356903" user="uli" version="1"
 
META FILEATTACHMENT attachment="BL.ino" attr="" comment="" date="1493635954" name="BL.ino" path="BL.ino" size="477" user="uli" version="1"
META FILEATTACHMENT attachment="UDM.ino" attr="" comment="" date="1493635954" name="UDM.ino" path="UDM.ino" size="458" user="uli" version="1"
META FILEATTACHMENT attachment="UDMwS.ino" attr="" comment="" date="1493635954" name="UDMwS.ino" path="UDMwS.ino" size="1539" user="uli" version="1"
Added:
>
>
META FILEATTACHMENT attachment="20170429_111108.png" attr="" comment="" date="1493646460" name="20170429_111108.png" path="20170429_111108.png" size="1339712" user="uli" version="1"
META FILEATTACHMENT attachment="20170429_114856.png" attr="" comment="" date="1493646618" name="20170429_114856.png" path="20170429_114856.png" size="1217962" user="uli" version="1"
META FILEATTACHMENT attachment="20170429_115852.png" attr="" comment="" date="1493646630" name="20170429_115852.png" path="20170429_115852.png" size="1420095" user="uli" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback