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

  • MOSFET rDS PCB

    This one came out surprisingly well, apart from the total faceplant with that resistor. With any luck, it’ll measure MOSFET on-state drain resistance over temperature for an upcoming Circuit Cellar column; it’s a honkin’ big Arduino shield, of course.

    Drilled holes on the Sherline using the relocated tool height switch:

    rDS Tester - drilled PCB
    rDS Tester – drilled PCB

    Front copper, after etching & silver plating:

    rDS Tester - etched front
    rDS Tester – etched front

    Back copper, ditto:

    rDS Tester - etched rear
    rDS Tester – etched rear

    I think I can epoxy the resistor kinda-sorta in the right spot without having to drill through the PCB into the traces. Maybe nobody will notice?

    The traces came out fairly well, although I had to do both the top and bottom toner transfer step twice to get good adhesion. Sometimes it works, sometimes it doesn’t, and I can’t pin down any meaningful differences in the process.

    And it really does have four distinct ground planes. The upper right carries 8 A PWM Peltier current, the lower right has 3 A drain current, the rectangle in the middle is the analog op-amp circuitry tied to the Analog common, and surrounding that is the usual Arduino bouncy digital ground stuff. The fact that Analog common merges with digital ground on the Arduino PCB is just the way it is…

  • EAGLE Library: 10 W Aluminum Power Resistor

    It appears there are at least two different 10 W aluminum resistor sizes: the one used by Dale and the one used by everybody else. It’s either that or the EAGLE HS10 symbol is wrong…

    Using those dimensions, here’s a part that more closely fits the resistors in my heap. EAGLE 6 uses an XML file format, so you can stuff some ASCII text into the appropriate sections of your custom.lbr file (or whatever).

    The EAGLE package, which remains HS10 as in the resistor-power library, should produce something that looks like this:

    EAGLE 10 W Resistor package
    EAGLE 10 W Resistor package

    The XML code includes top-keepout rectangles under the body footprint:

    <package name="HS10">
    <description>DALE Power Resistor 10W</description>
    <wire x1="9.525" y1="5.461" x2="9.525" y2="10.3378" width="0.2032" layer="21"/>
    <wire x1="9.525" y1="10.3378" x2="4.6482" y2="10.3378" width="0.2032" layer="21"/>
    <wire x1="-9.525" y1="-5.461" x2="-4.6482" y2="-5.461" width="0.2032" layer="21"/>
    <wire x1="-4.6482" y1="-5.461" x2="9.525" y2="-5.461" width="0.2032" layer="21"/>
    <wire x1="9.525" y1="-5.461" x2="9.525" y2="5.461" width="0.2032" layer="21"/>
    <wire x1="9.525" y1="5.461" x2="4.6482" y2="5.461" width="0.2032" layer="21"/>
    <wire x1="4.6482" y1="5.461" x2="-9.525" y2="5.461" width="0.2032" layer="21"/>
    <wire x1="-9.525" y1="5.461" x2="-9.525" y2="-5.461" width="0.2032" layer="21"/>
    <wire x1="4.6482" y1="5.461" x2="4.6482" y2="10.3378" width="0.2032" layer="21"/>
    <wire x1="-9.525" y1="-5.461" x2="-9.525" y2="-10.3378" width="0.2032" layer="21"/>
    <wire x1="-9.525" y1="-10.3378" x2="-4.6482" y2="-10.3378" width="0.2032" layer="21"/>
    <wire x1="-4.6482" y1="-5.461" x2="-4.6482" y2="-10.3378" width="0.2032" layer="21"/>
    <wire x1="-9.47" y1="0.5" x2="-17.78" y2="0.5" width="0.2032" layer="51"/>
    <wire x1="-17.78" y1="0.5" x2="-17.78" y2="-0.5" width="0.2032" layer="51"/>
    <wire x1="-17.78" y1="-0.5" x2="-9.47" y2="-0.5" width="0.2032" layer="51"/>
    <wire x1="9.47" y1="-0.5" x2="17.78" y2="-0.5" width="0.2032" layer="51"/>
    <wire x1="17.78" y1="-0.5" x2="17.78" y2="0.5" width="0.2032" layer="51"/>
    <wire x1="17.78" y1="0.5" x2="9.47" y2="0.5" width="0.2032" layer="51"/>
    <pad name="1" x="-15.24" y="0" drill="1.3" shape="octagon"/>
    <pad name="2" x="15.24" y="0" drill="1.3" shape="octagon"/>
    <text x="-6.35" y="1.27" size="1.27" layer="25">&gt;NAME</text>
    <text x="-6.35" y="-2.54" size="1.27" layer="27">&gt;VALUE</text>
    <rectangle x1="-9.779" y1="-5.715" x2="9.779" y2="5.715" layer="43"/>
    <rectangle x1="4.318" y1="5.715" x2="9.779" y2="10.668" layer="43"/>
    <rectangle x1="-9.779" y1="-10.668" x2="-4.318" y2="-5.715" layer="43"/>
    <hole x="-7.1374" y="-7.9375" drill="2.3876"/>
    <hole x="7.1374" y="7.9375" drill="2.3876"/>
    </package>
    

    The EAGLE symbol looks just an ordinary schematic resistor:

    <symbol name="RESISTOR">
    <wire x1="-2.54" y1="0" x2="-2.159" y2="1.016" width="0.2032" layer="94"/>
    <wire x1="-2.159" y1="1.016" x2="-1.524" y2="-1.016" width="0.2032" layer="94"/>
    <wire x1="-1.524" y1="-1.016" x2="-0.889" y2="1.016" width="0.2032" layer="94"/>
    <wire x1="-0.889" y1="1.016" x2="-0.254" y2="-1.016" width="0.2032" layer="94"/>
    <wire x1="-0.254" y1="-1.016" x2="0.381" y2="1.016" width="0.2032" layer="94"/>
    <wire x1="0.381" y1="1.016" x2="1.016" y2="-1.016" width="0.2032" layer="94"/>
    <wire x1="1.016" y1="-1.016" x2="1.651" y2="1.016" width="0.2032" layer="94"/>
    <wire x1="1.651" y1="1.016" x2="2.286" y2="-1.016" width="0.2032" layer="94"/>
    <wire x1="2.286" y1="-1.016" x2="2.54" y2="0" width="0.2032" layer="94"/>
    <text x="-3.81" y="1.4986" size="1.778" layer="95">&gt;NAME</text>
    <text x="-3.81" y="-3.302" size="1.778" layer="96">&gt;VALUE</text>
    <pin name="2" x="5.08" y="0" visible="off" length="short" direction="pas" swaplevel="1" rot="R180"/>
    <pin name="1" x="-5.08" y="0" visible="off" length="short" direction="pas" swaplevel="1"/>
    </symbol>
    

    And then the EAGLE resistor device lashes everything together:

    <deviceset name="R" prefix="R" uservalue="yes">
    <description>Resistors</description>
    <gates>
    <gate name="R" symbol="RESISTOR" x="0" y="0"/>
    </gates>
    <devices>
    ... many more devices...
    <device name="ALUM-10W" package="HS10">
    <connects>
    <connect gate="R" pin="1" pad="1"/>
    <connect gate="R" pin="2" pad="2"/>
    </connects>
    <technologies>
    <technology name=""/>
    </technologies>
    </device>
    ... many more devices ...
    </devices>
    </deviceset>
    

    Update the libraries and then it should Just Work.

    It would have been much better had I discovered this before drilling & etching the board with one of those resistors…

  • Soldering Third Hand Alligator Clip Improvement

    The third hand grabbers I have all put bare alligator clip ferrules in the adjustable sockets with a thumbscrew to secure them. Over time, that thumbscrew crunches the ferrule and makes the clip hard to adjust. This has become enough of an annoyance that I rummaged around in the brass tubing cutoffs to find some that fit into the ferrules:

    Alligator clip with brass tube insert
    Alligator clip with brass tube insert

    Given the sorry state of the ferrules, they required quite a bit of squeezing and shaping until that tube fit inside, but after that they rounded up nicely.

    I suppose I should solder the tubes in place, but …

  • NP-FS11 Batteries: Final Capacity

    Having rebuilt the rebuilt packs, the dead cells (with arbitrary IDs) look like this:

    NP-FS11 - Old Packs
    NP-FS11 – Old Packs

    These are the bare cells, without the protection circuit in series, so the voltage is a bit higher than the camera will see. One is completely dead and two of them appear to have about 1 A·h of capacity, but the discharge voltage evidently drops below what the camera considers acceptable.

    They’d work fine driving a less fussy load, though…

  • EAGLE 6.x Invalid Device Names: Repair Thereof

    It seems that a much older version of Eagle allowed device names along the lines of ELECTRET MIC that contained blanks and worked perfectly at the time. Since then, the rules changed to prohibit blanks, but the EAGLE 5.x series evidently allowed those names to exist as long as they weren’t used in the schematic or touched in the library editor. In 6.x, however, you can’t even load the library without triggering an error message.

    Because 6.x won’t load the library, you can’t use the library editor to remove the blank.

    Because the most recent version of 5.x kvetches about the blank, you can’t use the library editor to remove the blank.

    Having only two offending device names, I figured I could use a hex editor to jam a hyphen in place of the blanks and be done with it. Come to find out that EAGLE (wisely) wraps a checksum around the binary library file to detect such changes and prevent the files from loading. I think that’s an excellent idea, even if it was inconvenient in this situation.

    Fortunately, 6.x both complains about the problem and offers up a “text editor” window with the complete XML source code for the library that it converted from the 5.x binary format.

    So:

    • Copy-and-paste the text into an editor that supports highlighted XML editing
    • Find the offending device names
    • Change the blanks to hyphens
    • Rename the original custom.lbr to custom.lbr.bin
    • Save the modified XML as custom.lbr

    Done!

  • Capacitor Self-resonance Calculator

    A Circuit Cellar reader recommended the KEMET Spice calculator that lets you explore the Z / ESR / capacitance / inductance of their various capacitors:

    KEMET Spice Simulation - 100 nF C0G SMD
    KEMET Spice Simulation – 100 nF C0G SMD

    As nearly as I can tell, my measurements on all those random capacitors fell into the right general neighborhood…

  • Thermistor Linearization

    Faced with the need to measure heatsink temperature in an Arduino project and being unwilling to putz around with a MAX6675 thermocouple amp, I found a bag of thermistors in the heap. Unlike most surplus, the bag pedigreed them as Semitec 103CT-4, which led to some relevant parameters:

    • T0 = 25 °C
    • R0 = 10 kΩ
    • B = 3270 K

    The equation for a thermistor’s resistance at a given temperature (in K, not °C) is:

    R = R0 * e(B/T - B/T0)

    The canonical Arduino thermistor circuit uses a series resistor with a value equal to R0:

    Thermistor Linearization - Rseries
    Thermistor Linearization – Rseries

    Setting Rseries = 10 KΩ and applying a bit of spreadsheet-fu produces this:

    Thermistor Linearization - Rseries - Graph
    Thermistor Linearization – Rseries – Graph

    Getting within +2 °C /-1 °C over -20 °C to 60 °C isn’t all that bad, but … I wondered whether there might be an easy way to get better linearization. The heatsink temperature will range from about -10 °C to 60 °C (yes, there will be a Peltier cooler involved), so the range is a bit broader than usual.

    A bit of diligent rummaging turned up that description, which led to US Patent 3,316,765 from back in 1967, which teaches the concept of two different thermistors, one for low temperatures and one for high temperatures, with some resistive blending:

    Patent 3316765 Fig 3
    Patent 3316765 Fig 3

    The patent includes the claim of many different thermistors, each with a series resistor, to cover a much broader temperature range.

    Given a bag of identical thermistors, I wondered what might be possible. A bit more spreadsheet-fu produced this:

    Thermistor Linearization - Dual Thermistors - Graph
    Thermistor Linearization – Dual Thermistors – Graph

    Which corresponds to this sketch, with Rseries = 6.2 kΩ, R1 = 27 kΩ, and R2 = 0.0:

    Thermistor Linearization - Dual Thermistors
    Thermistor Linearization – Dual Thermistors

    All in all, a nicely centered ±1 °C error from -15 °C to +60 °C can’t be beat. The output voltage even spans 0.13 to 0.71 of Vcc, about 9 of the available 10 ADC bits.

    Those two resistors came from hand-tweaking with standard values, so it’s not like there’s a genetic algorithm involved. The value of Rseries wants to be a bit below the parallel combination of the two branches near 30 °C and R1 seems happiest around the 0 °C thermistor resistance. I vaguely thought about using a multivariable solver, but what’s the point?

    The result seems good enough that I didn’t try three thermistors. T2, the one with R2=0, already handles the high temperature range and the low end is fine, so it seems there’s not much to be gained. If you had a stash of different thermistors and knew their characteristics, then the results would be different.

    Admittedly, one could program the actual logarithmic equation to unbend a single thermistor’s voltage into temperature, but I must kludge up a thermistor mount anyway, so why not entomb two thermistors and an SMD resistor, then use a linear fit? It’s not like fancy math will give the whole lashup any greater accuracy.

    The spreadsheet may be of interest. It started out as an OpenOffice spreadsheet, but WordPress doesn’t permit *.ods files, soooo it’s in MS Excel format.