Friday, 12 July 2013

Line Follower using AVR

Hello Buddies,

Here is a simple guide to make a Line Follower using AVR.

First and Foremost,What is a Line Follower?

Line Follower is a Robot that can follow a path. Path is usually a Black Line on a white surface or vice versa.

Following Components are required for making a Line Follower :

  • Robot Chassis 
          Provides a base to the robot.
          Wheels,sensors and development boards are attached to it.
  • AVR Development Board (Model : PT0002)
          Used to interface motors,sensors and various other devices with microcontroller.
  • DC Geared Motors (Product ID : PT0017)
          Motors which works on DC current and gives a rotating motion as an output. 
  • Dual Pair IR Sensor Module (Product ID : PT0030)
          IR Sensor works on the principal of emitting IR rays and recieving the reflected rays via reciever. 
  • USB AVR ISP Programmer (Model PT : 0092)
          Used to program microcontoller from laptop only.
  • Two 4 Pin Connectors 
  • DC Supply (12V)

Now write a suitable code keeping the following things in mind :


  • For moving Forward : Both motors Clockwise
  • For moving Backward : Both motors Anti-Clockwise
  • For turning Left : First off Second Clockwise
  • For turning Right : First Clockwise Second off
Once code is written program your micro controller i.e. Atmega 16 using usb isp programmer.
Now we just have to mount the avr development board and IR sensors on chassis.

Make Sure to visit http://positronindia.in for the hardware required and refer to the Model No. given above.

Hope you understood the simple steps involved in making a Line Follower.

Happy Learning!!!

See the video of this project : https://www.youtube.com/watch feature=player_embedded&v=lV7detQ8dCA#at=39

About the Author : This post has been written by Ayush Sharma, an intern with Positron Technologies. Ayush is presently pursuing his BE at School of Engineering, Manipal University Jaipur. He can be contacted at ayush@positronindia.in.











Friday, 22 February 2013

CREATING HEX FILE USING KEIL uVISION4

Hello Folks,

Here is a guide to prepare a HEX file using KEIL uVision 4.

First and foremost, install Keil for 8051 on your computer. You can download the software at  http://keil.com/downloads

Go to the Start Menu of your Windows OS. Type in KEIL and select KEIL uVision.

Once the software is launched. Have a look at your workspace. It should look something like this.

Now you are ready to go.

Click on Project and select New uVision Project.


Give a name to your project. Can be anything, let me name it as sampleproject.

Once you have named your project. Now is the time to select your device. For 8051, select ATMEL and then select AT89C51.

Now, KEIL will ask, whether you would like to copy 'STARTUP.A51' to project folder. Select Yes.





Now is the time to write the code. Before writing the code, create a new ".C" file. Go to the File menu, and select "New".




A writing pad will open. Write down your code in it.




Once the code is written, we need to save the file. Go to the File menu and click on Save As.




Let's save the file as sampleproject.c
Do not forget to give the file an extension .c
Remember KEIL can be used to compile assembly as well as C Codes. As a tip, in case you have written down the code in Assembly, you need to save the file with a .asm extension.

Now, we need to compile the code, or so to say, "Build the Target". Before doing that, we need to do some settings.

Go to the Project menu and select Options for Target 'Target 1'

A dialog box will open. Select the Output menu and check on Create HEX file option.

Unless you check on this option, HEX file shall not be created.





Now, only one step remains. We need to Build the Target. Click on the Project Menu, and select Build Target.


And, your HEX file is created. Remember, the HEX file shall be created in he same folder, where your .c file is.

Hope you understood the simple steps involved in creating a HEX file using KEIL uVision4.

Happy Learning!