• Home
  • Pages
    • Labs
    • Milestones
    • Team
    • Documents
  • Gallery
  • Robot Design
  • Software Design
Robots 'N' Roses

Goal

The purpose of this milestone was to add wall and robot sensing abilities to our system. The wall detection was integrated using a pre-built IR distance sensor. The mechanism to sense another robot was integrated using the photodiode sensor we built in Lab 2. In addition, this milestone required us to integrate software from each sensor into our main branch.

Materials

1 Arduino Uno

1 USB A/B Cable

2 Continuous Rotation Servos

2 Line Sensors

1 Battery Pack

Laser Cut Acrylic and 3D printed Custom Lab Assembly Pieces

Microphone

Breadboard

IR Wall Sensor

Wall Detection:

For this milestone, we only needed to detect one wall at a time. To do this, we mounted an IR wall sensor on the right side of our robot and connected it to the XXX analog read pin. Since we only cared if the robot detected a wall or not, not the distance away, we just needed to find a threshold value for a wall about 4-6 inches from the side of the robot. This would represent the distance the robot would be from the wall inside the maze. Using this threshold value to detect a wall, we created the following code to be implemented in our robot’s motion.

The logic for wall following was also very simple. Whenever the robot reached an intersection, it would check if there was a wall to it’s right. If there was, it kept moving, if not it turned. This allowed it to navigate arbitrary walls using right-hand turns.

Robot Detection:

We detected other robots using the photodiode circuit and FFT program from our previous lab. We implemented this code as function XXX in order to detect when our robot recognizes a 6.08kHz signal. The code for XXX follows.

Next, we implemented this function into the logic for our robot’s motion. This required turning off the clock whenever we ran the FFT because… This did not detect the rest of our program. Our final logic allowed the robot to first check if it sensed another robot. If it did, it stopped until the other robot was not detected. Next, it would travel forward. Every time it met a junction it would check if it could turn right or if there was a wall. If there was no wall, it would turn. This is displayed below.

Adding Wall Detection and Integrating

We added an IR wall sensor to the right of the robot and gave it the simple code that, upon reaching an intersection (i.e. both line sensors on either side read WHITE), consisted of if(WALL_DETECTED) move_forwad() else turn_right(). After the turn, it would resume basic line following capabilities.

Final Robot actions

Copyright © 2016 - All Rights Reserved - Domain Name

Template by OS Templates