Neopixel Status LED's

Hello everyone, I was wondering if anyone knows whether I can add two seperate neopixel strips to my raspberry pi and have them change colour seperate based on the status of the printer? For example one strips around the frame of my printer would change colour (not sure what colour yet) based on the temp of the nozzle until it has reached the target temperature and the second strip will change colour based on the temperature of the bed. Also once the print has started the first strip will change to white to illuminate the print and the second strip will change to a colour to show the progress of print. Maybe the second strip can change colour at like 25% then 50% and so on. I'm not sure if this is possible could anybody let me know if it is and how I can do it please.
Thanks.

Neopixels use any of the listed GPIO pins but it's important to know that the data lines on the Pi are 3.3V and the chip on the Neopixels expects 5V logic.

So typically, you'd need to buy/use a logic level converter to go from 3.3V to 5V. The logic level they've suggested at Adafruit can drive four different circuits. My own cheaper solution is to use a 7404 with some external jumpers to drive two circuits.

Read through the Adafruit tutorial because they talk about adding a 470-ohm resistor which is important. They also indicate that you need to power the Neopixels separately and to share a ground with your Pi. See the photo on that last link where I've got that beefy power supply which is dedicated to driving the 60-LED ring. This is the same thing that's powering that huge 3D printer's status bar below the door.

For that one, though, I upgraded by adding a PyBoard that's connected to the Pi. The PyBoard is directly driving the logic line of the Neopixels (and it does other things). So I was able to drop the logic level conversion for that.

For this project, there's also a Neopixel strip inside the build area that illuminates the part for the internal camera. The PyBoard in my case can address two separate strips like this. There's micro python code that runs on the PyBoard and no, I can't share it with you since someone has paid for all that.

I do computerized Christmas lighting as well as 3D-printing. There are a number of arduino-based solutions as well as wifi enabled (Wemo D1) solutions that might be useful. Although in the lighting community we are usually talking about thousands of pixels, there are things like https://espartstick.ecwid.com/ that might be just the ticket!

Great product (Micro USB powered SD-Card/Wifi Costume Edition) but I'm LOL at the 32GB card.

That's because us lighting fanatics load up complex sequences that can be quite large! :grin: (and probably so they don't have to support the extended/enhanced SD spec that is required to support larger ones.)

Oh okay I will look into getting one, in the mean time do you know if it can be done in marlin and controlling it from the main board?

Client with big wallet: "Can it be done in Marlin?"
Contract programmer: "Yes. Yes it can."

:laugh:

The typical Arduino board has a small RAM footprint. The typical Marlin setup barely fits within that. Marlin is written in C (or C++) as I recall so in theory, new gcodes could be introduced to be a placeholder for this new code. Since it's an Arduino board it would already have the correct logic level. One would have to research to make sure that a data pin (or pair) is still available for this.

I can imagine telling a client that I'd work on this for them for a mere... $20,000 with no guarantee of success.

So I'm guessing that the cost for a PyBoard is looking a lot better now to you.

:grinning: Of course it can. "It is simply a matter of programming!" @OutsourcedGuru has a good answer. Building somthing with a PyBoard is one way. Using actions in Octoprint is another way. 32bit boards have the space and available processing to do the LEDS, but will require some low-level firmware work. Some SKR boards actually have the pins for WS2811/2812 support. Native Marlin 2.0.x and higher have some limited support for addressable LEDS. See https://marlinfw.org/docs/gcode/M150.html for some information.

1 Like