Add to Technorati Favorites Electronics Projects and Articles: November 2009

Friday, November 13, 2009

CIRCUITS FOR PARALLEL PORTS

I've created this blog to write electronics projects and electronics articles which can be used by any person interested in the electronic design. Your questions, doubts, comments and suggestions are welcome providing that they are written in a courteous and respectful way.

--EspaƱol-----English



CIRCUITS FOR PARALLEL PORTS

Previously on Projects category, I wrote the “Controlling Parallel Port Using IO.dll” article, but the circuits are still pending to use with this project which is dealt in this post.

Goal: Describing various circuits to use the parallel ports with the previous article “Controlling Parallel Port Using IO.dll” on "Projects" Category, giving external circuitry for interfacing with it.

Utility: Developing hardware to connect the parallel port appropriately to implement useful applications.

Circuits

Look at the following circuits:



The first circuit in figure 1, the Simple test circuit, is useful only to test the software. When a bit is set ‘1’ (you have clicked its button) you can see the respective LED turn on. You do not use external power supply for this circuit because the parallel port provides enough energy to turn on the led, TTL states, generally. In this way you can test every data pin on the parallel port of your machine.

The second circuit in figure 2 uses the ULN2803 which is an 8-bit 50V 500mA TTL-input NPN Darlington driver. The inputs on the left side of the IC (1-8 pins) are suitable to be connected directly to the PC parallel port output lines. The outputs are open collector outputs, so they are well suited for controlling various loads powered through external power supply. The load device can be as simple as a LED, a small motor, small light bulbs or a relay. In figure 2 you see the simple LEDs control using ULN2803 IC.
This Integrated Circuit also has diodes to protect it against reverse currents when loads such as motors and relays switch on and off. The line (pin 10) can, for example, be connected to the power supply line that supplies power to the relays. For example, You can also use 9V Zener diode connected to this line as a protection component which limits relay power supply to maximum less than 9V as in the figure 2. Or you can connect a 12V Zener diode from pin 10 to the relay power supply plus to limit spikes to power supply voltage plus 12V as in the figure 3. Do not use a power supply higher than 30V. In this circuit I control one relay but you can control up to 8 relays.
In any case you need an external power supply and coupling to the GND line of the PC with GND of the external power supply. These circuits can be useful to control dc loads up to 50 Vdc. The main idea in these circuits is to insulate external hardware control from internal circuitry in the parallel port and then to protect the parallel port.

If you want to control more power or mains voltage you can use the circuit in the figure 4.

Warning: When you are controlling mains voltage, you need to be very careful and must know what you do to do it safely. Mains voltage can injure you if you touch it, and a badly constructed circuit can overheat and cause a fire.

In figure 4 we can see that an opto-isolation is provided by the MOC3041 which is very safe for the PC. In addition, in figure 4 there is a TRIAC for switching the high dc voltage or mains voltage. In the example a 12A-600V Triac (Ref. BT138) is used but you must analyze the appropriate Triac according to your application.

Finally, all previous circuits can be also used with microcontrollers or microprocessors.