RELAY BOARD
A. PROLOG
This article means to utilize your old PC to be come a simple controller. Many old PC like 8088 type, 8086, 80286, 80386, or even 80486 already become an obsolete systems, since they can not run many new program now a days. In fact, this system still also can be run well. Many people has let their own not used, since they have a new one (pentium type). Thus what for this old system now? For people like us, we can use this old PC to make any experiment. Here I will stimulate you to take advantage, make a simple controller using 8 relays to make a variety uses like; turning on/off lights, turn your home stereo set, on/off you home appliance, make a timer device, make a home device alarm, etc. All application depends on your imagination.
USB to IEEE 1284 Parallel Port Adapter Cable
A. SCHEMATIC DIAGRAM
click below images to enlarge
This board using 8-bits of LPT printer parallel data port (DP) to activate the relays. LPT printer parallel port also have 4-bits additional port (PC) which can be utilized too. But this is not implemented in this design, because in my opinion, 8-bits are more than enough, and beside that this size (1 byte) fit each of 8255 PPI port if we want to interface it too. The basic is the same for all the eight channels. To protect the LPT port from damage, I use optocoupler to isolated the PC side (+5V) and relay circuit (+24V). You can change the relay voltage type to +12V or even +6V if you can find one. This type of optocoupler, PC914 can be replaced with another type like 4N series (4N22 ~ 4N28, 4N35, 4N47 ~ 4N49, etc.).Using a common driver combination, transistor Q1 ~ Q8 (hi-power) to drive the relays. D1 ~ D8 use to protect the transistor from any transient current when the relay is in the off state. The resistor values are chosen to make transistors get full enough saturated when it is on. This common driver also can be change using IC driver like: ULN2002 ~ ULN2004 types. Each package contain 6-bits line drivers. So you need 2 of this IC, but one does not maximize. If you use PC port, than this IC can be utilized. A good alternative.
Note that, for the relays, it must be stand the high voltage and current (big power) if you want to use it to drive any equiptment from the AC line. Find a good ones with a high rating output. Careful about the hi-voltage line on the PCB. Extra care must be taken in order to prevent the two different voltage lines not laying in the close distance. I used a terminal strip to connect this hi-voltage power wire.
B. PCB LAYOUT
Here I already designed the PCB for this relays driver. Not very compact, but already run well. Only data byte were used (DP port). Note that, pin 18 through 25 all together connected to ground. This PCB also included with power supply voltage regulator (+24V). Its very easy to change it to any other voltage by changed the voltage regulator only. For the data connection, as usual I used a DB-25 connector, to be easy to connected to LPT printer parallel port or for future using, when we want to connect it to any other port (like 8255-PPI port). For any reader who doesn't have protel software, you can also printout this pdf schematic layout (90.414 Bytes).
C. PART LISTS
Component part lists to build the complete set are :
1. Resistors :
R1 ~ R16 = 10k .................................................... 16 pcs R17 ~ R24, R33 = 1k5 .............................................. 9 pcs R25 ~ R32 = 1k .................................................... 8 pcs
2. Capacitors :
C1 = 2200 uF/50V (elco) ........................................... 1 pcs C2 = 1000 uF/25V (elco) ........................................... 1 pcs
3. Semiconductors :
D1 ~ D12 = 1N4007 ................................................. 12 pcs Led1 ~ Led9 = Red Led (3 mm) ...................................... 9 pcs IC1 = 7824 (voltage regulator) .................................... 1 pcs Q1 ~ Q8 = C1061 (transistor) ...................................... 8 pcs OP1 ~ OP8 = PC914 (optocoupler) ................................... 8 pcs
4. Others :
RL1 ~ RL8 = 24V relay PCB type (hi-power output, 5A/220V-AC) ...... 8 pcs CON1 = DB-25 socket (female, PCB type, LPT connector) ............. 1 pcs Optional CON2 = power connector ................................... 1 pcs OUT-1 ~ OUT-8 = 2-pairs of terminal strip ......................... 8 pcs Transformer = 15V with CT/1A or 30V-AC/1A ......................... 1 pcs Optional on/off switch for power supply ........................... 1 pcs Optional LPT parallel port cable (3 m) ............................ 1 pcs Optional little heatsink for voltage regulator .................... 1 pcs
D. SOFTWARE
There are many 'ready to use software'. Besides that you can write your own software as your purpose. But our goal now is to run our new card well. Here is a good free software I found on the electronic CD recently, one based on windows and the other based on DOS system. This 2 softwares are the best as an LPT port analyzer program. You can on/off (toggle) every bits, and get the response at the back read. So we can used this option to on/off our correlation output relays.
Some related software based on DOS program also can be obtainable at : DIY Electronics kit from Hong Kong. If you want to write the software by yourself, Boondog Automation tell the detail how to programming it using simple basic interpreter programming language and C-language. A good lesson to first time. That's all for right now, hope you have a happy programming!
E. PROTOTYPE
Here is my prototype board. As usual, I put it all together in a piece of multiplex board. So I can make a reach to any other components on the board, include the terminal strip to connect the output of relays.
Nice Post.But it is bit difficult to understand the circuit diagram
ReplyDelete