Friday, January 15, 2016

Simple Ball Tracker Bot | Part 1|Hardware and Software requirements

Hello readers. This is going to be my first blog post in three years and finally I've got enough material on projects I've worked on, will be working on, and what not but have got a considerable lot in my bag to turn them into blog posts. Hopefully I'll post updates as soon as possible.

Coming straight to the topic, The ball tracking bot is a simple image processing based bot that tracks a ball of a certain color(can be changed by changing the HSV values embedded with a tilt camera(with a servo) and follows the ball. It is going to be based on OpenCV. I chose this as my first topic as i wanted to start the blog with relatively easier topics than that would soon follow up. Image processing is a wide area and I've just started to learn image processing and only recently came up with an idea of such a bot (Obviously from getting inspired from similar bots on YouTube). So lets gets straight into it and look into the hardware and software requirements:


I. Hardware :

1) Raspberry Pi 2 B+

The reason for this being in the system is obvious, that is, that it'll be handling the image processing part of the proposed system. But i chose Raspi over other PC or computer based processing was that it'll make the bot mobile, with the capability of online editing of codes while running the bot. We're going to use the OpenCV library for python and we'll need python 2.7 or later versions. I'm not well versed with python, im still learning it. The OS i've installed is the Rasbian,



2) Slave Microcontroller  ( Arduino or any microcontroller that you are well versed with)

We'll be making decisions on the raspi for the tracking the ball but we'll send these decisions to execute to slave a microcontroller to move the servo and drive the motors for the chassis.

3) 9 gm Servo

Preferably a 9gm servo, i'm going to use as i think this is going to be enough to move a small USB camera. One thing important to note is that Servos require some amount of peak current and generally that amount for a 9 gm servo would be 200-300 mA so a compatible battery needs to be employed. Additionally i have put a pan tilt mechanism and mounted the camera on top and servo on the side.
  
4)USB Webcam/Camera.

A USB Webcam is i guess enough for the simple purpose of just tracking the ball, though if complex or higher end image processing is to be required then you need to use the Raspi Cam. The reason being that USB communication eats enough of the RAM/Processing Power but on the other hand the Raspi cam is directly connected to the dedicated GPU which makes the system available to compute the other tasks. Have a look at this:

5)DC Motors and l298D Driver

Normal 200 rpm dc motors i am going to use and the driver for it is going to be the l298d.

Note:- l293d will not be sufficient enough for this type of bot as explained here

6)Power supply 

For the raspi i'll be putting a seperate 1000 mAh battery pack and for the the uC, Servo and motor, i'll be using 1000 mAh Li-Po battery.

IMPORTANT: If you're going to use a uC other than Arduino, its better to use a USB to serial converter module due to different logic levels in raspi and uC pins. Like this one:


II.Software:

1) Python 2.7 on Raspi 

2)OpenCV library for python


optional :Arduino IDE on Raspi


Bot Chassis (Haven't made any connections yet)

Just get to the terminal window and type the following:

 sudo apt-get install arduino

I'll be coming up with another blog post on the how to setup the Raspi for OpenCV.

Cheers!


Subscribe my blog to keep a track on future posts!

No comments:

Post a Comment