Good evening everyone! My name is Brandon. I am new here at the forums and to arduino/electronics altogether. I have however been reading hanging around the forum and reading topics you guys post for a few weeks now. I am amazed at some of the things that you have done. With that said. I have purchased an Arduino Uno, a PIR HCSR-501,and a MOSFET IRLB3034PBF N Chan. My hope are to make a LED strip light up by fading under my bathroom counter whenever we walk in. Unfortunately other than knowing what parts to get, I have no idea how to set it up :-/ does anyone have any experience with this type of project?
Hi. Welcome to the forum. You are describing two things. A PIR sensor and dimming a LED strip. Try to understand/complete them individually before you combine the two. I would start with some of the the examples that come with the Arduino IDE. Leo..
The MOSFET wants to be used as a low-side switch, so source to negative side of LED supply, drain to LED strip
-ve, LED strip +ve to +ve LED supply. Common the source to Arduino ground and connect the gate via a 220 ohm resistor to one of the PWM pins on the Arduino. You’ve chosen such an over-rated MOSFET that you will
be limited in the frequency you can PWM it without a MOSFET driver chip - fortunately the default Arduino
PWM rate is slow enough for it. The MOSFET input capacitance is about 10nF so you’ll see several us of switching
time on each transistion.
HAving done that experiment with analogWrite() to that pin.
Here is a great resource for all. especially beginners.
As far as the PIR goes, couldn't be simpler. All pins should be marked. One pin is positive dc voltage , one pin is ground (same ground Arduino uses), the output pin goes to an Arduino I/O pin. Visit here.