The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Author: Ed

  • LF Crystal Tester: Fixture Output Amp

    The crystal test fixture and amp huddle in front of the OLED display:

    Crystal Tester - First Light
    Crystal Tester – First Light

    The schematic:

    Test fixture - Relay - MAX4255 amp - schematic
    Test fixture – Relay – MAX4255 amp – schematic

    The 22 pF cap now sits across the relay’s NO contacts, so as to simplify measuring the total in-circuit capacitance. The LED turns on when the relay shorts out the capacitor, which has a 50% probability of making more sense.

    The quartz tuning fork resonators have an ESR around 20 or 30 kΩ, so the off-resonance output should be down something like -60 dB = 20 log (24 / 24×10³) from the 150 mV input: 200 µV (-ish). It’s actually around 1 mV, suggesting plenty of blowby through the baling-wire connections hidden under that neat top surface. I think that’s why the whole setup shows only about 8 dB of dynamic range; more attention to detail may be in order, although the peaks probably won’t move all that much.

    Anyhow, even though the AD8310 log amp module should be able to handle such a tiny signal, the MAX4255 amp provides 40 dB of gain (OK, just 39.8 dB) and rolls off the high end at 220 kHz as a side benefit of its 22 MHz GBW.

    There’s way too much low frequency rumble at the amp output:

    100 Hz noise at MA4255 output
    100 Hz noise at MA4255 output

    What look like grass is actually the 60 kHz resonator output: those big lumps & bumps are noise from this-and-that. The repetitive peaks and dents exactly 10 ms apart (the cursors span four of ’em) felt a lot like OLED refresh cycles and, indeed, went away when I yanked the display out. Pulling the USB connection eliminates another tremendous heap o’ noise, so there’s likely a ground loop (-ish) thing going on, too. This may call for a USB optical isolator, its commercial equivalent, or more eBay offerings. Getting rid of that junk may improve the dynamic range enough to keep me from doing anything drastic.

    The AD8310 log amp input now has decent coupling caps, so it’s not seeing the VCC/2 bias, and I removed that kludged-in 50 Ω terminating resistor to present its full 1.1 kΩ input resistance to the op amp.

  • LF Crystal Tester: DDS Buffer Amp

    The Big Ideas: the DDS output, being more-or-less constant, needs a variable-gain amp to set the crystal drive level. The amp also fixes the impedance mismatch between the DDS output and the crystal, which may not be much of a problem for the (very) high ESR quartz tuning fork resonators in play.

    The AD9850 DDS output feeds a 70 MHz (-ish) elliptical reconstruction filter chopping off image frequencies descending from the 125 MHz sampling clock, with a 100 Ω (-ish) output impedance that’s just about purely resistive at 60 kHz. An on-board 3.9 kΩ resistor (labeled with 392 on their schematic) sets the full-scale output current to 10 mA for a peak voltage of 1 V. The module uses only the + output of the differential pair, which means the sine wave runs from 0 V to 1 V: 1 Vpp = 500 mVpeak = 353 mVrms (ignoring the 500 mV offset).

    Pin header J3 normally sports a jumper to connect the 3.9 kΩ RSET resistor, but you can insert an external resistor to increase the resistance and decrease the output current:

    IOUT = 32 × 1.248 V / RSET

    A little hot-melt glue action produced a suitable lashup from a 5 kΩ trimpot:

    AD9850 DDS Module - 5 k external RSET trimpot
    AD9850 DDS Module – 5 k external RSET trimpot

    The pillars of green wire insulation forestall screwdriver shorts to the bare pin headers, although that’s less of risk with the upper insulating foam sheet in place:

    Crystal Tester - First Light
    Crystal Tester – First Light

    A 5 kΩ trimpot can vary the output voltage downward by a factor of 2 = -6 dB, more or less.

    All the quartz tuning fork resonator specs I’ve found, none of which may apply to the units on hand, seem to require no more than 1 µW drive. Given a resonator’s equivalent series resistance of around 20 kΩ (for real!), the drive voltage will be 150 mV (-ish):

    1 µW = V² / 20 kΩ, so V = sqrt(20×10³) = 141 mV

    The nominal version of the crystal tester had a 50 Ω input impedance, so I picked a MAX4165 op amp with mojo sufficient for anything over 25 Ω; in retrospect, a lighter load than 48 Ω would be fine.

    In any event, the amp looks like this:

    MAX4165 Buffer Amp
    MAX4165 Buffer Amp

    What looks like a DIP switch is really the 3×2 jumper header just to the right of the foam insulation, in front of the SOT23 space transformer PCB carrying the MAX4165. No jumper = 0 dB gain, then 6 dB steps upward from there. The -6 dB trimpot range gives more-or-less continuous output tweakage across 24 dB, -6 dB to +18 dB, which is certainly excessive. The 24 Ω terminating resistors provide 6 dB loss into the crystal, so the effective range is -12 to +12 dB, with 0 dB = 350 mVrms and -6 dB = 150 mVrms (-ish) at the crystal.

    It’s a non-inverting amplifier, which (also in retrospect) probably isn’t a win:

    • Yet Another Bypass Cap on the cold end of the gain-setting resistors
    • Overly elaborate VCC/2 biasing to maintain sufficiently high input impedance

    I’m reasonably sure all those big caps contribute to some low-level motorboating, but haven’t tracked it down.

  • LF Crystal Tester: Pretty Plots

    A slight modification spits out the (actual) frequency and dBV response (without subtracting the 108 dB intercept to avoid negative numbers for now) to the serial port in CSV format, wherein a quick copypasta into a LibreOffice Calc spreadsheet produces this:

    Spectrum-32
    Spectrum-32

    Changing the center frequency and swapping in a 60 kHz resonator:

    Spectrum-60
    Spectrum-60

    Much prettier than the raw scope shot with the same data, there can be no denyin’:

    Log V vs F - 32766 4 Hz - CX overlay
    Log V vs F – 32766 4 Hz – CX overlay

    I think the wobbulations around the parallel resonant dip come from the excessively hugely too large 10 µF caps in the signal path, particularly right before the log amp input, although the video bandwidth hack on the AD8310 module may contribute to the problem. In any event, I can see the log amp output wobbling for about a second, which is way too long.

    Anyhow, the series-resonant peaks look about 1 Hz wide at the -3 dBV points, more or less agreeing with what I found with the HP 8591 spectrum analyzer. The series cap is a bit smaller, producing a slightly larger frequency change in the series resonant frequency: a bit under 2 Hz, rather than the 1 Hz estimated with the function generator and spectrum analyzer.

    I still don’t understand why the parallel resonant dip changes, although I haven’t actually done the pencil pushing required for true understanding.

    Ain’t they lovely, though?

  • Yellowbook Do-Not-Deliver Delivery Option

    Last summer I followed the procedure that should turn off (one of) the ersatz “Yellow Pages” directories littering our driveway.

    This just arrived:

    YellowBook Do-Not-Deliver Delivery
    YellowBook Do-Not-Deliver Delivery

    Seeing as how they have the wrong town in my address, there’s still another excuse available.

    My guess: they’re paid by tonnage of books delivered and have a powerful incentive to continue delivering all of them, no matter what gets in the way.

    You absolutely cannot make this stuff up.

  • Amazon Packaging

    The ample padding around this bag of fragile pecans leaves nothing to be desired:

    Amazon - well-packed pecans
    Amazon – well-packed pecans

    They’re firmly held in place on all sides, well protected from injury, and survived their shipping ordeal unscathed: not a bruise or break to be found. Well done!

    That’s not always the case. A padded envelope recently arrived with an obvious wound:

    Amazon - envelope perforations
    Amazon – envelope perforations

    Which came from its completely unprotected contents:

    Amazon - unprotected PCB pins
    Amazon – unprotected PCB pins

    Fortunately, the fragile glass front plate of that OLED managed to put itself flat against a small box inside the otherwise empty bag. it wasn’t broken, but due only to good fortune.

    “Static sensitive parts enclosed”, indeed …

  • Mailing Tube End Caps

    Faced with a need to send documents rolled up in a tube, rather than folded flat, I sawed off a suitable length of cardboard tube from the heap, then discovered a distinct lack of end caps.

    Well, once again, it’s 3D printing to the rescue:

    Mailing Tube Cap - top - Slic3r
    Mailing Tube Cap – top – Slic3r

    The small ribs probably don’t actually do anything, but seemed like a nice touch.

    They’re somewhat less boring from the bottom:

    Mailing Tube Cap - bottom - Slic3r
    Mailing Tube Cap – bottom – Slic3r

    The fancy spider supports that big flat top and provides some crush resistance. The flat flange should collect the edge of the packing tape wrapped around the ends.

    A firm shove installs them, so the size worked out perfectly:

    Mailing tube end cap - installed
    Mailing tube end cap – installed

    Add a wrap of tape to each end, affix the USPS label, and they went out with the next day’s mail, PETG hair and all.

    The OpenSCAD source code as a GitHub Gist:

    // Mailing tube end cap
    // Ed Nisley KE4ZNU – June 2017
    Layout = "Build";
    //- Extrusion parameters – must match reality!
    ThreadThick = 0.25;
    ThreadWidth = 0.40;
    function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
    Protrusion = 0.1;
    HoleWindage = 0.2;
    //- Screw sizes
    inch = 25.4;
    TubeID = 2 * inch;
    TubeWall = 0.1 * inch;
    CapInsert = 15.0;
    CapRim = 1.0;
    CapWall = 3*ThreadWidth;
    NumFlanges = 3;
    FlangeHeight = 3*ThreadThick;
    FlangeWidth = ThreadWidth/2;
    FlangeSpace = CapInsert / (NumFlanges + 1);
    OAHeight = CapInsert + CapRim;
    NumRibs = 3*4;
    NumSides = 3*NumRibs;
    //- Adjust hole diameter to make the size come out right
    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 TubeCap() {
    difference() {
    cylinder(d=TubeID,h=OAHeight,$fn=NumSides);
    translate([0,0,CapWall])
    cylinder(d=TubeID – 2*CapWall,h=OAHeight,$fn=NumSides);
    }
    for (i=[1:NumFlanges])
    translate([0,0,i*FlangeSpace])
    difference() {
    cylinder(d=TubeID + 2*FlangeWidth,h=FlangeHeight,$fn=NumSides);
    translate([0,0,-Protrusion])
    cylinder(d=TubeID – 2*CapWall,h=FlangeHeight + 2*Protrusion,$fn=NumSides);
    }
    for (i=[0:NumRibs-1])
    rotate(i*360/NumRibs)
    translate([0,-ThreadWidth,CapWall + ThreadThick])
    cube([TubeID/2 – CapWall/2,2*ThreadWidth,CapInsert + CapRim – CapWall – ThreadThick],center=false);
    translate([0,0,CapInsert]) {
    difference() {
    cylinder(d=TubeID + 2*TubeWall,h=CapRim,$fn=NumSides);
    translate([0,0,-Protrusion])
    cylinder(d=TubeID – 3*2*CapWall,h=2*CapRim,$fn=NumSides);
    }
    }
    }
    //- Build things
    if (Layout == "Show")
    TubeCap();
    if (Layout == "Build")
    translate([0,0,OAHeight])
    rotate([180,0,0])
    TubeCap();
  • Monthly Image: Great Blue Heron

    This Great Blue Heron caught a bright orange goldfish in the Vassar Farm Pond just before I rode past, spotted the scene, and fumbled my camera out of the underseat bag.

    The heron hurked the fish down, with the abrupt right-angle bend in its neck marking the fish’s current location:

    Great Blue Heron - swallowing
    Great Blue Heron – swallowing

    A bit of wiggling & jiggling put the meal in the right place and the bird relaxed:

    Great Blue Heron - ruminating
    Great Blue Heron – ruminating

    A postprandial flight around the pond apparently settled the fish:

    Great Blue Heron - takeoff
    Great Blue Heron – takeoff

    It landed on a snag a few dozen feet from where it started, then proceeded to look regal:

    Great Blue Heron - idling
    Great Blue Heron – idling

    Those things really do look like pterodactyls in flight!