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

  • Sticky Trap Results

    Sticky Trap Results

    In late May we deployed six sticky traps in and around the onion bed, attempting to reduce the number of Onion Fly maggots. By mid-June the sheets were covered with the shredded leaves Mary uses to mulch the onions, but half a dozen flies were out of action:

    Sticky trap - 2021-06
    Sticky trap – 2021-06

    We’re pretty sure that’s what these things are:

    Sticky trap - Onion Fly - 2021-06
    Sticky trap – Onion Fly – 2021-06

    They’re supposed to have red eyes, but being affixed to a sheet of snot for a few weeks doesn’t do the least bit of good for your eyes.

    We replaced the sheets and left them in place until the end of July:

    Sticky trap - 2021-07
    Sticky trap – 2021-07

    The sheets took another half-dozen flies out of circulation, Mary began harvesting the onions, and observed it was the healthiest onion harvest she’s ever had.

    We declared victory, removed the traps, and the remaining onions suffered considerable maggot damage over the next few weeks.

    Anecdotally, it seems reducing the Onion Fly population by (what seems to be) a small amount and maintaining pressure on the population dramatically reduces the number of maggots available to damage the onion crop. At least for a single bed in a non-commercial setting.

    The plural of anecdote is not anecdata, but we’ll try it again next year, leave the traps in place while the onions are in the ground, and see what happens.

  • MP1584 Current Regulator: Arduino Blinkiness

    MP1584 Current Regulator: Arduino Blinkiness

    Mostly because I wanted to verify that it really worked:

    MP1584 current - red LED - Arduino blinkiness
    MP1584 current – red LED – Arduino blinkiness

    The Arduino Nano runs the default Blink program that all the knockoff manufacturers use as their final QC test.

    The MP1584 specs say the Enable input can accept a logic signal up to 6 V, the Nano runs at 5 V regulated down from the 6.3 V from the bench supply, and the 1 W red LED now flashes 1 s ON / 1 s OFF.

    The current feedback works as it did before, too, which is comforting.

    The Nano adds 20 mA to the bench supply, so the whole affair runs at 220 mA = 1.4 W. Of course, it’s now at a 50% duty cycle, so that helps.

    I doubt hand-hewing an astable multivibrator is the right way to add blinkiness, but it’d definitely be playing on hard mode.

  • Tree Frog Redux

    Tree Frog Redux

    Mary found another tree frog while picking Savoy lettuce for breakfast:

    Tree frog on Savoy cabbage
    Tree frog on Savoy cabbage

    They’re much better camouflaged in their (more or less) natural surroundings, so I didn’t spot it at first, either.

    They really are cute little gadgets:

    Tree frog on Savoy cabbage - detail
    Tree frog on Savoy cabbage – detail

    This is only the fourth tree frog she’s seen in the last two decades, but the second one in a month. It may be the same frog as before, although the garden now has a rather husky resident snake who seems to be eating well.

  • MP1584 Current Feedback: 1 W Red LED

    MP1584 Current Feedback: 1 W Red LED

    A red 1 W LED works just as well as the amber LED from an MP1584 regulator hacked into current feedback mode:

    MP1584 buck regulator - current feedback - red LED
    MP1584 buck regulator – current feedback – red LED

    I started with the same 1.65 Ω sense resistor and got the same 484 mA current, with the LED forward drop at a surprisingly high 3.3 V = 1.6 W. Ouch.

    Adding a 1 Ω series resistor to get 2.65 Ω lowered the current to 300 mA with a forward drop of 2.45 V = 740 mW.

    Running the numbers suggested a 2.3 Ω sense resistor made from a pair of parallel 4.7 Ω resistors, which produced 346 mA and an LED drop of 2.66 V = 920 mW. The resistor dissipates 280 mW.

    The bench supply provides 6.3 V @ 200 mA = 1.26 W, so the overall efficiency is 94% and the LED burns 73% of the input.

    I expected the red LED would have a lower forward drop than the amber LED, but it’s actually higher.

    Word: Trust, but verify.

  • MP1584 With Current-Mode Feedback

    MP1584 With Current-Mode Feedback

    This actually worked out the way I expected:

    MP1584 buck regulator - current feedback
    MP1584 buck regulator – current feedback

    The PCB is the generic MP1584 buck regulator, as seen before in its normal voltage feedback mode, rewired to get feedback based on the LED current, so that it adjusts the output voltage to maintain a constant LED current, regardless of LED forward drop variations.

    Pin 4 normally sees the output voltage divided down to the 0.8 V error comparator reference voltage:

    MP1584 - buck regulator - voltage feedback
    MP1584 – buck regulator – voltage feedback

    Yes, the MP1584 is “not recommended for new designs”, which surely accounts for the myriad cheap regulators built around it. Somebody picked up a great deal on a vast pile of obsolete ICs and is passing the savings along to us; there are exactly zero hits for MP2338 buck regulators.

    Putting the ballast resistor on the low side of the LED turns it into a current sensor:

    MP1584 - buck regulator - LED current feedback
    MP1584 – buck regulator – LED current feedback

    Pick R to drop 0.8 V at the desired LED current and It Just Works™.

    The two 3.3 Ω resistors in the top photo produce a 1.65 Ω sense resistor to set the LED current at:

    485 mA = 800 mV / 1.65 Ω

    It actually works out to a bit higher than that, because I stuck a 100 Ω resistor in series with the feedback input. The PCB still has the 8.2 kΩ resistor from the original voltage divider, so the error amp sees only 99% of the sense voltage, but it’s close enough.

    With 6.3 V and 0.28 A = 1.76 W from the bench supply over on the left, the regulator puts 490 mA through the LED. The LED drops 2.54 V = 1.24 W and the resistor drops 0.809 V (that 1% thing) = 0.4 W for a total of 3.35 V and 1.64 W. The regulator is 93% efficient, although the resistor burns a quarter of the energy.

    One could use a Hall effect current sensor and an op amp circuit to deliver the proper feedback voltage without resistive loss, but I think burning half a watt is Good Enough for the purpose.

    One could add parallel resistors with MOSFET switches to set the LED current. An unswitched resistor would set the lowest current, with switched parallel resistors lowering the resistance, raising the current, and brightening the LED.

    The PCB leaves the Enable input floating with an internal pullup. Grounding the pin shuts off the LED as you’d expect, so I can blink the LED without any further hassle.

    One could imagine simultaneously blinking and brightening the LED as needed.

    That was surprisingly simple …

  • Natural Gas Meter non-Protection

    Natural Gas Meter non-Protection

    Spotted on the way into a fast food joint:

    Natural Gas Meter Plumbing - overview
    Natural Gas Meter Plumbing – overview

    Reading the lower meter seems particularly difficult:

    Natural Gas Meter Plumbing - detail
    Natural Gas Meter Plumbing – detail

    Given how bollards embedded in concrete fail, they’re not providing any protection.

    Did the meters get plumbed in first, with the bollards carefully fitted around them?

  • Clearwing Hummingbird Moth

    Clearwing Hummingbird Moth

    The butterfly bush attracted another Hummingbird Moth:

    Clearwing Hummingbrid Moth
    Clearwing Hummingbrid Moth

    As always, those gadgets are a wonder to behold!

    Photo from the Pixel 3a, zoomed all the way, and showing why digital zooming isn’t the way to get nice pictures. On the other paw, it’s the camera I always have with me.