Hi everybody,
Brand new noob in DIY world here. I did some research and investigations on my problem and I think I understand what's going on, but I'd like a confirmation (which I can't find precisely in other subjects).
So here is the thing.
I developed a small project using an Arduino Nano, a motion sensor, a Led Strip and a Relay.
The concept is simple : when we detect a motion, we switch on the relay, which gives power to the Led strip, and turn the leds on. And voila !
The relay is a 5V one.
The Led Strip supports 5V (it's a WS2812B). Not sure if they support more.
Therefore, mostly because of my choice of Led strip, I use a DC of 5V/2A.
My relay is powered directly by the wall DC (5V/2A). My Leds are powered by the same DC.
While developing the project, the Arduino Nano was powered by my computer.
I command the relay through D12 with a 1K resistor.
Until this, everything was working fine.
Now I wanted to move my project to the next step : get rid of the USB power from the PC, and power the Arduino Nano through the 5V / VIN pins.
1st. Not entirely sure if I'm doing things right here. I tried both pins. Since my DC is 5V I think (if I understood well) using the 5V is fine. I saw that VIN use 7 - 12V. So does using a 5V here means it doesn't have enough power?
Anyway...
So I power my Arduino Nano through the wall 5V/2A DC... The same that powers my Led Strip and Relay (and motion sensor).
In my setup() method, I wait for a few seconds, then switch OFF (LOW) the relay. (Yeah I realized that by default the relay is ON, not sure if that's normal too).
My problem =>
That works perfectly through USB. But since I got rid of the USB and power my Arduino through the wall power supply, switch OFF the relay doesn't work.
So I investigated a bit and read several posts on this forum. I followed some things here and there and here are my data:
- The Arduino Nano doesn't seem broken. I can still upload my code on it.
- My multimeter says that on D12, on my 1K resistor, the voltage is 2V when it's switch ON.
I have the feeling it's suppose to be 5V (didn't checked through the USB since I soldered...). Am I right?
If yes, does it just mean I need a 7-12V DC instead of 5, plug it to the VIN pin and voila?
If no, any idea of what I'm doing wrong?
Also, if the Arduino really needs a 7V DC, what about my Led strip that seems to use 5V and not more (disclaimer: not sure of this fact again...) ? Does it means I need 2 different power supply? (I hope no haha).
Thank you in advance.
I think I'm near to find the right answer but for once, even with everything I read, I prefer asking to be sure.