Beruflich Dokumente
Kultur Dokumente
BLOCK DIAGRAM
led Sensor
MCU LCD
P.SUPPLY
Switching ckt
relay
Power supply
The first block of every circuit is power supply unit. It is the most essential part of a circuit to run its constituent ICs. These ICs can run only on D.C. power. Hence, the required D.C. supply has to be generated. The main parts of power supply unit and their function are as follows:
Transformer The function of the transformer is to step down the voltage level from the available A.C. 220V to the desired voltage. The rating of the transformer depends upon the requirements of the ICs in the circuit. A 9-0-9 transformer is used. The secondary has centre tapping which forms the neutral terminal. Full wave Center Tap Rectifier
The function of the rectifier is to convert the alternating voltage signal in to unidirectional one. This function is provided by semiconductor diode connected to bridge configuration. Diode IN4007would be used for the rectifier.
Ripple rejection The output of the diode is unidirectional but pulsating. A 1000 f capacitor is used for ripple rejection. Regulation To obtain a constant voltage specific ICs are used as voltage regulator. LM7805 is used to obtain a +5v supply. This IC has three terminals, an input, an output and a ground terminal.
PIN DESCRIPTION
GND -- Ground.
Port 0 -- Port 0 is an 8-bit open drain bi-directional I/O port. As an output port each pin can sink eight TTL inputs. Port 1 -- Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port1 output buffers can sink/source four TTL inputs. When 1s are written to Port1 pins they are pulled high by the internal pull-ups and can be used as inputs.
Port 2 -- Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port2 output buffers can sink/source four TTL inputs. When 1s are written to Port2 pins they are pulled high by the internal pull-ups and can be used as inputs
Port 3 -- . Port 3 receives some control signals for ROM programming and verification. Port 3 also serves the functions of various special features of the 8051.
FEATURES OF AT89C51 - 4K on-chip ROM - 128 bytes internal RAM (8-bit) - 32 I/O pins - Two 16-bit timers - Six Interrupts - Serial programming facility
LCD DISPLAY:
The LCD, which is used as a display in the system, is LMB162A. The main features of this LCD are: 16*2 LCD display, intelligent LCD, used for alphanumeric characters & based on ASCII codes. This LCD contains 16 pins, in which 8 pins are used as 8-bit data I/O, which are extended ASCII. Three pins are used as control lines these are Read/Write pin, Enable pin and Register select pin. Two pins are used for Backlight and LCD voltage, another two pins are for Backlight & LCD ground and one pin is used for contrast change.
Pin 1 2 3 4
I/O I
Description Ground +5V power supply Power supply to control contrast RS=0 to select command register, RS=1 to select data register.
5 6 7 8 9
R/W=0 for write, R/W=1 for read Enable The 8 bit data bus The 8 bit data bus The 8 bit data bus
10 11 12 13 14
The 8 bit data bus The 8 bit data bus The 8 bit data bus The 8 bit data bus The 8 bit data bus
16
MAX 232
TR2OUT RE2N 8 9
TR2N RE2OUT
MAX232 C1+
C1V-
1 3 6 12 10uF 10uF
10uF
10
14
11
15
3.5.1 Dual Charge-Pump Voltage Converter The MAX220MAX249 has two internal charge-pumps that convert +5V to 10V (unloaded) for RS-232 driver operation. The first converter uses capacitor C1 to double the +5V input to +10V on C3 at the V+ output. The second converter uses capacitor C2 to invert +10V to -10V on C4 at the V- output. A small amount of power may be drawn from the +10V (V+) and -10V (V-) outputs to power external circuitry except on the MAX 225 and MAX245MAX247, where these pins are not available. V+ and V- are not regulated, so the output voltage drops with increasing load current. Do not load V+ and V- to a point that violates the minimum 5V EIA/TIA-232E driver output voltage when sourcing current from V+ and V- to external circuitry. When using the shutdown feature in the MAX222, MAX225, MAX230, MAX235, MAX236, MAX240, MAX241, and MAX245MAX249, avoid using V+ and V to power external circuitry. When these parts
TTL CMOS
RS232
VCC COM1 DB-9 DTR DSR RTS CTS RXD TXD GND
4 6 7 8 2 3 5
MAX232 11 12
TXD RXD
15
are shut down, V- falls to 0V, and V+ falls to +5V. For applications where a +10V external supply is applied to the V+ pin (instead of using the internal charge pump to generate +10V), the C1 capacitor must not be installed and the SHDN pin must be tied to VCC. This is because V+ is internally connected to VCC in shutdown mode. 3.6 PC COM Port A serial port sends and receives data one bit at a time over one wire. In fact, two-way (full duplex) communications is possible with only three separate wires - one to send, one to receive, and a common signal ground wire. The TD (transmit data) wire is the one through which data from a DTE device is transmitted to a DCE device. This name can be deceiving, because this wire is used by a DCE device to receive its data. The TD line is kept in a mark condition by the DTE device when it is idle. The RD (receive data) wire is the one on which data is received by a DTE device, and the DCE device keeps this line in a mark condition when idle.
DB-9 Connector
Pin no. 1 2 3 4 5 6 7 8 9
DB-9 Pin Used For Asynchronous Data
Signal Name Data carrier detect Received data Transmitted data Data terminal ready Signal ground Data set ready Request to send Clear to send Ring indicator
OPTOCOUPLER
The purpose of using the optocouplers is to pass the supply from the microcontroller to the stepper motor is for isolation of the port of the microcontroller from an external hardware . What happens is that the voltage signal from the microcontroller is being converted into light by the LED and then further converted into voltage by the phototransistor . This ensures that there is no physical connection between the microcontroller and the stepper motor . The signal from the microcontroller is coupled only through light so that if in any case the external hardware ( in this case :stepper motor) produces an error voltage it will not be passed over to the port of the microcontroller and will not damage the internal circuitry of the microcontroller
Pin no.
Function
1 2 3 4 5 6
The MCT2XXX series optoisolators consist of a gallium arsenide infrared emitting diode driving a silicon phototransistor in a 6-pin dual in-line package. There is no electrical connection between the two, just a beam of light. The light emitter is nearly always an LED. The light sensitive device may be a photodiode, phototransistor, or more esoteric devices such as thyristors, triacs etc. To carry a signal across the isolation barrier, optocouplers are operated in linear mode. WORKING OF ISOLATOR CARD
Fig. 8.2
OPTOCOUPLER 40(VCC)
MICRO CONTROLLER
P2.2 3
5 470ohm 4 12V
20(Gnd)
The P end of the infra red led has been connected to the VCC. But for the Led to glow it needs to have a ground at the N terminal. The N terminal is connected to any pin of the ports of the micro controller. Whenever A 0 is transmitted by the M.C.U, the Led will glow and the output of the optocoupler ckt. would become zero. This zero is transmitted to the pnp transistor attached in series through a resistor and the 12 V voltage would reach the collector terminal of the transistor, from where it can be picked and used to operate any high load device.
Applications:-
AC mains detection
Reed relay driving Switch mode power supply feedback Telephone ring detection Logic ground isolation Logic coupling with high frequency noise rejection.