0

RGBW's On a 3D Printer
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

RGBW's On a 3D Printer

by bustedparts on Mon Jun 19, 2017 1:35 pm

I am working on a project to install RGBW's on my FT5 (type of 3d Printer) and it runs a MKS Gen 1.4 board. It says that it can control the RGBW's or RGB leds but it would need a mosfet driven circuit as the board doesn't have enough power . I have been trying to find some kind or a tutorial or even a wiring diagram that I can go off of to make this. All I am finding is for RGB's and not RGBW's. I am very new to building circuits and I have a bit of understanding on how it is supposed to work. And i was planing on building it on a breadboard to verify proper operation before I install it. Next thing I am running into is I am not sure If I should just run it off of a separate controller and not use the 3d printers processor as I dont want to chance cooking it. What arduino should I use to drive 2 meters of rgbw? Now i am not asking any of you nice people to engineer me a led circuit. If i could be pointed to a guide or a youtube tutorial that would be fantastic. I am looking to build it myself as this is how I learn! Thanks again for the great site!

bustedparts
 
Posts: 13
Joined: Thu Apr 13, 2017 4:16 pm

Re: RGBW's On a 3D Printer

by adafruit_support_bill on Mon Jun 19, 2017 2:07 pm

The R, G, B and W channels are controlled individually, so the circuit for an RGBW is the same as for an RGB - but with 4 channels instead of 3. See this guide for details: https://learn.adafruit.com/rgb-led-strips/usage

Most Arduinos or compatibles should be able to drive it. You just need something with at least 4 PWM capable pins.
Image

adafruit_support_bill
 
Posts: 62183
Joined: Sat Feb 07, 2009 10:11 am

Re: RGBW's On a 3D Printer

by bustedparts on Mon Jun 19, 2017 3:04 pm

Thank you soo much. This is exactly what i was looking for.

bustedparts
 
Posts: 13
Joined: Thu Apr 13, 2017 4:16 pm

Re: RGBW's On a 3D Printer

by bustedparts on Wed Jun 21, 2017 8:15 pm

Alright. I went and bought 5 n type mosfets and I went to breadboard it up to test it before I install it and I am confused and I need some confirmation before I fry my leds. The ones that are in the picture have separate channels for the colors. My strips have a single data line. So the output from the adrino to the mosfet then to the data line for each color? Then power and ground. Correct?

bustedparts
 
Posts: 13
Joined: Thu Apr 13, 2017 4:16 pm

Re: RGBW's On a 3D Printer

by adafruit_support_bill on Wed Jun 21, 2017 8:22 pm

What kind of LEDs did you buy?

Analog LED strips will have one pin for power and one for each channel: R, G and B. You will need one MOSFET per channel to drive them.

If there is only one data pin, then you probably purchased a digital LED strip. These have individual drivers per pixel. They do not require MOSFETs. They are controlled via a digital signal from your controller. You will need to know what type of pixels they are so that you can use the correct library to control them.

adafruit_support_bill
 
Posts: 62183
Joined: Sat Feb 07, 2009 10:11 am

Re: RGBW's On a 3D Printer

by bustedparts on Wed Jun 21, 2017 8:36 pm

They are the 5050 RGBW LED. So From what I am finding now there is no mosfets needed.

bustedparts
 
Posts: 13
Joined: Thu Apr 13, 2017 4:16 pm

Re: RGBW's On a 3D Printer

by adafruit_support_bill on Thu Jun 22, 2017 5:37 am

They are the 5050 RGBW LED

That doesn't tell us much. "5050" just means that the chips are 5mm x 5mm square. It doesn't tell us what kind of chips they are.

There are analog 5050 RGBW LEDs and digital 5050 RGBW LEDs. The digital RGBW 5050 LEDs could be LPD8806, WS2812A, WS2812B, APA102 or possibly some other type of led controller.

adafruit_support_bill
 
Posts: 62183
Joined: Sat Feb 07, 2009 10:11 am

Re: RGBW's On a 3D Printer

by bustedparts on Thu Jun 22, 2017 6:08 pm

Sorry , I dont know what all the Led lingo is yet. I do believe that this is the chips number. SK6812. I think that they are updated WS2812B

bustedparts
 
Posts: 13
Joined: Thu Apr 13, 2017 4:16 pm

Re: RGBW's On a 3D Printer

by adafruit_support_bill on Thu Jun 22, 2017 6:16 pm

The SK6812 is a clone of the WS2812B which is a digital led with a one-wire communication protocol. In theory, you could control those with your MKS Gen 1.4 using the Neopixel library. But unless someone has already implemented support for that, you'd have to do some hacking in your firmware.

If your firmware already has support for analog RGBW strips, you would be better off just getting an analog RGBW strip.
https://www.adafruit.com/product/2440

adafruit_support_bill
 
Posts: 62183
Joined: Sat Feb 07, 2009 10:11 am

Re: RGBW's On a 3D Printer

by bustedparts on Thu Jun 22, 2017 6:27 pm

I think it is calling out support for analog support. I haven't looked at the code but it states that it requires mosfets to drive then . So I will assume that that what the code is for . Maybe if I had a example of digital code and and the code for the analog maybe i could hack it. That is why I am doing this. Learning.!

bustedparts
 
Posts: 13
Joined: Thu Apr 13, 2017 4:16 pm

Re: RGBW's On a 3D Printer

by adafruit_support_bill on Thu Jun 22, 2017 6:41 pm

Analog strips are pretty simple. You just use analogWrite() calls to each of the RGBW channels: https://learn.adafruit.com/rgb-led-strips/example-code

Digital strips have a lot more capabilities. But they require that you use a library and are a little more involved to set up: https://learn.adafruit.com/adafruit-neo ... no-library

There would also be potential issue writing to the strip while the printer was in operation. The WS2812 protocol is very time-sensitive and might interfere with your stepper motor timing.

adafruit_support_bill
 
Posts: 62183
Joined: Sat Feb 07, 2009 10:11 am

Re: RGBW's On a 3D Printer

by bustedparts on Thu Jun 22, 2017 6:57 pm

So , yeah. I looked through the firmware and all the callouts for the leds where simple high and low for the pins. I am very new at coding and electronics and I do not want to risk blowing up my board due to a simple mistake that a seasoned expert would have caught. . Now I do have a second option as i have a new Raspberry pi that I was going to use as a octoprint setup. Would it be possible to run them off of that? I do have a pi cobbler collecting dust.

bustedparts
 
Posts: 13
Joined: Thu Apr 13, 2017 4:16 pm

Re: RGBW's On a 3D Printer

by adafruit_support_bill on Thu Jun 22, 2017 7:15 pm

Because the WS2812 pixel communication timing is so critical, a board like the Pi is not the best choice for them. Arduinos and compatibles are the preferred way to go.

There is a library for the Pi, but it has not been proven to work on all models of the Pi. https://learn.adafruit.com/neopixels-on ... i/overview

adafruit_support_bill
 
Posts: 62183
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.