Introduction: OctoPrint Webcam Bracket for Creality CR-10
Six months ago, I got the Creality CR-10 3D Printer, the largest of my three printers. After having worked with it for these many months and printing parts that took as long as 50 hours, I was comfortable with its mannerisms. It was now time to move it downstairs into the garage.
With yet another 50 hour 3D printing project coming up, I set up OctoPrint for the purpose of managing the printer remotely. As part of this setup I needed to on board a Raspberry Pi webcam so that the monitoring would become easy especially for large, multi-day prints.
A couple of years ago, I debuted my first IBLE on setting up a Raspberry Pi Webcam. As I had the 3D printer down in the garage, I decided to use this very Webcam to primarily monitor my 3D printer. And when not printing, the Webcam would keep an eye on another area of my garage.
In this IBLE we will walk through how I designed, printed and mounted a Webcam Bracket for the Creality CR-10 that would help me in achieving these two goals.
Step 1: Things You Need
The design of my CR-10 Webcam bracket makes the Raspberry Pi case as integral part of the mounting mechanism. I worked the Pi case that came with a Raspberry Pi 3 Starter kit into the design. Therefore, this bracket will work should you prefer to go with the same kit.
With that, here's a list of parts required for this project:
- Vilros Raspberry Pi 3 Kit with Clear Case (Amazon)
- Waveshare Raspberry Pi Camera (F) Night Vision Camera (Amazon)
- Samsung EVO 32GB Class 10 Micro SDHC Card with Adapter MB-MP32DA/AM (Amazon)
- The larger the SD Card, the better as additional space will be required to hold all the STL and GCODE files
- KFD 5V Universal Adapter (Amazon)
- The Webcam used in this project requires at least 3 amps - therefore don't skimp on a good power supply!
- M3x5mm(L)-5mm(OD) Metric Threaded Brass Knurl Round Insert Nuts (Amazon)
- M3 x 10mm Phillips Drive Pan Washer Head Machine Screw(Amazon)
- 3D Printing filament of your choice - I used Peak Green PLA from eSun along with some left over Black PLA from Printrbot
- A 3D printer of your choice
You can use Raspberry Pi version 2 instead of version 3. But the Pi 3 has on board Wireless and does not require an additional dongle like this one to enable WiFi access. Besides, a WiFi dongle will take up a USB port, which is not a great idea as these USB ports can be put to better use for something else.
Step 2: Prerequisites - Set Up OctoPrint Server and Webcam
The Raspberry Pi 3 was already set up to run OctoPi. The Webcam was plugged in and confirmed to be enabled and working.
I flashed the latest Vanilla version of the OctoPi downloadable from the OctoPi website . In my case this is version v0.14. The instructions to flash this operating system on the SD card are available on the OctoPi site. One of the installation steps will describe how to configure OctoPi to connect to your home WiFi.
The Webcam set up is pretty straight forward and should work with OctoPi without any issues. Check out my other IBLE for more details on the Webcam setup.
Once OctoPi was up and running, I plugged in the Raspberry Pi to the Creality CR-10 (with the USB cable that came with the printer) and confirmed that I was able to connect to the Printer.
Finally, I created a new Printer profile for the CR-10 in the OctoPi Web Interface and set that as my default printer profile.
If not already done, connect the Raspberry Pi to a monitor and keyboard and perform the following initial set up using the raspi-config configuration tool:
- Enable the Webcam interface - this is required for the Webcam to monitor the Printer via the OctoPrint Web Interface
- Enable SSH - OctoPi by default does not come with a desktop User interface and you will need SSH to remotely connect to the Pi over WiFi
- When connecting to the Printer via the OctoPi Web Inteface, make sure that you explicitly select the Serial Port instead of leaving it at the default AUTO setting.
- Similarly, when selecting Baudrate, start with the lower value of 115200 - using a very high Baudrate value may result in connection failure
Step 3: Design Considerations
As always, I came up with the following set of guidelines that would allow of simplicity and flexibility throughout the design and fabrication process:
- The bracket has to be made up of smaller individual parts instead of having one large, monolithic mounting bracket
- The bracket must be mountable on any corner of the CR-10 printer frame, and also on the horizontal member of of the vertical Z-Axis frame
- The bracket must be mountable using the two extra sets of Tee nuts and bolts that came with the CR-10 printer
- The Webcam mount must be adjustable in the horizontal plane and in the vertical plane
- The bracket must incorporate mounting for the Raspberry Pi and not just the Webcam
- Where screws are used to attach two parts together, the screws should not be driven into bare plastic
- The Pi must be mounted without obstructing access to the USB Ports, the GPIO Pins and the HDMI port
- The Pi must be mounted after being locked in a case - It's never a good idea to leave an electronic board unprotected and unattended!
- It should be possible for me to open one half of the Pi case even when the Webcam is mounted
- Finally, I should be able to detach the the entire Pi case along with the Webcam and leave the bracket behind on the CR-10
I consider the last 4 points to be the most important criteria because I don't believe in locking my Pis down for a singular purpose.
Case in point, with design criteria #8 above, I can still use this Pi to install additional software such as Python and program the GPIO pins and extend the capabilities of the Pi
Step 4: Webcam Attributable Design Considerations
The Waveshare Webcam used in this project is highly versatile and durable for the following reasons:
- It has excellent night vision which means you don't have to keep lights on around the printer and/or the garage to effectively monitor your targets
- It has been running round the clock for better part of the (almost) two years since I first bought it
- It has worked seamlessly with the Raspberry Pi 2 in the past, and switching over to Raspberry Pi 3 was an equally seamless experience
However, the Webcam has some nagging issues which get in the way of user friendliness in other departments such as:
The size and shape
- In addition to it's small size, the camera has very little to no real estate that could be used to attach a mounting bracket, except the little area below the lens where the ribbon attaches to the main camera board.
- There are designs on Thingiverse that have managed to tackle the issue of mounting
- Unfortunately, some designs involve working with very small screws and nuts that I'm not a very huge fan of
The mounting hardware
At first sight, the 4 tiny screws and nuts appear to be simply for attaching the 2 Infrared guns to the central camera unit. But they do more than just that by electronically connecting the IR guns to the camera.
I realized this when my camera abruptly stopped working! And it so happened that one of the 4 screws had come loose causing the camera to lose connection with the Raspberry Pi!
Therefore, I had to come up with a simpler and functional design to achieve the following:
- Avoid loosening and tightening the 4 on board screws and nuts for the purposes of mounting
- Quickly and effectively mount/dismount the camera from it's mounting perch without the use of tiny wrenches and screw drivers
- Have clear access to adjust the camera position in the vertical and horizontal plane without having to physically dismounting the camera from it's perch
The second visual indicates the above considerations along side the actual picture that shows the camera in the mounted position. With this design, I'm able to mount the camera snugly and dismount it quickly when needed because it uses simple friction or push fit to stay atop the perch.
Step 5: Swiveling the Camera Around
The swivel bracket that adjusts the horizontal position of the Webcam has to be attached to two parts. The part at the top is the Webcam perch and the one at the bottom is the bracket for the Raspberry Pi case.
The picture shows the 3D printed bracket alongside the design, ready to be assembled.
This is one of the only 2 parts that required additional processing after 3D printing in the entire assembly, and that is to insert the M3 threaded inserts. These inserts are 5 mm long and therefore the corresponding sections of the swivel bracket have their depth set to at least 5 mm in depth.
In addition, the threaded insert needs enough plastic to bite into once it's infused into the part. Therefore, the diameter of the hole it's being inserted into has to be set to less than the outer diameter of the insert which is 5 mm.
In the design, the diameter of the hole was set at 5 mm, but as expected, my printer printed out the hole at 4.23 mm. Which means a lot of plastic would be displaced!
Infusing Brass Metal Inserts into the Printed part
The process to infuse the Brass inserts is pretty simple, but can get off the rails if not done correctly. The method involves using a basic soldering iron to heat up the Brass insert and gently force the hot insert into the part by melting away and displacing the plastic.
Follow these steps to get it done right without destroying the part like I did by applying too much heat:
- If possible, clamp the part down - smaller parts can get too hot and may burn your fingers!
- Use a soldering iron with a very narrow tip - this helps greatly in holding the threaded insert in position over the hole when applying the heat and also gives you a greater degree of control when pushing the insert squarely down into the part
- Do not apply prolonged heat - Brass will get real hot real fast and will warp the plastic!
- Instead, apply the first round of heat until you feel the insert sinking into the part and then move the iron away and allow the insert to settle for a few seconds inside the plastic
- Inspect to make sure that the insert is aligned with the hole and if not, position the hot iron into the insert until it heats up the plastic again and correct the position of the insert as required
- Continue applying heat intermittently and gently pushing the insert down into the part - do not apply too much pressure as it can cause the part to warp quite easily!
- In case of open-ended holes, the excess plastic displaced by the Brass insert will flow out the opposite end - allow the part to cool down before cutting away the excess plastic out
If done correctly, the inserts should be squarely infused into the part
Unlike open ended or through holes, blind holes do not have a passage for the plastic to be displaced when a Brass insert is infused into the plastic. Therefore, the blind hole has to be deeper than the height of the insert in order to accommodate the plastic displaced.
Example: In case of an insert that is 5 mm long, the blind hole may have to be set to 7.5 mm in depth.
Another option is to set the diameter of the hole as closely as possible to the outer diameter of the Brass insert. This way, a minimum amount of plastic is displaced into the blind hole.
Step 6: The Final Assembly
The rest of the parts are relatively simpler in design and do not warrant a detailed discussion. Therefore, we will skip hop ahead to the final assembly.
- The design graphic shows how all of the parts go together followed by a few pictures of the assembly process.
- The large main bracket in Bright Green attaches to the CR-10 frame using the extra pair of Tee nuts and bolts that came with the CR-10 printer kit
- This bracket has a simple ladder design in order to route the cables through it if needed
- The Raspberry Pi case attaches to two of it's brackets using a couple of Nylon screws and nuts that I had lying around in my parts bin
- One of the Raspberry Pi brackets has a threaded insert on to which the horizontal swivel bracket holding the Webcam is attached using an M3 x10 mm screw
- The entire Raspberry Pi case with the Webcam attached is mounted on the large main bracket in a similar fashion - an M3 screw fastened into a Brass insert inside the 3D printed bracket
Connecting the Webcam to the Raspberry Pi
The Pi case attaches to it's mounting bracket on just one half of the clam shell case. This leaves the other half to be opened to run the Webcam ribbon through the slot and attach it to the Pi board.
As described in the previous steps the Webcam brackets allow for enough clearance to run the ribbon down to the Pi board and also provide enough flex to adjust the Webcam position in the horizontal and vertical planes.
Step 7: The Webcam in Action
The pictures shows the Webcam in its final assembled position and in action.
- When the webcam is actively monitoring a 3D print it's swiveled inboard pointing to the 3D printer bed
- The Printers progress can be monitored remotely via the OctoPrint Web interface from anywhere in my house
- When the printer is not in use, the Webcam is swiveled outboard towards the garage area and it serves as a constant monitor on my car parked in the garage
- Going back to my very first IBLE, this was the original purpose of the Webcam that has been partially met in this project
- The next few pictures illustrate the fact that the Raspberry Pi has it's SD card slot, the GPIO Pin array, the HDMI Ports and the USB ports easily accessible for other purposes thus making the Pi much more usable than simply being an OctoPi Print Server
As of writing this, I have successfully printed and monitored a 3D print successfully using this Webcam.And for the past few days the feed from the Idle webcam helps me keep an eye on my car in the garage.
The STL files for the components have been attached.
Thanks for reading my IBLE and happy making!
4 years ago
I have copied the OctoPrint image on the SD Card. How does one resize the SD Card disk image so as to access the rest of the 32GB ?
Reply 4 years ago
There is no need to. If you go through the documentation on the Octoprint page, it states that recent versions of Octoprint do this automatically.
Hope this helps
Tip 4 years ago on Step 5
As member skelectronics has described and demonstrated in the comments section below, you can use M3 nuts in place of the Brass inserts and I think it's a great idea!
4 years ago
Thank you so much for this! It fit my regular Pi camera with no adjustments, and printed perfectly at 0.2mm.
Instead of the brass insert nuts I used m3 flat nuts and heated them up using a lighter and then pushed them into the holes in the print.
Here are some photos of what it turned out like:
Reply 4 years ago
Oh, and if you haven't yet put this on thingiverse, I think it would be great if you did.
Reply 4 years ago
And here it is!
Reply 4 years ago
Good idea Will do!
Reply 4 years ago
This is fantastic! It looks pristine and better than what I have. It means i have to print a new one! Congrats on an awesome print and making it look great!
5 years ago
i am using a raspberry pi 0 and a cr10s4
so i have it all connected up i am using the blue cable from the 3d printer and using a usb hub this all works because the printer's screen stays on even when i turn the printer off but as you can see from the picture i am getting this error what shall i do?
Reply 4 years ago
Can you please add this to the "I Made it"? Would truly help my work
Reply 5 years ago
In my experience, I would say that the CR-10 does not respond to an OFF command from the server. However, other functions such as FAN ON/OFF and moving the axes and extruder work fine. My guess is that when you do a power OFF via the server, it sends a printer OFF command over serial and then severs the serial connection immediately without actually executing a physical printer OFF command.
Hence the printer remains ON, but there is a Serial connection error each time you hit the OFF button. I'm not sure if the CR-10 firmware is engineered to not respond to a printer off command over serial. Or, if it's simply a bug!
I wanted to do more research on this, but then getting my projects out the door was more important than hacking into the CR-10 which otherwise is a fantastic printer.
I've since moved on to actually controlling the ON/OFF functionality using voice control via Alexa paired with a smart outlet that I built using an ESP8266 paired with a regular outlet from home depot. 4 months now, and it works reliably.
You can see this set up on Thingiverse at this location: Thingiverse URL /thing:2684005
Hope this helps.