1

If the intent is to drive the two LED's with 200-400mA (using PWM @ 38Hz), is there anything wrong with this solution?

enter image description here

Perhaps this is a better solution, as it ensures the current is exactly the same for the two LED's (so that they are not out of phase with each other):

enter image description here

closed as off-topic by gre_gor, per1234, sempaiscuba, Juraj, VE7JRO Nov 30 '18 at 17:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about Arduino, within the scope defined in the help center." – gre_gor, per1234, sempaiscuba, Juraj, VE7JRO
If this question can be reworded to fit the rules in the help center, please edit the question.

1

I would use a single transistor rated at minimum 1A continuous (a MOSFET by choice), and have both LEDs switched in parallel with their own resistor. By having them in series as in your second schematic you are limiting the input voltage to a minimum of 2×Vf which could be as high as 5.2V, and thus more than your power source can provide.

schematic

simulate this circuit – Schematic created using CircuitLab

This gives the same result as your first circuit, but only uses one transistor for the switching. You can add more LED+Resistor pairs in parallel as you like as long as the total current is below that which the chosen MOSFET can handle.

You should rate the MOSFET to handle the maximum continuous current, not the pulse current, in case the output of the Arduino should be set continuously HIGH instead of sending PWM.

You should also note that the pulse current of an LED is usually rated at 1% duty cycle.

Also note that as the voltage of your power source drops, so will the voltage across the resistors, and thus the current flowing through them (and your LEDs) making the LEDs dim. It may be beneficial to first pass your battery power through a high-efficiency 3.3V switch-mode regulator to keep the voltage stable whilst wasting the minimum amount of power in the regulation.

  • Thanks @Majenko. I read about using MOSFET's vs BJT's and came across one statement that asserted that BJT's can switch faster, which I thought would be relevant in my case since I'm pulsing at 38KHz...but perhaps the MOSFET's are plenty fast enough so it's not a concern. I have already ordered some 30A/60V NPN MOSFET's...are those a good choice in your opinion? Thanks again. – urbanite Nov 30 '18 at 0:42
  • Yes, BJTs switch faster. But by faster we're talking high MHz and GHz not just a few kHz. The critical parameter for a MOSFET is the threshold voltage. You need it to be fully turned on at a voltage below he output of your Arduino. Aim for <3V threshold voltage. Check the graphs in the datasheet. – Majenko Nov 30 '18 at 0:45
  • Also you should realise that the output of the Arduino is MOSFETs anyway, so they must be able to switch fast enough. In fact the entirety of the Arduino internals are MOSFETs. And that can run at up to 20MHz. 38kHz is nothing to a MOSFET... I regularly work with MCUs at 200MHz. Still 100% MOSFETs internally... Even your swanky 3.8HGz computer is MOSFETs... Teeny tiny MOSFETs... – Majenko Nov 30 '18 at 0:46
  • Gate threshold is 1-2V, if I'm reading the datasheet correctly. (It has 1 in the Min column and 2 in the Max column, but nothing in the Typical column.) Thanks for the tip about Arduino's internal MOSFET's! Very cool to know... – urbanite Nov 30 '18 at 0:48
  • There should be a graph of gate voltage vs drain-source current. Shaped like a curve. Find 5V on the gate voltage axis and see what the current flow is. It should be on the almost vertical section of the graph. – Majenko Nov 30 '18 at 0:50

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