Section 1 for ANLEE:
Drive a 12v0 relay using a MOSFET (Metal Oxide Semiconductor Field Effect Transistor) as a switch, use an OPTO Isolator such as a 4N25 (6 Pin DIL) as an interface for the switch Logic from the Output stage of the interface board at the control computer.
Provide the Vdd (Plus Volts) for the MOSFET Transistor via a 6v0 Voltage Regulator IC and a current limiting resistor to the Transistor Base, connect the Relay coil Negative Terminal (GND/Neutral/0Volts) to Collector and then the Emitter to Ground (VEE / 0 volts ) to act as an Electronic switch with the Transformer (power supply) connected the +Volts side of the Relay switch coil via a bridge rectifier, and an in line current limiting Resistor.
Use the 6v0 voltage Regulator output as the Drive source for the secondary stage of the OPTO ISOLATOR IC (Pin 4 - Pin 6) which will then drive the BASE of the Transistor and cause it to switch/energise the Relay coil, powering on and off the load each time the opto Isolator gets a 3v3 (3.3 volts) signal across pin 1 to pin 2.
Remember to use a small signal diode connected in series with pin 1 of the OPTO ISOLATOR and have this screened with a miniature ferrite bead shroud on the same small PCB (printed Circuit Board) as the Opto Isolator, you can give a better drive source for the 4N25 OPTO ISOLATOR by adding a cheap two input AND logic IC such as a 14pin (type 7408 TTL) AND chip with the output from the computer output board connected to pins 1 and 2 of the 7408 Integrated Circuit, connect pin 3 (the AND Logic output) to the input of the 4N25 IC OPTO ISOLATOR (this will provide 5v0 drive voltage with a marginally better current source characteristic) and can also use the same power supply as the Transistor and the OPTO ISOLATOR (all 3 components can accept the 6 volt supply from the regulator)
When constructing your power supply, it should be in this way :
( i )230v 500mA (0.5A) Fuse (inside an inline PCB solder tag fuse Holder)
(ii) primary Stage of Transformer (mains supply side)
Then :
(iii) The 12 Volt tap of the secondary windings of the transformer should be connected Via the Bridge Rectifier to the input pin of the 3 pin 6v0 voltage regulator IC which provides power to the 2 IC’s (the 7408 AND….the 4N25 OPTO ISOLATOR) and Q1(the Transistor)
The 12 Volts coming from the Bridge Rectifier (immediately after rectification) should also be connected to the supply terminal of the Relay Coil (remember that the Transistor connected between the Relay GND (Negative) and VEE Ground ( main Negative) Rail will do the ON/OFF switching of the Relay.
A single 1N400 Rectifier Diode should be connected in series between the Bridge Rectifier and the + Terminal of the Relay magnet coil to stop currents (spikes) developed by the collapsing magnetic fields of the relay coil de-energising from going into the Regulator IC and causing problems during switching (Flemmings right hand rule)