Connecting power external power source of pump connected to relay shuts down sensors

I’m new here
The challenge I’m having with the project is that everything works accordingly to how I programmed the system when the load connected to relay is not powered.the relay is able to turns on and off when the pump is not connected to its external power source but once I connect the power source to the pump all the sensors and lcd stops working. I’m using a relay as an automatic switch. Below is my circuit diagram. Relay has its Vcc connect to its own 5v source not shown in diagram

Hello mosesjuicy

Welcome to the world's best Arduino forum ever.

Check the power connections of the Arduino Uno.

  1. Vin
  2. +5V is not a power supply pin for the sensors

Have a nice day and enjoy coding in C++.

Thanks , I tried powering with the pc and port still giving same problem

Should I power them externally

Did you design the hardware yourself?

Do you know the physical specifications of the I/O pins of the Arduino?

Yess I designed it alone, I/o do you mean analog and digital pin specifications? The challenge I have is that when the power connected to com and NO of relay is not connected to power supply everything works well but once power is completed when relay is activated everything runs crazy and pump remains on

The challenge is that before you start 'writing' schematics it's a good idea to read the datasheets for the relevant hardware. @paulpaulson specifically points you to the pin specs because they cannot provide enough current for normal relay operation. For this you need a suitable transistor and reverse diode on the relay coil to protect the rest of the electronics and reduce interference. I would even prefer to get rid of the relay and replace it with a suitable logic level MOSFET transistor.

Would kindly advise on how i connect the diode a schematic would really help

That's not possible. Arduino Vin need to be greater than 7V or it won't work.
Either your schematic is wrong or you are doing something that you are not telling us about.

Thanks for the feedback, the relay has a separate 5v power source not shon in schematic

the relay has a separate 5v power source not shon in schematic

You already mentioned that but your schematic shows that the Arduino Vin connected to 5V. Vin need to be greater than 7V so it could not possibly work.

Do you have a schematic that shows how things are actually connected?
Do you have a datasheet for the pump?
Do you have a datasheet for the relay?




Updated circuit and should diode be connected in this way

Those image are too small and unreadable.

Put these components as close to the pump as possible.



I will try the recommended advice, are these images clear

Can a bipolar stepper motor also have an effect i observer the led on motor driver blinks with a feeding color when motor moves

Drawing schematic that make no sense will not help us debug your problems.
No hurry, take some time and do it right.
Don't show modules that you are not actually using, like the relay and AC-DC converter.

Provide datasheets for all the components you are actually using if you have them.
Screen shots of websites don't show very well

Maybe it's supposed to.
Unless you show how thing are actually connected and provide information on the motor, driver and power supply we can't help


I’m currently having problems with my laptop, but I have shown drawn a schematic using a pen hope connection are visible. A 5V 12V One 1 Channel Relay Module Board Shield with optocoupler Support High and Low Level Trigger is used as a switch for a pump, I’m currently stepping down AC using 5v 2.0 A phone charge to turn on arduino and 2 other identical phone chargers one is used as power source for relay and another one is connected to common port of relay and pump positive terminal is connected to normally open terminal. The ground of all phone charges is connected to common arduino ground.

First, the barrel jack on the Uno need a voltage between 7V and 12V or it won't work.
Those submursible pumps create a lot of electrical noise and can cause all types of problems. You are not the first to have this problem. The diode and capacitor I show should solve the problem.
Don't run those pumps out of water or they will burn out.
Make sure your set-up is nice and tidy. Keep the pump wires and the pump power supply wires away from all other wires.

Also don't connect the pump power supply ground to the Arduino ground.
Only connect it to the pump.
I hope this diagram is clear.