The picture above shows the circuit you need to build.
Arduino relay transistor diode.
Circuit diagram and working.
The coil of the relay needs a large current around 150ma to drive the relay which an arduino cannot provide.
Below given is relay driver circuit to build your own relay module.
Transistor acts as a switch to control the 12v to relay coil.
The design of the circuit is described here.
Arduino board jumper wires breadboard.
The following picture depicts how to connect the different parts using a solderless breadboard jumper wires a transistor a diode a relay a push button and two 10k resistors.
1 x tip120 darlington transistor is recommended but any one that will handle your relay will work.
Arduino tricks is the online education platform which teaches students every day that too completely free of cost.
2 x 220ω resistors.
1 x sharp pc817 optocoupler.
The coil of the relay needs a large current around 150ma to drive the relay which an arduino cannot provide.
An ac bulb is used for demonstration.
Resistor adjusts input current from arduino to the transistor.
In this project the npn transistor 2n2222 drives the relay when the npn junction gets saturated.
Connections to the household appliance are not shown.
The following arduino program completes the post.
Just a simple circuit that contains our transistor diode resistor and of course the relay.
Therefore we need a device to amplify the current.
The parts you will need.
B sc engineer in electrical and electronic engineering.
We have connected transistor base to arduino pin a0 through a 1k resistor.
In this arduino relay control circuit we have used arduino to control the relay via a bc547 transistor.
The project is used to demonstrate the high voltage driving capabilities of a relay using arduino uno.
In this project the npn transistor 2n2222 drives the relay when the npn junction gets saturated.
Therefore we need a device to amplify the current.
1 x 1n4001 diode.