Jake Brockwell, Kimberly Eddleman, and Nick Malone

Tags

The Missing Link

6/24/13

Jake Brockwell, Kimberly Eddleman, and Nick Malone

Team 2

Engineering Fundamentals

Abstract: The main idea of this project was to introduce us to the fundamentals of robotics and circuits. We completed this idea by performing various tasks. First, we had to build the robot using the guide provided. This involved screwing in the wheels, attaching the circuit board and adding the battery pack. We did basic wiring for the motors and speaker system (to play music) and later added further wiring for the line following sensors, touch sensors and infrared sensors. Our first task was to make the robot navigate a box using touch sensors, and this was achieved with some degree of success even though our robot “the missing link” sometimes got stuck in a loop of backing up. The next was to navigate along a black line in the shape of an infinity sign. The only sensor that worked was the line following sensors and while this often got stuck in the intersection, we modified our program to fix this. Finally, we had to make our robot stop when it hit something else and we achieved this using touch sensors.


Robot Description: Our robot is a relatively simple boe bot that we tried to make look like Link from the legend of Zelda game. We added a Zelda hat, a Zelda face of the touch sensors, green to look like his coat and yellow at the top for his hair. In term of the actually parts of our robot, our robot is equiped with touch sensors (two wires that when pushed completely a circuit between a metal piece and the wire), sensors that detect lines and follow them (four sensors near the bottom, two that registered dark and two on the outside that looked for white), and a speaker to play music (this had no true function in completing the task but we thought it was cool). When our robot is turned on, it will play the link theme song (about 30 seconds long) and then begin to follow any black lines it sees. We had two different "modes" for our robot. The first we called "friendly mode" where if the boe bot hit any other robot, it would activate the touch sensors on the boe bot and make it stop. The other mode was "destructive mode". We built and crossbow and when attached to our robot, if the robot hit anything or any robot, it would fire a spiked ball. Our crossbow did not always work accurately, however, because the trigger sometimes got stuck, but a successful run of the crossbow can be seen in the video attached.

What we learned: We learned much from this project since we none of us had had any experience with circuits and the only robotics experience any of us had had was lego robotics. We learned how to wire things correctly, the effects of short circuiting, how to troubleshoot our robot, and the basics of programing for boe bots. Overall, even though we may not use these skills in everyday life, they may be useful for future endeavors in both clubs and jobs. Another thing we learned is the need to keep going even in frustration. There were times where nothing in our robot worked, but we had to continue to move along and fix the problems or try something else. Some problems we had didn't get solved in the way we wanted (we wanted it to play music while moving) but we had to find ways around it even if not in the ways we wanted or expected (in the case of the music, we had to have it play before moving instead of during)

Advice: A main piece of advice we would give is to always check to make sure none of your wires are touching. This can cause the whole robot to stop working and heat up. Another suggestion is to use the help of others, even those not on our team. Often times, many teams had the same problem, and when one team figured it out, other teams could ask them for help. Finally, don't be afraid to jump in and try something different. If it doesn't work, you can always change it, but if it does you can create something really cool. Another piece of advice to to save your code often. If the program crashes, it is terrible to have to start over and by saving often this is often prevented. Also, don't be afraid to divide and conquer. Not everyone has to work on everything. If someone is good a coding, let them code, and if someone is good a building let them build. Many teams had one person code, one person build and one person design. Be sure, however that your design does not affect your actual needed parts. Even if something looks cool, if it doesn't work the coolness is moot.

Suggestions: One suggestion for improving this project is to give a few more guidelines. The first few days, we weren't really sure what we were supposed to do. Also, it would be awesome if we could learn about circuits for a few days before starting. I felt like I was just copying a picture most of the time and it would be awesome if I actually knew what I was doing. It would be amazing to be able to grasp the science behind the building circuits instead of mindless following a guidebook. Regardless, the project was fun and we did learn some circuitry through the pictures. Another suggestion is to make a task that is more open. While this task was good for the basics, something like a robot fight or a race or obstacle course may have lead to more creativity and more learning.

Other Feedback: This project overall was very fun and exciting. If we had more time it would have been fun to have robot fights (with a bracket tournament and the winner getting a prize), but what we did was cool too even if it restricted the programs somewhat. I really enjoyed working on this and think this project really should be done in the future.

Codes:

Follow the line with music code:

This program played the Zelda theme song and then followed the black line, stopping for a second if it hid another car or thing. Note that the loop for stopping was not saved and thus is not displayed below.

' {$STAMP BS2}

' {$PBASIC 2.5}

' LineFollowWithCheckQtis.bs2

' Navigates based on values acquired with the Check_Qtis subroutine.

qtis VAR Nib ' qti black/white states

OUTB = %1111 ' Set OUTB bits to 1

GOSUB Music

DO

' Main DO...LOOP

GOSUB Check_Qtis ' Get QTI states

SELECT qtis ' Control servo speeds/directions

CASE %1000 ' Rotate right

PULSOUT 13, 650

PULSOUT 12, 650

CASE %1100 ' Pivot right

PULSOUT 13, 750

PULSOUT 12, 650

CASE %0100 ' Curve right

PULSOUT 13, 800

PULSOUT 12, 650

CASE %0110 ' Straight ahead

PULSOUT 13, 850

PULSOUT 12, 650

CASE %0010 ' Curve left

PULSOUT 13, 850

PULSOUT 12, 700

CASE %0011 ' Pivot left

PULSOUT 13, 850

PULSOUT 12, 750

CASE %0001 ' Rotate left

PULSOUT 13, 850

PULSOUT 12, 850

CASE %1111

PULSOUT 13, 850

PULSOUT 12, 650

CASE ELSE

PAUSE 3

ENDSELECT

LOOP

Music:

FREQOUT 9, 300, 1864

PAUSE 150

FREQOUT 9, 100, 1396

FREQOUT 9, 600, 1396

PAUSE 400

FREQOUT 9, 200, 1864

FREQOUT 9, 150, 1864

FREQOUT 9, 150, 2093

FREQOUT 9, 100, 2349

FREQOUT 9, 100, 2489

FREQOUT 9, 600, 2793

PAUSE 400

FREQOUT 9, 100, 2793

PAUSE 25

FREQOUT 9, 100, 2793

PAUSE 25

FREQOUT 9, 200, 2960

FREQOUT 9, 200, 3322

FREQOUT 9, 600, 3729

PAUSE 400

FREQOUT 9, 150, 3729

FREQOUT 9, 300, 3729

FREQOUT 9, 125, 3322

FREQOUT 9, 150, 2960

FREQOUT 9, 400, 3322

FREQOUT 9, 150, 2960

FREQOUT 9, 400, 2793

PAUSE 400

FREQOUT 9, 200, 2793

PAUSE 25

FREQOUT 9, 400, 2489

PAUSE 25

FREQOUT 9, 200, 2793

FREQOUT 9, 350, 2960

PAUSE 400

FREQOUT 9, 200, 2793

PAUSE 25

FREQOUT 9, 200, 2489

FREQOUT 9, 400, 2217

FREQOUT 9, 150, 2489

FREQOUT 9, 350, 2793

PAUSE 400

FREQOUT 9, 200, 2489

PAUSE 25

FREQOUT 9, 150, 2217

FREQOUT 9, 400, 2093

PAUSE 50

FREQOUT 9, 150, 2093

PAUSE 25

FREQOUT 9, 150, 2349

FREQOUT 9, 400, 2637

PAUSE 25

FREQOUT 9, 400, 3136

PAUSE 25

FREQOUT 9, 400, 2793

PAUSE 50

FREQOUT 9, 400, 1396

FREQOUT 9, 200, 1396

FREQOUT 9, 600, 1396

PAUSE 300

RETURN

Check_Qtis:

' Result -> qtis variable. 0 means white surface, 1 means black

' surface.

DIRB = %1111 ' P7..P4 -> output

PAUSE 0 ' Delay = 230 us

DIRB = %0000 ' P7..P4 -> input

PAUSE 0 ' Delay = 230 us

' PULSOUT UnusedPin, 0 ' Delays = 208 + (Duration*2) us

qtis = INB ' Store QTI outputs in INB

RETURN