Introduction: DIY Relay Board
Relays are always used for AC switching circuits...we frequently need AC loads like Fan Bulbs to operate automatically with conditions like decreased light, increased temperature, etc.Also we come across situations like when we need to control appliances remotely using smartphone or we have sensor that detects human presence and turns on light ,fan and turns off when it is not detected..in all these applications we use a Relay board and we are now going to make such a Relay board that can be used along with logic circuits or micro-controllers to handle AC loads or High voltage DC loads..
Step 1: Parts Required
1. 5/6 V relay
2. 2 1K resistor
3. 1 1N4007 diode
4. 1 BC 548
5. 1 3 pin Screw connector
6. 1 MCT2E / 817 / 4N35 Optocoupler
7. Male headers
8. Solder kits and perfboard
Step 2: Theory and Breadboard Testing
Relay is an electromagnetic switch. Initially when there is no input signal, the COM(common) and NC(normally closed) are connected. The input coil when energized sets up magnetic field and becomes an electromagnet. This magnetic field pulls the COM terminal and connection is now formed between COM and NO(Normally Open).
The circuit has an optocoupler that is just an optical isolator ...it has a IR led at one end and a phototransistor at the other end. When the IR led glows and light falls on the base of phototransistor, the BJT turns ON, otherwise OFF..
Now the signal from the microcontroller or logic circuit glows up the IR led..and turns it on.
The emitter of Phototransistor is fed into base of another BC548 NPN BJT via a 1K resistor, hence a Darlington Configuration, The overall current gain is now B1*B2+B1+B2 (B1 is current gain of phototransistor and B2 is current gain of BC548)....This gives a better drive to the relay coil.
Now when signal line is high, IR glows, phototransistor and BC548 is On and current flows through the relay coil and energize it..then the COM terminal moves to the NO side and hence COM and NO are shorted, ..when signal line is LOW the COM and NC are shorted..
The diode is used as a flyback diode. After the circuit is operated for a while and is then switched off the stored energy from inductor now discharges, this voltage can even go up to 40-60V for a very short interval and can damage the other components, the diode is used to provide the circular path for that stored energy and is dissipated in the diode, keeping the components safe..
Test the above circuit in breadboard and see if this works, if properly connected it MUST work...
Step 3: Soldering on Perfboard
Now after breadboad testing is complete, move on to soldering, take the schematic beside you and start careful soldering. Be careful since you will be dealing with high voltages with this, hence a single error can damage everything...observe carefully the circuit traces using magnifying glass and light. Check yourself with continuity tester to find the NO and NC, the COM is always the middle one..
now test it first with DC load then you can move onto AC loads
I've attached a sample schematic to test with DC load, look at the video too attached here...
If everything is all right, you are all set..
contact me for any problem regarding schematic or theory or testing at firstname.lastname@example.org or comment below..
netzener made it!
We have a be nice policy.
Please be positive and constructive.