element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum LED Driver Circut
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 24 replies
  • Subscribers 653 subscribers
  • Views 3141 views
  • Users 0 members are here
Related

LED Driver Circut

fskrzycki
fskrzycki over 1 year ago

Can you review this circuit layout. Using Rasp pi to drive a high end LED strip. 24v mini 0402 LED.

I am experiencing a power leak on the board i built. I believe i need  resistance after my optocoupler on the Pi. side.

With the high voltage I am looking to protect the pi while still safely operating the strip. 

i have changed 2 things on this board since the picture.  I now have all grounds on ths Zenner Diode side connected to power supply ground and I decreased the Resistor from. 100k to 10k on the advise of Open Ai

image

image

image

  • Sign in to reply
  • Cancel
  • shabaz
    shabaz over 1 year ago

    What's the problem that is being experienced? By power leak, do you mean current is flowing from the 24V supply into the Pi somehow?

    All the connections labeled 0V connect together between themselves, and go to to 0V (i.e. "-" connection) on the power supply. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 1 year ago

    I just saw your other message. Regarding 

    "unfortunately, I still have a leak because they gradually get brighter."

    What happens when the resistor (100k or 10k) is temporarily shorted? Do the LEDs then fully extinguish during the time it is shorted?

    If they extinguish fully during shorting, then the issue is left of the MOSFET. If they do not, then the issue is MOSFET related (either connections or faulty MOSFET).

    If that test determines that the issue is left of the MOSFET, then you could try reducing the 220 ohm resistor to 100 ohm (if you don't have any 100 ohm resistors then you can parallel two 220 ohm resistors, because that equals 110 ohm which is close enough.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • colporteur
    colporteur over 1 year ago in reply to shabaz

    I'm curious as to why the design has the LED strip on with no input from the Pi?

    I would think the strip would be OFF when the device is power-up and there no input from the Pi and are turned ON as the Pi controls them. Maybe I am missing something. I've tried to follow the whole design process that started on another thread and jumped to this for the solution.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • scottiebabe
    scottiebabe over 1 year ago in reply to colporteur

    I won't comment on the quality of that circuit. But the OP does have their circuit wired differently. The opto appears to be driving the gate high instead of an open-collector low. (maybe I am wrong)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 1 year ago in reply to colporteur

    There's another circuit on the other thread, with logic arranged such that the LED strip is off when the Pi is disconnected or is low. However, that circuit wasn't used. Someone suggested adding an optocoupler to the MOSFET. I merely showed how to insert that between the MOSFET, and the simplest way inverts the logic (which I mentioned at the time so that the OP was aware, in case it didn't meet the requirements). 

    From the symptom (if I understood it correctly) there's a chance the MOSFET is faulty (easy to happen with ESD). The troubleshooting step mentioned above should rule that in or out, by forcing the gate temporarily low by shorting the 100k resistor.

    If that test determines that the MOSFET is fine, then there's a chance the optocoupler needs more drive current into its LED, although I'd be surprised if it did - but worth a try, since reducing the 220 ohm resistor to 100 ohm for a test is unlikely to cause an issue.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • fskrzycki
    fskrzycki over 1 year ago in reply to shabaz

    i used this circuit becase the pi will always be connected and enclosed inside a toy i am making. I will be programming the toy to work automatically when plugged in.

    P.S. that pic was my third try. my fourth board looks better. the PCB's i received from Amazon do not prevent all continuity between pins. I had to start using insulation on my tracers.

    I agree the MOSFET is the issue

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 1 year ago in reply to fskrzycki

    It might be worth ordering them from Newark/Farnell or any other big distributor, because some of the other suppliers don't take any ESD precautions when shipping them. If the MOSFETs are good when supplied, then to use them, I usually solder in the gate-source resistor (e.g. the 100k one in the diagram) first, so that the MOSFET is then a lot more protected while assembling the rest of the circuit (or solder in the MOSFET last).

    Also, continually discharging yourself with a wriststrap etc is definitely worth doing if you have access to that. Also, the soldering iron can cause an issue, if it is a USB powered on (they don't have the tip grounded, which ends up with a high enough voltage that can damage MOSFET gates (a non-USB soldering iron is fine).

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • fskrzycki
    fskrzycki over 1 year ago in reply to shabaz

    oh my gosh. I thought i was seeing things when soldering these up. i occasionally would see sparks. i never thought to ground myself while assembling the unit. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • anniel747
    anniel747 over 1 year ago in reply to fskrzycki
    [deleted]
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • strb
    strb over 1 year ago

    Looking at PC817 datasheet it has a minimum current transfer ratio of 50%. From the scheme I see that with 0V on the mosfet gate the collector current of the transistor (PC817output) is about 9mA -> this means that the diode needs 18mA on worst case to be able to handle such output current! With 220Ohm series resistor however you're polarizing it with only 2mA, it has no chance to handle all the output current.

    If you keep your 100k resistor and swap the 1k with 10k resistor the current that the optocoupler has to handle drops to about 1mA and should work (given that all other components are fine and not damaged by ESD as pointed out by others Slight smile )

    Beware that swapping 1k with 10k will slow down turn on transient, but I don't think it will be an issue...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube