An idiot admires complexity, a genius admires simplicity
– Terry A. Davis
The problem being solved here was having a Raspberry Pi streaming from a digital camera in an optical setup to a display. Just leaving the Pi dangling on the setup is cheap, sloppy. For prototyping, however, a beautiful enclosed mount is not only unnecessary but undesired, as it hinders probing and rewiring.
Within this context, the mount just has to hold the device, nothing else. Ideally, it shouldn’t take up breadboard real estate, as this is valuable. Also, being able to move (and remove) it around the setup easily, with no tools, is convenient.
Finally, in my prototyping philosophy moving fast is king. Developing and testing as fast as possible is more important than achieving a perfect, unattainable solution. Optmizations should always come later.
Fifteen minutes of CAD, fifteen minutes of 3d printing, and that was the result:
Here is the cadquery code that generates this object:
#!/usr/bin/env python3
import cadquery as cq
from cadquery.vis import show
# Part parameters
s_height = 60.0 # mm, support height above plate surface
s_width = 22.0 # mm, support width
s_thick = 12.0 # mm, support thickness
bt_thick = 8.0 # mm, bottom tab thickness // gap offset
plate_thick = 12.7 # mm, breadboard thickness
slot_depth = 16.0 # mm, how far the part "bites" the breadboard
ph_spacing = 49.0 # mm, pi mounting hole spacing
ph_offset = 6.0 # mm, pi hole offset from plate top surface
# Hardware parameters (counterbores)
screw_dia = 3.2
screw_cap_dia = 6.0
total_height = bt_thick+plate_thick+ph_offset+s_height
body_sketch = (cq.Sketch()
.segment((0,0), (s_width, 0))
.segment((s_width,0), (s_width, total_height))
.segment((s_width, total_height), (slot_depth, total_height))
.spline([(slot_depth, total_height), (0, bt_thick+plate_thick+ph_offset)],
[(0, -1), (-1, -1)], False)
.segment((0, bt_thick+plate_thick+ph_offset), (0, bt_thick+plate_thick))
.segment((0, bt_thick+plate_thick), (slot_depth, bt_thick+plate_thick))
.segment((slot_depth, bt_thick+plate_thick), (slot_depth, bt_thick))
.segment((slot_depth, bt_thick), (0, bt_thick))
.close()
.assemble()
)
support = (cq.Workplane("YZ").placeSketch(body_sketch).extrude(s_thick/2.0, both=True)
.faces("<Y").workplane()
.pushPoints([(0, bt_thick+plate_thick+ph_offset),
(0, bt_thick+plate_thick+ph_offset+ph_spacing)])
.cboreHole(screw_dia, screw_cap_dia, slot_depth+2.0)
)
show(support)
The code is not much different then others seem before on this blog. The general protocol is the same as point and click CAD:
The most exotic line today, is the one that creates the spline:
.spline([(slot_depth, total_height), (0, bt_thick+plate_thick+ph_offset)],
[(0, -1), (-1, -1)], False)
This is illustrated on the figure on the left. Just as a counter example, on the right figure we see the output if the vector at the end point would point straight in a negative direction along x axis [(-1, 0)].
The boolen False in the end is about the “periodic” argument. One uses
It is mandatory to pass one of the two as it will also tell the dispacther to use the overload method that takes tangents.
Some final photos of the mount in use:
It did the job ! 😎
📎 Download: Raspberry Pi Optical Breadboard Mount