Circuit is not working, when I plugged it to the power supply

Hello,

I am building an Arduino project which detects human motion at night time and switch on an LED strip. I am using a arduino nano, PIR sensor, LDR module and a relay module.
My codes works fine while it connects the USB. But when I connect it to the 5V/5A aluminium power supply, The relay doesn't work properly.

But it seems like the digital signal are receiving to the relay. But it does not work mechanically. What will be the issue here? Is the current flow is too high?

My code is attached for your reference.

BED_NIGHTLED.ino (1.08 KB)

are you applying 5V/5A via a power jack ?

well, you need at-least 6V via power jack for it to work reliably

otherwise apply that 5V ( I am assuming your supply is well regulated ) directly to the Arduino header pins named 5V and Gnd

.. and please post your schematic showing how things are wired up

I connected the power supply (5V/5A) direct to the nano board via Vin and GND pin. (attached pic)

Sure. I will provide my schematic diagram and some photos of the circuit

thanks

Vin will not work for 5V.

The correct pin for 5V is marked, believe it or not, 5V.

The order of the pins is VIN GND RST 5V A7...

Have you tied the power supply ground and the arduino ground together?

So I should at least give 6V to work Vin, am I correct?

There are two options now.

  1. Use the same 5V /5A power supply by connecting it to 5V pin.
  2. Purchase a new power supply with the range of 7-12V

What will be the best option? What option will be long term? Please share me your knowledge

jrdoner:
Have you tied the power supply ground and the arduino ground together?

Yes, I did

Hi,

Thank you so much for your guidance. It worked. I did as @Wattsthat said.

Thanks again.

Pramodh:
So I should at least give 6V to work Vin, am I correct?

No, absolutely not! :astonished:

Pramodh:
There are two options now.

  1. Use the same 5V /5A power supply by connecting it to 5V pin.
  2. Purchase a new power supply with the range of 7-12V

No, only one option.

KASSIMSAMJI:
are you applying 5V/5A via a power jack ?
well, you need at-least 6V via power jack for it to work reliably

Sorry, this comment is extremely misleading! :roll_eyes:

The clear blunder is not comprehending what the "Vin" or "RAW" terminal is. The regulator on the Arduino UNO/ Nano/ Pro Mini/ Mega2560/ Leonardo/ Pro Micro has very little heatsink, so will not pass very much current (depending on the input voltage and thus, how much voltage it has to drop) before it overheats and (hopefully reversibly) shuts down. It is essentially a novelty provided in the very beginning of the Arduino project when "9V" power packs were common and this was a practical way to power a lone Arduino board for initial demonstration purposes. And even then it was limited because an unloaded 9 V transformer-rectifier-capacitor supply would generally provide over 12 V which the regulator could barely handle.

In the Nano, for protection, there is a diode between the USB connector and the 5 V supply line (which is also the "5V" pin), so plugging 5 V power into the USB jack loses a significant part of a Volt before it gets to the 5 V line. According to the original circuit, this would be a SS1P3L with only 350 mV drop and capable of passing one Amp, but depending on what clone you have, this may be quite different.

So since you have the correct power supply - regulated 5 V - for the whole circuit, you connect it to the "5V" pin (and of course, ground) as well as your relay module and any other associated systems.

Maybe not as much fun... but this project doesn't appear to even need an Arduino. A PIR module can connect its output to the relay module directly. Many PIR modules even have an LDR built in, or the pads where an LDR can be soldered in, and the on time can be adjusted with one of the pots. Keeps it simple :slight_smile:

Good point, I failed to detect the re-invention of the wheel here. :astonished:

An LDR module? I mean, really? :roll_eyes:

due to complex schema

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.