But everthing is there? Diagram ,.ino.
Sorry for that, I didn't watch the video. Consider my reply just as general opinion about YT videos that don't give sufficient information to replicate what was presented.
I did a quick crosswatch of the video
Oh my god !
there are so many flaws in how they do it. It is amateur ³
amateur-flaw: Powering a 5V-Relay directly from arduino (draws too much current)
professional: use an external power-supply
amateur-flaw: Using a 9V-Block battery to power the pump (does not provide enough current will be empty very quick)
professional: using a 4x AA battery-pack or a wall-plug
amateur-flaw: they just stick the blank wireend into the screwterminal of the relay-board without tightening the screw and VOILÀ the wire drops out immidiately !
professional: very simple tighten the screws
amateur-flaw: "connect" the wires to the 9V-block with hand.
later on one wire seems to be soldered onto the nipple of the 9B-Block and the other wire is just "stuffed" inbetween.
professional: use a battery-clip with switch
It is another one of these crap-videos that lead to multiple fails.
I use them, but not for the thinnest wires.
question: why do we need to use an external power for the relay and the pump instead of the arduino? is it because of lack of power?
can you make design that would help me understand better?
the electrical components that i have is:
arduino uno
relay 5v 1 channel
pump
breadboards
18650 battery with battery holder
5v wires
IR Infrared sensor
16x2 LCD I2C
Flow sensor
5 pushbuttons
dc motor & drive motor
i want a pump that can release water at different modes like 250ml, 500ml, & 750ml with the use of pushbuttons
note: i dont have any resistors
the electrical components that i have is:
arduino uno
relay 5v 1 channel
pump
breadboards
18650 battery with battery holder
5v wires
IR Infrared sensor
16x2 LCD I2C
Flow sensor
5 pushbuttons
dc motor & drive motor
i want a pump that can release water at different modes like 250ml, 500ml, & 750ml with the use of pushbuttons
note: i dont have any resistors
for the battery
https://shopee.ph/PKCell-3.7V-Lithium-ion-NMC-18650-Battery-for-Solar-Electric-Scooter-Mini-Fan-Power-Bank-i.18252381.1670629656?xptdk=442bcfcd-ed58-49cb-b902-870ac238838c
(i bought 2 2200mah)
for the drive motor
https://shopee.ph/L298N-DC-Dual-H-Bridge-Stepper-Motor-Driver-Board-Module-L298-i.18252381.741424410?xptdk=7e3538b2-6f5d-45f5-8760-2ef215ea3f97
for the dc motor
https://shopee.ph/Yellow-DC-TT-Gear-Geared-Motor-and-Wheel-(Smart-Car-Robot-Gear)-i.18252381.314260266?xptdk=43a3aeff-f4d4-4992-9592-a4800505d7c3
(i bought the 6v dc geared motor)
You can plug this into a USB source (charger, port, whatever)
without having to hack a cable ─
https://www.aliexpress.us/item/3256805419110397.html
but do not allow the clips to touch together.
i dont understand what your trying to say
can you do it step by step clearly
es, the primary reason for using an external power source for the relay and pump (instead of the Arduino) is lack of power and electrical safety. Here’s why:
click triangle to open explanation
1. Current Limitations
- Arduino’s Power Limits:
Arduino pins can only supply ~20–40 mA per pin with a total limit of ~200 mA for the entire board.- Relays: Even small relays often require 50–100 mA to energize their coils, exceeding the Arduino’s per-pin limit.
- Pumps: Motors/pumps typically draw hundreds of mA to amps, far beyond the Arduino’s total current capacity.
Using the Arduino directly could overheat its voltage regulator or damage its pins.
2. Voltage Requirements
- Most relays and pumps operate at higher voltages (e.g., 12V, 24V), while the Arduino outputs 5V (or 3.3V).
If a relay works with 5V then the current is higher because you need a certain power
Power = voltage * current
example numbers for easy calculation wihout a calculator:
needed power 10W
voltage 5V * 2 A current = 10 W
voltage 20V * 0.5 A current = 10 W
- Even if the Arduino could supply enough current, it lacks the voltage to drive these components because of the total current limit of 200 mA
3. Electrical Noise & Safety
- Motors/pumps generate voltage spikes and electrical noise when turning on/off, which can:
- Crash/reset the Arduino (due to unstable power).
- Damage sensitive electronics on the board.
- Relays (especially mechanical ones) also create back-EMF spikes when deactivated.
- Using a separate power supply isolates the Arduino from these risks.
4. Role of the Relay
- The relay acts as a switch, allowing the Arduino to control a high-power circuit with a low-power signal.
- The Arduino powers the relay’s control side (if compatible), while the load side (pump) uses the external supply.
- Some relay modules include optocouplers or transistors for further isolation.
In the video you linked to they use an extra powersupply. This 9V-battery.
Such a 9V battery is a really bad choice because it can not provide much current and will be empty after 2 or 3 hours of operation.
Dear @tristanity
you are asking the right questions. And asking a lot of questions is the right thing to do.
So you are on a good way to gain knowledge. This is very good.
thank you for the information that you give, may i know how can i make the pump and the relay to work?
i have a battery holder here without the batterys yet to power the arduino. should i cut on of the wires in the battery holder and make it parallel cerculation to connet to connect both the relay/pump and the arduino?
how do i connect the pump and the relay together? and to the arduino to control its functions?? can you make a sketch of it??
does the 6v dc motor requires external power too??
A word discription in this case is error-prone for misunderstandings.
please make a hand drawn schematic. I emphasise hand-drawn is completely sufficient.
just simple 2d rectangles = boxes with a word that explains what the box represents
a box with word "batteryholder" inside the box
a box with word "relay" inside the box
etc. etc.
draw lines that represent the wires
take a picture with your smartphone and then post the pictures.
Here is a video that explains very good how relay works and why you need a flyback-diode to protect the electronics.
CLick the link to watch the video "How relays work"
I guess this channel has a lot more good videos.
If you need help with finding the right videos you can ask
this is what im trying to say
note: i have many components to connect to the arduino like drive motor, pushbuttons, lcd i2c
maybe no one at all. It might be that your relay-board already has one.
That is the reason whyt it is important to have a datasheet for each and every part you are using.
Ok. You have posted a hand-drawn schematic. Well you showed me that the quality of such a hand-drawn schematic needs a certain minimum-level do be good to read
Each box requires a name. Take a normal sheet of paper to have enough space to draw it.
use a blue or black pen to get enough contrast.
The relay is an electrical operated switch.
You are NOT connecting GND and Vcc of the pump to the relay
As a general advice: before connecting anything to your microcontroller you should ask here in the forum if it will work this way.
Your have to gain more knowledge about electonics. Without this knowledge you are in danger to damage your arduino, the power-supply and all other parts through creating shortcuts that create much too high currents that will blow up components!
The video that explains how relay works has a pretty picture that shows the difference
between what you have drawn it and how it should be connected.
as a remark:
user @kmin has posted a similar picture in post #8
that shows the same electrical connections only difference is the different relative positions of the components.
You seem to have not analysed this picture carefully. If you would have analysed this picture carefully you would have seen and understood what the difference is.
If you want to make this project a success you have to work with this pretty high level of carefuleness to make it work.
where will i connect it then??
should it be like this?
i forgot to write "in to the pin 13" on the top wire (first wire) on the relay
Your links don't open for me.
But if you have 3.7V battery, that's good only for powering directly your pump.
Not for the motor. L298N ancient motor driver has 1-2V voltage drop, so you need 7.4V battery for 6V motor.
And lithium batteries need protection circuits. They are dangerous is not used carefully.