Showing posts with label hobby. Show all posts
Showing posts with label hobby. Show all posts

Friday, 6 July 2012

Auto Tank - Ver 2

As I have planned before, finally I got some time to work with the tank and it looks much better now. See the video below. And yes I managed to break the tread!

My first plan was to make alternate left and right turn. But I after making a program for that I have realised turning left and right alternately will only get the tank stuck in some corner failing to get out of the trap. So I had to adopt a different strategy for fixed IR sensor control. I am just writing the logic below.
  1. Power on
  2. Move forward crazy(full speed).
    1. speed depends the distance to the obstacle
    2. speed reduces to zero as it reaches towards the obstacle
  3. Once the gap in front has reduced to 8 cm(approx), stop and have a think about which way to turn
  4. Turn left or right - Turning right has a probability of 9/10 and turn left has a probability of 1/10.
  5. Once the decision has made on which direction to turn  keep turning until the gap in front increases more than 8cm(approx).
  6. move forward
  7. got to step 2
The decision making with the more probability to turn right has been done using a random function as shown in below pseudo code.


        int t=random(1,11);   // randomly gets a value between 1 and 10, random() is an Arduino function
        if(t==1)  
        {
         Turn right
         }
        else
        {
        Turn left
         }

And from the previous version I have removed all the pause timings to make it more smooth-smooth. previously the minimum gap to brake was less than 8 cm. Increasing this minimum gap reduced the tank running into things and made the sensor more safe from collisions.

Now, these are my future improvement plans for this.

  1. Move the motor controller from the bread board into a PCB.
  2. Use a common 9V rechargeable battery for both Arduino and the motors. Currently Arduino runs with 9V PP3 battery and the motors on 4.8 V rechargeable battery pack.


Saturday, 19 May 2012

Shopping list - to start making your robot

Here is a list of basic things and some extra bits that I think essential to make a simple robot. I know it depends on how you define the simple robot but I am making this list keeping my tank robot in mind!

  1. Bread board 
  2. Wires - those ones you can directly push into the bread board are great! 
  3. Resistors 
  4. Capacitors 
  5. LEDs - at least one 
  6. A soldering kit 
  7. A digital multimeter 
  8. A computer 
  9. A programmer to compile and burn your program to the microcontroller 
  10. Microcontroller - For a beginner I think buying a microcontroller kit is the best idea - like Arduino, or biotrics cerebellum. 
  11. Motors - dc or stepper or servo 
  12. Sensors - I will be using an IR range sensor 
  13. Buy some old second hand toys so you can build your robot frame from it. I have been to couple of car boot sales and got enough metal frames and wheels and all sorts of stuff.


Some good shopping websites - for UK
  • http://www.phenoptix.com - They are specialised in LEDs, but I got my Arduino for a very good deal from there.
  • http://www.bitsbox.co.uk/ - Very small company but good number of components and deals, I bought an electronics kit and a Sharp IR range finder from there. Best deal I found on internet.