uCameraCube is a parametric camera module build using OpenSCAD uCube library. It is build with Raspberry Pi and Raspberry Pi camera and comes in three versions, which vary in the type of optics used.
A uCameraCube is assembled from the following parts:
cubeSize[defaultCubeSize] - size of the camera cube
moduleType["explode"] - type of module assembly. Use "explode" for preview and "flat" for STL export.
type['thin-lens', 'M12', 'photo'] - the type of the camera cube.
lens- the lens being used
adapter- a T-Mount adapter (only for T-Mount version)
cameraOffset- offset of the camera from the back uFace. For optional adjustment of the camera geometry (only for T-Mount and Thin Lens versions)
This is the most simple camera module, which uses an ordinary thin lens. For uCube with the default size a lens with up to 40mm in diameter and flange focal distance up to 50 mm can be used. Makes a simple telescopic camera.
This version utilises a broad range of M12 CCTV lenses.
This version comes with a T-mount adapter. It can accept any T-Mount photo objective and other photo objectives, if you have a T-Mount adapter. Alternatively can be attached to a camera port on a microscope.
1. Download and install OpenSCAD.
2. Download uCube Library.
3. Open a new .scad file and in the uCube directory, and import the library:
4. Create an instance of a lens you would like to use. This can be either a Lens, M12Lens or PhotoLens:
// f - Focal length // r - Radius // minH - Minimal thickness of the lens ( at the edge ) // maxH - Maximal thickness of the lens ( in the middle ) thinLens = Lens( f = 25, r = 12.5, minH = 2, maxH = 5 ); // f - Back focal length // threadH - Height of the threaded part // headH - Height of the non-threaded part // headR - Radius of the non-threaded part m12Lens = M12Lens( f = 5.4, threadH = 11, headH = 4, headR = 7.2 ); // ffd - flange focal distance photoLens = PhotoLens( ffd = 35 );
2. Create a uCameraCube module
uCameraCube( type = "M12", lens = m12Lens );
for M12 Lens version.
uCameraCube( type = "photo", lens = photoLens, aperture = Aperture( shape="circle", size = [10,10] ) );
for Photo Lens version.
uCameraCube( type = "thin-lens", lens = thinLens);
for Thin Lens version.