This is a system of parts that attaches a Raspberry Pi Camera Module v2 (picam) to an IKEA Jansjo gooseneck LED lamp. Parts include an enclosure body and lid for the picam, a mount for the neck of the Jansjo lamp, and a clip for routing the picam ribbon cable along the Jansjo gooseneck.
Files picam_body_modified_revA.stl and picam_lid_modified.stl are remixes of the Creality Ender 3 Pi Cam Mount by sn4k3 at https://www.thingiverse.com/thing:2987719. Modifications consist of moving the hinge mount from the lid to the enclosure body. This allows the ribbon cable to leave the picam enclosure behind the hinge, which is necessary for this mount to be used as intended. Removing the hinge mount from the lid also allows the lid to be printed in a natural, horizontal orientation without any supports. The revA version of the body stl has been processed through netfabb to fix errors that were reported in slicing the original body STL with Simplify3D.
File Jansjo_neck_clamp.stl is the part that attaches to the neck of the Jansjo lamp. A hinge connection between the clamp and the camera enclosure allows the camera angle to be optimized for image illumination.
File Jansjo_ribbon_clasp.stl is a part that clips onto the gooseneck part of the Jansjo lamp for routing the picam ribbon cable along the gooseneck.
I also have a custom mounting base for the Jansjo lamp. See Stylish Mounting Base for IKEA Jansjo LED Gooseneck Light at https://www.thingiverse.com/thing:3327503.
"Elephant footing" at the bottom of the ribbon clasp can fill in the narrow slit provided for holding the ribbon cable. To minimize it, limit squish or over-extrusion on the first layer, print on a cold or low temperature print surface, and/or reduce your hot end temperature. If necessary, clean out the narrow slits with something like a thin hobby saw after printing.
If some drooping occurs in the horizontal screw holes during printing, add supports to the holes or clean out the drooping after printing.
Attach the ribbon cable to the picam module. Place the picam into the enclosure body and snap the enclosure lid into place.
The picam enclosure mounts to the Jansjo clamp with an M3x16mm screw and standard M3 nut. An 18mm long screw would work better if a nylon insert locknut is being used.
The Jansjo clamp will grip the neck of the lamp by itself, but an M3x18mm screw and standard nut can be used to tighten it in place.
The ribbon clasps can be slipped onto the free end of the ribbon cable, or the ribbon cable can be shaped into a shallow curve and popped into the clasp. Use multiple ribbon clasps along the lamp gooseneck as desired.
My preference is for the picam to be located below the lamp in order to provide the best view under the hot end. Used with Octopi, this inverts the image from the picam. This can be corrected by adding a rotation parameter to the camera_raspi_options in file /boot/octopi.txt. For an inverted image, the parameter added would be '-rot 180'.