1
\$\begingroup\$

I want to control some white led lights (datasheet) with PWM.

The Leds are in a parallel-series circuit with 3 leds per series and multiple of those in parallel. (See Image below) The Leds itself are rated 3.4V, but because I am already using a 24V 6.25A Power Supply with some other stuff, I am running 24V lines and use a 155 Ohm resistor infront of each series.

How would I control all those leds with a 3.3V PWM signal? I saw some circuits using Mosfets but I have never used one of those so I am not sure what I am looking for if I would use one. The Mosfet would also have to be infront of the load, due to the Ground beeing shared with the other parts of the circuit.

circuit described above

\$\endgroup\$
3
  • \$\begingroup\$ Your question is very difficult to read. Please hit the edit button and improve the formatting using paragraphs to help with readability. Please also use the built-in schematic editor to draw a schematic of what you have now. \$\endgroup\$
    – jwh20
    Feb 23, 2021 at 13:46
  • \$\begingroup\$ of course, thanks for pointing it out \$\endgroup\$
    – Jannis
    Feb 23, 2021 at 13:53
  • \$\begingroup\$ you can also use TLP opto-isolator (or any opto-isolator). Although, other's answer are fine too. \$\endgroup\$ Feb 23, 2021 at 19:25

2 Answers 2

1
\$\begingroup\$

You have about 270mA total, so a MOSFET would not be a bad idea.

schematic

simulate this circuit – Schematic created using CircuitLab

The MOSFET should be a logic-level N-channel type with low rated Rds(on) at 3.3V or less drive voltage, and rated for 30V or more Vds. If you are running long wires to the LEDs you should pick a higher voltage MOSFET. The AO3400 is in an SOT23 package and has less than 0.05 ohms on-resistance with 3.3V drive.

Here R2 slows the switching a bit while limiting the effects of any remaining ground bounce. R1 makes sure the MOSFET turns off if the input is high-Z or open, which prevents the MOSFET from accidentally turning partially on and destroying itself.

\$\endgroup\$
2
  • \$\begingroup\$ Could I just put the load on the other side, so that ground and load are on one side? And will this behave any different with higher or lower Voltage? \$\endgroup\$
    – Jannis
    Feb 23, 2021 at 18:52
  • \$\begingroup\$ I am emphasizing that the high current return should go directly to the 24V supply return. Which side you drawn the wire on makes no difference, but the ~300mA should not go through the ESP circuit. The grounds must be connected together at some point or another. The circuit will work fine with lower than 24V and / or somewhat higher current. Above 1A or so it would be worth checking a bit more closely, but this is what you asked for. \$\endgroup\$ Feb 23, 2021 at 18:59
0
\$\begingroup\$

Something like this might work...

schematic

simulate this circuit – Schematic created using CircuitLab

The transistor selection is based on a max collector current of 100 mA or so. There are many other possibilities. The R1-R3 values were chosen to give ~20 mA of LED current. Choose R4 so that you get the required amount of base current out of your MCU.

\$\endgroup\$

Your Answer

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

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