I made a small circuit (with a breadboard) which turns a small 12V LED ribbon (a few mA) when the Pir sensor detects a motion.

The circuit is made of:

  1. Velleman PIR motion sensor
  2. Relay
  3. Velleman step down voltage shifter
  4. LED ribbon (12V)

It works like a charm expects the relay makes a "click" sound (I know it normal :) when it's switched on and it needs a 5V power supply (while the LED ribbon and the PIR needs 12V).

Now, I want to optimize the circuit. I searched on the Internet and I found two components that I could use: MOSFET and optocoupler.

The first one, the MOSFET, I know a lot about it now. I read a lot of documentations. I need a logical N MOSFET in my case.

Then I just found today a new component: an optocoupler but I don't know a lot about it.

I need something that can be opened turned on at 3.3v and can provide cope with at least 12V (I know it needs to be higher) and more than 4 Amps.

What would be the "best" between a MOSFET and an optocoupler (in my case)?

  • \$\begingroup\$ An optocoupler is used to provide galvanic isolation, so doesn't seem suitable/appropriate for this. It would appear in this case that you are looking to simply drive a MOSFET that in an open drain configuration. Some of your descriptions seem a little bit confused which may be simply due to a language issue. When you say opened at 3V3 I assume you mean turned on by a 3V3 signal? A MOSFET "providing" 12V in this case doesn't seem appropriate either. Do you mean that you are looking for a MOSFET that can cope with a load driven by a 12V supply and passing over 4A? \$\endgroup\$
    – DiBosco
    Commented Sep 4, 2017 at 12:47
  • \$\begingroup\$ Sorry for my lack of electrical vocabulary. "When you say opened at 3V3 I assume you mean turned on by a 3V3 signal": That is right, my bad. IRL540, it seems by watching at the Vgs chart that at 3.3v it can cope with +10A. Almost the same with FQP30N06L. So I will go with a MOSFET then. \$\endgroup\$
    – Kaymaz
    Commented Sep 4, 2017 at 13:22
  • \$\begingroup\$ There are xxxx varieties of FETs. Either choose a low "logic level" FET or use 12V for Vgs and open collector or open drain to turn off std FET. These two you picked are not optimal. Vgs ought to be >= 3x to 4x threshold Vgs for low RdsOn. Opto may not be necessary but depends on power source is floating and EMI. It is just a low gain <<1 current ratio CTR \$\endgroup\$ Commented Sep 4, 2017 at 13:52
  • \$\begingroup\$ No need to apologise at all, you're learning, asked a question and were polite about it so it's all fine. \$\endgroup\$
    – DiBosco
    Commented Sep 4, 2017 at 14:07
  • \$\begingroup\$ Is IRLZ44PBF better? Looking at the chart. I don't get why the Vgs ought to be >= 3x to 4x threshold of Vgs for low RdsOn \$\endgroup\$
    – Kaymaz
    Commented Sep 4, 2017 at 14:31

1 Answer 1


I finally bought some IRLZ34N MOSFET and they are working great with my PIR Sensor (which outputs 3.3V).

  • \$\begingroup\$ Why -1? Please give some explanations... \$\endgroup\$
    – Kaymaz
    Commented Oct 12, 2017 at 19:36

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.