Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.
While converting a stop-action series of images from the HDR-AS30V into a movie, I wanted change all the image files on a USB Flash drive from DSC00008.JPG to dsc00008.jpg, so as to simplify typing their names.
Alas, because the camera’s exFAT filesystem cares not one whit about case, the obvious command doesn’t work:
rename 's/JPG/jpg/' /mnt/part/*
/mnt/part/DSC00008.JPG not renamed: /mnt/part/DSC00008.jpg already exists
The Sony HDR-AS30V “action camera” uses NP-BX1 lithium batteries (3.7 V @ 1.24 A·h = 4.6 W·h) that are, of course, a completely different size and shape than any other lithium battery on the planet.
So.
Tweaking a few dimensions in the Canon NB-6L source code, tinkering with the layout of the contact pins, and shazam Yet Another 3D Printed Battery Test Fixture:
NP-BX1 Holder – show layout
It builds nicely, although the contact pin tunnels are a bit too close to the top of the case:
Sony NP-BX1 Holder – on platform
After reaming out the contact pin holes to the proper diameters & depths, then gluing the plugs in place, it works just as you’d expect:
Sony NP-BX1 battery holder
It’s worth noting that the Wasabi charger accepts the batteries upside-down, with the conspicuous chevron against the charger body. It’s definitely not the way all the other chargers work. The keying recesses on the battery (corresponding to the blocks in the solid model) lie along the bottom edge of the contact surface, so flipping the battery over means they’ll hold it in place, but … oh, well.
That grotty Powerpole connector last saw use in some random benchtop lashup. At some point I’ll be forced to start making more of those.
These quilting pin caps are slightly longer than the previous version and, due to the M2’s smaller nozzle, have slightly thinner single-thread walls. Because Slic3r does a better (although not ideal) job of path planning than Skeinforge, it’s easier to create an array of the caps in the solid model than to manually add duplicates in Slic3r:
Fill with silicone caulk on waxed paper and they look even more like that:
Quilting pin caps – silicone fill
Fast-forward a few days, rub off the excess caulk, trim off a few blobs, and they’re ready for presentation:
Quilting pin caps – finished
In use, they look about like you’d expect:
Quilting pin caps – in use
The pin caps I made from a 5 gallon bucket’s O-ring gasket didn’t work out well, as the plastic didn’t like being poked with pins and put up a stiff resistance. Silicone caulk has exactly the right consistency.
When Mary ramps up a full-scale quilt, we’ll need a few hundred of the things. The commercial version has dropped to 40 cents each, which makes all this worthwhile.
The OpenSCAD source code:
// Quilting pin caps
// Ed Nisley KE4ZNU April 2012
// January 2013 - modify for Slic3r and M2
//- Extrusion parameters must match reality!
// Print with +1 shells and 3 solid layers
ThreadThick = 0.20;
ThreadWidth = 0.40;
HoleWindage = 0.2;
function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
Protrusion = 0.1; // make holes end cleanly
//----------------------
// Dimensions
ID = 5.0;
OD = ID + 2*ThreadWidth;
Length = 8.0;
Sides = 8;
CapArray = [6,6]; // XY layout of caps
CapsOC = OD + 2.0; // OC spacing
//----------------------
// Useful routines
module PolyCyl(Dia,Height,ForceSides=0) { // based on nophead's polyholes
Sides = (ForceSides != 0) ? ForceSides : (ceil(Dia) + 2);
FixDia = Dia / cos(180/Sides);
cylinder(r=(FixDia + HoleWindage)/2,
h=Height,
$fn=Sides);
}
module ShowPegGrid(Space = 10.0,Size = 1.0) {
RangeX = floor(100 / Space);
RangeY = floor(125 / Space);
for (x=[-RangeX:RangeX])
for (y=[-RangeY:RangeY])
translate([x*Space,y*Space,Size/2])
%cube(Size,center=true);
}
module PinCap() {
rotate(180/Sides) {
difference() {
PolyCyl(OD,Length,8);
translate([0,0,-Protrusion])
PolyCyl(ID,(Length + 2*Protrusion),8);
}
}
}
//----------------------
// Build them!
ShowPegGrid();
translate([(-CapsOC*(CapArray[0] - 1)/2),(-CapsOC*(CapArray[1] - 1)/2),0])
for (i=[0:(CapArray[0] - 1)],j=[0:(CapArray[1] - 1)])
translate([i*CapsOC,j*CapsOC,0])
PinCap();
The pushbutton on the X10 wall switch controlling the fiercely incandescent lamp over the kitchen table has gotten erratic, so I dug into the Big Box o’ X10 Crap for a replacement. Turns out The Box has only 3-way switches, but the lamp needs a standard two-wire switch.
The instruction sheet shows this diagram:
X10 3-way Wall Switch Wiring
The pushbutton on the CS277 “Companion” switch connects the red lead to the two blue leads. The blue leads are always connected together and carry the lamp current, so the red lead is just a signal from the remote button.
The WS477 “Master” switch will work as an ordinary switch if you cap the red lead with a wire nut and tuck it into the box.
This collects the temperature data points from the Hobo data loggers for the last month:
Temperatures
Things to ponder:
The carrot buckets sat under the patio at the start of the month and moved indoors twice, marked by the humps. The early part of their curve doesn’t track the patio ground temperature nearly as well as it did during the three days at 18 Jan. We’re not sure why.
The water temperature sensor clamps to the copper pipe just inside the wall, so the low points measure outdoor water on its way past. The high points rise toward the basement air temperature (measured a few feet away), but the wall / earth around the pipe holds it below the air.
The basement safe looks like a good proxy for the average daily air temperature.
The attic insulation I added long ago seems to be working hard & doing swell.
I cleaned up the data files manually, using those sed pipes, because of inadequate Bash-fu; I can’t figure out how to escape-quote the input file names and make temporary files work inside a Bash for;do;end construct that would rip through all the CSV files in one shot.
On the other paw, the chart came out pretty well; I can now specify X-axis date ranges with some assurance of getting the right results.
The Bash / Gnuplot script that made it happen:
#!/bin/sh
#-- overhead
export GDFONTPATH="/usr/share/fonts/truetype/"
ofile=Temperatures.png
echo Output file: ${ofile}
#-- do it
gnuplot << EOF
#set term x11
set term png font "arialbd.ttf" 18 size 950,600
set output "${ofile}"
set title "House Temperatures"
set key noautotitles left bottom
unset mouse
set bmargin 4
set grid xtics ytics
set timefmt "%m/%d/%Y %H:%M:%S"
set xdata time
set xlabel "Date"
set format x "%Y-%m-%d"
set xrange ["01/03/2014":]
set xtics font "arial,12"
#set mxtics 2
#set logscale y
#set ytics nomirror autofreq
set ylabel "Temperature - F"
#set format y "%4.0f"
#set yrange [30:90]
#set mytics 2
#set y2label "right side variable"
#set y2tics nomirror autofreq 2
#set format y2 "%3.0f"
#set y2range [0:200]
#set y2tics 32
#set rmargin 9
set datafile separator ","
set label 1 "Attic pack" at "01/31/2014",25 left font "arialbd,10" tc lt 3
set label 2 "Attic air" at "01/31/2014",28 left font "arialbd,10" tc lt 2
set label 3 "Safe" at "01/31/2014",55 left font "arialbd,10" tc lt 4
set label 4 "Carrot" at "01/31/2014",47 left font "arialbd,10" tc lt 1
set label 5 "Ground" at "01/31/2014",31 left font "arialbd,10" tc lt 6
set label 6 "Bsmt air" at "01/31/2014",51 left font "arialbd,10" tc lt 7
set label 7 "Water" at "01/31/2014",42 left font "arialbd,10" tc lt 8
#set arrow from 2.100,110 to 2.105,103 lt 1 lw 2 lc 0
plot \
"Attic.csv" using 2:3 with lines lt 3 lw 1,\
"Attic.csv" using 2:4 with lines lt 2 lw 1,\
"Safe.csv" using 2:3 with lines lt 4 lw 1,\
"Carrot.csv" using 2:3 with lines lt 1 lw 1,\
"Patio.csv" using 2:3 with lines lt 6 lw 1,\
"Water.csv" using 2:3 with lines lt 7 lw 1,\
"Water.csv" using 2:5 with lines lt 8 lw 1
EOF
It turns out that the audio-over-HDMI/DisplayPort channel which, for whatever reason, is the only way to get audio out of the Optiplex 980 with the big Dell U2711 monitor starts up AT MAXIMUM VOLUME! regardless of the GUI’s Pulseaudio mixer setting that’s diligently saved-and-restored across sessions. That makes a certain perverse sense, as the digital-to-analog converter & power amp live inside the monitor.
Manually adjusting the GUI mixer by one click, either up or down, forces the new setting out over the digital link to the monitor, after which the audio output corresponds to the mixer; I never remember that until just after some dipshit auto-play video lights up with a fanfare.
Setting the mixer to the same value doesn’t force an update, so the obvious solution (at least to me) of sending a fixed initial value doesn’t work; it’s optimized away. I think that’s why the initial update doesn’t happen: the stored volume is the same as the, ah, stored volume, so there’s no need to tell the monitor.
The automatic solution involves putting two more commands in my ever-growing ~/.config/startup.sh:
That sets a rational level (which might be the same as the existing one from the previous session), then changing it by one tiny click to force the new value out to the monitor.