Shop OBEX P1 Docs P2 Docs Learn Events
Participating in the Parallax Expo LFO (Line Following Open) 2012 — Parallax Forums

Participating in the Parallax Expo LFO (Line Following Open) 2012

StempileStempile Posts: 82
edited 2012-04-23 19:23 in Robotics
The LFO only had 3 robots, 2 that competed, 1 that could line-follow and respond to predefined map. That 1 was my StringRay. I won by default - but a win is a win so I will take it!

Robot:

  • Parallax StringRay chassis
  • Parallax MSR-1 Propeller control board (now discontinued)

Sensor:
  • Parallax line following kit with 8 IR sensors and on-board adjustable PWM driver

Prop Objects:
  • 582 - Stingray Motor Control (modified by me)
  • ### - IR Line Sensor (new object by me, needs clean before OBEX posting)

Theory of Operation:
  1. Detect line, adjust motors (left %power, right %power) base on line input to keep line in center. If off line continue with prior sensor reading.
  2. Detect line conditions; e.g. T-intersection, Right-intersection, Left-intersection.
Robot travels following the line until reaching a predefined condition based on map provided prior to event. At condition turn right, left or keep going. Primary method is line detection, secondary interrupt based methods are for condition processing. Robot is programed to line follow, seek conditions, react and adjust and continue following the line. If exception (off line) continue on prior course correction value (motors (left %power, right %power)).

Mapping Logic:

LFO Map with mark up.jpg



Daniel provided a course lay out prior to the event. The course had all kinds of intersecting lines and funny patterns to deal with. This was not going to be a straight line and you are done kind of run.

To stub out the program I color coded the different intersections to make it easier to align methods. Contestants were allowed only a small amount of time just prior to the official run to setup the logic for following the map. The blue line was the actual course, the black line is what I practiced with. To recap - the course was posted before the event, the actual path to follow was given just prior to participating in the event.

LESSONS LEARNED:

  1. Don't mess around with the robot that will be competing at the Expo. I was demoing the 2.5 Watt video transmitter and RC Teleop function when I broke the gear box. Stripped out 2 gears. OUCH. Being that it was STOCK Parallax parts, I bought a new one, did some field repair and I was back in business. Problem was I had tuned some method timings based on the old motor - old and new weren't performing the same...
  2. Encoding would be nice.
  3. Bring more tools then I thought I would need.
  4. Bring water, was out in the back in the full sun most of the afternoon tweaking things within the code.
  5. Test more consistent conditions as the course. I used electrical tape for function testing. Worked great. My logic was backwards compared to the actual course. If the silver line was under a sensor, it would register a '0'. At home, if the black tape line was under a sensor, it would register a '1'. So when I arrived to test, I quickly had to reverse all my code. Next time I am going to build that logic function switch into the code. I also had to adjust the PWM freq on the sensor to pick up the difference in the type of line.
  6. Be prepared adjust clearance on sensor. The Parallax stock line follower kit has a spacer that gets the sensor nice and close to the ground. On the course, pebbles would get stuck or the sensor would rub on the tape damaging the course. Raised it up a little, no more issues.
  7. This event drove a lot of interest. Next year I am going to prepare a poster board with the theory on it in hopes of getting more people interested. Met a lot of great people while explaining what I was doing hunch over the laptop.
  8. Get power for laptop :)
  9. Have a separate program ready for just debugging.
  10. Develop a audio based debug method. I couldn't see the LED that I was using. I tried to add a buzzer before, but I didn't have time to tweak it.

OTHER NOTES:

I didn't run the video transmitter during the event. Good thing because after I tried to repeat the run with the TX on, it wasn't working. To much interference with the sensor.

The course was suppose to be black top. We found that it was really gray top given the condition of the aggregate. A few very white (near reflective) rocks close to the silver line had to be covered in black tape or sharpie marker.

WRAP UP:
Over all it was a lot of fun. It got me a lot more comfortable with SPIN and back into micro controller programming. I combined the winnings with what I had planned to spend at the Expo to get an Elev-8 and some sensors. Built the Elev-8 over the past week, flew it - had a blast. Now I am looking at advanced line following, GPS tracking and perhaps hacking Elev-8 for a 3D experience.

Thanks Parallax - I hope this contest will be back next year!!
1024 x 1338 - 114K

Comments

  • WhitWhit Posts: 4,191
    edited 2012-04-22 18:58
    Thanks for the great report. Glad you put you Stingray through the paces!
  • RaymanRayman Posts: 14,662
    edited 2012-04-23 12:21
    Congratulations Matt!

    I'm happy with second place, considering the relative amount of effort and expense...
    If it was really black top, I might have put up a better challenge. As it was, I'm glad my bot followed any of the lines for a while...

    The grey surface cause my bot serious grief...

    Maybe next year I'll be better prepared...

    I'm actually very glad you were there. It would have been a very, very sad competition without you. It would have been very emberrassing in front of all the kids...
    At least they got to see one bot do well...
  • ercoerco Posts: 20,256
    edited 2012-04-23 13:07
    Did anyone use 38 khz IR sensors as Parallax suggested beforehand?
  • RaymanRayman Posts: 14,662
    edited 2012-04-23 17:10
    I used OSRAM SFH 7741 ir proximity sensors that update at 11 Hz. I'm not sure if the IR is modulated in any way...
    Not sure if modulation would help...

    Having Parallax show us the way is a good idea though. I think next time I'd like to see Parallax show us a bot that can complete the course :)
  • StempileStempile Posts: 82
    edited 2012-04-23 19:23
    The sensor I used from Parallax starts out at 38kHz. Ended up dialing up around 42 I think, I set the pot up as far as it would go. I will measure it to see what its cranking out when I get more batteries for my DMM.
    Rayman wrote: »
    Having Parallax show us the way is a good idea though. I think next time I'd like to see Parallax show us a bot that can complete the course :)

    I am already planning for next year. Will have some additional hardware and better software to knock out the whole thing and do it fast! Will knock it out and will have a presentation if anyone wants to hear it :)

    ms
Sign In or Register to comment.