led stripe mosfet

Control single-light LED strip 24v with Raspberry pi and mosfet

Ask QuestionAsked yesterdayActive todayViewed 25 times1

I’m trying to make my LED strip fade-in and fade-out by using Raspberry-pi 4, unfortunately for me, I am not an electronic expert. Every tutorial I saw so far was for RGB LED strips and I have a single-color(3000K) LED strip with just 2 pins (+ & -).
Im have:

  1. LRS-50-24 datasheet
  2. 30N06L datasheet
  3. 4m LED strip single color (3000K) 24V
  4. Raspberry Pi 4 

My question is how to connect the MOSFET and the LRS-50-24 to the PI in order to control the fade-in/out by GPIO python code?

Appreciate any helpledShareEditFollowClose 1Flagasked yesterdayOmri11122 bronze badges New contributor

  • Please let us know which led strip you are playing with: (1) Aliexpress 24V 4000k Led Strip: aliexpress.com/cheap/cheap-24v-4000k-led-strip.html – tlfong01 yesterday   
  • 1@tlfong01 I bought it at a local store, I don’t have much information about it except its 24V, 10Watt per meter and 3000K – Omri 17 hours ago 
  • 1@tlfong01 I dont see the wiring diagram in that video, could you check the link? – Omri 16 hours ago
  • (1) Ha, if you are sure it is 24V, then you can take a small risk and test it with your 24V high class power supply, which should have short circuit protection. (2) You just connect 24V directly to the LED stripe and see if it lights up (I guess you might have tested it this way already. :)).(2) Your power MOSFET seems N-channel, so you should use it as a “Low side switch”, see this wiring diagram: i.imgur.com/v5KszyF.jpg. (3) Please let me know you know more or less I am talking about. – tlfong01 16 hours ago   
  • @Omn, sorry, I gave you the wrong link. I have edited my post. Please try again. – tlfong01 16 hours ago   
  • 1(4) Your power mosfet’s “Gate to Source Threshold” voltage Vgs(th) is (3V3 ~ 5V) logic level trigger. So you can use a jumper wire to connect DC voltage, say from a battery 3V to 6V to the gate terminal of the mosfet, which should switch on and light up your LED stripe. WARNING: Me just a friendly hobbyist, No guarantee no nothing wouldn’t blow up or melt down. Good luck. Cheers. – tlfong01 16 hours ago    
  • 2@tlfong01 the gate-source threshold voltage is too high for a 3.3V logic level. Vgs,th should not be more than half the logic voltage at most, especially if you switch high currents. So my judgement is: the mosfet is not suitable and it will become hot and may fail. – Sim Son 16 hours ago 
  • 1@SimSon what kind of mosfet do you suggest to use? – Omri 16 hours ago
  • 1@Simson, I agree the OP’s mosfet is not the best choice. I used to use IRL540N and found it OK for 3V2 logical level input, for “small” currents < 3A. An alternative is BSS240N. Imgur does not allow me to upload rubbish too frequently. So uploading BSS240N as an answer. – tlfong01 16 hours ago   
  • 1As I said, I suggest to use a MOSFET with a Vgs,th of no more than half the logic level voltage at max. – Sim Son 15 hours ago
  • 1@SimSon good news. I replaced the MOSFET with IRLB8721 and it’s working. BUT the power of the LED lights is very weak… why is that? reminder – it is 24V LED strip with 10watt per meter – Omri 13 hours ago
  • 1Can you messure the voltage between drain and source? In case the mosfet is fully on it should be in the range of millivolts. – Sim Son 12 hours ago
  • 1@SimSon when led turned off its 8.2V and when turned on (full bright) its 4.72V – Omri 12 hours ago
  • 2I see, the IRLB8721 appears to be unsuitable, too. Its Vgs,th is 2.35V, but you need a mosfet with no more than 1.5V. Ideally, you want to measure 24V when the mosfet is off and 0V when it is on. – Sim Son 11 hours ago 
  • 1@SimSon what other features I should look up for when searching for the right mosfet? other than Vgs,th <= 1.5V. Any recommendations on how to search for it? – Omri 11 hours ago
  • 1Well, voltage and current ratings are trivial. Next priority is Vgs,th to be as low as possible. When switching currents of more than 1A, the last thing is an on-resistance Rds,on as low as possible, as this will determine the final voltage drop (U=RI) and power dissipation (P=RI²) in the mosfet. But the most critical feature when controlling mosfets with a Pi really is Vgs,th. Search for “Logic Level MOSFETS”. – Sim Son 11 hours ago
  • 1@SimSon I tried looking for one here digikey.com/en/products/filter/discrete-semiconductor-products/… but none have all features you recommended. I will really appreciate if you could help me find one or two which fits – Omri 11 hours ago
  • Let us continue this discussion in chat. – Sim Son 10 hours ago

Add a comment

1 Answer


Non Answer

(1) This is not an answer, but just a temporary place to upload pictures. So this non answer would be deleted later.

The OP’s MOSFET can be replaced by the following.


(2) The OP’s mosfet 30N06L has a similar Vgs(th) spec to my favourite IRL540N. So I guess there is big chance it can happily entertain the OP’s low current LED stripe.


ShareEditDeleteFlagedited 15 hours agoanswered 16 hours agotlfong013,50633 gold badges77 silver badges2222 bronze badgesAdd a comment

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.