I have none to less electronics background, with limited knowledge whatsoever. I've used some schematics from the internet https://www.youtube.com/watch?v=ugDPdgGekNo to put in place the below setup :
enter image description here

A PIR sensor (HC-SR501) + n-Mosfet transistor irfz24n + 9v battery to power on a 9v led light bulb.

The problem is that with this setup, the led light bulb doesn't turn off when no motion is detected, it remains opened. I have measured aside the PIR sensor outputs: it's 3.6V when some motion is detected and when no motion is detected it drops to 0v.

Any advice on what is wrong is appreciated.

  • \$\begingroup\$ Please include a schematic. \$\endgroup\$
    – Hearth
    Commented Nov 5, 2018 at 13:09
  • \$\begingroup\$ Your Imgur image is pretty, but, PLEASE, draw a schematic. \$\endgroup\$
    – mguima
    Commented Nov 5, 2018 at 13:15
  • \$\begingroup\$ "it remains opened" - what does this mean? \$\endgroup\$
    – Andy aka
    Commented Nov 5, 2018 at 13:33

2 Answers 2


This is the correct pin-out for the MOSFET you are using (superimposed on to your incorrect pin-out): -

enter image description here


Unless I am misinterpreting your image (and you really should use the schematic editor), you have connected the gate to ground and the source to the output. This will not work. What you want is


simulate this circuit – Schematic created using CircuitLab


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.