Qidi Plus 4 Toolhead Cover Mod with USB Endoscope for Nozzle View
Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.
Zapisane na tym urządzeniu.
Remix of the original Qidi Plus 4 toolhead cover to integrate a mount for a USB endoscope camera with direct nozzle view
- Ocena
- 0 / 5
- Polubienia
- 9
- Pobrania
- 34
- Wydruki
- 0
- Wyświetlenia
- 623
- Oceny
- 0
Aktualizacja u źródła:
Informacje o modelu
- Źródło
- Printables
- Kategoria
- Other Printer Parts & Upgrades
- Licencja
- Creative Commons — Attribution — Noncommercial — Share Alike
Disclaimer: Please be aware that the modifications described below involve altering both the hardware of your USB endoscope camera and the software configuration of your Qidi Plus 4 3D printer. These steps carry inherent risks, and I assume no responsibility for any damage to your hardware, software, or printer that may occur as a result of following these instructions. Proceed with extreme caution and at your own risk. Ensure you understand the potential consequences before attempting these modifications.
I've always found it incredibly useful to have a camera focused directly on the nozzle of my 3D printer. On my self-built machine, a nozzle camera has been invaluable for monitoring print quality, diagnosing extrusion issues, and ensuring perfect first layers. I loved this functionality so much that I wanted to integrate it into my Qidi Plus 4 as well.
Initially, I looked for a complete toolhead model to modify, but I primarily found the cover model and a few other parts. So, I decided to take matters into my own hands. I carefully took measurements of the original Qidi Plus 4 toolhead cover and then used these dimensions to modify the existing model. The goal was to create a seamless and secure mount for a USB endoscope camera, positioned perfectly to view the nozzle.
After designing the modification, I printed the new toolhead cover in 3D. During the design process, I considered the original magnetic attachment of the cover. However, through testing, I found that the modified cover fits snugly and remains perfectly stable on the toolhead even without the magnets.
Important Note: Modifying the Endoscope Camera
To achieve the optimal focal length of approximately 20mm for a clear view of the nozzle, the USB endoscope camera (https://it.aliexpress.com/item/1005006710505036.html?spm=a2g0o.order_list.order_list_main.22.793e3696WXMtl2&gatewayAdapt=glo2ita) requires a delicate modification. Proceed with caution:
- Carefully open the camera housing using a Dremel tool, making a small incision on the rear part where the USB cable enters.
- Gently widen the opening using a flat-head screwdriver to allow the internal components (electronics and optics) to be slid out. Handle these components with extreme care to avoid damage.
- Once the internal assembly is separate, detach the LED ring. It is lightly glued, so gently pry it off after removing the foam pad in contact with the outer glass.
- Connect the camera to a USB port to view the live feed and carefully rotate the lens to adjust the focus to approximately 20mm.
- After focusing, reinsert the internal electronics and optics back into the housing. Secure the modified section with heat shrink tubing.
Mounting the Camera in the Cover:
The threaded part at the very end of the modified camera can be used to screw it into the hole in the printed cover. The hole is intentionally a few tenths of a millimeter smaller to ensure a secure fit. If needed, you can carefully enlarge the hole with a drill bit.
Cable Management and Software Configuration on Qidi's ARMBIAN Distribution:
Once the camera is securely mounted in the cover, carefully route the USB cable alongside the toolhead's Bowden tube and connect it to one of the USB ports on the top panel of your Qidi Plus 4.
I've spent some time trying to get both the stock Qidi camera and this added endoscope camera to work simultaneously. However, for reasons I haven't yet fully understood, it doesn't seem possible to run both at the same time.
For the time being, I've found two alternative ways to get either camera working:
WEBCAMD:
To configure the USB endoscope camera using the default webcamd service on the Qidi Plus 4's ARMBIAN distribution, you'll need to access the printer's file system via SSH (Secure Shell) using a terminal program like PuTTY. The default login credentials for SSH on the Qidi Plus 4 are username mks and password makerbase. Once connected:
Locate and Open webcam.txt: Navigate to the configuration file. The correct path on your Qidi Plus 4 is: /home/mks/printer_data/config/webcam.txt. Open this file using a text editor (like nano).
Comment Out the Default Camera Options: Look for a line similar to:
Add a # at the beginning of this line to comment it out, like this:
Specify the Endoscope Camera by ID: Instead of using the generic /dev/v4l/webcamX device path, it's more reliable to specify the camera by its unique ID. You'll need to identify the correct ID for your specific endoscope camera. You can usually find this information in the /dev/v4l/by-id/ directory. List the contents of this directory to see the available camera IDs.
Based on my setup, I have the following camera IDs (yours may differ, so verify the IDs on your printer with your specific cameras and adapt the following two lines accordingly):
To use the stock Qidi camera (example ID):
To use my added endoscope camera (example ID):
Important: Only uncomment the line corresponding to the camera you want to use at that time. In this example, the stock camera is active, and the endoscope camera is commented out. To switch to the endoscope camera, comment out the stock camera line and uncomment the endoscope camera line (and potentially adjust the -n value if needed; -n 2 might be necessary if it's recognized as the second video device).
Save and Restart: After making the necessary changes, save the webcam.txt file and restart the webcamd service for the changes to take effect. The command to restart the service might be sudo systemctl restart webcamd.
By following these steps, you should be able to switch between your stock Qidi camera and the modified USB endoscope camera by editing the webcam.txt file and restarting the webcamd service. Remember to verify the correct device IDs for your specific cameras.
CROWSNEST:
I also experimented with Crowsnest in an attempt to get both the stock Qidi camera and the modified endoscope camera to function simultaneously. Unfortunately, I wasn't successful in achieving this, but I'll outline the steps I took.
Important: Before proceeding with Crowsnest, you need to disable the default webcamd service and either rename the webcam.txt file (e.g., to webcam.old) or remove it entirely.
Disable webcamd: Connect to your Qidi Plus 4 via SSH (username mks, password makerbase) and execute the following command to stop and disable the webcamd service:
Rename or Remove webcam.txt: Navigate to the configuration directory: /home/mks/printer_data/config/ and either rename webcam.txt to webcam.old or delete it.
Install Crowsnest Legacy: Due to the obsolete Buster distribution on the Qidi Plus 4, the latest version of Crowsnest is not compatible. Therefore, you need to install the Crowsnest v3 legacy version. Refer to the Crowsnest and Moonraker documentation for detailed installation instructions for the legacy version. This typically involves cloning the Crowsnest repository and running an installation script.
Configure crowsnest.conf: The Crowsnest configuration file is usually located in /home/mks/printer_data/config/crowsnest.conf. Here's an example of my configuration for the nozzle camera (you might need to adjust the device path based on your specific camera; use the /dev/v4l/by-path/ directory to find the correct path):
resolution: 1280x720 # widthxheight format max_fps: 25 # If Hardware Supports this it will be forced, otherwise ignored/coerced. #custom_flags: # You can run the Stream Services with custom flags. #v4l2ctl: # Add v4l2-ctl parameters to setup your camera, see Log what your cam is capable of. host: 0.0.0.0 # Listen on all interfaces v4l2_buffers: 10 # Try increasing buffers
**Note:** To switch between the stock camera and the nozzle camera using this configuration, you will need to **comment out the device line of the camera you don't want to use and uncomment the device line of the camera you want to enable**. For example, to use the stock camera, you would comment out the device line for the nozzle camera and uncomment the line for the main camera (adjusting the path if necessary). **After each change, you must restart the Crowsnest service** for the new configuration to take effect.
Restart Crowsnest: After configuring crowsnest.conf, you'll need to start or restart the Crowsnest service. This can usually be done with the following commands:
Check the Crowsnest logs for any errors.
While I couldn't get both cameras to work at the same time using Crowsnest on the Qidi Plus 4's Buster distribution, these steps should allow you to configure and use the modified endoscope camera (or the stock camera) as a separate webcam stream accessible through the specified port (e.g., http://<your_printer_ip>:8080/?action=stream). Any suggestions or insights on how to potentially get both cameras working simultaneously on this setup would be greatly appreciated! Further investigation might be needed to understand the limitations preventing simultaneous operation.
This modified toolhead cover allows you to easily monitor your Qidi Plus 4's nozzle in real-time (though not simultaneously with the stock camera, based on my current findings), which can be incredibly helpful for:
- Troubleshooting extrusion problems: Easily identify clogs, under-extrusion, or over-extrusion.
- Monitoring first layer adhesion: Ensure your prints get off to a perfect start.
- Observing filament flow: Get a better understanding of how your filament is behaving.
- Creating detailed time-lapses: Capture fascinating close-up videos of your prints.
I hope you find this modification as useful as I do! Please proceed with the camera modification at your own risk and with extreme caution. Any insights or solutions for running both cameras simultaneously on the Qidi Plus 4's ARMBIAN distribution would be greatly appreciated! Feel free to share your experiences and any improvements you might make.
Bash
sudo systemctl enable crowsnest
sudo systemctl start crowsnest
Ini, TOML
[cam 1]
mode: ustreamer # mjpg/rtsp
ustreamer: true
port: 8080 # Port
#device: /dev/video4 # See Log for available ...
#device: /dev/v4l/by-path/platform-ff5c0000.usb-usb-0:1.4:1.0-video-index0 #main camera
device: /dev/v4l/by-path/platform-ff5c0000.usb-usb-0:1.2:1.0-video-index0 #nozzle camera
Bash
cd /home/mks/printer_data/config/
sudo mv webcam.txt webcam.old
# OR
sudo rm webcam.txt
Bash
sudo systemctl stop webcamd
sudo systemctl disable webcamd
#camera_usb_options="-r 1280x720 -f 10 -n 2 -d /dev/v4l/by-id/usb-Generic_USB_Camera_200901010001-video-index0"
camera_usb_options="-r 1280x720 -f 10 -d /dev/v4l/by-id/usb-SYX-231020-J_HD_Camera-video-index0"
#camera_usb_options="-r 640x480 -f 10 -d /dev/v4l/webcam1"
camera_usb_options="-r 640x480 -f 10 -d /dev/v4l/webcam1"
