Recent Changes - Search:


Robotics I Fall 2007

Robotics II Spring 2007

Robotics I Fall 2006

Vision Servoing Laboratories

FPGA-Based Vision


LabVIEW Embedded


Site Admin

edit SideBar

Lab 3: Servos and Sonar

Assigned: Monday, September 24, 2007.
Due: Monday, October 1, 2007.

In this lab you will work with servo motors and the sonar distance sensor. You will develop an algorithm that allows the robot to seek out open space and drive toward it.


TBA — none for now.

Project 3: Open-Space Seeking

About Sonar

The sonar ranging sensor determines distance to an object by measuring how long it takes for an ultrasonic ping to be emitted, travel through the air to the object, and then get reflected back.

Sound travels relatively slowly (to a microprocessor): about 1 foot per millisecond. Therefore, if an object is 1 foot away, the delay between a ping being emitted and the reflection being heard will be 2 milliseconds (because you have to count the round-trip travel time).

The sonar sensors we will use is the Devantech SRF04. It has a separate signal wire for the transmit and receive pulses. To connect to the Blackfin Handy Board, plug the sonar's transmit wire to a Handy Board digital output, and the sonar's receive wire to a digital input. Use matching inputs and outputs; e.g., use digital input 12 and digital output 22.

Use the sonar initialize VI to configure the input/output pair to function with a sonar sensors, and the sonar read VI to take a measurement.

About Servos

A servo motor consists of a DC motor, gear train, positioning measurement sensor, and controller electronics, all integrated into one compact package.

There are two basic types of servo motors: free-running (in which the output shaft spins continuously, like a regular motor. These are also known as a “winch servo”) and position-based (in which the output shaft can rotate about 180 degrees, back and forth).

For this project, use a position-based servo motor.

The servo motor is controlled by an encoded digital signal. In the case of the position-based motor, the signal tells the motor what angular position it should rotate to. The motor then attempts to stay at the position.

The Project

Mount the sonar ranging sensor onto a servo motor, and then mount this assembly onto your robot.

Now, develop a LabVIEW program in which the robot will rotate the sonar for one sweep, building up an array of sensor readings, and then find the position that reveals the most open space. The robot should then rotate toward that position and drive forward a bit. Then this process should repeat. The final result is a robot that continuously hunts for and drives toward open spaces.

Write up your results as an Open Project DB project and link to your iDB cube at the bottom of this page. Notes on this:

  • use the new server
  • you will need a UML-CS account and you must log in with this. Get one by visiting the CS sysadmin office: just before end of the 3rd floor hallway on the left.
  • make sure all partners are collaborators on the OPDB entry

Please create a short video of your robot performing this function. You should be able to upload 20 MB movies now.

Student Links to InventionDB Writeups

Link to your InventionDB cubes here.

Edit - History - Print - Recent Changes - Search
Page last modified on December 13, 2007, at 03:39 PM