Project - FEZ Cerbot Line Follower

I just posted FEZ Cerbot Line Follower on Codeshare. Feel free to discuss and make suggestions here.

7 Likes

I like! Very cool!

@ KiwiSaner - Thank you sir. I wish I had a video of my daughter’s face when I showed her, not knowing about the reflector sensors she was astounded that the cerbot could follow the line by it self, her initial expression was priceless.

I don’t have a Cerbot.
What would it take to make this run on a Cerberus or Cerbuino?

i’ll play with it a report back…

Thanks for sharing…

@ Jay Jay - Technically, the code would never run on a Cerberus or Cerbuino as the Motor Controller is only found on the Cerbot. With that being said, all of the other code should work with those systems and a small modification would be needed for the motor controller module we sell or any other one of your choice.

right I have the motor controller module you guys sell, and the reflector… so the plan is to put these together and make it dance :slight_smile:

@ Jay Jay - Using the reflector module you would probably be able to do an even better job since you have better granularity (4 sensors vs 2 on the Cerbot), so you would be able to apply some finer control as to how much you adjust the turn based on the number of reflectors sensing the line.

I would be very interested in seeing your results!

@ taylorza - I just found out that our robotics club is having a line following bot contest Saturday. I don’t have time to build one from scratch so I’m going to put your code to the test. Go Cerbot!

They’re following this model. I’m a little worried that the sensors on the Cerbot are too far apart for this thin a line. Have you tried it with a line the width of a single piece of electrical tape? Also, its a speed contest. So, if you have ideas for speeding it up let’s hear them. I think the motors of the Cerbot are going to be a limiting factor here, though.

Contest model:

@ ianlee74 - I did not have insulation tape and the only black tape I could get at the local store was duck tape which coincidentally was just the right width.

You are definitely correct that the motor speed is going to be a limiting factor for the speed. I found that if I ran them at 100% the motors would cutout.

You might have to tune the turning rate for the thinner line, what I expect might happen is that the Cerbot will track the line with one of the sensors, so it will not run over the center of the line, but the sharp turns might induce violent swings that overshoot the narrower lines if not tuned correctly.

I look forward to seeing how you get on with this, I will go by some insulation tape to give this a try myself. I have the reflector sensor module, it has four reflectors but it does not have a convenient way to mount it to the cerbot without creating something custom, that might help if you can use that.

I just looked at the Reflector module I have and it is actually 3 IR reflection sensors and not 4 as I initially thought and not an ideal configuration for line following purposes.

I tried making a track using black electrical tape on the concrete floor of my shop last night and it didn’t work at all. If I get time tomorrow, I’ll try to round up some white cardboard. But, it seems that the sensors are too high above the floor to be effective in less than ideal environments. I may try to put some tubes around them to block excess light/IR. I’ve got 500 sonic screwdriver handle to finish up before Saturday, though. So, not much time to work on this. I may have to just show up and see if I get better results on their course.

I had a different idea, though… I have a color sensor module. It should be possible to use a single one mounted in the center of the bot. Might be tough at high speed, though.

Color sensor is an interesting idea, but I suspect that with one sensor you are going to be spending a lot of time hunting for the line because you will not know if you need to turn left or right to get back on the line. Or are you thinking of something else?

You do realize that I now need to go get some insulation tape to try this. ;D

Yea, that’s the problem. But, hopefully, 50% of the time you turn the right way first :slight_smile: I’m not sure how fast that sensor can sample but I suspect it would be tough for a fast moving bot but it might be able to keep up with the Cerbot although it will probably look a bit jerky when trying to find the line.

You should be able to test this fine using your wide tape. It jut won’t need to correct as often.