embedded c,89x51 chip family
android,java,embedded c,89x51 chip,webba
java,embedded c,msp430 chip
Project Platform : EMBEDDED C 8051 FAMILY CHIPS
Languages Used : EMBEDDED C
Project Cost : 6000
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 Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard 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
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, it’s 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 order
BLOCK DIAGRAM :-