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

  • Tour Easy 1 W Amber Running Light: End Cap

    Tour Easy 1 W Amber Running Light: End Cap

    My initial doodles suggested an end cap with an opening for the Arduino’s USB port and something for the power cable from the Bafang controller:

    1 W LED Running Light - internal assembly
    1 W LED Running Light – internal assembly

    Common sense finally broke out and I made a simple disk cover held in place with an M3 screw:

    1 W Amber Running Light - bench test
    1 W Amber Running Light – bench test

    Unfortunately, I cut the PVC shell flush with the USB port, which meant the cap couldn’t have a little shoulder to stabilize it on the shell. Maybe next time?

    Machining the disk required using the scrap of aluminum rod left over from the heatsink as a fixture with a piece of sandpaper stuck to the front surface:

    1 W Amber Running Light - end cap setup
    1 W Amber Running Light – end cap setup

    The live center presses the bandsawed + disk sanded cap against the sandpaper, providing barely enough traction for sissy cuts reducing the disk to the proper diameter:

    1 W Amber Running Light - end cap turning
    1 W Amber Running Light – end cap turning

    It actually worked pretty well, although next time I’ll skip the sandpaper, affix the disk directly to the double sided duct tape, and be done with it.

    Line up the center punch dimple and drill a hole for the M3 screw:

    1 W Amber Running Light - end cap drilling
    1 W Amber Running Light – end cap drilling

    The power cable port turned into a little slot bandsawed into the edge of the disk with the sharp edges filed off.

    Basically, the thing needs some road testing before I build one for real …

  • Tour Easy 1 W Amber Running Light: Circuitry

    Tour Easy 1 W Amber Running Light: Circuitry

    With the internal slab attached to the 1 W LED heatsink, some double-sided foam tape affixes an Arduino Nano to one side of the slab:

    1 W LED Running Light - Arduino side
    1 W LED Running Light – Arduino side

    The MP1584 regulator and its 2.2 Ω current-sensing resistor (tacked down with acrylic adhesive) go on the other side:

    1 W LED Running Light - Regulator side
    1 W LED Running Light – Regulator side

    The Arduino and regulator draw power from the Bafang motor controller’s 6.3 V headlight circuit. The 2.2 Ω resistor sets the LED current to 360 mA = 900 mW. The blue wire connects the Arduino’s default LED output pin (D13) to the regulator’s Enable input (pin 2) to allow programmatic blinkiness.

    The end view shows everything Barely Fits™:

    1 W LED Running Light - internal assembly
    1 W LED Running Light – internal assembly

    All it needs is a rear cover of some sort …

  • Tour Easy 1 W Amber Running Light: Internal Plate

    Tour Easy 1 W Amber Running Light: Internal Plate

    A semi-scaled doodle laying out an Arduino Nano and the MP1584 regulator board suggested they might fit behind the heatsink with the 1 W LED:

    Amber running light - board layout doodle - side
    Amber running light – board layout doodle – side

    A somewhat more detailed doodle of the end view prompted me to bore the PVC pipe out to 23 mm:

    Amber running light - board layout doodle - end
    Amber running light – board layout doodle – end

    The prospect of designing a 3D printed holder for the boards suggested Quality Shop Time combined with double-stick foam tape would ensure a better outcome.

    So I bandsawed the remains of a chunky angle bracket into a pair of rectangles, flycut All The Sides to square them up, and tapped a pair of M3 holes along one edge of each:

    1 W LED Running Light - baseplate tapping
    1 W LED Running Light – baseplate tapping

    The other long edges got the V groove that killed the Sherline’s Y axis nut:

    Sherline Y-Axis Nut Mishap - setup
    Sherline Y-Axis Nut Mishap – setup

    The groove holds a length of 4 mm OD (actually 5/32 inch, but don’t tell anybody) brass tubing:

    1 W LED Running Light - baseplate trial fit
    1 W LED Running Light – baseplate trial fit

    The M3 button head screws are an admission of defeat, as I could see no way of controlling the width + thickness of the aluminum slabs to get a firm push fit in the PVC tube. The screws let me tune for best picture after everything else settled out.

    A little more machining opened up the top of the groove:

    1 W LED Running Light - baseplate dry assembly
    1 W LED Running Light – baseplate dry assembly

    A short M3 button head screw (with its head turned down to 4 mm) drops into the slot and holds the slab to the threaded hole in the LED heatsink. The long screw is holding the threaded insert in place for this dry fit.

    I doodled a single long screw through the whole thing, but having it fall off the heatsink when taking the rear cover off seemed like a Bad Idea™. An M3 button head screw uses a 2 mm hex key that fits neatly through the threaded insert, thereby making it work.

    Butter it up with epoxy, scrape off the excess, and let things cure:

    1 W LED Running Light - baseplate curing
    1 W LED Running Light – baseplate curing

    This was obviously made up as I went along …

  • Arduino MEGA Debugging LEDs

    Arduino MEGA Debugging LEDs

    Kibitzing on a project involving an Arduino Mega (properly MEGA, but who cares?) with plenty of spare I/O pins led me to slap together a block of LEDs:

    Arduino Mega Debugging LEDs
    Arduino Mega Debugging LEDs

    The excessive lead length on the 330 Ω resistors will eventually anchor scope probes syncing on / timing interesting program events.

    Not that you have any, but they’re antique HP HDSP-4836 tuning indicators: RRYYGGYYRR. If you were being fussy, you might use 270 Ω resistors on the yellow LEDs to brighten them up.

    A simple test program exercises the LEDs:

    /*
      Debugging LED outputs for Mega board
      Ed Nisley - KE4ZNU
      Plug the board into the Digital Header pins 34-52 and GND 
    */
    
    byte LowLED = 34;
    byte HighLED = 52;
    byte ThisLED = LowLED;
    
    //-----
    void setup() {
      pinMode(LED_BUILTIN,OUTPUT);
      
      for (byte p = LowLED; p <= HighLED; p+=2)
        pinMode(p, OUTPUT);
    
    //  Serial.begin(9600);
    }
    
    // -----
    void loop() {
      digitalWrite(LED_BUILTIN,HIGH);
      
      digitalWrite(ThisLED, HIGH);
      delay(100);
      digitalWrite(ThisLED, LOW);
     // delay(500);
    
      ThisLED = (ThisLED < HighLED) ? (ThisLED + 2) : LowLED;
    
    //  Serial.println(ThisLED);
    
      digitalWrite(LED_BUILTIN,LOW);
    }
    
    

    Nothing fancy, but it ought to come in handy at some point.

  • Soldering Iron Spider

    Soldering Iron Spider

    I noticed something out of place when I fired up the soldering iron:

    Soldering Iron Spider
    Soldering Iron Spider

    It’s not obvious in a flat photo without depth perception, but here’s a closer look:

    Soldering Iron Spider - detail
    Soldering Iron Spider – detail

    A tiny spider had set up shop just over the tip cleaning port, with a delicate web linking the sponge to the iron holder.

    I tried to deport her outdoors, as is our custom with helpful critters, but she jumped off the web and scurried to an unknown spot on the bench. She’ll surely rebuild in an equally productive spot.

    Obviously, I’m not soldering enough electronic gadgetry …

  • Running Light: 1 W LED Switched Parallel Resistors

    Running Light: 1 W LED Switched Parallel Resistors

    Manually selecting the current through the 1 W amber LED with a switch actually intended for LED flashlights:

    1 W LED Running Light - switched parallel R
    1 W LED Running Light – switched parallel R

    The resistors on the low side of the LED use the MP1584 regulator for current control, with the orange wire feeding the resistor voltage into the error amplifier.

    The 15 Ω unswitched resistor sets the LED current at 53 mA = 0.8 V / 15 Ω, with the LED dissipating about 100 mW. The resistor dissipates 43 mW.

    Closing the switch puts the two parallel 4.7 Ω resistors in parallel with the 15 Ω resistor to produce 2.0 Ω, which sets the LED current to 390 mA and runs it at 950 mW. Each of the 4.7 Ω resistors dissipates 140 mW.

    That much power raises the aluminum body to 50 °C = 120 °F: definitely uncomfortable but probably survivable for the LED inside.

    Eyeballometrically, a decimal order of magnitude difference in the LED current produces an obvious brightness difference. My first try ran the LED at 500 mW (a binary order of magnitude less than 1 W) and wasn’t visually different. Given that the LED will run from the Bafang’s headlight output, saving power isn’t all that important.

    If this is the first time you’ve encountered parallel resistors, this is why your calculator has a reciprocal button: the total resistance is the reciprocal of the sum of the reciprocals of all the resistances:

    1/R = 1/R₁ + 1/R₂ + …

    A real engineering calculator does not have a shifted reciprocal function.

  • Running Light: 1 W LED Heatsink

    Running Light: 1 W LED Heatsink

    The general idea: a cylindrical holder / heatsink for a 1 W LED on the end of a tube clamped in a Tour Easy fairing mount, much like a flashlight.

    A pleasant evening at a virtual Squidwrench meeting produced the raw shape of the front end from a 1 inch aluminum rod:

    1 W LED Running Light - heatsink raw
    1 W LED Running Light – heatsink raw

    Trace the outline of the LED’s PCB inside the cylinder just for comfort, align to the center, and drill two holes with a little bit of clearance:

    1 W LED Running Light - heatsink drilling
    1 W LED Running Light – heatsink drilling

    For the 24 AWG silicone wire I used, a pair of 2 mm holes 8.75 mm out from the center suffice:

    1 W LED Running Light - heatsink fit
    1 W LED Running Light – heatsink fit

    Gnaw some wire clearance in the lens holder:

    1 W LED Running Light - wiring
    1 W LED Running Light – wiring

    Tap the central hole for an M3×0.5 screw, which may come in handy to pull the entire affair together.

    Epoxy the PCB onto the heatsink with the lens holder keeping it aligned in the middle:

    1 W LED Running Light - heatsink clamp
    1 W LED Running Light – heatsink clamp

    Then see how hot it gets dissipating 900 mW with 360 mA of current from a 2.2 Ω resistor:

    1 W LED Running Light - heatsink test
    1 W LED Running Light – heatsink test

    As you might expect, it gets uncomfortably warm sitting on the bench, so it lacks surface area. The first pass will use a PVC cylinder for easy machining, but a full aluminum shell would eventually be a nice touch.

    A doodle with some dimensions and aspirational features:

    Running Light - 1 W LED case doodle
    Running Light – 1 W LED case doodle

    Even without a lens and blinkiness, it’s attention-getting!