element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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
  • About Us
  • 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
Experts, Learning and Guidance
  • Technologies
  • More
Experts, Learning and Guidance
Ask an Expert Forum Help Using WS2811 to drive 12v RGB LED strip
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Experts, Learning and Guidance to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 41 replies
  • Answers 11 answers
  • Subscribers 299 subscribers
  • Views 8812 views
  • Users 0 members are here
  • driver
  • mosfet
  • strip
  • led
  • ws2811
  • rgb
Related
See a helpful answer?

Be sure to click 'more' and select 'suggest as answer'!

If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!

Help Using WS2811 to drive 12v RGB LED strip

dmilton2004
dmilton2004 over 10 years ago

Greetings all,

 

I am creating a lighting project that I want to have a wall display with large (15" x 20") panels and each panel acts as its own "pixel" (controlled by one WS2811).

 

I had purchased 12v RGB LED strips with 30 LEDs per meter. What I want do is control a section of the RGB strip (about 15 LEDs). I have been scouring the web for possible solutions. One avenue I was looking at was using MOSFETs to drive the strip from the PWM outputs from the WS2811. There is an example in the WS2811 datasheet that shows using 3 LEDs per color with 12v. I do know that the WS2811 is a constant current source device. My thought was to use a logic level N-channel MOSFET to drive the LED strip. This is just based upon the research that I have done. What I have not found was any schematic to go from. I am looking at possible 3 MOSFETs per WS2811.

 

Any help and schematics would greatly help!

 

Thanks in advance!

 

Don

  • Sign in to reply
  • Cancel

Top Replies

  • Former Member
    Former Member over 10 years ago +3 suggested
    I was able to make this work by using a simple NOT gate between the WS2811 chip and the mosfet. I believe this works because it is using TTL (transistor based logic). The WS2811 requires some kind of load…
  • Robert Peter Oakes
    Robert Peter Oakes over 10 years ago in reply to michaelkellett +2
    More LEDS in series means less current, thinner wires and a single switch, so 12V = 3-4 LEDS per channel, using a chip like ULN2003 will provide all the drive for a single board probably Using logic levels…
  • dmilton2004
    dmilton2004 over 10 years ago in reply to dragonstyne +2 suggested
    Thanks Steve. I have not tried to trigger the MOSFETs yet, but that was my next plan. I should be able to do that by applying +5v to the Gate and connecting the Source to GND. I should see voltage flow…
Parents
  • dragonstyne
    0 dragonstyne over 10 years ago

    Greetings Don,

     

    How is the project coming along

     

    -Steve

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dmilton2004
    0 dmilton2004 over 10 years ago in reply to dragonstyne

    Hi Steve,

     

    Its going rather slowly. I tried using my test circuit with the WS2811 and did not get anything. I have looked on other forums for any kind of schematic for what they said they used and no luck there. I am attempting to use Fritzing to draw my circuit diagram and I am learning how to create my own parts that are not in the the library.I will post what I have even though it is not working hoping that someone can point out what I may be doing incorrectly. I do not fully understand how the PWM that the WS2811 output differs from the PWM outputs on the Arduino. The post on the Adafruit site explaining how to use 12v RGB LED strips with an Arduino does not work with the WS2811s.

     

    I am not just looking for a quick fix or solution, I want to be able to understand how the circuit works.

     

    Thanks in advance for any and all help. image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 10 years ago in reply to dmilton2004

    Hi Don,

     

    The WS2811 is a constant current sink from what I can tell, which means that if you want it to drive it the MOSFET type circuit earlier in the thread, then something is needed to get the output from the WS2811 to voltage levels suitable to drive the MOSFET.

    The WS2811 datasheet shows a circuit where LEDs are driven from 12V. if the LEDs are replaced with a 620 ohm resistor, then this allows 12/620 = 19mA of current to flow through the resistor, which is close to what the WS2811 is programmed to deliver (I think. I've not used this device before). So, when the LED is supposed to be on (except there is a resistor there now), the voltage at the output of the WS2811 will be close to 0V. When the LED is supposed to be off, the voltage will be high (12V).

    Then you can connect to the MOSFET circuit driving the LEDs.

    The result will be inverted (LEDs on when they should be off), but you could correct for that in software.

     

    Alternatively the WS2811 could be removed and a circuit similar to the Adafruit Arduino one could be used.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 10 years ago in reply to shabaz

    Remind me why your trying to use the WS2811 rather than some more appropriate chip to drive the RGB LED Strip

     

    It seems a lot of work for the gain

     

    A good exercise in design etc so worthwhile for education purposes

     

    Peter

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 10 years ago in reply to Robert Peter Oakes

    Hi Peter,

     

    I agree (Don mentioned he wanted to understand the circuit with the WS2811). I too would just directly drive the strings via MOSFETs as I think you're probably thinking.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 10 years ago in reply to shabaz

    Yup

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dmilton2004
    0 dmilton2004 over 10 years ago in reply to Robert Peter Oakes

    Hi Peter,

     

    One reason is that I already have the chips. I am going to drive 40 pixels. I have the ATtiny85s that I am going to use to program a couple of modes into. I have a small prototype already running and I already have the 12v strips. I do understand that there may be some noise and I have seen a few solutions to counter that. Since I am only doing 40 pixels and the animation is not high speed, I figured that using the WS2811 would work and be cheap. I am doing this for my church's lighted backdrop. Right now it is using 5 100w halogen spot lights with a color gel over them. They get really hot and the gels are slowly burning and fading from the heat. So hear I am designing a new led color backdrop. This project is going to expand as I go. I was inspired by several smaller addressable light display projects and I figured there is always a way to scale up. image

     

    I already have my power supplies, wire, chips and LEDs. I have a plan and now I need to get a solution working. My plan is not carved in stone but I am funding this project on my own and so far the parts I have bought were inexpensive through eBay.

     

    I hope that helps paints a better picture of what I am trying to accomplish.

     

    Thanks and I appreciate the help and expertise.

     

    Don

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • mcb1
    0 mcb1 over 10 years ago in reply to dmilton2004

    Don

    The library to drive Neo Pixels is based on the CPU frequency.

    As I understand its the same internal and either runs at 400 or 800Hz data rate.

     

    Generally the ATtiny85 is running at 8MHz, and therefore the timers are all wrong.

    Forget Me Not :  eLDERmon  Hardware Hacking #2

     

     

    If you download the Digispark they run it at 16.5Mhz and it will work.

    Digispark USB Development Board - Digistump

    click the resource tab.

     

    See this blog of mine where I used NeoPixels and an ATtiny85

    Wireless Challenge .... Beer Tap (the other bit) - 4  Assembly

     

     

    Mark

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dmilton2004
    0 dmilton2004 over 10 years ago in reply to mcb1

    Hi Mark,

     

    I have not had any trouble programming or using an ATtiny85 with NeoPixels using Adafruit's library. Lately I have been using FastLED and it works fantastic. I have used both the NeoPixel and FastLED library to control 100 NeoPixels very well. In learning to program those little gems I learned that you have to program the boot loader first to set the fuses. After that programming always goes great!

     

    With this project I am only using 40 with this project so the 8MHz speed does not seem to be a  problem.

     

    If I expand the project, I may look into adding an external crystal to go to 20MHz. For right now, the 8K program space is my only limitation. I suppose if it was necessary, I could move to ATMega328. For now I am struggling to get these LED strips to work with the WS2811s. LOL

     

    Don

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dragonstyne
    0 dragonstyne over 10 years ago in reply to dmilton2004

    I currently run 128 pixels with an Arduino Uno with 4 I/O points. They are ran as a single string and I haven't experienced timing issues, yet. But, I can't leave well enough alone. The ones I use do not require a clock connection like the WS2801 and WS2811's.

     

    I also run 50 NeoPixel style LED's I use FastLED with them.

     

    I believe the issue Don you are having is the size of your pixels. Are you planning to drive RGB LED's or are you using discrete LED's?

     

    -Steve

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • dragonstyne
    0 dragonstyne over 10 years ago in reply to dmilton2004

    I currently run 128 pixels with an Arduino Uno with 4 I/O points. They are ran as a single string and I haven't experienced timing issues, yet. But, I can't leave well enough alone. The ones I use do not require a clock connection like the WS2801 and WS2811's.

     

    I also run 50 NeoPixel style LED's I use FastLED with them.

     

    I believe the issue Don you are having is the size of your pixels. Are you planning to drive RGB LED's or are you using discrete LED's?

     

    -Steve

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • dmilton2004
    0 dmilton2004 over 10 years ago in reply to dragonstyne

    I am going to use RGB LEDs. I already have 30 LEDs per meter 12v strips (analog type). The strip has 10 sections per meter and each section has 3 5050 SMD RGB LEDs with a chip resistor per color (150ohm for Green and Blue, and 330ohm for Red). rgb-strip-with-mosfet-drivers.png?w=620&h=371

     

    This diagram is from here. After seeing this, I figured that I can do the same thing from the PWM outputs from the WS2811. And since the MOSFETs are allowing the current to come from the 12v supply, I could use a 10 sections from a strip (30 LEDs) which will draw 1800mA at full brightness. What I am not sure of is that the MOSFETs in this diagram appear to be depletion type so they are acting in "normally closed" mode. The blog is not open for questions so I cannot ask if that was an error in the diagram. The spec sheet for the part labeled does say that it is an "enhanced" type rated at 100v but only 750mA so it is acting in "normally open" mode (all from this wonderful site that has a great tutorial on how MOSFETs work).

     

    So based upon this, it seems very plausible that this should work. And I have seen these 24v large color pixels which uses WS2811 to drive 12 5050 SMD RGB LEDs.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • dragonstyne
    0 dragonstyne over 10 years ago in reply to dmilton2004

    Test the circuits individually. And troubleshoot the interface issues.

     

    Good luck Don,

     

    We will be here if yoy need us.

     

    -Steve

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 10 years ago in reply to dragonstyne

    OK, all understood, we have had our chance at recommending alternatives and understand your desired approach and why, now to start helping you to succeed with your chosen approach

     

    So at this point in your design, what are the issues your currently experiencing ?

     

    Please of course provide code examples, pictures etc, it will all help

     

    Thanks

     

    Peter

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dmilton2004
    0 dmilton2004 over 10 years ago in reply to Robert Peter Oakes

    Happy Holiday all!

     

    Sorry for not posting any updates but the holidays are here and i am currently working on some projects. I will be back on it after i am done with these projects.

     

    Merry Christmas everyone and a Happy New Year!

     

    Don

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dragonstyne
    0 dragonstyne over 10 years ago in reply to dmilton2004

    Merry Christmas And Happy New Year guys!

     

    -Steve

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • 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