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.

Tag: Improvements

Making the world a better place, one piece at a time

  • Sencha Green Tea: Japanese vs. Chinese

    I recently ordered a pound of genuine Japanese Sencha Green Tea from Harney & Sons (who turn out to be a long bike ride away at the Millerton end of the Harlem Valley Rail Trail), having had entirely enough of the rather bitter Chinese Sencha from the local grocery store.

    Guess which one is which:

    Japanese vs Chinese Sencha Green Tea
    Japanese vs Chinese Sencha Green Tea

    Yup, Japanese on the left, Chinese on the right. The latter comes from the bottom of the container, hence the larger proportion of flakes, but it’s obviously different stuff.

    Based on the first few cups, the new tea has a much better taste.

    From what I read, the price of Japanese teas has taken a real beating in recent years, because everyone (else) fears Fukushima Daiichi fallout. My feeling is that a Chinese tea plantation could be downwind of Smiling Face Heavy Metal Refinery Complex Number 5 and you’d never know it.

    For reference, the Japanese Green Sencha was $40 for 1 lb delivered.

    They tossed in a few sample packets, including “Paris: Black tea with Fruit and Caramel”, which was horrible…

  • Hall Effect LED Current Control: Switched MOSFET Gates

    The rise and fall times for the LEDs on the over-the-top blinky taillight left a bit to be desired, at least if you were interested in short pulses:

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

    So I spliced an analog switch between the PWM filter and the gate, with inputs selecting ground and the PWM drive voltage:

    Switched MOSFET gate - analog switch schematic
    Switched MOSFET gate – analog switch schematic

    This being a prototype, that involved epoxying a SOT23-6 package atop the MOSFET, with flying wires all over the PCB:

    Hall Effect PCB - MOSFET gate switch
    Hall Effect PCB – MOSFET gate switch

    It works pretty well:

    VDS ILED 50 mA div - 200 50 150 25 mA
    VDS ILED 50 mA div – 200 50 150 25 mA

    The top trace is the drain voltage and the bottom trace is the LED current at 50 mA/div.

    The current transitions come out vertical at any sweep speed, even through the Tek Hall effect current probe. The pulses would be rectangular if I weren’t changing the current for each one.

    The current feedback loop closes through the Arduino’s main loop, which includes a 1 ms delay after each PWM output change before measuring the LED current. As a result, each loop takes just under 2 ms, but, fortunately, ramping from 25 mA (in the last pulse) to 200 mA (in the first pulse) requires less than 10 PWM increments; you can see the stairsteps if you squint.

    Next up: bump the PWM to 64 kHz (from 32 kHz) and rip out the pull-down resistor that used to hold the gate near ground when the output floated as an input. That should improve the output ripple caused by the MOSFET’s bias as a perfectly serviceable linear amplifier.

    The control loop now fetches durations & currents from an array-of-structs, so I can customize each pulse. An obvious enhancement: remember the gate drive that produced a given current, then restore the corresponding value as the starting PWM setting for each pulse, so the loop begins closer to reality. The gate drive varies with temperature and suchlike, so it can’t be a compile-time constant, but maybe the startup routine could preload the array / list / cache with values taken from a “lamp test”.

    Four close-together flashes repeating at about 2 Hz, even with two runt pulses, turn the LEDs into a real eye magnet…

  • Subaru Forester Manual: Oddities

    Our shiny new Subaru Forester came with a 540 page user manual and, being that type of guy, I’ve been reading through it. I suspect warnings like this come from a lawsuit in the not-too-far-distant past:

    Camera Disassembly Warning
    Camera Disassembly Warning

    They seem to be very, very worried about small animals:

    Check for Small Animals
    Check for Small Animals

    In this situation, I’d hope the engine would fare better than, say, a squirrel:

    Trapping Small Animals
    Trapping Small Animals

    Unlike the Toyota Sienna’s enclosed belt, I could actually replace this one, so I suppose a squirrel could take up residence somewhere in there:

    Subaru Forester - belt and oil filter
    Subaru Forester – belt and oil filter

    And look at that oil filter: right up top, inside a bowl! The never-sufficiently-to-be-damned Toyota engineers mounted the Sienna’s filter horizontally, halfway up the side of the transverse V6 engine, where it slobbers oil down the block and over the front exhaust manifold.

    So far, so good…

  • HP Super Glossy Paper vs. Generic Ink: FAIL

    When Aitch moved to NC, he unloaded a stack of printer paper on me to avoid paying half a buck a pound to haul it along. One package contained some high-end HP photo paper that, not being a high-end photo kind of guy, I figured I’d use for my 3D printing brag sheets.

    Alas, after trying several permutations of image quality / paper type / ink density, it seems that the cheap generic ink I’m using in the Epson R380 simply isn’t compatible with the HP paper. The top image shows that the ink doesn’t wet the paper and forms a weird alligator-skin pattern:

    HP vs Staples Glossy Photo Paper
    HP vs Staples Glossy Photo Paper

    The bottom image looks perfectly fine; it’s on cheap Staples photo paper, printed with the usual Photo quality on Photo paper.

    I’ve read vague statements here-and-there that some HP ink uses an entirely different chemistry from the usual inkjet printers and, perhaps, that accounts for the mismatch. Not a problem, but it did blow an hour while proving that it wasn’t the configuration settings doing me in.

  • Slicing Anomaly: Resolved, With Cross-Check

    Some pix that serve as a stick in the ground showing that my current Slic3r configuration constellation doesn’t produce thin infill

    All of the layers in the 20 mm calibration cube look just like this:

    Solid cube - Slic3r normal infill
    Solid cube – Slic3r normal infill

    The bottom layer of the Tux mold comes out solid:

    Tux thread fill - bottom
    Tux thread fill – bottom

    As does the top:

    Tux thread fill - top
    Tux thread fill – top

    The Gcode Analyzer algorithm that assigns colors to numeric values tends to produce many aliases, although most of the time you can figure out what’s going on. If somebody wants to dive into the code, I’d like to have unique colors and get the color table sorted in ascending order.

    The current Slic3r configuration:

    # generated by Slic3r 1.1.1 on Sat May  3 10:31:36 2014
    avoid_crossing_perimeters = 0
    bed_size = 190,250
    bed_temperature = 70
    bottom_solid_layers = 3
    bridge_acceleration = 0
    bridge_fan_speed = 100
    bridge_flow_ratio = 1
    bridge_speed = 150
    brim_width = 0
    complete_objects = 0
    cooling = 1
    default_acceleration = 0
    disable_fan_first_layers = 1
    duplicate_distance = 6
    end_gcode = ;-- Slic3r End G-Code for M2 starts --\n;  Ed Nisley KE4NZU - 15 November 2013\nM104 S0		; drop extruder temperature\nM140 S0		; drop bed temperature\nM106 S0		; bed fan off\nG1 Z180 F2000	; lower bed\nG1 X130 Y125 F30000	; nozzle to right, bed front\nM84     	; disable motors\n;-- Slic3r End G-Code ends --
    external_perimeter_speed = 25
    external_perimeters_first = 0
    extra_perimeters = 1
    extruder_clearance_height = 25
    extruder_clearance_radius = 15
    extruder_offset = 0x0
    extrusion_axis = E
    extrusion_multiplier = 1.07
    extrusion_width = 0.4
    fan_always_on = 0
    fan_below_layer_time = 30
    filament_diameter = 1.79
    fill_angle = 45
    fill_density = 100%
    fill_pattern = rectilinear
    first_layer_acceleration = 0
    first_layer_bed_temperature = 70
    first_layer_extrusion_width = 0.4
    first_layer_height = 100%
    first_layer_speed = 25
    first_layer_temperature = 175
    g0 = 0
    gap_fill_speed = 50
    gcode_arcs = 0
    gcode_comments = 0
    gcode_flavor = reprap
    infill_acceleration = 0
    infill_every_layers = 3
    infill_extruder = 1
    infill_extrusion_width = 0
    infill_first = 1
    infill_only_where_needed = 0
    infill_speed = 150
    interface_shells = 0
    layer_gcode = 
    layer_height = 0.2
    max_fan_speed = 100
    min_fan_speed = 75
    min_print_speed = 4
    min_skirt_length = 15
    notes = 
    nozzle_diameter = 0.35
    only_retract_when_crossing_perimeters = 1
    ooze_prevention = 0
    output_filename_format = [input_filename_base].gcode
    overhangs = 1
    perimeter_acceleration = 0
    perimeter_extruder = 1
    perimeter_extrusion_width = 0.4
    perimeter_speed = 150
    perimeters = 2
    post_process = 
    print_center = 0,0
    raft_layers = 0
    randomize_start = 1
    resolution = 0.05
    retract_before_travel = 1
    retract_layer_change = 0
    retract_length = 1
    retract_length_toolchange = 5
    retract_lift = 0
    retract_restart_extra = 0
    retract_restart_extra_toolchange = 0
    retract_speed = 60
    skirt_distance = 3
    skirt_height = 1
    skirts = 3
    slowdown_below_layer_time = 20
    small_perimeter_speed = 25
    solid_fill_pattern = rectilinear
    solid_infill_below_area = 5
    solid_infill_every_layers = 0
    solid_infill_extrusion_width = 0
    solid_infill_speed = 150
    spiral_vase = 0
    standby_temperature_delta = -5
    start_gcode = ;-- Slic3r Start G-Code for M2 starts --\n;  Ed Nisley KE4NZU - 15 Nov 2013\n;  28 Feb 2014 - 6 Mar 2014 - tweak Z offset\n; Z-min switch at platform, must move nozzle to X=130 to clear\nM140 S[first_layer_bed_temperature]	; start bed heating\nG90				; absolute coordinates\nG21				; millimeters\nM83				; relative extrusion distance\nG92 Z0			; set Z to zero, wherever it might be now\nG1 Z10 F1000	; move platform downward to clear nozzle; may crash at bottom\nG28 Y0			; home Y to be sure of clearing probe point\nG92 Y-127 		; set origin so 0 = center of plate\nG28 X0			; home X\nG92 X-95		; set origin so 0 = center of plate\nG1 X130 Y0 F30000	; move off platform to right side, center Y\nG28 Z0			; home Z with switch near center of platform\nG92 Z-4.40		; set origin to measured z offset\nG0 Z2.0			; get air under switch\nG0 Y-127 F10000	; set up for priming, zig around corner\nG0 X0			;  center X\nM109 S[first_layer_temperature]	; set extruder temperature and wait\nM190 S[first_layer_bed_temperature]	; wait for bed to finish heating\nG1 Z0.0 F500	; put extruder near plate \nG1 E25 F300		; prime to get pressure, generate blob\nG1 Z5 F2000		; rise above blob\nG1 X15 Y-125 F20000	; jerk away from blob, move over surface\nG1 Z0.0 F1000	; dab nozzle to attach outer snot to platform\nG4 P1			; pause to attach\nG1 X35 F500		; slowly smear snot to clear nozzle\nG1 Z1.0 F2000	; clear bed for travel\n;-- Slic3r Start G-Code ends --
    start_perimeters_at_concave_points = 1
    start_perimeters_at_non_overhang = 1
    support_material = 0
    support_material_angle = 0
    support_material_enforce_layers = 0
    support_material_extruder = 1
    support_material_extrusion_width = 0
    support_material_interface_extruder = 1
    support_material_interface_layers = 0
    support_material_interface_spacing = 0
    support_material_pattern = honeycomb
    support_material_spacing = 2.5
    support_material_speed = 150
    support_material_threshold = 0
    temperature = 175
    thin_walls = 1
    threads = 2
    toolchange_gcode = 
    top_infill_extrusion_width = 0.4
    top_solid_infill_speed = 25
    top_solid_layers = 3
    travel_speed = 250
    use_firmware_retraction = 0
    use_relative_e_distances = 0
    vibration_limit = 0
    wipe = 0
    z_offset = 0
    
  • V-Brake Replaceable Pad Pins

    After replacing the front wheel bearings, I replaced both pairs of brake pads. The rear brakes use holders with slide-in pads, but I’ve never been happy with the dinky little pins that retain the pads, so this time I’m using ordinary cotter pins:

    V-brake pads - cotter pin retainer
    V-brake pads – cotter pin retainer

    The rear brake pads on a diamond-frame bike sit nearly horizontally on the seat stays, with the pin head pointed upward. On Tour Easy recumbents, the pads stand almost vertically on the chain stays, with the pins sideways:

    Tour Easy rear brakes
    Tour Easy rear brakes

    That photo dates to 2010, when those brakes were new. Nary a pin has worked loose yet and I don’t expect they ever will, but …

    If the pins rust before the pads wear out, I’ll go back to those little bitty OEM stainless pins.

  • Wide-Angle Lens Distortion Correction

    The Sony HDR-AS30V camera lens has a view angle of 120° or 170°, achieved by internal image processing rather than mechanical lens adjustments. For most action-camera purposes you don’t care about fisheye distortion, but sometimes a more rectilinear picture will look better, in which case the GIMP’s Lens Distortion filter comes in handy.

    A still image at 120°, which doesn’t look all that bad, really:

    Sony HDR-AS30V 120 angle - as captured
    Sony HDR-AS30V 120 angle – as captured

    Applying Main=-25 gives this:

    Sony HDR-AS30V 120 angle - corrected
    Sony HDR-AS30V 120 angle – corrected

    A frame captured from video at 170°, with the overhead wires hanging upward:

    Sony HDR-AS30V 170 angle - as captured
    Sony HDR-AS30V 170 angle – as captured

    Applying Main=-25, Edge=-12.5, Zoom=+8 flattens them enough to be acceptable:

    Sony HDR-AS30V 170 angle - corrected
    Sony HDR-AS30V 170 angle – corrected

    The main effect of the Zoom parameter seems to be discarding the severely distorted remnants around the edges of the corrected 170° view. Sometimes, those pixels around the edges can be very, very important, so I’d rather make that decision after the fact.

    If you must fix many images at once, Fred’s defisheye ImageMagick Script would certainly be useful. There’s also a bare-knuckles ImageMagick version, including how to measure lens parameters.