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?
Pramodh:
So I should at least give 6V to work Vin, am I correct?
No, absolutely not!
Pramodh:
There are two options now.
Use the same 5V /5A power supply by connecting it to 5V pin.
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!
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