Hello everyone to the first post of my new web site. I was not planning to document it when I built this project, so the pics are limited and I don’t have a step by step video. I might be doing something like that in the future for other projects.
Also, let me apologize for the basic WordPress site. I am not much of a blogger, vlogger, graphic artist, or anything so don’t expect much in the way of pretty graphics but the basic wp package is easy and functional – which is the important part of the deal.
I am just getting into Raspberry Pi, Arduino, 3D Printing, and other diy/maker projects so I wanted to share my experiences with others and hopefully hear feedback, get help and learn more as I go along. This first post is just a quick and easy update to my first (and, for now, only) 3D printer – a CR10s Pro from Creality – which I picked up several weeks ago now.
Some of the first things I did when I go the printer were to buy a raspi for OctoPrint and swap out the fans. There are plenty of how to tutorials for all of those, so that’s not what I am going to discuss. When I started trying to use the webcam with octoprint, I found that I had lighting issues. Naturally, I decided to add LEDs to the printer rather than the cheaper, easier option of getting a lamp 🙂 Wouldn’t be any fun otherwise.
One of the reasons I went with the NeoPixel LED strip was because as I was setting the PIDs in Marlin, I saw there was existing code supporting them. This would allow me to control the lights using standard gcode as well as get rid of the requirement for another power source since I might as well patch into the printer’s psu if I was going to be running wires into the control box anyway.
- NeoPixel Digital RGB LED Strip – Black 60 LED – BLACK
- LM2596 Buck Converter – Amazon link
- 470 Ω resistor
- 1000 µF capacitor
- CR-10s Pro LED Bar – Thingiverse link
These lights came in a protective case, so you just cut it off. I also de-soldered the existing connectors since I didn’t want to use the four wires it came with. Then you just cut the strip to length and secure it to the light bar using double sided tape. (I used AJ Sign World Best 1″ Ultra-Thin Permanent Double-Sided Tape from amazon which worked great) You can see my atrocious soldering job here:
At this point, I give a great shout out to the writers of Marlin for their documentation and the site https://www.tweaking4all.com/for the article here. I was about to just plug this into the control board – I mean it gives you 5V, right? Well looks like running all those LEDs might be just too much of a strain so I didn’t try to connect it directly and built this instead:
This is about as simple a board as can be. I had the post terminal laying around, added the LM2596 buck converter, a capacitor (as recommended at Adafruit here) and some standard dupont angle pins. ** be careful and wear eye protection when you clip off the unused portions of the pcb – pieces go flying! One part bounced off two walls and the ceiling.
I hooked up the buck converter to my bench psu and a dc fan to set the output voltage and confirm it under load.
To hook up the power supply, I used the wire I had on hand with standard crimp terminals that have been in my toolbox for decades and ran it to the terminal posts I added to the buck converter. This will allow me to run the wires more easily as well as replace the buck converter if it ever dies.
I ran the data and ground from the board to the converter. I could have just pulled the signal lead from here and ran it directly to the LED strip, but I would rather have all the input (data and power) connecting in one place.
Some links you may find helpful:
- gcode for setting the RGB color and brightness – http://marlinfw.org/docs/gcode/M150.html
- LED settings in Marlin – https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/Marlin/Configuration.h starting at line 2110. For this, it would be:
- #define NEOPIXEL_LED
- #define NEOPIXEL_PIN 12
- #define NEOPIXEL_PIXELS 24
- #define NEOPIXEL_TYPE NEO_GRB
The LEDs are a *bit* bright. To help combat the glare in octoprint, I reduced the brightness in the start script with the line:
M150 B255 P25 R255 U255
And I don’t want these to actually be on all the time, so I just turn them off in the ending script with:
I know this is kind of sparse. Like I said to begin with, I was not planning to write it up at first so I didn’t take notes or document the steps at the time. If anyone has any questions or wants any clarifications, please just ask and I would be happy to help.