1
\$\begingroup\$

I have a Home Automation Motion Detector Project. I am to light a LED strip of 1meter when motion is detected. My arrangement is posted as an attachment. The transistor is attached to a microcontroller output through a resistor and diode.

My Question is: is a LED Driver compulsory in this arrangement?

Led control From Microcontroller

Another option that can be implemented is Using a Relay. The relay will act as a driver.

Please refer to the attached image and give your valuable advises

enter image description here

Edit: These are the Relay Ratings that I have found in the datasheet. These are the only rating given in the entire datasheet.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ OK. Thank you. From what i read on Adafruit, a 1meter LED strip will draw about 1.2A of current. and my SMPS is capable to providing 3A current. Also, I suppose the LED strips already have Limiting resistors. So, I do not need to add an extra current limit resistor at the beginning of the LED strip right? \$\endgroup\$ – shantanu Nov 24 '16 at 8:26
  • \$\begingroup\$ Um. \$1.2\:\textrm{A}\$ will need about \$100\:\textrm{mA}\$ of base drive current. Your resistor won't even come close, unless you are driving it with \$100\:\textrm{V}\$ or more. And your micro won't source \$100\:\textrm{mA}\$, anyway. You need a different circuit. \$\endgroup\$ – jonk Nov 24 '16 at 8:33
  • \$\begingroup\$ Thank you for your advise Jonk. But, I have used to same circuit before. Just that instead of the LED strip, there as a Relay attached. And that worked just fine. Am I still missing something? \$\endgroup\$ – shantanu Nov 24 '16 at 8:36
  • \$\begingroup\$ Yes. A relay helps a lot. They usually don't require 1.2 A!! (You hadn't mentioned all the details, as you should have.) \$\endgroup\$ – jonk Nov 24 '16 at 8:44
  • 3
    \$\begingroup\$ Use a suitable MOSFET to switch the LED strip, not a BJT. \$\endgroup\$ – Majenko Nov 24 '16 at 9:26
1
\$\begingroup\$

If you want to consider ways to avoid the relay (they tend to cost money and they are mechanical and wear out over time), you could consider something like this (these schematics are updated now, given the new information about the \$3.3\:\textrm{V}\$ operating voltage for your micro.):

schematic

simulate this circuit – Schematic created using CircuitLab

The above circuit adds \$R_2\$ (which is otherwise not actually necessary) in order to distribute the power dissipation load away from \$Q_2\$ and into a resistor. If you use a TO-220 type BJT for \$Q_2\$, though, you could remove \$R_2\$ without trouble.

Another approach would be:

schematic

simulate this circuit

This last circuit may be part of why Majenko specifically suggests using a MOSFET for \$Q_1\$. It may be difficult to support \$11\:\textrm{mA}\$ from your micro's output using this topology.

However, the first circuit I mentioned uses an emitter follower arrangement for \$Q_2\$, so it only requires \$1\:\textrm{mA}$\$ (or less) and won't tax most modern microcontroller outputs. So the need for a MOSFET is less, with the first circuit. But it still involves dissipation in the resistors and those add costs, as well.

I tend to stay away from the use of MOSFETs, as cost matters a lot to me and diverse manufacturers matter somewhat, also. However, I do use them. And this would be a good application. If you are willing to reverse the sense of your I/O, it might look like:

schematic

simulate this circuit

This uses the IRLB8721 you mentioned. It definitely has very low drain-source resistance driven as above and would work well. (\$R_{DS(on)} \approx 10\:\textrm{m}\Omega\$ with \$V_{GS}=10\:\textrm{V}\$.) But your LEDs will be "ON" when your micro outputs a LOW. Just keep that in mind.

Majenko would prefer you use a logic level MOSFET. And for that, you may need nothing other than a small gate resistor and the MOSFET. But you'll have to select and buy one of those.

\$\endgroup\$
  • \$\begingroup\$ Damn Jonk!! Thank you so very much for all your help and advise. So I will do this, I will use your 3rd and last suggestion. I will Constant Pull Up my Micro pin. So that it will output a LOW when it gets from within the code. So when it outputs a low, the LED strip will turn ON. Sounds like a plan? \$\endgroup\$ – shantanu Nov 24 '16 at 10:13
  • \$\begingroup\$ @shantanu Yes. You already have the MOSFET, which is "good." When you output a LOW, Q1 will be OFF. Because it is OFF. R2 can then pull up the gate on the MOSFET to about 12 V. Which should be plenty good. If you output a HIGH, Q1 turns ON and this pulls the MOSFET gate back close to ground, which should shut the MOSFET off. \$\endgroup\$ – jonk Nov 24 '16 at 10:15
  • \$\begingroup\$ Perfect. Thank You extremely very much Jonk. And also Majenko. You guys are superb. \$\endgroup\$ – shantanu Nov 24 '16 at 10:17
  • \$\begingroup\$ @shantanu However, you could also just try to use the MOSFET directly, using a 220 Ohm resistor to its gate from your micro (might not even need that, either.) In this case, a HIGH output from the micro would turn the LEDs ON. The risk here is that you don't drive the gate high enough and the LEDs aren't ON as much as they might otherwise be. But it is worth an experiment, too. \$\endgroup\$ – jonk Nov 24 '16 at 10:18
  • \$\begingroup\$ Thank you for all your help. I really appreciate it. So basically, I can drive the LED strip with the above circuit (As mentioned by Mr.EM Fields) WITHOUT a LED driver right? \$\endgroup\$ – shantanu Nov 24 '16 at 12:14
1
\$\begingroup\$

If you can invert the Arduino's output, this will work using the MOSFET and any jellybean NPNs you have on hand:

enter image description here

\$\endgroup\$
  • \$\begingroup\$ R3 will be replaced by my load i.e. the LED Strip right? \$\endgroup\$ – shantanu Nov 24 '16 at 10:40
  • \$\begingroup\$ Yes. sorry for the confusion, I'll fix it right now. \$\endgroup\$ – EM Fields Nov 24 '16 at 10:48
  • \$\begingroup\$ Thank you for all your help. I really appreciate it. So basically, I can drive the LED strip with the above circuit (As mentioned by Mr.EM Fields) WITHOUT a LED driver right? \$\endgroup\$ – shantanu Nov 24 '16 at 12:14
  • \$\begingroup\$ @Shantanu: Yes. The circuit is the driver! Try it, you'll like it. :) \$\endgroup\$ – EM Fields Nov 24 '16 at 13:00
  • \$\begingroup\$ Hi EM. I was just curious, I thought of one more way to do the same operation. Will it be fine if I replace the MOSFET by a 12V relay? \$\endgroup\$ – shantanu Nov 25 '16 at 5:47
0
\$\begingroup\$

This is a part of my (not made yet) design for a PWM dimmer for a LED strip using STM32F031. From LTSpice sims it should be good for switching times down to microseconds and won't overload STM's GPIO.

Do bear in mind it isn't tested yet.

The N-MOS is logic-level so no level switching needed.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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