Published:2011/7/26 21:57:00 Author:Li xiao na From:SeekIC
by K. Heiden
Interface Circuit
The parallel port interface circuit (Figure 3) is essentially divided into two parts: the part that drives the remote control transmitter using optocouplers, and two optional extra switching stages built around IC1 and two relays. This switching circuit allows for the control of two additional devices, located near to the PC, directly from the interface. If this feature is not required, the switching stages can be left out, and signals DO, Dl and D3 (port pins 2, 3 and 5 of the 25-way sub-D plug) left unconnected.
Port signals D4 to D7 (pins 6, 7, 8 and 9 of the 25-way sub-D plug) are connected to the remote control transmitter via a quad optocoupler device (IC2, type ILQ74). Figure 1 also shows the pinout of this device.
The circuit diagram only shows the part of the remote control transmitter circuit that is connected to the interface circuit, namely the pushbuttons and the connections for the power supply. The pushbutton connections for the transmitter are brought out on four wires labelled A to D and connected to the output transistors of the optocouplers (see also Figure 4). When the port pin driving an optocoupler goes high, its output transistor conducts, bridging the corresponding pushbutton contacts on the transmitter. The effect is the same as if the button had been pressed (channel 2 on/off, channel 3 on/off and so on). We can arrange for the pin on the parallel port to be taken high using suitable software. The components between the parallel port and the optocoupler (the series resistor and the diode) serve to limit current flow and protect both the input LED of the optocoupler and the output transistors of the parallel port.
The interface circuit also includes a power supply for the remote control transmitter. The transmitter batteries (two button cells in the type we used) should be removed and connections made to the points marked ’ + ’ and ’-’ in the circuit diagram. A voltage of 3 V for the transmitter is derived from the 12 V supply of the interface using D2, Rll, C8 and Zener diode D3. The interface circuit itself can be powered from a 12 V mains adaptor connected to Kl or by connecting to the PC’s internal 12 V supply.
The optional switching stages connected to port pins DO, Dl and D3 are equipped with one normal relay (with one coil) and one latching relay (with two coils). They are controlled by driver IC1 (type ULN2803).
The latching relay (RE1) is controlled using port signals DO and Dl and has the feature that its state is preserved when power is switched off. In contrast, RE2 is an ordinary, non-latching, relay and is controlled using D3. Its contacts are closed only while current flows in the coil. Switching pulses can be generated using this relay with a duration under software control. Thus it is suitable, for example, for driving an electrically-operated door latch from the PC, connecting the relay contacts in parallel with the button for opening the door.
You may be wondering why there are no protection diodes across the relay coils: this is because suitable diodes are already built into the ULN2803.
A 25-way male sub-D connector is required to connect the interface circuit to the parallel port. A cable with at least eight conductors is required for the connection, with the 25-way sub-D connector at one and suitable connector at the other. If it is desired to use a spare ordinary printer cable, a 36-way Centronics-style socket will be required.
Reprinted Url Of This Article: http://www.seekic.com/blog/project_solutions/2011/07/26/Parallel_Port_Mains_Switching_Interface__switch_radio_controlled_mains_sockets_on_and_off_from_a_PC_(2).html
Print this Page | Comments | Reading(2322)
Author:Ecco Reading(30166)
Author:Ecco Reading(3461)
Author:Ecco Reading(3181)
Author:Ecco Reading(3661)
Author:Ecco Reading(5231)
Author:Ecco Reading(3248)
Author:Ecco Reading(3390)
Author:Ecco Reading(3530)
Author:Ecco Reading(3935)
Author:Ecco Reading(3707)
Author:Ecco Reading(3677)
Author:Ecco Reading(3714)
Author:Ecco Reading(6028)
Author:Ecco Reading(3692)
Author:Ecco Reading(4478)