The connections for connecting the relay module with arduino are very simple.
Arduino 5v relay module circuit diagram.
Below given is relay driver circuit to build your own relay module.
Don t skip this step it is necessary to avoid mistakes when soldering into a pcb and check if it is works.
The working of the project is based on the functioning of the relay and the ability of arduino to control the relay.
Relay module for arduino is one of the most powerful application for arduino as it can be used to control both a c and d c devices by simply controlling the relay by giving 5v.
Arduino ky 019 relay module is used to control ac circuits the relay acts as a switch that responds to a signal received from the arduino it has an integrated led that indicates if the signal is high or low.
Circuit diagram and working.
Now we need to test the circuit diagram of the relay module on a breadboard.
A relay is an electrically operated switch that you can use to control mains voltage appliances.
Assemble all the parts as shown in the schematic diagram.
So connect the 5v and the ground of the arduino with the 5v and the ground of the relay module.
Circuit diagram and explanation.
Whenever the hall effect sensor is subjected to a magnetic field it toggles the relay as per the code.
The working of this circuit is very simple.
Light intensity below 500 then the relay module gets input from arduino through pin 9 and there is a connection between the com and no pin is established and turns on the light.
A relay is basically a switch which is operated electrically by electromagnet.
Let us discuss the working of the project.
In this arduino relay control circuit we have used arduino to control the relay.
To power the relay module you need to supply 5v in the vin pin of the relay board.
As mentioned earlier by interfacing arduino with 5v relay module we intend to operate an ac load like lamp.
A simple project in which arduino uno controls a 5v relay is explained here.
The arduino can be programmed to turn on the relay when a certain event occurs for example when the temperature of a thermistor gets higher than 30 c.
In this example we will connect the relay module with arduino in the normally open state.
This post shows how to use a relay module with an arduino board.
Now we have all the parts to make a diy relay module.
After all parts you collected lets go ahead to the next step.
Since the arduino operates at 5v it can t control these higher voltage devices directly but you can use a 5v relay to switch the 120 240v current and use the arduino to control the relay.
The circuit diagram for controlling a 5v relay module with hall effect sensor and arduino is shown below.
Circuit diagram for relay with arduino code for relay with arduino the working of the above sketch is as when the ldr senses darkness i e.
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.
A relay can be used to control high voltage electronic devices such as motors and as well as low voltage electronic devices such as a light.