![]() Now we need to make a connection between the 5V pin of Arduino and the relay module’s positive (+) pin.Take a dupont cable and one end of this cable to PIN 7 (Digital PWM) of the controller board and connect the remaining end of the cable to the Signal PIN of the relay module.Step1: Wiring of Arduino board & the relay board Pin6 (Normally Closed): This is the Normally closed (NC) terminal of the relay.Pin5 (Common): This is the relay’s common terminal.Pin4 (Normally Open): This is the relay’s NO (Normally open) terminal.Pin3 (VCC): This input supply pin is used to power the relay coil.Pin1 Signal pin (Relay Trigger): This input pin is used to activate the relay.The relay module includes different pins which are discussed below. Some relay modules come with an LED indicator to indicate the status of the relay.They include the required drive circuitry.These modules are mainly used due to many reasons like the following. These modules are available with additional components & circuitry on a board. Maximum switching voltage is 250VAC or 30VDC.Rated through-current is 10A for NO and 5A for NC.It is compatible with any 5V microcontroller like Arduino.It is controllable with digital output.The Arduino relay specifications include the following. The required components of this wiring mainly include Uno Rev3, Relay Module, Dupont wire, USB cable for powering & programming, Battery, Connector of battery, Screwdriver for connecting wires to the module, and DC motor. The main intention of this wiring is to control a DC motor with the help of a relay and Arduino. Whether you’re using it for a home garden or a larger agricultural project.The Arduino relay wiring with the DC motor is shown below. With the ability to program the pump to turn on and off at specific times, adjust its speed, and integrate it with other sensors and devices, you can create a customized water pumping system that fits your needs. In conclusion, controlling a 12V DC motor water pump with Arduino is a simple and effective way to automate your water pumping system. Cooling systems for electronic components and machinery.Water transfer and circulation in small fountains and ponds.Some common applications of 12V DC water pumps include: ![]() Applications 12V DC Water Pumpġ2V DC water pumps are commonly used in a variety of applications where a small, compact, and portable pump is required. This code is a basic example of how to control a DC motor water pump using an Arduino board and a MOSFET transistor. This function uses the digitalWrite() method to set the RELAY_PIN to HIGH, which will turn on the water pump for a duration of 5 seconds, then the digitalWrite() method is used again to set the RELAY_PIN to LOW, which will turn off the water pump for another 5 seconds, then the loop repeats. The loop() function is the main function of the program and will run repeatedly as long as the Arduino board has power. ![]() This means that the pin is configured to be able to provide an output voltage to control the MOSFET. In the setup() function, the pinMode() method is used to set the RELAY_PIN as an output. The code begins with the declaration of a constant variable RELAY_PIN which is assigned the value of the Arduino digital pin number to which the MOSFET gate pin is connected. This Arduino code is designed to control a 12V DC motor water pump using a MOSFET transistor. the loop function runs over and over again foreverĭigitalWrite(RELAY_PIN, HIGH) // turn on pump 5 secondsĭigitalWrite(RELAY_PIN, LOW) // turn off pump 5 seconds initialize digital pin A5 as an output. the setup function runs once when you press reset or power the board constants won't changeĬonst int RELAY_PIN = 3 // the Arduino pin, which connects to the gate pin of MOSFET Now copy the following code and upload it to Arduino IDE Software. Here is a simple step-by-step guide on “ How to install Arduino IDE“. 12V DC Water Pump Arduino Circuit Installing Arduino IDEįirst, you need to install Arduino IDE Software from its official website Arduino.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |