5 volt dc motors arduino12/29/2023 Although the main task of the relay is to control a load, how that relay is being operated by the Arduino makes it an interesting project. Interfacing a 5V Relay with Arduino opens up the door to a huge number of applications.A suitable option will be using additional isolation like an opto-isolator or completely eliminating the electromechanical relay and replacing it with solid state relay. CODEĪdvantages: The main and important advantage of connecting a 5V relay with Arduino is that it can be powered by Arduino itself.ĭisadvantages: A transistor based relay might not be ideal for long time use as there will always be noise in the relay coil. This condition can be used to trigger the 5V Relay and turn on the light. When the lighting conditions go dark (can be done by covering the LDR with hand), the output from the LDR will jump to 130 – 140. Under normal lighting conditions, the output from the LDR will be in the range of 80 – 90 (range is 0 – 255). Instead of using it directly, we designed a small application where an LDR is used to detect the light intensity and automatically turn on or off the relay. Let us discuss the working of the project.Īs mentioned earlier, by interfacing Arduino with 5V relay module, we intend to operate an AC load like lamp. The working of the project is based on the functioning of the Relay and the ability of Arduino to control the relay. Working of the ProjectĪ simple project, in which Arduino UNO controls a 5V relay is explained here. Since we need to control this relay with the help of Arduino, a transistor is used with an additional pin called Control Pin on the Relay Module. A relay is a type of a switch that acts as an interface between microcontrollers and AC Loads.Ī simple Single Pole – Single Throw (SPST) relay, like the one used in this project consists of 5 Terminals: 5V, GND, Normally Open (NO), Normally Close (NC) and Common (COMM). The advantage of using a 5V relay in this project is that the power supply for the relay can be directly given from the Arduino UNO board itself. The output of the LDR sensor is given to the Analog Input pin A0. Finally, the neutral wire from the mains is connected to the Common (COMM) contact of the relay.Ī small light sensor in the form of LDR (Light Dependent Resistor) is used to switch on or off the light automatically. Other terminal of the lamp is connected to Normally Open (NO) contact of the 5V Relay. the lamp, hot wire from the mains supply is connected to one terminal of the lamp. 5V and GND and connect the control signal from Arduino to control pin on the relay board.Ĭoming to the load part i.e. Most relay modules (whether 5V or 12V) will come with the aforementioned connection and hence all you need is to give power supply to the relay module i.e. Although the circuit diagram explains the detailed connections, practically we didn’t need to make all the connections. If you used a 12V relay like we used in this project Arduino Relay Control, you need to use a separate power supply for relay.Ĭoming to the design of the circuit, it is very simple as we used a 5V relay module and not the individual components. This makes it easy as Arduino can power up the relay directly. First thing is we used a 5V relay in this project. Let us now see how the circuit is designed. Wires for connecting DC Voltage components.2 x 1K Ohm Resistors (1/4 W – for Red and Green LEDs).Green LED (can be used as a Relay ON LED).Red LED (can be used as a Power ON LED).Arduino UNO (or any other Arduino board).Even though we have used a 5V Relay Module, the connections in this circuit diagram will be describe the complete setup. Let us see the circuit diagram for the project.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |