Competitions Robotics 3 - The Build and a Fast Line Follower using PID

Last time we covered the hardware we needed to assemble our robot. This time lets assemble it quickly and get it moving. And do some hello world in robotics , which is Line Following.

We will start with the Video of what we are going to achieve -

If you are building this and already have bought the parts I will assume that you will need little help assembling it , but I would like to give some pointers so that you dont make the mistakes which are usually made by people and things proceed fast for you.

Either get the PCB made by a PCB vendor or simply do it yourself using the Ferric chloride method ( tutorial ). This PCB is made for easy fabrication at home with all components available locally. Also this Board can easily be used for any of your own robots. And has been made with libraries compatible to orangutan so you have a good framework to fall back on.

We will first start off by assembling the electronic component and then in the end putting everything together. So starting out if you have made the PCB yourself you can TIN it yourself, doing it is quite simple and will stop your PCB from oxidizing. To do so simply put a small drop of Solder on our copper side of board and then rub it across using your hot solder head ( With Max possible temprature). This will create a very fine layer of solder on the copper.

Also you can print the top silk side on a paper cut it to size and paste it to make it look neater and to label everything.Next solder the components, start with the small ones and move to the bigger ones, this allows for easy soldering. Also use ample flux while soldering to get good joints.

To make FRC cables simply use a plier and put the cable in between it to make the connections, it works well. And with FRC cables you get a very neat robot.

So here is the final robot once again with the battery and the Orangutan Board from Pololu mounted on it -

Lets start moving 

Since we are using a framework and our PCB is built for it most of the things are already taken care of 

To move your robot forward for a second at speed 30 here is the code .

The above code is for a decently advanced line follower written by me over a Sunday evening. Most of the code comes from Pololu Documentation with some customizations for my Robot. The compiler is AVR-GCC being run inside AVR Studio.

The robot does self calibration based on environment to optimizes its sensor reading for line following, this can be seen in the video. Once calibrated it waits for user input to start.

There are basically two choices available -

void follow()

This is the simple line following function which just goes left and right based on the location of the line.

void followPID()

This is a PID based line following mechanism with some of my own customization to prevent robot from skidding. Please do optimize the code if you ever use it. The built robot is quite fast , but due to the small course we are not able to see the real speed.

HI GUYS HOW ARE YOU ALL
I NEED UR HELP TO BUILD AN LINE FOLLOWING ROBOT..........................
I DONT KNOW FROM WHERE I SHOULD START..............
HERE IS A COMPETETION ON LINE FOLLOWING ROBOT KINDLY HELP ME PLZZZZZZ