Gas station without pumps

2018 July 4

Resuming jogging

Filed under: Uncategorized — gasstationwithoutpumps @ 20:16
Tags: , ,

After a three-week break to let my tendons and bursæ heal (see Taking a break from jogging), I started jogging again today, cautiously.

I went to Santa Cruz Running Company on Monday and bought a pair of running shoes. I ended up buying ASICS Kayano 24 shoes in size 10½ US (44.5 European, 9½ UK), for about $142 (including tax),  which is somewhat more than I would have paid on-line, had I known that those were the shoes I wanted, though less than I would have paid a month ago (the shoe is now last-season’s model).

I’m glad to pay the 20–30% premium for the ability to try on 8 different pairs of shoes from different manufacturers (as well as seeing a little slow-mo video of my running on the treadmill, to see if I had an problems with rotation of my feet—none were visible).  The shoes I had originally thought I wanted, because of the big toe box, ended up not being comfortable, because the stiffening at the toe pressed down on my big toe nail—there was plenty of room horizontally, but not enough vertically.

The shoes I ended up with have soft mesh uppers and conform better to my feet.

The tenderness in my pes anserinus tendon (or bursa underneath) is almost gone, so I tried taking a short run this morning: just 1.5km with no hills.  I’m going to switch to an alternate-day schedule to give more healing time between runs and to give me more warning if I start damaging my tendons or bursæ again.  I’ll ramp up the distance more slowly this time also.

It is unlikely that I’ll be up to Bike Santa Cruz County’s  12km run on 26 August 2018, but it is more important to me that I don’t make the minor injury worse.

2018 July 1

Analog Discovery Impedance Analyzer

Filed under: Circuits course,Data acquisition — gasstationwithoutpumps @ 17:54
Tags: ,

One of the new toys I got this week was the Impedance Analyzer board for my Analog Discovery 2 (I also got a Breadboard Breakout, but I won’t discuss that in this post).

Here they are in the bags they shipped in.

And here they are unwrapped.

I tried testing out the impedance analyzer board today, to see how well it worked, and to try to determine the precision of the reference resistors they used, since Digilent does not seem to have provided that information on their datasheets.

The impedance analyzer board is used just like any other setup for using the Analog Discovery impedance meter: you select the reference resistor and the range of frequencies, run open-circuit and short-circuit compensation, then insert the impedance to measure and do a sweep. The only difference is that the board uses latching relays to select the reference resistor, rather than having to wire it yourself. The board has 6 resistors: 10Ω, 100Ω, 1kΩ, 10kΩ, 100kΩ, and 1MΩ.

I did several tests, many of which seemed rather inconclusive. One fairly consistent result was that the open compensation saw the open circuit as essentially a 1.63pF capacitance. One exception was the 10Ω resistor, which reported 5.4pF, but I suspect that is due to measurement error from quantization—as 1.6pF at 1MHz is still about -j 100kΩ and the 10Ω resistor would have only 0.001 times the voltage across the open circuit. These capacitance measurements were only consistent above about 3kHz—at lower frequencies I had rather noisy results, probably again because of quantization problems measuring small voltages across the reference resistor.

The short-circuit compensation reported values roughly proportional to the size of the reference resistor, with a maximum around 24mΩ for the 10Ω reference to 148Ω for the 1MΩ reference. The impedance changed a lot with frequency, with a maximum around 18kHz. The phase change varied a lot with frequency also.

I used the impedance meter to measure some 0.1% resistors that I had purchased previously to use as reference resistors in my own impedance setups. The impedance measured was not constant with frequency (generally fairly flat at low frequency, then peaking a little around 70kHz, then dropping off with higher frequency). The variation with frequency was as much as 2–3%. Incidentally, the latest version of Waveforms (3.8.2) still has the bug where the impedance meter sometimes exports the frequencies as if they had been stepped linearly, instead of logarithmically. [Update 2018 July 2: Digilent says that the bug will be fixed in the next release.  Based on their rate of updates lately, that should be soon.]

The impedance of the 10kΩ±0.1% resistor is not constant with frequency. This plot has a linear y axis, to accentuate the fairly small change that is measured.

I decided to measure each of the precision resistors using each of the reference resistors at 100Hz, with settling time set to 2ms and 32 cycles. (I probably should use a longer settling time for more accuracy at low frequencies and average 10 or more measurements.) I’ve marked in red those measurements that are off by more than 1%:

Reference 100Ω ±0.1% 1kΩ ±0.1% 10kΩ ±0.1% 100kΩ ±0.1%
10Ω 98.81Ω 986.3 9955 77.97k
100Ω 99.83Ω 998.8 9936 98.91k
1kΩ 99.88Ω 998.6 9980 99.69k
10kΩ 100.4Ω 998.5 9971 99.88k
100kΩ 106.1Ω 1005 9987 99.97k
1MΩ 118.3Ω 1042 10000 99.97k

The results are best when using a reference resistor within a factor of 10 of the resistor being measured, and those results seem to be within about 0.2% of the correct value, which suggests that Digilent is using 0.2% resistors (or that they got very lucky with standard 1% resistors).  The one set of bad values is from the 10Ω reference—the resistance of the relay contacts may be big enough to throw off that measurement, though I would have expected measurements to be too big, if that were the source of the error.

(Update 2018 Oct 17: I heard today from Digilent that the resistors on the board are 0.1% resistors, so the larger fluctuations I’m seeing are likely to be from other sources, such as the contact resistance of the relays.)

Adding feet to the Monoprice Delta Mini 3D printer

Filed under: Uncategorized — gasstationwithoutpumps @ 09:22
Tags: , , ,

The first functional prints I’ve created from the new Monoprice Delta Mini 3D printer that I bought earlier this week (see Three boxes this morning!) are small plates to attach rubber feet to the bottom of the printer, to raise it off the table and improve airflow.

I looked at what Thingiverse had for accessories for the printer, and several people had designs for feet, but I didn’t really like any of the designs, so I decided to design my own.

Because 3D printing is so slow, I decided not to try to print tall feet, but to use some rubber feet that I bought back in 2012 from Parts Express. (If you follow that link, you’d find that Parts Express no longer has these feet, but has slightly smaller black rubber feet for about 66¢ each.)  This meant that I only had to design and print adapter plates that could be screwed on over the existing  feet, with a central hole for attaching the rubber foot.

The plate attaches with M3 screws. The design calls for replacing the existing M3×8 Phillips head screws with M3×12 socket-head screws, and I decided to recess the sockets into the plate, both for looks and to see whether the printer could bridge over the recess.  (If the printer had not been able to bridge, then I would have made that surface of the adapter plate be flat, and used M3×16 screws instead.)

I spent a fair amount of time measuring the irregular hexagonal end of the uprights of the printer, so that I could match it and the get the screw holes in the right places.  The measurements were not perfectly consistent, so I had to decide which measurements to take as “correct” and which to compute based on the chosen parameters.  I decided that all the angles should be treated as canonical (multiples of 30°), since that seemed like a likely choice for the designers of the printers.  I decided that the two parallel edges and the distance between them would be my other defining parameters, since that allowed easy definition in Cartesian coordinates, which also seemed like a likely choice for the original designers.

I did the design in OpenSCAD, which does not have anywhere near the feature richness of a professional tool like SolidWorks, but which is (for a programmer) much easier to learn to use, and easier to get precise results with.

Unfortunately, OpenSCAD does not produce the pretty renderings that SolidWorks does, so I can’t show you pretty design pictures. I can, however, share the source code for the design, which you can modify to produce different designs, or just compile and print. The code is at the end of this post.

View of the adapter plate from the outside, rendered by Finder’s “Quick Look” on a Mac.

View of the adapter plate from the printer side, showing the countersunk hole in the center, rendered by Finder’s “Quick Look” on the Mac.

My first print was to test whether I had the holes in the right places, and whether the printer was printing things at the specified size.  (I was pretty sure it was not, as I had printed the Make magazine test piece for dimensional accuracy, and had seen that the printer was printing about 3% small.)  The test print was just a 3mm slab, printed with 10% infill and 0.2mm layers for speed.  OpenSCAD made it easy to create this slab, by intersecting the design with a rectangular prism of the appropriate thickness and location.

The two test pieces I printed. Test piece 1 is a little small and has a few holes misplaced.  On test piece 2, you can see a little “stringing” where the unsupported bridging filaments drooped, but the overall integrity of the bridge seemed adequate.

The slab showed me that the printer was indeed printing a little small, and that I had misplaced the hole for the existing printer foot by 1mm and the screw holes further from the outside edge by about 0.5mm.  I moved the holes, figured out how to do scaling in Cura to scale the part by 102.9% when slicing, and did another test print—a 4mm slab that included the end of the recesses for the socket-head screws, so that I could test the overhang capability.  I printed this one with 20% infill.

The final design is a slab 7mm thick, which 5 screw holes: 4 for the M3 socket-head screws, and one for a 10-24 flat-head screw for attaching the rubber foot. The 10-24 hole is countersunk and is at the base of a cylindrical recess deep enough that the head of the screw has clearance from the foot that is already on the base of the printer. Because the existing feet are just stuck on with double-stick tape, it would probably have been easier to remove them rather than make clearance for them.

Outside view of a disassembled leg.

Printer-side view of a disassembled leg.

Because the 10-24 screw will be hard to retighten once the leg is on the printer, I squirted a little low-temperature hot-melt glue onto the nut after tightening it, so that it would not work loose from vibration.

The three printed legs, with the rubber feet attached. If you look closely, you can see a little of the clear hot-melt glue in the right-hand foot, to keep the nut from loosening.

Bottom view of the printer with the legs attached.

Side view of the printer with the legs attached.

Closeup of the printer with the legs attached, showing the greater space now available for airflow.

I printed the legs one at a time, so that in the event of printer failure, I would only have to redo one leg, rather than all three.

To print the legs, you need to open the .scad file with OpenSCAD, render it, and output a .stl file. Then use Cura to slide the model. I chose a layer height of 0.1mm, a wall count of 4 layers (for strength and stiffness), 4 top layers and 3 bottom layers, a concentric top and bottom pattern, 20% infill (a compromise between strength and speed of printing), and no special build-plate adhesion. The top layers are excessive, as that face is buried against the bottom of the printer and does not need to be pretty. The first leg I printed had some sort of printer/communication failure and froze after only one top layer had printed, and it is still a perfectly usable leg.

(Update 2018 July 15: I’ve made the clips available on Thingiverse:

Here is the code for the adapter plate for extending the legs of the printer:

// Kevin Karplus
// 2018 June 30
// Leg for extending height of Monoprice Delta Printer, to improve airflow under printer.

// create a screwhole for metric screw of given length,
// with head extending in -z direction and screw in +z direction
// Loose=0.10 for loose fit, 0.05 for tight fit, about -0.15 for threaded hole
module screw_hole(metric_size=3, length=10, loose=0.10)
{   union()
    {   cylinder(d=metric_size*(1+loose), h=length*1.1, $fs=0.3);  // body of screw
        cylinder(d=metric_size*2.2, h=metric_size*1.1, $fs=0.3);  // counterbore for head of screw

// make countersunk hole for 10-24 flathead screw
// surface on xy plane at (0,0), screw extends in +z direction.
// length is the length of the hole for the threads (past the base of the head)
// diam is the diameter of the hole for the screw threads
// depth is the depth of the countersink
module countersunk_10_24(length=35, diam=5, depth=3)
    // top_diam is the diameter at the surface (the xy plane)
    // assumes that cone has an apeture of 90°
    top_diam = diam + 2*depth;
    {    cylinder (d=diam, h=length+depth, $fs=0.3);   // hole for screw
        // countersink (adding 0.1 overshoot to avoid coincident faces)
cylinder (d1=top_diam+0.2, d2=diam, h=depth+0.1, $fs=0.3); 

// polygon that matches the foot of the Monoprice Delta printer,
// with outside edge on the x-axis, with center of edge at origin.
// "base" is the length of the outside edge in mm.
// Long edge of plate parallel to x-axis at y=height, of length long.
// The default parameter values were measured from the printer.  
// The angles are taken as canonical, and the parameters were chosen as
// those that could be easily defined on a Catersian coordinate system,
// with the other side lengths calculated from the geometry.
module foot_poly(base=50,long=65, height=32)
    // how wide trapezoid would be without trimmed-off corner
    extra_long= base+ 2* height/tan(60);
    short = (extra_long-long)/2 * cos(30);  // shortest edge
    // Width at widest point (right-angle vertex)
    width =long + 2*short*cos(30);
    // remaining edge
    side = (width-base)/(2*cos(60));
    // How high up is the widest point
    height_at_width= side*sin(60);
    echo("edges=", base, side,short, long);
    echo("width=",width, "height=", height);
    polygon(points=[ [base/2,0], 
            [width/2, height_at_width],
            [long/2, height],
            [-long/2, height],
            [-width/2, height_at_width],

module foot(screw_length=12)
    // For the 4 M3 screws that hold foot plate to delta printer
    hole_length=screw_length-8;  // how much of screw thread is left?
    counterbore= 3;  // depth of counterbore
    thickness = hole_length+counterbore;
    old_foot = 3.7;  // height of bore to avoid old foot
        color ("red")  linear_extrude(height=thickness) foot_poly();

        color("green") translate([22.5,5,counterbore])  
        color("green") translate([-22.5,5,counterbore])
        color("blue") translate([32.5,25,counterbore])
        color("blue") translate([-32.5,25,counterbore]) 
        // make hole for old foot
        color("brown") translate([0,center,thickness-old_foot]) 
            cylinder(d=14,h=old_foot +0.1, $fs=0.6);
        // make countersunk hole for 10-24 screw for new foot
        color("magenta") translate([0,center,thickness-old_foot])
            rotate([180,0,0]) countersunk_10_24();

{  foot();  
« Previous Page

%d bloggers like this: