[Home] [About] [Links] [Contact] [Resume] [CS List] [cs482: Robotics Page]

Yousef Rabah
Robotics Journal
May Term 2003: cs482:Robotics



Wednesday May 14

  • Started to build the robot car, called it Mik-yo.


    Click on Picture

    Thursday May 15


  • Built the robot in the basic way. Satrted to play around with code using the built in functions. Wrote a simple program and ran it.

  • Afternoon: We decided to remodel the robot, had a few problems with getting the 90 and 180 degree turns, where the truns were unpredictable. After thinking about whats going on, we figured that the robot was heavy at one side mostly, so we divided the weight. We also took out another motor that had a fan because it was just extra weight.

  • We got the milestone 1 done.
  • We also started working on milestone 2, looking where to put the sensors and worked on implimenting it.
  • Friday May 16

  • Added this website online - sent link of journal.
  • Continued on implimenting milestone 2. Placed the sensors in a unique model that works great on the ground (in front of robot), also we put anotehr sensor in the back.

  • Wrote the program that works to impliment milestone 2. While its going forward, when a sensor is hit, it gets random input to either go left or right turn.
    Also, we made a c program that has functions, as an example, to go Forward, backward, turing left, turning right. Called the file functions.c
    Milestone 2 done successfully.
  • Monday May 19

  • Talked about milestone 3 and ways to impliment it. At first we were thinking that we can give a code that would just have the robot move to the left but when we looked further we realized that it wasnt the ideal way to do this, where there will be a number of places were the robot will not be able to go through.

    We then thought that having a sensor will be the best way to go with this. The left-side sensor will be an advantage. Basically, when the left-side seneor is toched we want it to keep going in that path. Now when the left front senor is toched we want to move right and then move left until the senor is pressed and when so then we go forward. When the right front sensor is pressed then the robot will move right but not as much as it would have if the left front sensor was pressed.

    We had some problems at first with the speed. Where when we first tried the robot on the ground, the robot will be going fast that it would get itself stuck. Then we thought to have it go slow where that way the robot will be persise, but that was also a bad idea where the robot was going slow that the sensors up front were not toched at all. We then changed the power at 60-65. Based on the power we had the shift right based on. Also at the begining, we got in trouble were the moving right wasnt enough, and it would take a while to get going forward again. So we had it turn more on the right when front is pressed, yet a little less trun right when the left is pressed. Now when none of the sensors are pressed the robot starts moving forward and to left.
  • Tuesday May 20

  • Continued work on milestone 3. We had some problems but worked them out slowly. We encountered the problem where at one point you need to turn more than at another point, its in a way unpridictable whats going to happen, so code has at be at its best where the robot will go through at its best way.

    hanged some functions. The problems that we sloved today were
    1. In the initial turn, in order for it to go smoothly from going straight and then along the path way, what we did was the bot goes forward till the wall is reached and then it backs up a little, the turns to right, stops then moves forward. Problems occured when we backed up too much, or went to right too much and so it was hard to go through.
    2. When not touching the wall, when left touch --> more forward and less right.
    3. When touching the wall, from both sensors in front, back up once and move forward once. Now im saying this because the problems we encountered was that we had backward a little, forward a little, backward again, stop and move forward. All this trying to be persise, but it became clear, or it seemed that the robot could not read a lot of small inputs at once. It was actually easiar and more efficient to have it back up once and move forward once.
    Milestone 3 is done.
  • Wednesday May 21

  • Running Milestone 3 today, source of problems was that the battery of the robot was fully charged while yesterday our tests ran on half-full battery and so the results today were not as we wanted them to be.
  • Started thinking about Milestone 4. Took some light sensors and took the results of the best 3 closest to each other.
    Started to think how we are going to impliment this milestone. We decided to divide what we have to do and each day work on something until we get the whole thing done.
    Today we are working on setting up the light sensors, getting results from the ensors. We wrote code that contains the knob function.
  • Thursday May 22

  • We have been working on code. Testing it.
    Working on the stopping point, which is the furthest the bot can be close to light.
  • We have had a hard time locating the besting timing at which the bot should stopbecause each time it would be getting different results when approching it. We tried to have a mean, the average to stop between an average of points. It was not getting the results we want. We went to anther direction where we get another sensor and set it up in the middle of the robot facing upwards and so this way when the robot approches the light, the light sensor will be very close to light bulb that the readings are most always very close and so we were able to get the results that we want.
  • Friday May 23

  • Been looking at the code, observing tests.
    Went to the library, did research. Came back with 2 books and also different online reliable sources.
  • Saturday May 24

  • Was reading some parts of the sources I got from the library, was also thinking of what I want out of the research paper. Also wrote an outline.
  • Sunday May 25

  • I started out by reading from sources and the outline.
  • Later on, I started to write the paper. I am half way through the paper.
  • Monday May 26

  • When we took the robot to test it out in the testing area. Turns out that the lights have been lowered down. I asked the TA's and they said it was the case so that all sensors on the bots would be at the same height.
    Me and Mikel spend however the days that passed figuring and constructing a way to have another sensor that reached the light so that it would reach the light. So we had to remove the extra sensor that we had, then we changed the code a little where first we took out the code for the extra sensor that was put on a lego that almost reached the light. In any case, the code was working again.

    Me and Mikel added some code. We added a function called calibrate where left_max would get analog(0), right_max gets analog(1), then set of printf's to give what the value is. The reason for this is that before we press the start botton, we place the robot at the closest point to the light in that current situation and you get maximum values closest to the light and based on that those values are there in the code. After getting results you place the robot wherever you want and you press the start buttom and robot starts moving.

  • Tuesday My 27

  • Tested Milestone 4 and it worked properly. Its done
  • Started to work on Milestone 5.
    Before we started, we decided that we will divide what we want to do until the last day we would be done with everything. The goal for today is to have code, build the robot and with implimentation so that the robot by the end of today hopefully will be going along the tape.

    We started out coding. Then we worked on setting up the sensor on the robot. We then put the extra red light which was great b/c we didnt know we could get it and we thought we were going to be only working with a sensor and it was up to it basically to go through the tape. The reason it was a little frustrating because we knew from other tests from prior milestones that those sensors are unpredictable, however, with the red light its a great help.

    After setting up both the sensor and the red light, we ran the code that we put up. The robot was not giving us the results we were expecting, and so what we did was add a rounded plastic to the red light along so that the red light would not directly hit the sensor.

    We uploaded the code to the handy board, and the robot was getting along the path in a decent manner yet something was wrong and it was not predictable (the results I mean). It would go along the tape and once it goes this way and once the other way, while in the code it would be sometimes totaly different. After a lot of hours that passed, we understood what was going on. The light from outside and also the light from the room was effecting the robot's behavior. Turns that the rounded plastic didnt really do great, yet it still did b/c it doesn't interfere directly with the sensor.

    We reached a point where we cannot really do anything just because we are going to wait for the setup to be made, the light bulb that is going to be placed, the area and so forth.

    Tomorrow, we want to make sure we get the code to be running and that the robot is behaving like we expect it to.Then the goal is impliment the algorithum that we came up with today for locating coordinates.

    We talk to hanna and chip and so far they think that the light will be on the top left and according to that, what we basically do is,

    1. first locate the light source, then turn left to get the distance to wall where it will get smaller and smaller until it reachs minimum and that is your x-coordinate.
    2. Then turn right on that samelocation where it also will be smaller and smaller until minimum and that will be your y-coordinate.
    The rest we are still thinking about and tomorrow we will work on it.


    Wednesday May 28

    The main things we did today were:
  • We changed around the algorithm more than once until we got a better one that gave better results.
  • We also changed the structure of the robot. The first attempt in the morning was to put 2 sensors + the red light in the bottom so that it would be basically be reading from both sides and based on those reports gives the robot directions of what to do. After the cource area was made, we dicovered that this would not work because we thought the tape was wider and so useing 2 sensors would not work. So we just have one sensor and changed the code based on that one sensor.
  • We also took different readings from the Infra Red (IR).
    Values we got were:


    Here is a graph plot of our results:
  • Thursday May 29
  • We started out brainstorming how to make this milestone possible in the amout of time we have today. Also since we have to keep in mind that we have to share the handyboard with the Nates although we are short in time. We have less time than we think. Here are the things we worked on today:
    1. Added more sensors to the robot. What we have now is a sensor in the front, one on the left, one on the right and one in the back. The reason is that it will help with knowing the coordinates.
    2. We added two wheels near the main wheels, so the robot will have space at the front of the robot, and also not to have friction with the ground and not be able to move and follow the tape in the right manner.
    3. Then what we did is that we checked the robot without giving the coordinates, just to follow the tape. It would work fine but not with the light bulb on. It would be fine without it. So what we did is try to block the light from coming inside the robot (from the sides, bottom ) we also added some tape on the area's that had the holed lego parts. After than the robot seemed to work fine and follow the tape normally with the light bulb on.
    4. The we started coding. We had a number of functions, of which included a function that checks light, locates light, find coordinates, and reports coordinates for x and y positions.
  • I feel that this milestone was difficult yet challenging. I think that if we had more time it would have been a reasnable milestone. For this milestone, it would have helped if the exact pre-known cource area and lights were confired so that we would not have to worry about which place the light is coming from, or what is the area we are testing at. Minor stuff that wastes time since we dont have alot of days.
  • Friday May 29
  • The robot was tested today, Milestone 5, and it went alright.
  • We started to think about the final project. We set a couple of tasks for today.
    1. Understand the project, what is needed out of it.
    2. Get the Robot build. Remove unwanted sensors, add things we need. Remodel the robot to fit this projects aim.
    3. Get the readings from the different tape colors. The sensor readingswe got were Black: 180, Blue: 171 , and white: 110 .
    4. Code up code referencing some form previous milestone while learning from previous mistakes and also adding new features. We will move on from there later on.
  • Saturday May 30
  • I have been working on the research paper and hopefully, I will finish it today.
    It would give a head start to work early on the final project.
  • Sunday June 1
  • Working on the research paper. Got it done
  • Monday June 2
  • Started out by giving an informal presentation on my research paper.
  • Me and Mekel have been working on the code for final milestone. Seems that we are getting unusual readings each time, we are trying to lock on something that we can be able to work with.
    The goal for today is to have the robot move on the black tape and then continue to move to the blue tape.
  • We have been working on making functions necessary for working out towards the final milestone. Here are some Functions:
    1. follow_black_tape()
    2. follow_blue_tape()
    3. play_music()
    4. next_node()
    5. in_front_node()
    6. lights_are_on()
    7. set_current_node()
    8. set_inactive_node()
    We are working on these functions still. Also we need to have the light finalized, so that we would be able to to testing/getting values with/without light on the testing area. Also to get the values from the sensor of the 3 tapes.
  • Tuesday June 3
  • Worked more on the functions that we made.

  • Added a few more functions and took out the ones that were not neccessary.

  • What happened was that as we were filling the details of the final milestone,we had functions that had within it the same coding. So in a way we were repeating same code and the functions got really big. At that point me and mekel took a small break and when we went back we printed the code that we had. Then went upstairs and looked at the code on a big TV screen and then started to note where code was repeated and that code we put in other functions. This made the program more readable and more efficient. Basically, we fixed the code up.

  • After that we started to work more on functions. Getting things ready,testing and slowly but surely we made a lot of progress until we got the milestone done. We tested it in an environment where it was byitself in the testing area. It went pretty well. The FINAL MILESTONE is done !


  • Questions, email rabahyo@cs.earlham.edu.
    Main CS list : CS list.
    Website USEF-ONLINE.