Introduction to Robotics, Lab Report Example

Abstract

This lab involved the creation of programs that allowed out bot to display or output the audio sensor data value on the LCD display, respond to claps or loud noises to trigger the bot to make specific movements.

Introduction

In this lab, we set out to develop and build a bot that that accepts a starting command (clap or other sharp sound) and plays music or sounds. The Bot will also be controlled by the Touch sensor.

Task #1

Here we designed a program that repeatedly outputs (to the LCD) the Audio Sensor data value. We set the LCD to display “Sound Level:” on the first line. On the second line in the middle, the LCD was set display “Quiet” 0dBs to 33dBs, “Noisy” 34dBs to 66dBs, and “Loud” 67dBs to 100dBs. This task was completed by ensuring that the sound gauge was correctly configured to our desired thresholds for noise.

Task 2

Here we designed a program that allows the Bot, upon hearing a clap, to drive forward for 5-seconds and turn around (180-degrees) and return very close to its original spot and stop. We then designed it to then turn 180-degrees, to face the same direction it did when it started, and be ready to accept another clap to repeat the process. We used part of our code from DriveBot to perform the driving, but fresh code was written to analyse the input sound level and make a decision on whether or not it should begin driving.

We used the NXT sound sensor and mounted it onto our robot. We did it in the following way:

NXT sound sensor

NXT sound sensor instruction

NXT sound sensor and robot

Task 3

We designed a program that allowed our Bot, upon hearing a clap (loud noise), to drive forward until the Bot bumps into something (Touch sensor is pushed) at any angle, stops (motors off), plays a sound, backs up enough to turn around, stops, turns around 15 degrees plus some random amount, and continues to drive forward until it bumps into something else.

Results

The tasks were both successful as we managed to complete the programming and the fitting of the required parts to the robot.

Task 1

Using the NXT software, we managed was able to recognize our threshold of noise levels according to our desired specification for each noise level. The program successfully recognize the noise level as “Quiet” when the noise was between 0dBs and 33dBs, “Noisy” when the noise level was between 34dBs to 66dBs, and “Loud” when the noise level was between 67dBs to 100dBs

Task 2

Here we managed to attach the NXT sound sensor to the robot as shown in the figures in task 2. We task was successful with the robot being able to recognize clap sounds that triggered it to start. Upon hearing a clap, the bot drove forward for 5-seconds and turned around (180-degrees) and returned very close to its original spot and stop.

Task 3

Here we succeeded in designing a program that allowed our Bot, upon hearing a clap (loud noise), to drive forward until the Bot bumped into something (Touch sensor is pushed) at any angle, stopped (motored off), played a sound, backed up enough to turn around, stopped, turned around 15 degrees plus some random amount, and continued to drive forward until it bumped into something else.

Conclusion

The lesson that we took from this lab report is that debugging of the programs that we developed consumed the most amount of time. Here is where we encountered some minor glitches that forced us to repeat the debugging process severally.