In this project our aim is to develop an automated system to control all the operations of the key board and the mouse in order rescue the eyes of those who are sitting in front of the system hours together. So, here we are about to control all the functions of the mouse and some of the functions of keyboard such as, a)Directional keys (b) Start window © Close window (d) Enter key.
To do all these operations, firstly we need to install the software which is done as a front end application in .Net.
Actually, the project is combination of two sections divided on the basis of wireless communications of IR. The first section consists the monitoring part of controller which is serially interfaced to the PC through RS232 and MAX232. The second section deals with Remote keypad consisting of 10 keys performing 12 different operations and is operated with IR communications and acts as transmitter.
Signals of our remote are transmitted to the receiver section including microcontroller, which is nearer to the PC, through IR. The signals from this controller are sent to the PC via serial communication through DB-9 connector.
The one end of IR LED is connected to the supply of 9v with a resistor and the other end is connected to the transistor which is been switched with according to the pin 15 DOUT. 8 switches are connected to the 8 keys pins of the IC SM5021 (IR encoder).namely 3, 4, 5, 6, 7, 9, 10, and 11th with diodes IN4007 in-between. The IR remote operates in 2 modes, one is Mouse mode and the other is Key board mode.
RECEIVER SECTION (Rx):
The TSOP17.. â€œ Series are miniaturized receivers for infrared remote control systems. PIN diode and preamplifier are assembled on lead frame, the epoxy package is designed as IR filter. The demodulated output signal can directly be decoded by a microprocessor. TSOP17.. is the standard IR remote control receiver series, supporting all major transmission codes.
Â¢ Photo detector and preamplifier in one package
Â¢ Internal filter for PCM frequency
Â¢ Improved shielding against electrical field disturbance
Â¢ TTL and CMOS compatibility
Â¢ Output active low
Â¢ Low power consumption
Â¢ High immunity against ambient light
Â¢ Continuous data transmission possible(up to 2400 bps)
Â¢ Suitable burst length .10 cycles/burst
FIG: Block diagram of Receiver section
MICRO CONTROLLER (AT89S51)
A Micro controller consists of a powerful CPU tightly coupled with memory, various I/O interfaces such as serial port, parallel port timer or counter, interrupt controller, data acquisition interfaces-Analog to Digital converter, Digital to Analog converter, integrated on to a single silicon chip.
If a system is developed with a microprocessor, the designer has to go for external memory such as RAM, ROM, EPROM and peripherals. But controller is provided all these facilities on a single chip. Development of a Micro controller reduces PCB size and cost of design.
One of the major differences between a Microprocessor and a Micro controller is that a controller often deals with bits not bytes as in the real world application.
Intel has introduced a family of Micro controllers called the MCS-51.
Fig: Micro Controller
Â¢ Compatible with MCS-51Ã‚Â® Products
Â¢ 4K Bytes of In-System Programmable (ISP) Flash Memory
â€œ Endurance: 1000 Write/Erase Cycles
Â¢ 4.0V to 5.5V Operating Range
Â¢ Fully Static Operation: 0 Hz to 33 MHz
Â¢ Three-level Program Memory Lock
Â¢ 128 x 8-bit Internal RAM
Â¢ 32 Programmable I/O Lines
Â¢ Two 16-bit Timer/Counters
Â¢ Six Interrupt Sources
Â¢ Full Duplex UART Serial Channel
Â¢ Low-power Idle and Power-down Modes
The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K 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 AT89S51 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications.
Fig: Block diagram of Micro Controller
Fig: Pin diagram of Micro Controller
VCC - Supply voltage.
GND - Ground.
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink eight TTL inputs. In this mode, P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. External pull-ups are required during program verification.
Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 1 also receives the low-order address bytes during Flash programming and verification.
Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification.
Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 receives some control signals for Flash programming and verification. Port 3 also serves the functions of various special features of the AT89S51, as shown in the following table.
Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. This pin drives High for 98 oscillator periods after the Watchdog times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled.
Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming.However, that one ALE pulse is skipped during each access to external data memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.
Program Store Enable (PSEN) is the read strobe to external program memory. When the AT89S51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.
External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming.
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
Output from the inverting oscillator amplifier.
XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator. Either a quartz crystal or ceramic resonator may be used.There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.
Fig :Oscillator Connections Fig :External Clock Drive Configuration
A variable regulated power supply, also called a variable bench power supply, is one where you can continuously adjust the output voltage to your requirements. Varying the output of the power supply is the recommended way to test a project after having double checked parts placement against circuit drawings and the parts placement guide. This type of regulation is ideal for having a simple variable bench power supply. Actually this is quite important because one of the first projects a hobbyist should undertake is the construction of a variable regulated power supply. While a dedicated supply is quite handy e.g. 5V or 12V, it's much handier to have a variable supply on hand, especially for testing. Most digital logic circuits and processors need a 5 volt power supply. To use these parts we need to build a regulated 5 volt source. Usually you start with an unregulated power supply ranging from 9 volts to 24 volts DC to make a 5 volt power supply, we use a LM7805 voltage regulator IC.
The LM7805 is simple to use. You simply connect the positive lead of your unregulated DC power supply (anything from 9VDC to 24VDC) to the Input pin, connect the negative lead to the Common pin and then when you turn on the power, you get a 5 volt supply from the Output pin.
A transformer is an electrical device which is used to convert electrical power from one Electrical circuit to another without change in frequency.
Transformers convert AC electricity from one voltage to another with little loss of power. Transformers work only with AC and this is one of the reasons why mains electricity is AC. Step-up transformers increase in output voltage, step-down transformers decrease in output voltage. Most power supplies use a step-down transformer to reduce the dangerously high mains voltage to a safer low voltage. The input coil is called the primary and the output coil is called the secondary. There is no electrical connection between the two coils; instead they are linked by an alternating magnetic field created in the soft-iron core of the transformer. The two lines in the middle of the circuit symbol represent the core. Transformers waste very little power so the power out is (almost) equal to the power in. Note that as voltage is stepped down current is stepped up. The ratio of the number of turns on each coil, called the turnâ„¢s ratio, determines the ratio of the voltages. A step-down transformer has a large number of turns on its primary (input) coil which is connected to the high voltage mains supply, and a small number of turns on its secondary (output) coil to give a low output voltage.
An Electrical Transformer
A circuit which is used to convert a.c to dc is known as RECTIFIER. The process of conversion a.c to d.c is called rectification
TYPES OF RECTIFIERS:
Â¢ Half wave Rectifier
Â¢ Full wave rectifier
1. Centre tap full wave rectifier.
2. Bridge type full bridge rectifier.
A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-wave rectification. This is a widely used configuration, both with individual diodes wired as shown and with single component bridges where the diode bridge is wired internally.
A bridge rectifier makes use of four diodes in a bridge arrangement as shown in fig(a) to achieve full-wave rectification. This is a widely used configuration, both with individual diodes wired as shown and with single component bridges where the diode bridge is wired internally.
Fig 13 (A)
During positive half cycle of secondary, the diodes D2 and D3 are in forward biased while D1 and D4 are in reverse biased as shown in the fig(b). The current flow direction is shown in the fig (b) with dotted arrows.
Fig 14 (B)
During negative half cycle of secondary voltage, the diodes D1 and D4 are in forward biased while D2 and D3 are in reverse biased as shown in the fig©. The current flow direction is shown in the fig © with dotted arrows.
Fig 15 ©
A Filter is a device which removes the a.c component of rectifier output but allows the d.c component to reach the load
We have seen that the ripple content in the rectified output of half wave rectifier is 121% or that of full-wave or bridge rectifier or bridge rectifier is 48% such high percentages of ripples is not acceptable for most of the applications. Ripples can be removed.
Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable output voltages. The maximum current they can pass also rates them. Negative voltage regulators are available, mainly for use in dual supplies. Most regulators include some automatic protection from excessive current ('overload protection') and overheating ('thermal protection'). Many of the fixed voltage regulator ICs have 3 leads and look like power transistors, such as the 7805 +5V 1A regulator shown on the right. The LM7805 is simple to use. You simply connect the positive lead of your unregulated DC power supply (anything from 9VDC to 24VDC) to the Input pin, connect the negative lead to the Common pin and then when you turn on the power, you get a 5 volt supply from the output pin.
Fig. 15 A Three Terminal Voltage Regulator
The Bay Linear LM78XX is integrated linear positive regulator with three terminals. The LM78XX offer several fixed output voltages making them useful in wide range of applications. When used as a zener diode/resistor combination replacement, the LM78XX usually results in an effective output impedance improvement of two orders of magnitude, lower quiescent current. The LM78XX is available in the TO-252, TO-220 & TO-263packages,
To allow compatibility among data communication equipment made by various manufactures, an interfacing standard called RS232 was set by the Electronic Industries Association (EIA).This RS-232 standard is used in PCs and numerous types of equipment .However, since the standard was set long before the advent of the TTL logic family, its input and output voltage levels are not TTL compatible.
In RS-232 ,a 1 is represented by -3 to -25V,while a 0 bit is +3 to +25V,making -3 to +3 undefined. For this reason, to connect any RS-232 to a microcontroller system we must use voltage converters such as MAX232 to convert the TTL logic levels to the RS-232 voltage levels and vice versa.
Infrared (IR) radiation is part of the electromagnetic spectrum, which includes radio waves, microwaves, visible light, and ultraviolet light, as well as gamma rays and X-rays.
Based on the sensor's calibration equation and the target's emissivity. This temperature value can be displayed on the sensor or, in the case of the smart sensor, converted to a digital output and displayed on a computer terminal.
IR remote controls use wavelengths between 850 - 950nm. At this short wavelength, the light is invisible to the human eye, but a domestic camcorder can actually view this portion of the electromagnetic spectrum. Viewed with a camcorder, an IR LED appears to change brightness.
All remote controls use an encoded series of pulses, of which there are thousands of combinations. The light output intensity varies with each remote control, remotes working at 4.5V dc generally will provide a stronger light output than a 3V dc control. Also, as the photodiode in this project has a peak light response at 850nm, it will receive a stronger signal from controls operating closer to this wavelength. The photodiode will actually respond to IR wavelengths from 400nm to 1100nm,so all remote controls should be compatible.
A sensor is a type of transducer, or mechanism, that responds to a type of energy by producing another type of energy signal, usually electrical. They are either direct indicating (an electrical meter) or are paired with an indicator (perhaps indirectly through an analog to digital converter, a computer and a display) so that the value sensed is translated for human understanding. Types of sensors include electromagnetic, chemical, biological and acoustic. Aside from other applications, sensors are heavily used in medicine, industry and robotics.
In order to act as an effectual sensor, the following guidelines must be met:
Â¢ the sensor should be sensitive to the measured property
Â¢ the sensor should be insensitive to any other property
Â¢ the sensor should not influence the measured property
In theory, when the sensor is working perfectly, the output signal of a sensor is exactly proportional to the value of the property it is meant to measure. The gain is then defined as the ratio between output signal and measured property. For example, if a sensor measures temperature and has an actual voltage output, the gain is a constant.
When the sensor is not perfect, various deviations can occur, including gain error, long term drift, and noise. These and other deviations can be classified as systematic, or random, errors. Systematic deviations may be compensated for by means of some kind of calibration strategy. Noise is an example of a random error that can be reduced by signal processing, such as filtering, usually at the expense of the dynamic behavior of the sensor.
The IR transmitter is nothing but the IR LED, LIR50333. It just looks like a normal LED but transmits the IR signals. Since the IR rays are out of the visible range we cannot observe the rays from the transmitter.
These are infrared LEDs; the light output is not visible by our eyes. They can be used as replacement LEDs for remote controls, night vision for camcorders, invisible beam sensors, etc.
Â¢ Infrared LEDs are ideal light sources for use with night vision goggles, surveillance cameras, medical imaging, recognition and calibration systems.
Â¢ Due to their resistance to ambient-light impediments and electromagnetic interference (EMI), Infrared LEDs enhance the performance of wireless computer-to-PDA links, collision avoidance systems, automation equipment, biomedical instrumentation, and telecommunications equipment.
Micro vision Keil (IDE):
Keil is a cross compiler. So first we have to understand the concept of compilers and cross compilers.
The C programming language is a general-purpose programming language that provides code efficiency, elements of structured programming, and a rich set of operators. C is not a big language and is not designed for any one particular area of application. Its generality combined with its absence of restrictions, makes C a convenient and effective programming solution for a wide variety of software tasks. Many applications can be solved more easily and efficiently with C than with other more specialized languages.
Compilers are programs used to convert a High Level Language to object code. Desktop compilers produce an output object code for the underlying microprocessor, but not for other microprocessors. For example, compilers for DOS platform is different from the compilers for UNIX platform.
The Cx51 Optimizing C Compiler is a complete implementation of the American National Standards Institute (ANSI) standard for the C language. The Cx51 Compiler is not a universal C compiler adapted for the 8051 target. It is a ground-up implementation, dedicated to generating extremely fast and compact code for the 8051 microprocessor. The Cx51 Compiler provides you with the flexibility of programming in C and the code efficiency and speed of assembly language.
The C language on its own is not capable of performing operations (such as input and output) that would normally require intervention from the operating system. Instead, these capabilities are provided as part of the standard library. Because these functions are separate from the language itself, C is especially suited for producing code that is portable across a wide number of platforms.
A cross compiler is similar to the compilers but we write a program for the target processor(like 8051 and its derivatives) on the host processors (like computer of X86).
It means being in one environment you are writing a code for another environment is called cross development. And the compiler used for cross development is called cross compiler.
By using this compilers not only can development of complex embedded systems be completed in a fraction of the time, but reliability is improved, and maintenance is easy. The ability to combine variable selection with specific operations improves program readability. Program development and debugging times are dramatically reduced when compared to assembly language programming.
Keil is a German based software development company. It provides several development tools like
Â¢ IDE(Integrated Development Environment)
Â¢ Project Manager
Â¢ C Cross compiler, Cross Assembler, Locator/Linker
Keil Software provides us with software development tools for the 8051 family of microcontrollers. With these tools, we can generate embedded applications for the multitude of 8051 derivatives. The Keil 8051 tool kit includes three main tools, assemblers, compiler and linker. An assembler is used to assemble the 8051 assembly program. Compiler is used to compile the C source code into an object file. Linker is used to create an absolute object module suitable for the in-built circuit emulator. The Keil C51 compiler has been written to allow C programmers to get code running quickly on 8051 systems with little or no learning curve. However, to get the best from it, some appreciation of the underlying hardware is desirable. The most basic decision to be made is which memory model to use.
C51 currently supports the following memory configurations:
ROM: currently the largest single object file that can be produced is 64K, although up to 1MB can be supported with the BANKED model described below. All compiler output to be directed to Eprom/ROM, constants, look-up tables etc., should be declared as "code".
RAM: There are three memory models, SMALL, COMPACT and LARGE
SMALL: all variables and parameter-passing segments will be placed in the 8051's internal memory.
COMPACT: variables are stored in paged memory addressed by ports 0 and 2. Indirect addressing opcodes are used. On-chip registers are still used for locals and parameters.
LARGE: variables etc. are placed in external memory addressed by @DPTR. On-chip registers are still used for locals and parameters.
BANKED: Code can occupy up to 1MB by using either CPU port pins or memory-mapped latches to page memory above 0xFFFF. Within each 64KB memory block a COMMON area must be set aside for C library code. Inter-bank function calls are possible.
8051 project development cycle:-
These are the steps to develop 8051 project using Keil:
1. Create source files in C or Assembly.
2. Compile or assemble source files.
3. Correct errors in source files.
4. Link object files from compiler and assembler.
5. Test linked applications.
In wireless security system: A security guard can control the entry of vehicles through a gate by opening and closing it through a remote even when he is not infront of the system.
In industries: This system is very helpful in the industries where there is a requirement for the control of temperature of the furnaces if necessary.
When we press any button of the remote, the corresponding operation will be performed based on the mode in which it is being operated.
Let us assume that the remote is operating in mouse mode, then the key pressed in the figure is used to open the WINDOWS MEDIA PLAYER.
Fig: IR Remote
The screen shot for the particular operation performed by using IR Remote is shown below
The project Wireless Desktop Operation for PC has been successfully designed and tested.
Integrating features of all the hardware components used have developed it. Presence of every module has been reasoned out and placed carefully thus contributing to the best working of the unit.Secondly, using highly advanced ICâ„¢s and with the help of growing technology the project has been successfully implemented.
Data communication is blossoming at a great pace. As communication systems evolve, service quality and capacity are of primary importance. To ensure reliable communication over a mobile radio channel, a system must overcome multi path fading, polarization mismatch, and interference. The trend towards low power hand held transceivers increases all of these challenges. Keeping all the above parameters in view we have designed a low cost integrated system for transferring data between two Sections transmitter and the receiver.
Finally we conclude that IR Technology is an emerging field and there is a huge scope for research and development.
The 8051 Micro controller and Embedded
-Muhammad Ali Mazidi
Janice Gillispie Mazidi
The 8051 Micro controller Architecture,
Programming & Applications
Fundamentals Of Micro processors and
Micro processor Architecture, Programming
- Theodore S. Rappaport
Mobile Tele Communications
- William C.Y. Lee
References on the Web: