When the button is pressed the fan will turn on and will remain in this state until the button is pressed again.
Arduino power control relay.
Finally the power outlet box.
The detail instruction code wiring diagram video tutorial line by line code explanation are provided to help you quickly get started with arduino.
Coming to the relay the 5v and gnd pins for the relay module are given from the arduino uno.
In this arduino relay control circuit we have used arduino to control the relay via a bc547 transistor.
The control pin for the relay is connected to the pin 8 of arduino.
Use the io expander and relay expander with the arduino to control up to 65 280 relays.
Control up to 65 280 relays with your arduino.
The connections between the relay module and the arduino are really simple.
Project tutorial by christian.
First connect neutral wire from the supply to neutral connector on the socket.
In this quick arduino tutorial i will explain how you can control a relay using the arduino board one 1k and one 10k resistors 1 bc547 transistor one 6v or 12v relay one 1n4007 diode and a 12v fan.
Here to turn on the relay with arduino we just need to make that arduino pin high a0 in our case where relay module is connected.
Below given is relay driver circuit to build your own relay module.
Without the jumper cap you need to provide an independent power source to power up the relay s electromagnet through the jd vcc pin.
Circuit diagram and working.