Clayton Cramer.
Conservative. Idaho. Software engineer. Historian. Trying to prevent Idiocracy from becoming a documentary.
Email complaints/requests about copyright infringement to clayton @ claytoncramer.com. Reminder: the last copyright troll that bothered me went bankrupt.
Friday, January 17, 2025
Design Failure
.41mm Leads
I am trying to find a connector for combining .41mm leads to a wire that is considerably larger..These Harwin connector cables terminate in very fine leads, which I need to connect to a 9V battery holder. Wire nuts usually bind wires of similar thicknesses. I could solder the wires together and then wire nut the joint to nget an insulated, physically strong connection.
Thursday, January 16, 2025
12VDC Harwin Pin Style Connector Cable
Stepper Motor
Climate Change
"Sun stones and the darkened sun: Neolithic miniature art from the island of Bornholm, Denmark" Antiquity 1/16/25
Tuesday, January 14, 2025
Learning to Machine?
When I received my mill, it included some "hold down" clamps. Why would I use these when the mill came with a milling vise? Below is an example of a workpiece that wll never fit into a milling vise that fits on the table. It is a 6" x 6" x .5" piece of carbon fiber composite.
The carbide endmill is cutting 1" x 1" squares, .001" per pass at 25 inches/minute. The hold downs are clamping the workpiece to the mill's table. You need to square the back of the workpiece to the back of the mill table to get square cuts. This is easier than it sounds. I can easily feel a discrepancy of .003".
Monday, January 13, 2025
G2 Code for Arcs and Circles
I have been battling gCode's fairly complex scheme for turning arcs and cirxcles. This bash script produces gCode to cut a circle centered in a biounding box specified byn the first four values, starting at z cutting circles at specified step size at the specified feed rate for a hole of specified size and mill diamete. There are a lot of intermediate steps there m ostly for debugging but likely useful for understanding the process.
#!/bin/bash
# Cut an interior circle starting at xStartBB yStartBB xEndBB yEndBB zStart zStep zEnd feedRate holeDiameter endMillDiameter
# BB is short for BoundingBox
if [ "$#" -eq 0 ];
then echo "$0 xBB yBB xEndBB yEndBB zStart stepZ endZ feedRate holeDiameter endMillDiameter"
else
xStartBB=$1
yStartBB=$2
xEndBB=$3
yEndBB=$4
startZ=$5
stepZ=$6
endZ=$7
feedRate=$8
holeDiameter=$9
endMillDiameter=${10}
millRadius=`echo "$endMillDiameter/2"|bc -l`
# Calculate starting cut points
echo $xEndBB $xStartBB $holeDiameter
center=`echo "(($xEndBB-$xStartBB)/2)"|bc -l`
offset=`echo "((($xEndBB-$xStartBB)-($holeDiameter))/2)"|bc -l`
startXCut=`echo "$xStartBB+$offset+$millRadius"|bc -l`
startYCut=`echo "($yEndBB-$yStartBB)/2"|bc -l`
endYCut=$startYCut
endXCut=`echo "$yEndBB - $offset - $millRadius"|bc -l`
# calculate radius for i
i=`echo "($center-$startXCut)"|bc -l`
cat prolog.nc >rotate.nc
echo "g1 z1.0 f$feedRate" >>rotate.nc
echo "g1 x$startXCut y$startYCut f$feedRate" >>rotate.nc
echo "g1 z$startZ y$startYCut f$feedRate" >>rotate.nc
newstartZ=`echo "$startZ+$stepZ"|bc -l`
for curZ in `seq $newstartZ $stepZ $endZ`
do
echo "g1 z$curZ f$feedRate" >>rotate.nc
echo "g2 x$endXCut y$endYCut i$i j0 f$feedRate" >>rotate.nc
echo "x$startXCut y$startYCut j0 i-$i" >>rotate.nc
done
echo "g1 z1.0 f$feedRate" >>rotate.nc
cat epilog.nc >>rotate.nc
fi
The two external files are prolog.nc
%
g17 g20 g54
and epilog.nc
m2
%