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.

Category: Science

If you measure something often enough, it becomes science

  • Monthly Science: Apple Storage

    We hauled 70 pounds of apples back across the river last month:

    Apple Ride - 2013-10-20
    Apple Ride – 2013-10-20

    If only there were a Spackenkill Road bridge across the Hudson…

    We laid the bags out on the garage floor, seeing as how they can’t go into the cold cellar with the root crops (apples give off ethylene gas, which doesn’t mix well with long-storage crops). I dropped a Hobo datalogger into one bag to record the temperatures:

    Apples and air temperature
    Apples and air temperature

    The purple trace comes from a data logger in the attic, which is as close as we have to an outside air temperature record.

    Those low air temperatures suggest it’s time to move the remaining apples into the basement, as far from the root cellar as possible, as we have more nights in the teens ahead.

  • Solubility of PLA in Common Gun Bore Cleaners

    According to Wikipedia, Polylactic acid, a.k.a. PLA “is soluble in chlorinated solvents, hot benzene, tetrahydrofuran, and dioxane” and is not soluble in acetone, alcohol, or water.

    Just to see what happens, I dunked a pair of those 3D printed dummy bullets in Shooter’s Choice Gun Solvent (which has since gone obsolete) and Hoppe’s No. 9 Gun Bore Cleaner (which seems to have been reformulated several times), then let them air-dry in those background puddles:

    PLA dummy bullets after solvent bath
    PLA dummy bullets after solvent bath

    Nothing much happened: they’re not soft or gummy, haven’t slumped, and seem undaunted.

    That’s in contrast to ABS plastic, which is readily soluble in acetone and the aromatic hydrocarbons commonly found in solvents used around firearms. Apart from that, ABS would be a slightly better choice on mechanical grounds. I’m not sure the difference really matters for most purposes, given the very wide tolerances on 3D printed objects.

  • Hall Effect Current Control PCB: First Light

    After winding the toroid the right direction, resoldering the ATmega2560, and fixing a scope probe, the brassboard PCB lit right up:

    VG 1193 mV - ID 50 mA-div - 1 ms PWM filter - overview
    VG 1193 mV – ID 50 mA-div – 1 ms PWM filter – overview

    The top trace is the gate drive at 200 mV/div, the bottom trace is the LED current at 50 mA/div. Expanding the timebase gives a closer look at the fuzz:

    VG 1193 mV - ID 50 mA-div - 1 ms PWM filter
    VG 1193 mV – ID 50 mA-div – 1 ms PWM filter

    Yup, that’s what deriving an analog voltage from a PWM output looks like. Verily, you’re seeing a 32 kHz PWM passed through a 1 ms = 160 Hz low-pass RC filter; the PWM frequency is 2 decades + 1 octave above the filter, so the 5 Vpp digital signal should be down 46 dB. Squinting at the ripple, it’s maybe 40 mV = -42 dB, which is certainly close enough, all things considered.

    The MOSFET controlling the LED current operates in its linear region (the whole point of this exercise!) and acts as a Class A amplifier. The datasheet says the forward transconductance is 21 S at VDS = 5 V and ID = 8 A, which certainly isn’t what we have here (about 1 V and 150 mA); you’d expect a 40 mV ripple to produce 840 mA of sawtooth. Under these conditions, the transconductance seems to be 2.5 S = 100 mA/40 mV.

    Anyhow, because the gate drive comes from an Arduino PWM output, it has 0.4% resolution and the voltage steps by a bit under 20 mV per PWM increment. Here’s what increasing the PWM output by one count looks like:

    VG 1213 mV - ID 50 mA-div - 1 ms PWM filter - overview
    VG 1213 mV – ID 50 mA-div – 1 ms PWM filter – overview

    Expanding the timebase:

    VG 1213 mV - ID 50 mA-div - 1 ms PWM filter
    VG 1213 mV – ID 50 mA-div – 1 ms PWM filter

    The gate drive is 20 mV higher and the current is 50 mA higher, so the transconductance again works out to 2.5 S.

    Note bene: The smallest gate voltage increment produces 50 mA more LED current. It works the same way in the other direction, too, putting a lower limit on the allowable LED current: when the ripple becomes larger than the nominal current, what’s the point?

    So, not surprisingly, precise LED current control isn’t possible with an Arduino’s PWM output, at least under these conditions. Using 16 bit PWM would increase the resolution (by a factor of 256), but the PWM ripple means the LED current varies by nearly 2/3 of the setpoint: 100 mApp for a 160 mA nominal LED current.

    You could apply a more drastic low-pass filter, but remember that the whole point is to blink the LEDs, not gradually turn them on and off. Eyeballometrically, the LED current risetime = 7 ms, which is very roughly what you’d expect from the 1 ms filter time constant: 5 τ = 99.3%. Doubling the filter time constant wouldn’t be a step in the right direction…

    To do this right, you need a real DAC with maybe 10 or 12 bit output (and careful attention to analog layout), which would be absurd in a circuit with an Arduino Pro Mini jammed on top.

    Given that it’s just blinking LEDs, none of this really matters: the LEDs are shatteringly bright and blink most satisfactorily. It’s a keeper, even with all that ripple…

  • Hall Effect Sensor: Toroid Winding Direction

    Pop Quiz!

    What’s the difference between the winding on this toroid:

    Hall effect sensor - toroid CW field
    Hall effect sensor – toroid CW field

    And the winding on this one:

    Hall effect sensor - toroid CCW field
    Hall effect sensor – toroid CCW field

    Very good!

    In the first picture, the top lead goes down the hole. In the second picture, the bottom lead goes down the hole.

    Bonus question 1: Why is this important?

    The winding’s chirality determines the direction of the magnetic field in the toroid by the right hand rule: grab the wire with your right hand, with your thumb pointed in the direction of (conventional) current flow, then your fingers wrap around the wire in the direction of the induced field.

    The Hall effect sensor snuggled in the toroid’s gap produces a bipolar output that depends on both the magnetic field’s direction and intensity, so reversing the field direction changes the phase of the sensor output: an increasing field can either increase or decrease the sensor’s output.

    Bonus question 2: For a given sensor orientation, what’s the probability of winding the toroid correctly on the first try?

    Yup: zero. Wound it backwards…

    It’s not practical to reverse the sensor orientation, the leads weren’t quite long enough to swap, and turning the toroid upside-down is effectively the same as swapping the too-short leads.

    The size of the solder blob at the end of the top lead tells you everything you need to know about the sequence of the picvtures.

  • Monthly Science: Penumbral Lunar Eclipse

    We attended the Walkway Over the Hudson’s Moonwalk event / fundraiser on the night of the Hunter’s Moon, which also happened to be a penumbral eclipse. You can barely see the darkness in the lower right-hand quadrant, down around Tycho Crater:

    Penumbral Eclipse of Hunters Moon
    Penumbral Eclipse of Hunters Moon

    That’s a fairly crappy picture by contemporary standards: taken with my Canon SX-230HS, zoomed tight, hand-held, braced atop the Walkway’s railing. Any of the telescopes deployed along the Walkway produced better / sharper / more impressive images. Heck, we’ve been there and brought back moondust, despite being stuck in LEO ever since.

    Galileo upended the universe with observations based on images no better than that. What’s your excuse?

    Wisely is it written: A poor craftsman blames his tools.

    Go read Galileo’s Daughter by Dava Sobel. If you have dry eyes at the end of the last sentence, then I’d say you have what it takes to be the CEO of a really big financial institution.

  • Outdoor Display: Diurnal Pumping

    The HRECOS folks installed a display on the Walkway Over the Hudson that shows current environmental conditions at the river sampling station just north of the bridge:

    HRECOS Display with internal condensation
    HRECOS Display with internal condensation

    Those two blurry white rectangles are paper charts taped to the inside of the case below the scrolling LED display, so I think they’re discovering what happens when you trap ambient air inside a sealed enclosure without dehumidification. Even if they weren’t opening the case every now and again to change the charts, diurnal pumping would pull outside air past any affordable non-hermetic seal.

    That fancy electronics won’t last long under those conditions; I foresee several pounds of silica gel in their future…

  • Hard Drive Lifetime: Data Points

    Three years ago I installed a 1.5 TB WD Elements USB drive as an external backup for the “file server” in the Basement Laboratory. The log files show that the drive started spitting out “short reads” early in October, which means the rust has begun flaking off the platters.

    Repeated fsck -fyv /dev/sda1 runs produce repeated failures at various spots, so it’s not in good condition:

    e2fsck 1.41.14 (22-Dec-2010)
    Backup-1.5TB contains a file system with errors, check forced.
    Pass 1: Checking inodes, blocks, and sizes
    Error reading block 97649088 (Attempt to read block from filesystem resulted in short read) while getting next inode from scan.  Ignore error? yes
    ... snippage ...
    Pass 2: Checking directory structure
    Error reading block 104039017 (Attempt to read block from filesystem resulted in short read) while reading directory block.  Ignore error? yes
    Force rewrite? yes
    Directory inode 26009985, block #26, offset 0: directory corrupted
    Salvage? yes
    ... snippage ...
    Pass 4: Checking reference counts
    Inode 25903223 ref count is 41, should be 40.  Fix? yes
    ... snippage ...
    Backup-1.5TB: ***** FILE SYSTEM WAS MODIFIED *****
    
    736471 inodes used (0.80%)
    10173 non-contiguous files (1.4%)
    9367 non-contiguous directories (1.3%)
    # of inodes with ind/dind/tind blocks: 119655/12234/0
    142996292 blocks used (39.04%)
    0 bad blocks
    3 large files
    
    276772 regular files
    459614 directories
    0 character device files
    0 block device files
    0 fifos
    10377447 links
    76 symbolic links (72 fast symbolic links)
    0 sockets
    --------
    11113909 files
    

    Given that rsnapshot lashes the daily backups together with extensive hard links, so that there’s only one copy of a given file version on the drive, I don’t know what 76 symbolic links might mean.

    It’s been spinning up once a day, every day, for about 40 months; call it 1200 power cycles and you’ll be close. The usual runtime is about 10 minutes, giving the poor thing barely enough time to warm up.

    One data point does not a curve make.

    The warranty on new WD Element drives seems to be a year; I have no idea what it was slightly over three years ago, although I’m pretty sure it wasn’t more than three years…

    The various desktop boxes around here get powered up once a day, too, but I tend to replace them every few years and have never had a hard drive failure; a few system boards have crapped out, though. The boxes acting as controllers for the 3D printers and the Sherline CNC mill have a much lower duty cycle.