I made a very simple project that simply increases the light intensity on RGB LED strip if movement is detected and decreasing it if no movement is detected.
Everything works fine while I am powering my sensor with arduino UNO, but when I try to connect sensor to external power supply (YwRobot) on 5v output it does not work properly.
What happens basically is that if there is movement it works perfectly fine, strip keeps shining and movement is detected (I separated one LED to only show PIR sensor output), but when movement is stopped and when lights turn off (Gradually, it takes like 10-20 seconds) completely it detects movement which does not exist, and when it gets to full light (Also gradually but a bit faster) it stops detecting movement. I can interrupt lights turning off by actually making movement.
I am sorry if it is a bit confusing, it is kinda hard to explain.
EDIT : I made a quick video of it : Problem with sensor and external power supply - YouTube
Note : Red light on the start is indicating calibration of the sensor.
Note 2 : Last LED shines RED if movement is detected and GREEN if movement is not detected.
Do you have the external power supply ground connected to your sensor ground and also connected to your UNO ground? If not, you will have issues, possibly like this.
While researching I found that you have to have mutual ground for all components connected so I did that.
It is possible that I did something wrong. This is how I connected it (I only included power related cables since output/input signals should not be relevant to the problem) : Screenshot by Lightshot
I am powering breadboard supply using a 2.1mm DC power cable that is plugged into a wall through a USB power adapter.
This may be a newbie question (since I am one for electronics) : I do not understand why I would strictly need <=6volt if the breadboard supply outputs 3.3/5volt ?
Looking at the specs I believe that I would not be able to power it with <=6.5v since these are the specs : "Input voltage: 6.5-9v (DC) via 5.5mm x 2.1mm plug"
Skazzyyy:
I am powering breadboard supply using a 2.1mm DC power cable that is plugged into a wall through a USB power adapter.
So you use a 5volt cellphone charger on the DC socket.
The DC socket might connect to a reverse protection diode that drops ~0.4 or 0.7volt, and a 5volt regulator that drops another volt.
If so, then there is about 3.5volt left on the 5volt output of your breadboard supply.
Measure it.
Skazzyyy:
This may be a newbie question (since I am one for electronics) : I do not understand why I would strictly need <=6volt if the breadboard supply outputs 3.3/5volt ?
Looking at the specs I believe that I would not be able to power it with <=6.5v since these are the specs : "Input voltage: 6.5-9v (DC) via 5.5mm x 2.1mm plug"
Thermal problems.
With 9volt on the DC socket, and a current draw of 500mA from the 5volt rail of the breadboard,
9 - 5 = 4volt * 0.5Amp = 2watt is dissipated in the 5volt regulator of the breadboard.
Ok for a very short while, but too much long term.
A lower input voltage will minimise power (heat) in the regulator.
You might indeed need a minimum of 6.5volt if there is a reverse protection diode inline.
But why don't you connect that 5volt cellphone supply directly to the breadboard/Uno.
Then you don't need that breadboard supply.
Leo..
Now it makes sense. It would work, it would just have too much extra power that it needs to get rid of which would result in it heating up quite a bit.
I wanted to experiment a bit with external power supply.
I tried 2 new versions :
I connected USB-B cable to arduino and to USB power adapter plugged into a wall which resulted in everything working fine.
I did the same thing except I used DC input which resulted in sensor not working.
My best guess is that arduino has same protection diode that drops voltage so I am ending up with a lower ouput and on the other side USB-B does not do that ?
Skazzyyy:
2. I did the same thing except I used DC input which resulted in sensor not working.
My best guess is that arduino has same protection diode that drops voltage so I am ending up with a lower ouput and on the other side USB-B does not do that ?
Are you referring to the DC jack on the Uno? If so, that feeds into the voltage regulator on the board so you need to supply 6+ V in order for that to work.
Since this is +5V coming from the wall adaptor, you want to feed that directly into +5V pin on the UNO, not V-in, not the DC jack.
Understood.
One more question : What is simple and also good way to power my arduino (Without it depending on PC) ? Should I just stick with USB/USB-B or should I get some kind of DC power adapter ?
These are just fun projects so I doubt that thermal limits will make a problem considering the whole thing will not run more than a few hours without a break. Is there anything that I definitely must not do that would damage my board if I am using one of the 2 options you listed ? (For now I do not plan on using anything more than Arduino Uno + 8 RGB LEDs strip + a few modules (like 3-4) at once)
Things could get hot in a matter of minutes or seconds.
If you power with 5volt, on the USB socket, then the regulator is not used.
Addressable RGB LEDs could use up to 60mA each when full white, so eight LEDs is the limit.
More than that, and you can't power the strip(s) through the Uno.
Leo..
I use an Arduino Uno and I have a 3cell 12v lithium ion battery as my power supply.
When I connect the battery to the Arduino board and supply my sensors(by sensors I mean anything e.g an IR sensors or even a bluetooth module) with the Arduino board, everything is fine and I have a clean analog read through my analog pins. but the problem starts when I supply my sensors with the battery through a 5v regulator. when I do this, my sensors or modules turn on but the analog pins only take noises or my bluetooth module stops showing me the words that I send through my phone.
Please I need help.
Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html . Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Please post a copy of your circuit with the 5V regulator, in CAD or a picture of a hand drawn circuit in jpg, png?
Are you using the bypass capacitors around the regulator as suggested in the data sheet?