Thursday, 10 May 2012

.Net Gadgeteer Powered Object Tracking Robot

This is my first real project using the awesome .Net gadgeteer platform. My initial aim for this project was to build a Gadgeteer version of the robot shown in this video.

The robot can track objects at short (around 20-30cm) distances and will try to stay a set distance away from the object it is tracking.
For tracking the robot uses an ir compound eye, which is a sensor that gives an analog output depending on the level of reflected infrared light.


This is a video of the working prototype of my gadgeteer powered version. (apologies for the crappy quality, i'll get a better version uploaded soon)


This is the first of a series of posts detailing how i went about building it and the stupid expensive mistakes i made along the way.

Parts and materials

The base of the robot is a Rover 5 chassis, made by Dagu electronics.

I had a couple of different options for the motor controller. GHI electronics make a Gadgeteer motor driver module, which i could have used and would probably have worked perfectly well.
However i chose the  Dagu explorer pcb  as it was designed to fit the chassis i was using and has lots of other nice features such as infrared corner tracking and multiple power sources.

Fez Spider mainboard (you can probably use most other gadgeteer mainboards)

Future posts will detail how i went about putting it together.

Driving the motors
Object Tracking

If you enjoyed this post, you can also follow me on twitter or subscribe to this feed.




5 comments:

  1. Hi Rick, Thanks for the great post. I have followed your post and one problem I am facing is that my main board gets restarted very frequently after deploying the code (I heard it on my laptop when it is getting rebooted since it disconnects from the usb port). if I disconnect the extenders that cover the eye, it is fine, but with those extenders, my board gets rebooted every few seconds. could you also let me know which sockets on the board you have each module attached to?
    thanks again
    Hamed

    ReplyDelete
  2. Hi, if you are having problems with the mainboard rebooting it will probably be down to your power supply.

    Are you using a separate power source for the servos and ir compound eye?
    You'll definitely have problems if you try and run everything off the USB connection to the mainboard.
    Even if you do have a separate power source for the servos and compound eye it may just be that the board is drawing too much power for the USB connection.

    I would try using a separate 9v battery as the power source for your gadgeteer mainboard or alternatively a powered USB hub. I was having problems with reboots myself until I did this.

    In my setup I use a 9v PP3 battery to power the mainboard and 6 AA batteries to power the servos, the ir compound eye and the motors on the rover 5 chassis (I'm using the explorer pcb which provides a regulated 5v output for powering servos etc) if you aren't driving motors you could probably just use 4 AA batteries.

    Initially I was trying to power everything including the mainboard from 6AA batteries and was having problems with frequent reboots. Since I switched to using a separate 9v battery to power the gadgeteer board I haven't had any more problems.

    To answer your question about the sockets I'm using, I have the Fez Spider. I'm using sockets 9 and 10 for the extender modules connected to the ir compound eye, socket 8 for the pan and tilt servos and in the finished version of the robot I'm using socket 11 for the motors.

    Hope this helps

    ReplyDelete
  3. Thanks Rick, the power was the issue. using a separate source for the eyes and motors solved the reboot issue. One more question though, did you do any calibration on the eye? to me, it seems the eye in the video is more accurate than mine, especially if the object move to the side.

    ReplyDelete
    Replies
    1. Hi, glad that worked for you :)

      The sensitivity of the ir compound eye is affected by the amount of ambient ir light. So sunlight will reduce the range and effectiveness of the sensor quite significantly.

      Try tracking a white object as it will reflect the it light better.

      You could also try tweaking the default values in the ObjectTracker class, although I think those values should be fine.


      Is it panning left and right at all? If not then you may need to swap the left and right it sensor connections around.

      Let me know how you get on

      Delete
  4. Easton Bell Electrical are your Melbourne based electricians, and it is our priority that
    we provide you with a friendly and courteous service while being professional and well presented.
    We pride ourselves on being on time and discussing with you what work suits you best. And best of all, We Clean Up!Hampton Electrician

    ReplyDelete