Arduino Tutorial : Controling 4 relay module for use with a 5 volt water pump

preview_player
Показать описание
In this video I used the following supplies to control a 4 relay module with a arduino
- Arduino uno
- Bread board
- 5-volt water pump
- jumper wires
- 1-4 relay module
- Fish tank tubing

The code is below

byte pump1 = 7;
byte pump2 = 10;
void setup() {
while (!Serial);
pinMode(pump1, OUTPUT); // variant low/high
digitalWrite(pump2, LOW); // variant input/output
}
void loop() {
digitalWrite(pump1, HIGH); // pump1 deactivated
//pinMode(pump2, INPUT); // pump2 deactivated
delay(2000);
digitalWrite(pump1, LOW); // pump1 activated
//pinMode(pump2, OUTPUT); // pump2 activated
delay(2000);
}
Рекомендации по теме
Комментарии
Автор

I thought it was and old video and disregarded it, turns out this was the best option. Thanks!

harshyofficial
Автор

Thanks mate, your explanations has helped me clear my confusion on completing my project using 5v water pump.

williammonroe
Автор

thanks, bro i was frustrated but now my connection is done because of you
thanks, buddy

veervanshajwadehra
Автор

Thank you so much!!! I was so frustrated because I couldn´t get the pump to work. A shame I can only give 1 like :/

yp
Автор

This was exactly what I was looking for. Thank You!!!

ShahrukhFakrudeenK
Автор

thank you Sir! This video healped me a lot in my project!

antonnipies
Автор

It needs a sensor to tell the archive the glass is empty so the pump turns off

layton
Автор

Thanks bro.. I thought i need to buy battery to use my water pump

archietiongson
Автор

Thank you for sharing your knowledge, bro. This is a great help for my capstone project.

joshuavillaver
Автор

Ty so much this video solve my problem using water pump and relay

rasenchannel
Автор

nice ive always wanted to control water pumps

cal
Автор

You're using the 5v usb rail and when current gets drawn the relay drops out, the pump requires way more current than you're providing

cjdelphi
Автор

Don’t you have to have a kickback diode so to block against back emf to your Arduino? Anything when you break the magnetic field sends a electron dump from cathode to anode (+ to -)

WithinandThroughout
Автор

how can we install ultra sonic sensor in it

PakistanYouth
Автор

When would you use the “normally closed” vs “normally open”?

VortexGamer-oufn
Автор

Hey, can I power the 5v relay from the main power supply instead of Arduino ? I'm new to this and don't want to burn down my house accidentally.

AadeshKulkarni
Автор

Where would you add a separate power source(9v battery) for the pump? I'm making an alarm clock and will like to add the pump...

josep
Автор

Thanks!
Can you add the make and model of the pump?

ivndkoq
Автор

Hey, what is the model of water pump? And did those tubes come preinstalled on that pump? Or was that another diy thing you had to do?

brandonly
Автор

hello did you have the stl file of those pump black plastic?

NickyAndre