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

Fabric arts and machines

  • Kenmore 158: Useful Unicode Glyphs

    It turns out, for some reasons that aren’t relevant here, that I’ll be using the Adafruit Arduino LCD panel for the sewing machine control panel, at least to get started. In mulling that over, the notion of putting text on the buttons suggests using getting simple pictures with Unicode characters.

    Herewith, some that may prove useful:

    • Needle stop up: ↥ = U+21A5
    • Needle stop up: ⤒=U+2912
    • Needle stop down: ⤓ = U+2913
    • Needle stop any: ↕ = U+2195
    • Needle stop any: ⟳ = U+27F3
    • Needle stop any: ⇅ = U+21C5
    • Rapid speed: ⛷ = U+26F7 (skier)
    • Rapid speed: 🐇  = U+1F407 (rabbit)
    • Slow speed: 🐢 = U+1F422 (turtle)
    • Dead slow: 🐌 = U+1F40C (snail)
    • Maximum speed: 🏃 = U+1F3C3 (runner)
    • Bobbin: ⛀ = U+26C0 (white draughts man)
    • Bobbin: ⛂ = U+26C2 (black draughts man)
    • Bobbin winding: 🍥 = U+1F365 (fish cake with swirl)

    Of course, displaying those characters require a font with deep Unicode support, which may explain why your browser renders them as gibberish / open blocks / whatever. The speed glyphs look great on the Unicode table, but none of the fonts around here support them; I’m using the Droid font family to no avail.

    Blocks of interest:

    The links in the fileformat.info table of Unicode blocks lead to font coverage reports, but I don’t know how fonts get into those reports. The report for the Miscellaneous Symbols block suggested the Symbola font would work and a test with LibreOffice show it does:

    Symbola font test
    Symbola font test

    An all-in-one-page Unicode symbol display can lock up your browser hard while rendering a new page.

    Unicode is weird

  • Kenmore 158 LED Heatsink: Epoxy Sculpture

    The LED mounting plate inside the sewing machine’s end cap sits 30° from the vertical axis of the needle. Even though the surface-mount LED emitters have a broad pattern, it seemed reasonable to aim them toward the needle to put the brightest spot where it’s needed.

    The LEDs must have enough heatsinking to pull 2+ W out of the solder pads, so I figured I’d just epoxy them firmly to the mounting plate, rather than try to gimmick up a circuit board that would interpose a fiberglass slab in the thermal path.

    Combine those two requirements and you (well, I) get a wire fixture that provides both power and alignment:

    LED mount - wire fixture
    LED mount – wire fixture

    The LED body is 5 mm square, sin(30°) = 0.5, and the rear wire raises contact end by 2.5 mm. This still isn’t an exact science; if the center of the beam lands in the right time zone, that’s close enough.

    Testing the LED assembly at low current before entombing it shows the emitters have six chips in series (clicky for more dots):

    LED mount - lighting test
    LED mount – lighting test

    The grotendous solder job follows my “The Bigger the Blob, the Better the Job” principle, modulated by the difficulty of getting a smooth finish on bare wires. Indeed, the first wires I painstakingly bent, set up, and soldered turned out to have an un-solderable surface, much like the header pins from a while ago. That hank of wire now resides in the copper cable recycling bucket; you’re looking at Version 1.1.

    Two strips of Kapton tape under the ends of the wires hold them off the (scoured and wiped clean!) aluminum plate, with more tape forming a dam around the nearest edges:

    LED mount - epoxy pour
    LED mount – epoxy pour

    Despite being steel-filled, JB Weld remains nonconductive, the epoxy-filled gap under the wires insulates them from the plate, the wires aren’t shorted together, and there’s a great thermal bond to the heatsink. Good stuff, that JB Weld!

    A view from the back side shows the epoxy sagging over the wires before I added another blob:

    LED mount - epoxy pour - rear
    LED mount – epoxy pour – rear

    The LED assembly just sits there, without being anchored, until the epoxy cures. The epoxy remains thick enough (in the rather chilly Basement Laboratory) so that it doesn’t exactly pour, can be eased into place without too much muss & fuss, and stays pretty much where it’s put.

    After the epoxy stiffened a bit, I gingerly positioned stranded wires not-quite-touching the LED wires and applied a dot of solder to each. Powering the LEDs from a bench supply at 500 mW each took the chill off the heatsink and encouraged proper curing:

    LED mount - heated epoxy cure
    LED mount – heated epoxy cure

    Fast forward to the next day, return the heatsink to the Sherline, and drill a hole for the power cable. It’s centered between the wires in Y and between the fins in X, which is why I couldn’t drill before mounting the LEDs:

    LED mount - drilling cable hole
    LED mount – drilling cable hole

    It’s not like I’m building this from any specs…

    Trim the wires, solder the cable in place, cover the wire ends & joints with JB KwikWeld epoxy, and it’s done:

    LED mount - final epoxy
    LED mount – final epoxy

    With the LEDs running their 230 mA rated current, the entire heatsink gets pleasantly warm and the mounting plate isn’t much warmer than that. I loves me a good JB Weld job…

    However, I suspect they’ll shine too brightly at full throttle, which means an adjustable power supply looms on the horizon…

  • Kenmore 158: Pulse Drive First Light

    This worked right out of the box:

    Pulse Drive - Tek 1 A-div
    Pulse Drive – Tek 1 A-div

    That’s roughly two half-cycles of the full-wave rectified AC with about 100 ms between pulses.

    The upper trace comes from the differential amp, the lower trace from the Tek current probe at 1 A/div. The overall amp transconductance looks to be 1.3 A/V = 1.3 A/div, minus that small DC offset, so the ADC range is actually 6.5 A. That might be a bit too much, all things considered, but not worth changing right now.

    Notice that the upper trace drops like a rock at the end of the pulse, while the Tek probe shows a gradual decrease. The missing current goes ’round and ’round through the flyback diode across the motor:

    Pulse Drive - Flyback Diode - Tek 1 A-div
    Pulse Drive – Flyback Diode – Tek 1 A-div

    The Tek probe in the lower trace goes on the green wire connecting the diode to the bridge rectifier, oriented to match the diode polarity (+ current flows from motor to blue wire on collector to brown wire on rectifier to motor):

    Motor flyback diode - installed
    Motor flyback diode – installed

    That nasty little spike in the middle of the diff amp output occurs when the collector voltage drops to zero and the ET227 shuts off, but the motor current continues to flow due to the winding inductance. In the first scope shot, the Tek probe doesn’t show any spikes in the motor current, because there aren’t any.

    Compare that with the voltage and current of the motor running from an isolation transformer:

    Rectified AC - 200 mA div - 875 RPM
    Rectified AC – 200 mA div – 875 RPM

    As the pulse repetition frequency increases, the motor speed goes up and the current goes down:

    Pulse Drive - Fast - Tek 1 A-div
    Pulse Drive – Fast – Tek 1 A-div

    The dropouts between successive pairs of half-cycles show where the firmware shuts off the current and goes once around the main loop.

    The Arduino code making that happen:

    PedalPosition = ReadAI(PIN_PEDAL);
    if (PedalPosition > 190) {
    	BaseDAC.setVoltage(Cvt_mA_to_DAC(3000),false);					// give it a solid pulse
    	MotorDrive.ADCvalue = SampleCurrent(PIN_CURRENT_SENSE);			// measure current = half cycle delay
    	MotorDrive.ActualCurrent = Cvt_ADC_to_mA(MotorDrive.ADCvalue);
    	printf("%5u, %5u, %5u, %5u, %5u, %5u, %5u\r\n",
    		MotorSensor.RPM,ShaftSensor.RPM,MotorDrive.State,
    		MotorDrive.DACvalue,MotorDrive.ADCvalue,MotorDrive.ActualCurrent,PedalPosition);
    	delay(3);														// finish rest of half cycle
    	BaseDAC.setVoltage(0,false);									//  ... then turn it off
    
    	delay(map(PedalPosition,190,870,100,0));						// pedal controls off time
    }
    

    The map() function flips the sense of the analog voltage coming from the pedal, so that more pedal pressure = higher voltage = lower delay. The pedal voltage produces ADC values from about 185 through 860, with a pleasant sigmoid shape that gives good speed control.

    The maximum motor speed isn’t quite high enough for bobbin winding, but I like what I see so far!

  • Kenmore 158: Recalibrated Hall Effect Sensor Amp

    Reducing the differential amp gain fits a higher current into the Arduino’s fixed 5 V ADC range:

    Hall Sensor Differential Amp
    Hall Sensor Differential Amp

    Those are 1% resistors, chosen from the heap for being pretty close to what I needed. Given that it’s an LM324 op amp, we’re not talking instrumentation grade results here.

    The same calibration run that produced the DAC plot gave these values:

    Current Calibrate - ADC - 270k Hall 2.7k opto
    Current Calibrate – ADC – 270k Hall 2.7k opto

    The linear fit gives the actual current, as seen by the Tek probe, for a given ADC reading.

    The trimpot controls the offset voltage at zero current; working backwards, ADC = 0 corresponds to 140 mV, a bit higher than the actual 90 mV. Close enough, at least for a linear fit to eyeballed data, sez I.

    Working forward, the maximum ADC value of 1023 corresponds to 4 A, which should suffice.

  • Kenmore 158: Motor Flyback Diode

    Although small power diodes make fine flyback diodes for relays, the motor can draw several amps during the startup pulse, which will be a bit out of spec for the usual 1N4007-class diodes. Pressing an old 5 A / 200 V stud diode into service produces the ungainly black-and-blue lump eating the end of the green wire:

    Motor flyback diode - installed
    Motor flyback diode – installed

    For completeness, here’s the entire AC line interface part of the schematic:

    AC Power Interface
    AC Power Interface

    The diode’s 200 V limit should suffice, even for cold starts at high line peaks, but, when you build this with new parts, get something rated a bit higher, OK?

    The four NTC power thermistors lie just to the right of the relay, before the bridge rectifier.

  • Kenmore 158: Pulse Drive

    A Circuit Cellar reader sent me a lengthy note describing his approach to slow-motion AC motor drives, designed for an already ancient truck mounted radar antenna back in 1972-ish, that prompted me to try it his way.

    The general idea is to pulse the motor at full current for half a power line cycle with an SCR (rather than a triac) at a variable pulse repetition rate: the high current pulse ensures that the motor will start turning and the variable repetition frequency determines the average speed. As he puts it, the motor will give off a distinct tick at very low speeds and the maximum speed will depend on how the motor reacts to half-wave drive.

    Note that this is not the chopped-current approach to speed control: the SCR always begins conducting at the first positive-going 0 V crossing after the command and continues until the motor current drops to zero. There are no sharp edges generating high-pitched acoustic noise and EMI: silence is golden.

    The existing speed control circuitry limits the peak current and assumes that the motor trundles along more-or-less steadily. That won’t be the case when it’s coasting between discontinuous current pulses.

    When I first looked at running the motor on DC, these measurements showed the expected relationship:

    Kenmore Model 158 AC Motor on DC - Loaded and Unloaded RPM vs Voltage
    Kenmore Model 158 AC Motor on DC – Loaded and Unloaded RPM vs Voltage

    Later on, plotting RPM against current (50 mA/step starting at 550 mA):

    Motor RPM vs Current Steps - Accelerating
    Motor RPM vs Current Steps – Accelerating

    Eyeballometrically, the slowest useful speed will be 2 stitch/s = 120 shaft RPM = 1300 motor RPM. At that speed, under minimal load, the motor runs on about 20 V and draws 550 mA. At that current, the 40 Ω winding drops 22 V, which we’ll define as “about 20 V” for this discussion, so the back EMF amounts to pretty nearly zilch.

    That’s what you’d expect for the fraction of a second while the motor comes up to full speed, but in this case it never reaches full speed, so the motor current during the pulses will be limited only by the winding resistance. At the 200 V peak I’ve been using for the high-line condition, that’s about 5 A peak, although I’d expect 4 A to be more typical.

    So, in order to make this work:

    • the optocoupler driving the base needs more current
    • the differential amp from the Hall effect sensor needs less gain

    Given the ease with which I’ve pushed the hulking ET227 transistor out of its SOA, the motor definitely needs a flyback diode to direct the winding current away from the collector as the transistor shut off at the end of the pulse. Because it’s running from full-wave rectified AC, the winding current never drops to zero: there will definitely be enough current to wreck the transistor.

    The firmware needs reworking to produce discrete pulses at a regular pace, rather than slowly adjusting the current over time, but that’s a simple matter of software…

     

  • Kenmore 158: Relay Transient Simulation

    After having blown two ET227 transistors, I fiddled with some SPICE models to explore the ahem problem space. This seems to be the simplest model with all the relevant details:

    Motor Transient - no NTC - schematic
    Motor Transient – no NTC – schematic

    A step change in the voltage source simulates the relay clicking closed with the AC line at a peak. R4 might resemble the total wiring resistance, but is more of a placeholder.

    I measured 1 nF from each motor wire to the motor shell, so I assume a similar value from wire to wire across the winding. I can’t measure that, because, as far as my capacitance meters are concerned, the 40 Ω motor winding looks exactly like a resistor. R1 and L1 model the winding / commutator, but on the time scale we’re interested in, that branch remains an open circuit.

    There’s no transistor model even faintly resembling a hulking ET227, so a current controlled current source must suffice. The 0 V VIB “source” in the base lead measures the base current for the CCCS labeled ET227, which applies a gain of 10 to that value and pulls that current from the collector node. R2 is the internal base-emitter resistor built into the ET227.

    C2 is the 6 nF (!) collector-base capacitance I measured at zero DC bias on a good ET227. That’s much more than you’ll find on any normal transistor and I’m basically assuming it’s vaguely related to the Miller capacitance of small-signal fame. C3 is a similar collector-emitter capacitor; I can’t tell what’s going on under the hood without a whole lot of measurement equipment I don’t have.

    So, without further ado:

    Simple Transient Model - current pulse
    Simple Transient Model – current pulse

    Whenever you see a simulation result like that, grab your hat in both hands and hunker down; the breeze from the handwaving will blow you right off your seat.

    The key unknown: the rise time of the voltage step as the relay contacts snap closed. Old-school mercury-wetted relay contacts have rise times in the low tens of picoseconds. Figuring dry high-power contacts might be 100 times slower gives a 1 ns rise time that I can’t defend very strongly; it seems to be in the right ballpark. The green trace shows the input voltage ramping to 180 V in 1 ns, which is pretty much an irresistible force.

    The motor shunt capacitance forms a voltage divider with the parallel base and collector capacitors, so the collector voltage shouldn’t exceed 180 * (1/(1+3)) = 45 V. In fact, the blue trace shows the collector voltage remains very low, on the order of 10 V, during the whole pulse.

    The red trace shows the collector current hitting 150 A during the entire input ramp, which is exactly what you’d expect from the basic capacitor equation: I = C dv/dt. The current depends entirely on the absurdly fast 180 V / 1 ns rate: if the relay rise time is actually smaller, the current gets absurdly higher.

    The ET227 datasheet remains mute on things like junction capacitance, damage done by nanosecond-scale high-current pulses, and the like.

    Absolutely none of those numbers have even one significant figure of accuracy, but I think the overall conclusion that I’m blowing junctions based on transient startup currents through the collector holds water.

    Adding four of those NTC power thermistors seems in order. This picture also shows the snubber hanging from the back of the ET227, but I eventually took that off because the simulations show it’s not doing anything useful and it does resonate with the 120 Hz halfwave supply:

    HV Interface - snubber and thermistors
    HV Interface – snubber and thermistors

    The thermistors get comfortably warm after a few minutes and settle out around 1 Ω apiece. Adding 4 Ω to the simulation reduces the current to 30 A during a 1 ns ramp, which number obviously depends on all the assumptions mentioned above.

    I’ve been running it like that for a few hours of start-stop operation and the ET227 lives on, so maybe I can declare victory.