PC’s printer port can be used to control all the devices which are normally used in the home .You can switch on or off any of your device using the keyboard of your PC and the alphanumeric keys of the PC will work as the switches for the electronics devices during working on the PC a person can switch on or off any of the device interfaced to the PC without being disturbed. This all can be done by using the parallel printer port of the computer .The other ports can also be used but the parallel printer port is simplest to work on it has eight output pins all the other information of parallel printer port has already given .
The out put of the parallel printer port can be used to drive a Relay or a Triac or other transistors but the output current is very low further more if the relays are used to control the devices as they works on the basis of electromagnetic induction where the main circuit during no voltage applied from the printer port act as the open circuit and when the supply from the parallel printer port comes it will act as the shot circuit but it may be very dangerous as the Relay produce a very high peak voltage when there is a disconnection in the relay circuitry. this high voltage peak can be passed to the parallel port of the computer .which may then cause the sudden damage of the computer. So the isolation should always be there between the computer supply and the main supply. This isolation can be provided by using an optoisolator the isolator used in my project is MCT-2E .
The details of the optoisolator is already given in the report here I will discuss how it is being used in our circuit .Pin no 1 of the each optoisolator is connected to the output pins of the computer’s parallel port that may be any of the 8 pins of the printer port .the 2 no pins of the optoisolator are shorted and then are connected to the any of the ground pin of the printer port. Thus when any of the output pins goes high the corresponding optocoupler get activated. Pin no 4 of the optocoupler is connected to the gate of the triac. Thus all the optocoupler are driving the triacs. Pin no. 5 of the optocoupler is connected with the 18v DC supply. The MT 1 and MT 2 of the triac acts as a switch to the main supply. The MT 2 of the triac is connected to the one end of a device.
The other end of the device is connected with the phase voltage of the main supply. The MT 1 terminal which is connected to the neutral voltage of the main supply also makes the transformer ground potential equal to the ground potential of the main supply. Thus the main current passing through the device gets blocked at the triac.
Whenever an output voltage from the parallel port comes the optocoupler let the 18v DC supply to pass through the gate of the triac. And at the same time a current begins to pass through the triac and the whole circuit gets completed. Thus the current which was passing through the device is now free to pass through the triac and to the neutral terminal of the main supply. Thus the device begins to work or get s switched on.
Similarly when there is not any supply at the port, the optocoupler do not allow to pass the 18v DC from the 5 no pin to the 4 no pin and the gate of the triac do not get any voltage and remains open circuit as no current can now pass through triac from MT 2 to MT 1. In this way we can use the printer port supply to control a device. The printer port supply in our project comes through the functions used in C++. The outportb() function can be used for this practice. Which outputs a byte to the pin no.2 to pin no.9 of the printer port. The triac used is BT-136 and the optocoupler used is MCT-2E. The BT-136 can be used up to 4 ampere of current and up to the voltage 230v. For higher values of voltage i.e. up to 16 ampere BT-139 can be used .