Login - Register -

Building a Robot

Ultrasonic Range Finder

Assembly

The ultrasonic sensor is attached to the front of a mechanism which can turn from side to side in order for our robot to look around itself and detect obstuctions.

  • Two plastic shell pieces close around the servo motor, they will only fit one way, and are secured with the long thin screws.
  • One of the small white plastic servo 'horns' should fit inside the square mounting base, and be secured with one of the tiny servo screws.
  • The smallest of the servo screws will secure the servo horn to the servo
  • Four M2.5 bolts and nuts will secure the base to the clear perspex mounting plate
  • Four nylon standoffs and 4mm M3 screws will secure the mounting plate to the chassis plate

Theory of Operation

The ultrasonic board contains an audio transmitter and receiver that work at above human hearing at around 40kHz, the board makes small chirps of sound and listens for the echo they make as they reflect off of objects infront of the board. By timing how long it takes for the echos to return the system can calculate how far away the objects are. This is commonly known as Sonar and is used by creatures such as bats, and by submarines underwater.

Wiring

  • plug the servo into one of the servo connectors on the motor controller
  • using the longest of the dupont wires to connect the ultrasonic sensor to power and remaining Analog inputs on the motor control board.

Using

  • The New Ping Ultrasonic Library provides simple easy to use functions which report either a time or distance of detected objects. Download the ZIP file and use 'Add .zip library' to install it.
  • It is common to get false readings of distance, and of absence or presence of an object so taking repeated readings and averaging / filtering them in some way is recommended
  • By using the servo to turn the sensor you can take readings in several directions and then choose the best direction to move in next
  • Try the 'NewPingExample' editing the PIN definitions to match which pins on the motor board you used
- Last change March 30, 2016, at 03:51 PM
- Registered in England and Wales 08777436