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

  • In Case Of Emergency: FAIL

    In Emergency Blank Sign
    In Emergency Blank Sign

    Saw this on a family bike ride. It’s atop a Central Hudson gas pipeline, pretty much directly across the Hudson from that gas storage tank, although on a local branch line.

    Other such gas-pipeline signs have contact information, like the phone number, printed in red ink. Alas, red ink absorbs UV and eventually bleaches away. It’s not like this is an unknown phenomenon that’s happened here for the first time.

    What’s odd about this, though, is that the pole supporting the sign and the pipe leading to the sampling head (?) were both recently repainted with nice red paint. One would think the painter would be empowered to report problems like this, but I’m guessing that job has been subcontracted out through so many layers that the actual guy-with-the-brush neither knows nor cares what he’s painting.

    I’d report it, but I’m unwilling to invest half an hour being told that my call is important to them.

    Yessir, yessir, three bags full.

  • Staghorn Beetle

    This scary-but-innocuous fellow landed on our doorstep last night.

    Staghorn Beetle
    Staghorn Beetle

    He’s a staghorn beetle and, as nearly as we can tell, uses the mandibles to demonstrate his superiority over the rest of the staghorn beetles in the neighborhood.

    Staghorn Beetle - top
    Staghorn Beetle – top

    Go, beetle, go!

  • Simpleminded EPROM Programming Power Supply

    My buddy Eks recently acquired a “guaranteed broke” Tektronix 492 spectrum analyzer that turned out to have a defunct memory board: the ROM holding the initial boot firmware has a bad checksum. He verified that by swapping in a memory board from another 492 and found it worked perfectly.

    The original board used Mostek MK36400 8Kx8 masked ROMs, but they can be replaced by either 27HC641 or (in a pinch) a quartet of 2716 EPROMs. Being a stickler for authenticity, Eks picked up some 27HC641 chips. That means we need a device programmer, as none of the burners we have know anything about 27HC641s. There are other ways of getting the job done, but this has the advantage of getting me some face time with my role model for being a Renaissance Man.

    Tek EPROM Power Supply Breadboard
    Tek EPROM Power Supply Breadboard

    To make a long story somewhat shorter, the 27HC641 is a 8Kx8 EPROM in a 24-pin package with the usual 12 address lines, 8 data lines, power, ground, and a single chip-select / output-enable / programming-voltage pin. Normal EPROMs in 28-pin packages have separate pins for all those functions to make life easier.

    Anyhow, the CE/VPP supply must provide 30 mA at 12.5 V as well as the usual minuscule FET logic currents at 5 V and 0 V. The VCC supply must cough up a staggering 90 mA during normal operation at 5 V and 30 mA at 6 V during programming. Both supply voltages must switch between three levels: unnaturally high during programming, 5 V for normal operation, and 0 V for output-enable and during chip removal / installation in the programming socket.

    This being an entirely one-off project, I used good old LM317T regulators with a handful of transistor switches to vary the voltage and clamp the output to ground. The CE/VPP supply looks like this:

    Schematic of VPP-VCE pin supply
    Schematic of VPP-VCE pin supply

    An Arduino will drive the gates of Q2 & Q3, with all the programming logic and timing handled by software. The shortest VPP pulse is a millisecond long, so that’s not a real restriction, and the verification can happen at nose-pickin’ speed. That simplifies a lot of other things about the project, too.

    Switch: 12.5 to 5 V
    Switch: 12.5 to 5 V

    Q3 selects the output voltage: gate high = 5 V, gate low = 12.5 V. The scope shot shows the gate driven with a 500-Hz square wave, which is about the right width for the programming pulse.

    I prototyped this on a solderless breadboard (ptooie) as shown above with 5% resistors, so the actual voltages aren’t quite nominal. The readout says 13.28 and 5.3 V, which will need some trimming to get inside the EPROM’s 5% spec.

    The 1 nF cap at the LM317 Adjust terminal encourages stablity by knocking off the high-frequency stuff and slowing down the transitions just a smidge. The datasheet suggests up to 10 µF, which turns the transitions into triangles.

    The LM317 can only supply current to its load, so reducing the output voltage requires the load to draw current from C3. Because this is essentially a DC application, C3 can be quite small: there won’t be any other switching going on during the programming pulse. The datasheet recommends 1 – 10 µF, but definitely more than 5 nF.

    The LED is actually a key part of the circuit, as it draws current to pull the output voltage downward: more LED current = faster transition time. However, higher C3 = slower transitions.

    Fall time: 12.5 to  5 V
    Fall time: 12.5 to 5 V

    Seen at a higher magnification, the falling edge of the output waveform shows a decay that lasts 50 µs or so. The LED draws maybe 12 mA at 13 V, so the voltage across C3 should drop at

    (1/100 nF) x (12 mA) = 120 V/ms

    Applying a straightedge to the early part of that curve looks like 25 V in 100 µs; call it 250 V/ms, maybe a bit less.

    What’s a factor of two among friends, particularly given the tolerances on ceramic caps?

    T1 and Q1 (I don’t know why Eagle’s models use both T and Q as transistor prefixes, it’s probably an international thing) switch the output line between the LM317 and ground; I suspect just turning T1 off would work as well, but this way the chip pin is firmly held to 0 V, where it should be, regardless of leakage and other oddities.

    Switch: 5 to 0 V
    Switch: 5 to 0 V

    Because Q1 crops both sides of the transistion, the rise and fall happen in nanoseconds rather than microseconds.

    So, now that I know this will actually work, I can build a PCB and write some firmware…

    Memo to Self: make sure the code waits for the output transitions. Methinks delayMicroseconds() will be a constant companion.

  • Rudy Sunglasses Repair: Stress Cracking

    Rudy sunglasses stress cracking - left
    Rudy sunglasses stress cracking – left
    Rudy sunglasses stress cracking - right
    Rudy sunglasses stress cracking – right

    Mary dropped a pair of her sunglasses that disintegrated on impact: both earpieces broke off. She has trouble finding sunglasses that fit, so this is not to be taken lightly…

    The sunglasses had interchangeable lenses, a feature which she’d never used, and the lower of the two tabs that snapped into the earpieces had broken off — on both sides, simultaneously. These weren’t high-snoot items, but they were name-brand: Rudy Project from, IIRC, nashbar.com.

    Peering through the microscope, it turns out that the lens material may have been pretty good optically, but wasn’t up to the mechanical task: the two remaining tabs had deep stress cracks. The right-side picture shows the lens upside-down, as that was the easiest way to set up the shot.

    Notice the many, many cracks that penetrate nearly all the way through the tabs. The tabs didn’t break because she dropped the glasses on the floor, they broke because there was barely anything left holding the tabs in place.

    Mind you, she’d never removed the lenses from the earpieces, so this isn’t a case of failure-from-overuse, either. They’re about a year old, more or less, and have been used in stressful tasks like gardening and the occasional bike ride.

    Urethane adhesive foam-in-place
    Urethane adhesive foam-in-place

    I slobbered urethane glue into the ends of the earpieces to mechanically lock the remaining tabs in place and fill all the voids. It looks rather ugly here, but the excess adhesive simply snaps off because it doesn’t chemically bond with either of the other two plastics.

    Rudy sunglasses stress cracking - center
    Rudy sunglasses stress cracking – center

    After screwing everything back together again, I noticed that there’s another stress crack growing in the middle of the lens, just over the nosepiece. These sunglasses are not long for this world: that failure will be an end-of-life event.

    The frames claim “Designed in Italy” which doesn’t win any points with me; the design is fundamentally flawed.

    Yo, Rudy, how about designing some sunglasses with a high-tech feature like durability… rather than style?

    Oh, yeah, I suppose this repair voids the Warranty. Perhaps buying from Nashbar on sale triggers this clause: “Buying Rudy Project sunglasses, goggles or helmets from an online retailer at a price below the suggested retail price (MSRP) voids your warranty.” The expense of sending them in negates any possible benefit, which I’m sure they realize, too.

  • War on the Unexpected: A Screenplay

    EXT.  UPSTATE NY APARTMENT COMPLEX — EARLY AFTERNOON

    Clouds
    Clouds

    A STRANGER emerges from an apartment and walks through the adjacent parking lot to the complex’s central roadway. A late-middle-age white male, he is dressed casually in black trousers, red t-shirt with STAFF in large white letters on the back, well-worn blue-and-white pinstriped locomotive driver (“engineer”) cap, and dark sunglasses. His graying beard is trimmed short, but he is obviously overdue for his quarterly haircut. He carries a bulky black prosumer digital camera.

    The bright blue sky is filled with large clouds from an approaching storm front and, opposite the sun, a cumulonimbus bank looms over the far horizon above a row of apartment buildings.

    The Stranger studies the clouds, moves to various vantage points, examines the rest of the sky. He braces the camera against a road sign pole and fiddles extensively with the knobs & buttons while taking several pictures.

    WOMAN #1 emerges from a building, enters a car, and drives along the central roadway. She slows, stops next to the Stranger, and rolls down her window.

    WOMAN #1

    What are you taking pictures of?

    STRANGER

    Those great clouds over there! Looks like we’re in for a real storm later today!

    WOMAN #1

    Oh. Have a nice day. (She rolls up the window and drives off)

    The Stranger is joined an elderly COUPLE, WOMAN #2 who is probably his wife, and a teenage GIRL who vaguely resembles all of them. The Girl is wrapped in a large towel. They walk slowly through the apartment complex to the pool, appear baffled by the childproof latch on the gate, and are finally admitted by WOMAN #3 who shows them how to operate it.

    INT.  IN-GROUND POOL PATIO

    They sit around a table in the corner, jockeying the uncomfortable plastic chairs for position in the shade cast by the table’s umbrella, while the Girl removes a towel to reveal a red swimsuit, enters the pool, and begins swimming laps.

    Coming up for air
    Coming up for air

    Various other PEOPLE occupy the area near the pool, including older couples, males of various ages, several curvaceous mid-twenty-ish females clad in revealing swim / sunbathing attire, and a group of middle-age couples.

    The Stranger takes several pictures of the Girl in the pool.

    Time passes.

    The Stranger, realizing that he’s about to spend the next three hours sitting on his well-flattened butt in the van while driving home, stands up, stretches, and walks to the gate. He intently studies the labels on the childproof latch, which is misinterpreted as being baffled, and leaves the pool area.

    EXT.  APARTMENT COMPLEX ROADS

    Manhole cover
    Manhole cover

    The Stranger strolls around the apartment complex to the side entrance road, and returns along a different route. He seems to take a particular interest in drain grates, manhole covers, garage doors, and infrastructure in general. He scuffs the dirt from one manhole cover and takes a picture of it. He continues walking around the complex and returns to the pool.

    His companions gather themselves together and emerge from the pool gate.

    EXT.  POOL AREA

    A New York State Police car drives slowly into the complex through the side entrance. The TROOPER scans the area, spots the Stranger, and pulls up beside him.

    TROOPER

    Good day. How are you doing?

    STRANGER

    (Smiling) So far, so good.

    TROOPER

    What brings you here today?

    STRANGER

    We’re visiting my wife’s parents. (Gestures to indicate the Couple among his companions)

    TROOPER

    (Eyes the group) We’ve had a report of someone in the area taking pictures of buildings and possibly people.

    STRANGER

    Well, I’ve been taking pictures of clouds, a manhole cover, and my daughter. (Smiles) I think it’s still permitted for me to take her picture.

    TROOPER

    (Getting down to business) Your name?

    STRANGER

    (gives name, helpfully spells last name)

    TROOPER

    What’s your birth date?

    STRANGER

    (Gives a date long in the past)

    TROOPER

    (Typing on laptop PC) And your address?

    STRANGER

    (Gives city and state)

    TROOPER

    (With emphasis) Your street address.

    STRANGER

    (Gives street address)

    TROOPER

    Phone number?

    STRANGER

    (Gives phone number, repeats when trooper misses last four digits)

    TROOPER

    (Types, pauses, types, reads screen) Enjoy your stay.

    Trooper drives off, leaving apartment complex through main entrance.

    STRANGER

    (To his companions) Well, I now have a police record tagged “suspicious behavior”.

    The group walks back to the apartment while discussing recent events and their plans for the remainder of the Independence Day weekend.

    EXT.  APARTMENT COMPLEX

    P.O.V. pulls back and ascends in Google-Earth fashion to show entire Adirondacks region. The Stranger assumes the role of voice-over INTERLOCUTOR. Fade to black during narration.

    INTERLOCUTOR

    Despite my pique, the Trooper performed his job properly and with decorum. While the opinions of my companions differ, I contend that once a 911 call has been received, the police must follow established procedures to resolve the complaint. The response depends on the initial report and what the Trooper finds during his approach.

    The fault, if any is to be found, thus resides with people who have been recently trained to suspect once-normal behavior: anything they wouldn’t do is considered threatening, if not hostile, when done by someone they don’t recognize.

    Photography, in particular, is now treated as reconnaissance for an assault. Unless it’s done by surveillance cameras, in which case it’s perfectly benign.

    –THE END–

    Perhaps you can tell a similar story.

    Extra Credit
    Explore these 27 parametric variations on the theme of Stranger:

    • Appearance: whitebread / black / Levantine
    • Dress: casual / ripped baggies / ersatz-military-wanker-camo
    • Conduct: friendly / avoids-meeting-of-eyes / arrogant

    Describe the Trooper’s likely approach to and interaction with these Strangers, assuming sufficient training to avoid racial profiling:

    • [white + military + friendly]
    • [black + military + arrogant]
    • [Levantine + ripped baggies + avoids-meeting-of-eyes]

    Double Bonus
    Consider the behaviour variation where a [white + casual + friendly] Stranger politely but firmly refuses to cooperate with the Trooper’s inquiries. Explore the range of perfectly legal and extremely unpleasant outcomes. Possible working title: “How to ruin the rest of your holiday weekend in five minutes flat”.

    Background information, all highly recommended:

    Update: Many internal links on Schneier’s blog are broken. As nearly as I can tell, all inter-word hyphens should now be underscores: the-war-on-the.html becomes the_war_on_the.html. Perhaps they switched the back-end database?

  • Inexpensive Diamond-Frame Bike Seat Tube Finishing

    Seat Tube Fitting
    Seat Tube Fitting

    Our daughter has been helping a friend learn to ride a bike (at age 15: it’s never too late!) and we’ve been rehabilitating a new-to-her bike in the process. It’s an inexpensive Ross bike, perfect for the task at hand, and is providing a good introduction to machine-shop work.

    The fact that it’s much older than she is makes not a whit of difference. Nay, verily, I rode a bike pretty much like this one for hundreds & hundreds of miles back in the day. I got better ones when I could afford them and she will, too; maybe we’ll tempt her into a recumbent bike some day…

    Anyhow, the seat tended to spin around even with the clamp cranked dangerously tight. Taking a look down the tube showed that they used welded-seam tubing (it really was an inexpensive bike) and didn’t bother to clean up the internal seam. As a result, the chromed steel seat post rested on maybe three small patches of metal that didn’t provide much friction at all.

    I wrapped a neodymium magnet in a rag and stuffed it down the tube to catch the filings, then applied a coarse cylindrical file (a rat-tail would work as well) to the seam. When it was nearly flush, I switched to a finer file to smooth it and the other high spots. The picture shows the improved seam, ready for the seat post. Ugly, but rough is actually a Good Thing in this situation.

    Seat Clamp Swaging
    Seat Clamp Swaging

    The seat tube has a nominal 1-inch OD, so I clamped a random round from the heap in the vise, tapped the clamp around it, and massaged it lightly with a hammer to persuade it into a more cylindrical shape. It’s still not perfect, but at least the bolt lugs engage the seat tube around the slit somewhat better.

    With all that in hand, the seat post is now perfectly secure.

    On her first “I can ride!” parking-lot outing, she experimentally determined that a bicycle wheel’s lowest-energy state resembles the edge of a potato chip. Fortunately, it was the front wheel and, after a bit more shop derring-do than one might wish, we swapped in another wheel that’s been hanging on the garage wall for a decade, ready for just such an occasion.

    Remember how independent your first bike made you feel? It’s working that way for those two, just like it did for us. Life is full of bumps and they’ll get hurt every now and then, but there’s no other way to get through it; they’re just about ready to ride over the horizon.

    Happy Independence Day for those of us in the USA!

  • Cold & Fractured Solder Joints

    Joint 1 - solder not bonded to lead
    Joint 1 – solder not bonded to lead

    A friend brought over a broken toy (well, an Argent GPS tracker) with a peculiar problem: everything worked, but after a few minutes the front-panel LEDs would get intermittent. The LEDs are hand-soldered to the board with leads that extend maybe 7 mm from the surface.

    After a bit of poking around, I stuck the gadget under the microscope, at which point the problems became obvious.

    See that distinct line where the solder meniscus ends at the lead? Yup, that’s the teltale sign of a cold solder joint. The lead never got hot enough to bond properly with the solder, so the failure extends all the way down through the board. The only electrical contact is at a random point where the flux layer is thin enough to pass current; as the joint heats up, that point Goes Away.

    Worse, do you see (click on the pix for bigger images) the small discontinuity about 1/3 of the way down the solder cone? My buddy Eks alerted me to that failure: that’s where the solder joint fractures from repeated heat stress.

    Solder Thermal Stress
    Solder Thermal Stress

    Here’s the quick sketch he drew on the canonical back-of-the-envelope. I added the red oval as a replacement for his emphatic gestures; with any luck, you’ll never forget it, either.

    In this case the LED is anchored in a front-panel hole and the lead is mechanically locked to the board. As the lead heats & cools, it expands & contracts (duh) at a slightly different rate than the solder. After a while, the solder cracks; it’s much less ductile than copper.

    Joint 2
    Joint 2 – clear fracture

    I’m not convinced that’s what happened here, as the LED leads have a bend in the middle that should relieve the stress, but it’s at exactly the spot where he sketched the failure he’s found in many, many gadgets. Power transistors standing above boards with their backs screwed to heatsinks seem particularly prone to this failure, as they have short leads stressed by the differential expansion between copper and aluminum.

    Here’s another LED lead from the same gadget. A random out-of-focus fiber enters from the right and exits around to the left rear, but you can clearly see the bad joint at the top of the solder cone and the fracture line just below the fiber.

    A touch of the soldering iron generally solves the problem, although you might want to suck the old solder out so the new solder can re-flux the joint.

    Arduino Pro USB (cold) Solder Pads
    Arduino Pro USB (cold) Solder Pads

    This doesn’t happen only to hand-soldered joints. The USB header fell right off an Arduino Pro board while I was debugging something else. I had to re-heat the joints and the header separately, add flux, and then solder ’em together. Notice the bubbles in the solder layer? That header just never got up to the proper temperature. The current version of that board uses a through-hole header, which is more rugged than this surface-mount equivalent.

    TinyTrak3 cold-solder joints
    TinyTrak3 cold-solder joints

    And a TinyTrak3+ board had few cold joints, too, where the leads just didn’t bond at all.

    In both of those cases, the vendors did a quick check and didn’t find similar problems with their stock, so the boards I got seem like random failures on the soldering line.

    Now, if I’d never made a cold solder joint in my life, I’d be in a position to get all snooty. That’s just not the case: it happens to everybody, once in a while, and you just learn to live with it.