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: Repairs

If it used to work, it can work again

  • Siglent SDS2304X Screen Shot File

    Poking the Print button on the front of the Siglent SDS2304X scope saves the screen to a BMP file (in the /BMP directory) on a USB flash drive plugged into its front-panel port:

    Siglent SDS2304X Front Panel - Print Button - USB port
    Siglent SDS2304X Front Panel – Print Button – USB port

    Which produces files like these:

    ll --block-size=1 /path-to-USB-stick/BMP/
    total 2318336
    drwxr-xr-x 2 ed ed    4096 May 23 13:13 ./
    drwxr-xr-x 4 ed ed    4096 Dec 31  1969 ../
    -rw-r--r-- 1 ed ed 1152054 May 23 13:13 SDS00001.BMP
    -rw-r--r-- 1 ed ed 1152054 May 23 13:13 SDS00002.BMP
    

    The files are 1152054 bytes long, as specified by the BMP header inside the file:

    hexdump -C /path-to-USB-stick/BMP/SDS00001.BMP | head
    00000000  42 4d 36 94 11 00 00 00  00 00 36 00 00 00 28 00  |BM6.......6...(.|
    00000010  00 00 20 03 00 00 e0 01  00 00 01 00 18 00 00 00  |.. .............|
    00000020  00 00 00 94 11 00 00 00  00 00 00 00 00 00 00 00  |................|
    00000030  00 00 00 00 00 00 01 01  01 01 01 01 01 01 01 01  |................|
    00000040  01 01 01 01 01 01 01 01  01 01 01 01 01 01 01 01  |................|
    *
    00000880  01 01 01 01 01 01 01 01  01 01 01 01 01 01 1e 1e  |................|
    00000890  1e 1e 1e 1e 1e 1e 1e 1e  1e 1e 1e 1e 1e 1e 1e 1e  |................|
    *
    00000990  1e 1e 1e 1e 1e 1e 01 01  01 01 01 01 01 01 01 01  |................|
    

    The first 14 bytes contain the Bitmap file header, with the file size in Little-Endian order in the four bytes at offset +0x02: 0x00119436 = 1152054.

    The four bytes at offset +0x0A give the offset of the pixel data: +0x36. That’s the series of 0x01 bytes in the fourth row. Unlike most images, BMP pixel arrays start at the lower left corner of the image and proceed rightward / upward to the last pixel at the upper right corner.

    The data between the Bitmap file header and the start of the pixel data contains at least a Device Independent Bitmap header, identified by its length in the first four bytes at offset +0x0E. In this case, the length of 0x28 = 40 bytes makes it a Windows (no surprise) header.

    The two bytes at +1C give the bits-per-pixel value: 0x18 = 24 = 3 bytes/pixel, so parse the pixels in RGB order.

    The four bytes at +0x12 give the bitmap width in pixels: 0x320 = 800. Each pixel row must be a multiple of 4 bytes long, which works out fine at 2400 bytes.

    The tail end of the file shows one dark pixel at the upper right:

    hexdump -C /path-to-USB-stick/BMP/SDS00001.BMP | tail
    00118330  00 cc 00 00 cc 00 00 cc  00 00 cc 00 00 cc 00 00  |................|
    00118340  cc 00 00 cc 00 00 cc 00  00 cc 00 00 cc 00 00 cc  |................|
    00118350  00 00 cc 00 00 cc 00 00  cc 0f 0f 75 1e 1e 1e 1e  |...........u....|
    00118360  1e 1e 1e 1e 1e 1e 1e 1e  1e 1e 1e 1e 1e 1e 1e 1e  |................|
    *
    00118ad0  1e 1e 1e 01 01 01 1e 1e  1e 1e 1e 1e 1e 1e 1e 1e  |................|
    00118ae0  1e 1e 1e 1e 1e 1e 1e 1e  1e 1e 1e 1e 1e 1e 1e 1e  |................|
    *
    00119430  1e 1e 1e 01 01 01                                 |......|
    

    Which looks like this, expanded by a factor of eight (clicky for more dots to reveal the situation):

    Screenshot - upper right corner - 8x expansion
    Screenshot – upper right corner – 8x expansion

    The scope can also transfer a screenshot over the network:

    lxi screenshot -a 192.168.1.42 /tmp/lxi-shot.bmp 
    Loaded siglent-sds screenshot plugin
    Saved screenshot image to /tmp/lxi-shot.bmp
    

    Which has the same header:

    hexdump -C /tmp/lxi.bmp | head
    00000000  42 4d 36 94 11 00 00 00  00 00 36 00 00 00 28 00  |BM6.......6...(.|
    00000010  00 00 20 03 00 00 e0 01  00 00 01 00 18 00 00 00  |.. .............|
    00000020  00 00 00 94 11 00 00 00  00 00 00 00 00 00 00 00  |................|
    00000030  00 00 00 00 00 00 01 01  01 01 01 01 01 01 01 01  |................|
    00000040  01 01 01 01 01 01 01 01  01 01 01 01 01 01 01 01  |................|
    *
    00000880  01 01 01 01 01 01 01 01  01 01 01 01 01 01 1e 1e  |................|
    00000890  1e 1e 1e 1e 1e 1e 1e 1e  1e 1e 1e 1e 1e 1e 1e 1e  |................|
    *
    00000990  1e 1e 1e 1e 1e 1e 01 01  01 01 01 01 01 01 01 01  |................|
    

    But the resulting file is three bytes = one pixel (!) too large:

    ll --block-size=1 /tmp/lxi.bmp
    -rw-rw-r-- 1 ed ed 1152057 May 23 19:09 /tmp/lxi.bmp
    

    The tail end of the file:

    hexdump -C /tmp/lxi.bmp | tail
    00118330  00 cc 00 00 cc 00 00 cc  00 00 cc 00 00 cc 00 00  |................|
    00118340  cc 00 00 cc 00 00 cc 00  00 cc 00 00 cc 00 00 cc  |................|
    00118350  00 00 cc 00 00 cc 00 00  cc 0f 0f 75 1e 1e 1e 1e  |...........u....|
    00118360  1e 1e 1e 1e 1e 1e 1e 1e  1e 1e 1e 1e 1e 1e 1e 1e  |................|
    *
    00118ad0  1e 1e 1e 01 01 01 1e 1e  1e 1e 1e 1e 1e 1e 1e 1e  |................|
    00118ae0  1e 1e 1e 1e 1e 1e 1e 1e  1e 1e 1e 1e 1e 1e 1e 1e  |................|
    *
    00119430  1e 1e 1e 01 01 01 01 01  0a                       |.........|
    

    Because the file header doesn’t include those three bytes, they don’t go into the image and the resulting screenshot is visually the same.

    Which looks like a picket-fence error, doesn’t it? I’d lay long odds the erroneous loop runs from 0 to NUMPIXELS, rather than 0 to NUMPIXELS-1. Raise your hand if you’ve ever made that exact mistake.

    I have no practical way to determine whether the error is inside the scope or the LXI network code, but given Siglent’s overall attention to software fit-and-finish, I suspect the former.

    One can convert BMP files to the much more compact PNG format:

    convert /tmp/lxi.bmp /tmp/lxi.png
    convert: length and filesize do not match `/tmp/lxi.bmp' @ warning/bmp.c/ReadBMPImage/829.
    

    Yes. Yes, there is a mismatch.

    The space savings is impressive, particularly in light of PNG being a lossless format:

    ll /tmp/lxi.*
    -rw-rw-r-- 1 ed ed 1.1M May 23 19:09 /tmp/lxi.bmp
    -rw-rw-r-- 1 ed ed  14K May 23 19:17 /tmp/lxi.png
    

    You can eliminate the nag by truncating the file:

    truncate --size=1152054 /tmp/lxi.bmp
    

    One could wrap it all up in a script:

    #!/bin/bash
    lxi screenshot -a 192.168.1.42 /tmp/"$1".bmp
    truncate --size=1152054 /tmp/"$1".bmp
    convert /tmp/"$1".bmp "$1".png
    echo Screenshot: "$1".png

    And then It Just Works:

    getsds2304x.sh "Test Shot Starfish"
    Loaded siglent-sds screenshot plugin
    Saved screenshot image to /tmp/Test Shot Starfish.bmp
    Screenshot: Test Shot Starfish.png
    
    Test Shot Starfish
    Test Shot Starfish

    SpaceX uses Test Shot Starfish tracks for pre-launch background music; the actual test shot was spectacular.

  • Mower Blade Standardization, Lack Thereof

    The blade from our current Craftsman mower is on the right:

    Sears Craftsman mower blades
    Sears Craftsman mower blades

    The other two came from our previous Craftsman mowers.

    Stipulated: Sears sources their mowers from various suppliers, but it’d be great if everybody could agree on a single blade mount and be done with it.

    Obligatory XKCD.

    For the record, a 5/8 inch socket works fine. One could surely use a 16 mm socket in a pinch.

    Wear leather gloves to prevent a nasty gash from the stamped-steel muffler shroud as you pull the sparkle plug cap to avoid an absolutely impossible engine startup while you’re wrenching under the deck.

    Replace the air cleaner while you’re at it.

  • Littelfuse Automotive Fuse Tester

    Fuses came up during the Second Squidwrench Electronics Workshop, so I’ll bring a handful along to the next session. Conveniently, the doomed Sienna’s rear storage compartment disgorged a new-old-stock box of fuses, along with a fuse puller/tester containing a pair of feeble vintage 164 / LR60 / AG1 alkaline cells:

    Littelfuse Mini Auto Fuse Puller-tester - as opened
    Littelfuse Mini Auto Fuse Puller-tester – as opened

    Somewhat to my surprise, the other side of the PCB has components:

    Littelfuse Mini Auto Fuse Puller-tester - circuitry
    Littelfuse Mini Auto Fuse Puller-tester – circuitry

    It looks like a transistor switch to minimize the current through the fuse and protect the LED from over / reverse voltage, should you apply it to a live circuit.

    A pair of new cells had it working just fine, not that I expect to need it in real life.

  • Kenmore 158: First Needle LED Failure

    The first white LED fixture built to illuminate one of Mary’s Kenmore 158 sewing machines has been in regular use for the last four years:

    Kenmore 158 Sewing Machine - mixed LED lighting
    Kenmore 158 Sewing Machine – mixed LED lighting

    We never found a good time to rip-and-replace the “prototype” with brighter SMD LEDs and one of the LEDs finally gave up.

    They’re 10 mm white LEDs with five chips wired in parallel, which is obvious when you look into the remaining LED running at 1 mA:

    10 mm white LED - chips
    10 mm white LED – chips

    The center chip is just dimmer than the others, which means their QC doesn’t tightly control the forward voltage spec.

    The wire bonds on the anode terminal of the failed LED look a bit sketchy:

    10 mm white LED - wire bonds
    10 mm white LED – wire bonds

    Fortunately, I hadn’t removed the 120 VAC wiring for the original bulb and I have two OEM bulbs from other machines, so I just removed my LED gimcrackery, installed a good old incandescent bulb, and she’s back to sewing with a pleasantly warm machine.

    The fixture holding the LEDs broke apart as I extracted it, but it’ll never be used again:

    10 mm white LED - fixture
    10 mm white LED – fixture

    The LEDs are rated at 3.5 V and 200 mA (!), but were reasonably bright in series from a 6 V unregulated supply. Perhaps a power glitch killed the poor thing? We’ll never know.

    LEDs are reputed to have lifetimes in the multiple tens of thousands of hours, but I’ve seen plenty of failed automotive LEDs and fancy new LED streetlights out there, not to mention many dead and dying traffic signals. Seeing as how they’re in (presumably) well-engineered fixtures with good power supplies and are at most only a few years old, there shouldn’t be any failures yet.

     

  • Michelin ProTek Max Tubes: Slow Leak

    The back tire on my bike was flat when I rolled it out for a ride (the day after replacing the front shifter cable), which ought not be possible with a Michelin Protek Max tube inside. On the other paw, we’ve had zero flats in the not quite two years since installing the things, which says they’re doing very well, and I’ll take a flat in the garage over a flat on the road any day.

    With the bike up on the stand, I didn’t spot the expected large glass chip or sharp wire, but I did find three smaller gashes:

    Bike tire tread gashes - composite - 2017-05-13
    Bike tire tread gashes – composite – 2017-05-13

    … from which I extracted two small glass shards. Perhaps a wee puncture spent four days parked at the top of the wheel, with the ProTek’s internal goop drained away and unable to plug the slow leak.

    Having spun the tire a few times while looking for trouble, I pumped it back up to 80 psi. After delaying the ride for half an hour, the tire pressure remained constant, and we enjoyed a fine ride around the block.

    Because I’m writing this in the future, I know it’ll hold pressure just fine, which means I can declare victory and move on.

    The tube & tire weigh more than some frames, but they’re worth it!

  • Tour Easy: SRAM X.9 Grip Shift Replacement

    The rear shifter on my Tour Easy stopped working when we were most of the way to the grocery store, due to what turned out to be due to a broken cable. I managed to yank the frayed end out of the shifter, pulled the derailleur into a middling gear, and belayed the cable into a deadly cactus:

    SRAM X.9 Rear Shifter - frayed cable
    SRAM X.9 Rear Shifter – frayed cable

    A three-speed recumbent got me home again, albeit with spin-it-out high gear and a low gear barely sufficient for trailer hauling.

    Attempting to remove the frayed cable from the SRAM X.9 grip shifter didn’t go well at all:

    SRAM X.9 Rear Shifter - cable tangle
    SRAM X.9 Rear Shifter – cable tangle

    I managed to extract the lead pellet, but, while it may be possible to extract the remaining tangle, even pulling on individual wires wasn’t productive.

    AFAICT, the shifter came as original equipment on the bike, so it’s been in constant use for the last 17-ish years. The nice soft grip material (and the cover over the cable port) turned into gummy sludge under the cheerful silicone tape I applied some years ago, so I sliced the old grip and pulled it off:

    SRAM X.9 Rear Shifter - gummified grip
    SRAM X.9 Rear Shifter – gummified grip

    Popping a new-old-stock X.9 shifter from the Big Box o’ Bike Parts and installing it proceeded without problems. This being the rear shifter, I had to remove the shiny OEM cable and replace it with a PTFE-coated tandem-length rear cable, but that’s normal for a long wheelbase recumbent.

    For the record, both black shift indicator tabs still show no signs of failing after half a year, so a bent piece of polypropylene sheet looks like a win.

  • End of the Sienna

    Although I knew the Sienna showed signs of a leaky head gasket, the exhaust system needed some attention, and a sporty used car recently put it in the shade, this still came as a surprise:

    I’m trying to get a crew … together and live the demolition derby dream

    By the time I arrived, the dashboard trim had vanished and the air bags were safely out:

    Demolition Derby - Sienna dashboad prep
    Demolition Derby – Sienna dashboad prep

    Diligent application of a Harbor Freight “Professional Windshield Removal Kit” cut through the side window seals, but the rear window rested on four impossible-to-cut locating studs:

    Sienna - rear window locating stud
    Sienna – rear window locating stud

    I managed to pry the glass off using a Gasket Scraper and considerable muttering.

    With all the exterior trim, lights, and mirrors gone, the Sienna was in fine race trim:

    Sienna - Demo derby race trim
    Sienna – Demo derby race trim

    But, being no longer street-legal, it required trailering. For the record, not all huge pickup trucks have bulky guys with pot bellies behind the wheel:

    Demolition Derby - Tow Vehicle Rental
    Demolition Derby – Tow Vehicle Rental

    A few hours later, it was in the Short Track Full Size pack at the Upperco Volunteer Fire Company’s Demolition Derby:

    Sienna at Upperco VFC Demolition Derby - start
    Sienna at Upperco VFC Demolition Derby – start

    The driver required a few laps to shake off years of safe-driving indoctrination:

    Sienna - Demolition Derby - running alone - 2018-04-28
    Sienna – Demolition Derby – running alone – 2018-04-28

    But eventually the spirit of the thing took over:

    Sienna - Demolition Derby - right crunch - 2018-04-28
    Sienna – Demolition Derby – right crunch – 2018-04-28

    We now know the transmission oil cooler sat just ahead of the left front wheel, where it was exposed to damage by a glancing collision:

    Sienna - Demolition Derby - left crunch - 2018-04-28
    Sienna – Demolition Derby – left crunch – 2018-04-28

    The Sienna finished the race and made it almost all the way to the trailer before bleeding out through the ATF cooler.

    The driver emerged in fine shape, although the door didn’t work nearly as well as it had fifteen minutes earlier:

    Sienna - Driver exiting Van - 2018-04-28
    Sienna – Driver exiting Van – 2018-04-28

    A race staffer in a Bobcat aimed the carcass in the right general direction and shoved it onto the trailer for the return to base:

    Sienna - Final Trailer Tiedown - 2018-04-28
    Sienna – Final Trailer Tiedown – 2018-04-28

    You can find shaky low-res camera action documenting the event, because video-or-it-didn’t-happen.

    We piled the windows / parts / detritus into the back, a scrapper hauled it away the next morning, and that’s the end of our Sienna’s story.

    Toyota sold a lot of Siennas, which means the Hot Topics list over on the right will show a need for Sienna ABS trouble codes long into the future.

    In fact, the adjacent motel slot had a disconcerting sight:

    Yet Another Sienna
    Yet Another Sienna

    I think it was a 2001 model, but …