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: Electronics Workbench

Electrical & Electronic gadgets

  • Arduino Pro Mini Knockoff: Solder FAIL

    Although it’s not obvious, the two blue 2431 Ω resistors just above the toroid are a divider that scales the switched battery voltage (from the p-MOSFET on their left) by 50% and sends it to input A0 on the Arduino Pro Mini board:

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

    The firmware can use that input to dim the LEDs when the voltage drops below some preset threshold and, eventually, turn them off completely.

    Figuring the actual battery voltage is straightforward:

    • get 10 bit ADC value with analogRead()
    • multiply by actual VCC (measured at 4.96 V for this board)
    • divide by actual voltage divider ratio (measured at 3.78/7.57)

    Which, of course, reported the battery voltage was 4.116 V. Huh?

    After spending far too much time poking the code with a sharp stick, I wired the divider to the (previously unused) A6 and A7 inputs and dumped the raw ADC counts for all three. The answer should be somewhere near 763, but the three values came out around 215, 667, and 750. Huh?

    The A0 value is totally bogus, so I finally looked at the Arduino Pro Mini board:

    Arduino Pro Mini clone - chip overview
    Arduino Pro Mini clone – chip overview

    Hmmm. It turns out A0 is the second pin back on the left side:

    Arduino Pro Mini clone - unsoldered leads
    Arduino Pro Mini clone – unsoldered leads

    Double hmmm. An even closer look:

    Arduino Pro Mini clone - unsoldered A0 lead
    Arduino Pro Mini clone – unsoldered A0 lead

    Well, that was obvious after I figured out where to look…

    I slathered flux on all the pins, touched each one with a soldering iron, and it’s all good.

    This is a knockoff Arduino Pro Mini board from eBay, of course, and the rest of the boards in that lot were OK. Their QC inspection almost certainly boils down to running the Blink sketch: if the LED blinks after the power goes on, ship it!

    Blink doesn’t verify the analog inputs, which turn out to be wrapped around that corner of the package.

  • 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.

  • LED Bug

    Our Larval Engineer has a bug report that blows away anything I’ve ever seen:

    Check out her post for the rest of the story…

    Forgot to mention this when she first told me about it; the discussion of LED and CFL lifetime brings it to mind.

  • 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.

  • LED Bulb Lifespan vs. Warranty

    I picked up a $35 LED bulb that’s allegedly equivalent to a 75 W incandescent, replacing a 100 W equivalent compact fluorescent bulb that an X10 relay switch couldn’t turn off cleanly, for a torchiere floor lamp. ‘Nuff said about early CFL failures.

    It has both upward and downward facing LED chips that light up the diffuser and ceiling in equal measure. Both strings are visible from the side due to the heavy molded plastic lens around the chips:

    LED Bulb
    LED Bulb

    Some interesting bits from the package:

    Home Depot LED Bulb Warranty
    Home Depot LED Bulb Warranty

    A 22.8 year lifespan at three hours per day works out to 24.983×103 hours. I wish I could have heard the arguments about whether they could claim a 23 year lifespan…

    At the same duty cycle, the 5 year warranty covers 5.479×103 hours. Huh.

    The URL at the bottom leads to some general info, but nothing you didn’t know already.

    It works well enough, but at $35 it’s really a capital investment that I suspect will never actually pay for itself…

  • Makergear M2 Improved Platform: Solid State Relay and Thermistor

    I’d originally planned to drive the new HBP with a boost converter from the 24 V supply brick, but that didn’t quite work out. The arrival of a 36 V brick from halfway around the planet solved that problem, but the RAMBo platform heater’s 15 A ATO fuse restricts it to 24 V and I don’t quite trust that MOSFET for high current applications, either.

    Sooo, I went full-frontal Cupcake with a solid state relay screwed to a pair of existing holes (!!!) in the M2’s frame:

    M2 - SSR for Improved HBP
    M2 – SSR for Improved HBP

    Note: that’s a DC-to-DC SSR, not the more common DC-to-AC SSR. Basically, it’s an up-armored optically isolated MOSFET, not a triac, and, yes, capitalizing acronyms and initalisms can be contentious.

    Because the RAMBo’s MOSFET now drives the piddly current required to activate the SSR, I rewired the power to apply the M2’s 19.5 V brick to all three inputs by adding two red jumpers on the right side of the Phoenix plugs:

    M2 HBP SSR Wiring
    M2 HBP SSR Wiring

    The M2’s hulking 12 V brick now resides in the Basement Warehouse’s Power Supply Annex.

    The HBP cable comes in from the right side and the 36 V supply arrives through the Powerpole connectors in the lower right. Tucking the ferrite slug on the 19.5 V supply behind the wire loom prevents the cable from pulling the Phoenix connectors out of the RAMBo board at an inopportune moment.

    The original M2 HBP wiring got uncomfortably warm carrying the 10+ A for that platform. It would probably work OK at a lower current, but I’d already put Powerpole connectors on the new HBP. So I ran that cable outside the loom and abandoned the original pair inside.

    The SSR switches the +36 V wire, leaving the HBP at 0 V when it’s not activated: supply hot → SSR → HBP → supply common. That makes no practical difference, but it feels like a Good Idea. Also, the Kapton tape across the SSR terminals should be barely adequate to prevent contact with random conductive clutter; I’m channeling the true spirit of DIY 3D printing…

    I don’t have a connector matching the M2’s 100 kΩ platform thermistor, either, so I just ran the new cable down the outside of the loom and conjured up a two-pin socket for the header on the RAMBo board:

    Improvised 2-pin header socket
    Improvised 2-pin header socket

    Plug it all together, tweak the startup G-Code to properly trip the Z-min switch at its new location, and it Just Works:

    M2 Improved HBP - alignment test
    M2 Improved HBP – alignment test

    Those are thinwall open boxes that came out 5±0.03 mm tall across the array, so the platform is just about as level / aligned as necessary for my simple needs.

    The Z-min switch will move to get rid of that stupid block epoxied to the platform, so I didn’t record the G-Code tweakage…

  • Makergear M2 Improved Platform: Mechanical Adjustments

    The PCB under the improved flat-top glass platform has three soldered-in-place M3 screws that fit the M2’s Y stage support:

    M2 - Improved HBP - bottom view
    M2 – Improved HBP – bottom view

    I applied a tiny rat-tail file to the holes until they became a free sliding fit for the screws.

    The wave springs are mostly decoration, as the silicone rubber disks now take the compression load from the screws, and the platform is quite rigidly mounted.

    The new platform eliminates the M2’s original aluminum support spider, the aluminum heater & heat spreader, and the corner supports & clips, all of which add up to about 780 g. I didn’t bother changing the Y axis acceleration to match, as all those numbers seem rubbery.

    Minus the support spider, the platform rides much lower on the Z axis stage than the M2’s platform. Unfortunately, the Z-min switch clamped to the top of the rear Z-axis guide rod can’t get any higher, even after rearranging the cable and fiddling with the LED:

    M2 - Z min limit switch
    M2 – Z min limit switch

    As a first-pass hack, I moved the switch to the rear of the X gantry and applied Gorilla Tape to hold it in place:

    M2 - Z-min switch at rear X gantry
    M2 – Z-min switch at rear X gantry

    That required a small block to raise the platform enough to activate the switch before hitting the nozzle. I epoxied a snippet of brass rectangle tube to the left edge of the platform, directly under the switch lever:

     M2 - Improved HBP - rear switch tab
    M2 – Improved HBP – rear switch tab

    The awkward position activates the switch with the platform as far to the rear as possible, so that you can’t inadvertently drag the dangling switch lever across the block in the wrong direction.

    I think it’s stupid, too, but it let me bring up the printer and make sure all the electronics kept working. The next step was to relocate the switch to a more rational place