Hey guys, I was looking into adding LED’s to my MPCNC and found this code in the Marlin Arduino config.h file:
I don’t remember off the top of my head which pins I can check tomorrow if you don’t figure it out by then but powering the LEDS from your board is not a good idea, I would always use a mosfet. Before you power it up make sure it can handle the load. I havn’t done it with a rambo but with the ramps a mosfet was 100% required when I did it.
A normal pin can maybe sink 40mA, with a bunch of caveats. 20mA is more like it, and that’s about 1 LED. So Ryan’s advice is sound. I have these IC chips that are great for led driving, but I can’t remember the number… Much easier than mosfets. Let me know if you want and I can look when I get home. Just know that it’s a solved problem, I guess…
As for the pinouts, I doubt the pins 34, 35, 43 are right for the Rambo, unless they are in the pins_rambo.h. You really just need to set those to three pins that you know the output for and support pwm.
I have strip LED’s in all the devices, but I’ve found I prefer them to be powered and switched separately. I’ve run them so they were automatic, but it wasn’t fun having them on all the time when the printer was going. I switched them from a web page which was irritating to use. Finally, I’ve recently had them just on a toggle switch and that’s seemed to be reasonable for my use… I found I only cared to have them on when I was looking at the machine and the toggle switch was perfect.
I have octoprint switching my lights on when I print (for good time lapses):
But I’m not sure that’s what Alec was looking for.
I think my first youtube video was having an led “breathe” (fade on a sine curve) with increasing speed as the hot end came to temp then go steady or turn off as it became print ready. Later we did the whole color changing to temp thing and white while printing so we could see if the first layer was going down well. This was before autolevel was around, before all robos had heated beds and were on drawer slides instead of linear rails I think. We were so stoked to make it happen, now it is baked in, pretty cool I should look into it again.