Line Following Robot

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

LINE FOLLOWING ROBOT-:

INTRODUCTION-:
This simple robot is designed to be able to follow a black line on the ground without getting off the line too much. The robot has two sensors installed underneath the front part of the body, and two DC motors drive wheels moving forward. A circuit inside takes an input signal from two sensors and controls the speed of wheels rotation. The control is done in such a way that when a sensor senses a black line, the motor slows down or even stops. Then the difference of rotation speed makes it possible to make turns. For instance, in the figure on the right, if the sensor somehow senses a black line, the wheel on that side slows down and the robot will make a right turn.

A BRIEF INTRODUCTION TO 8051 MICROCONTROLLER:


When we have to learn about a new computer we have to familiarize about the machine capability we are using, and we can do it by studying the internal hardware design (devices architecture), and also to know about the size, number and the size of the registers. A microcontroller is a single chip that contains the processor (the CPU), non-volatile memory for the program (ROM or flash), volatile memory for input and output (RAM), a clock and an I/O control unit. Also called a "computer on a chip," billions of microcontroller units (MCUs) are embedded each year in a myriad of products from toys to appliances to automobiles. For example, a single vehicle can use 70 or more microcontrollers. The following picture describes a general block diagram of microcontroller. AT89S52: The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industrystandard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller, which provides a highly flexible and cost-effective solution to many, embedded control applications. The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data

pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM con-tents but freezes the oscillator, disabling all other chip functions until the next interrupt

The hardware is driven by a set of program instructions, or software. Once familiar with hardware and software, the user can then apply the microcontroller to the problems easily.

The pin diagram of the 8051 shows all of the input/output pins unique to microcontrollers:

The following are some of the capabilities of 8051 microcontroller. Internal ROM and RAM I/O ports with programmable pins Timers and counters Serial data communication

The 8051 architecture consists of these specific features: 16 bit PC &data pointer (DPTR) 8 bit program status word (PSW) 8 bit stack pointer (SP) Internal ROM 4k Internal RAM of 128 bytes. 4 register banks, each containing 8 registers 80 bits of general purpose data memory 32 input/output pins arranged as four 8 bit ports: P0-P3 Two 16 bit timer/counters: T0-T1 Two external and three internal interrupt sources Oscillator and clock circuits.

THEORY OF OPERATION-:

How to sense a black line The sensors used for the project are Reflective Object Sensors, 0PB710F that are already ready in the Electronic Lab. The single sensor consists of an infrared emitting diode and a NPN Darlington phototransistor. When a light emitted from the diode is reflected off an object and back into the phototransistor, output current is produced, depending on the amount of infrared light, which triggers the base current of the phototransistor. In my case, the amount of light reflected off a black line is much less than that of a white background, so we can detect the black line somehow by measuring the current. (This current is converted to voltage.) ii) How to control a DC motor Instead of applying a constant voltage across a DC motor, we repeat switching on and off the motor with a fixed voltage (Vcc) applied to the motor. This is done by sending a train of PWM (Pulse Width Modulation) pulses to a power MOSFET in order to turn it on and off. Then, the motor sees the average voltage while it depends on duty cycle of PWM pulses. The speed of rotation is proportion to this average voltage.

By PWM method, its easier to control the DC motor than by directly controlling the voltage across it. All we have to do is to modulate pulse width, in ord

BLOCK DIAGRAM-:

CONCLUSION-:
For a test, I held my robot in the air and I approached a white paper to sensors. Then, both wheels rotated as expected and they slowed down when either the paper moved away or sensors passed across a black line. Next, I put it down on the track, but unfortunately, it didnt move. I found the torque of motors not enough to drive my robot. Even though the chosen DC motor was slowest and gave highest torque among other DC motors in the lab, it wasnt enough. For solving this problem, I will have to find a suitable DC motor with large torque. Overall, the robot project wasnt successful, but it was quite a fun to go through all the process. I also realized that there were many things to consider practically such as installation of motors, building up a circuit by soldering and putting all parts together. This experience hopefully would be helpful in the future work

References-:
8051 and embedded system by Mazidi and Mazidi All datasheets from www.datasheetcatalog.com About AT89s8252 from www.atmel.com And www.triindia.co.in

You might also like