Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.
Category: Science
If you measure something often enough, it becomes science
I ran across your blog on Smart Beaconing and saw something that needed correction.
You state the Turn Slope is in units Degrees / MPH
This is incorrect. Although the term Turn Slope is not a real slope (such as rise/run classically) that is what the originators used albeit incorrectly. They do however correctly attribute the units to MPH * Degrees (a product and hence not really a slope).
In their formula they calculate a turn threshold as:
turn_threshold = min_turn_angle + turn_slope / speed
Looking at the units we see:
= Degrees + (MPH * Degrees) / MPH
which yields
= Degrees + Degrees
Which makes sense. It is too bad that the originators used the wrong term of Turn Slope which confuses most people. A better term would have been Turn Product.
In looking back over that post, I have no idea where or how I got the wrong units, other than by the plain reading of the “variable name”.
As he explained in a followup note:
As for units… I was introduced to making unit balance way back in 1967-1968 science class in HS by a really fine science teacher. It has served me all my life and I’m thankful for that training.
I have ever since told that teacher so!
A while back, our Larval Engineer rammed an engineering physics class head-on and sent me a meme image, observing that I’d trained her well: if the units don’t work out, then you’re doing it wrong.
Our Larval Engineer volunteered to convert the lens from a defunct magnifying desk lamp into a hand-held magnifier; there’s more to that story than is relevant here. I bulldozed her into making a solid model of the lens before starting on the hand-holdable design, thus providing a Thing to contemplate while working out the holder details.
That justified excavating a spherometer from the heap to determine the radius of curvature for the lens:
Student Sphereometer on lens
You must know either the average radius / diameter of the pins or the average pin-to-pin distance. We used a quick-and-dirty measurement for the radius, but after things settled down, I used a slightly more rigorous approach. Spotting the pins on carbon paper (!) produced these numbers:
Sphereometer Pin Radii
The vertical scale has hard-metric divisions: 1 mm on the post and 0.01 on the dial. You’d therefore expect the pins to be a hard metric distance apart, but the 25.28 mm average radius suggests a crappy hard-inch layout. It was, of course, a long-ago surplus find without provenance.
The 43.91 mm average pin-to-pin distance works out to a 50.7 mm bolt circle diameter = 25.35 mm radius, which is kinda-sorta close to the 25.28 mm average radius. I suppose averaging the averages would slightly improve things, but …
The vertical distance for the lens in question was 0.90 mm, at least for our purposes. That’s the sagitta, which sounds cool enough to justify this whole exercise right there. It’s 100 mm in diameter and the ground edge is 2.8 mm thick, although the latter is subject to some debate.
Using the BCD, the chord equation applies:
Height m = 0.90 mm
Base c = 50.7 mm
Lens radius r = (m2 + c2/4) / 2m = 357.46 mm
Using the pin-to-pin distance, the spherometer equation applies:
Pin-to-pin a = 43.91 mm
Sagitta h = 0.90 mm
Lens radius R = (h/2) + (a2 / 6h) = 357.50 mm
Close enough, methinks.
Solving the chord equation for the total height of each convex side above the edge:
Base c = 100 mm
Lens radius r = 357.5 mm
Height m = r – sqrt(r2 -c2/4) = 3.5 mm
So the whole lens should be 2 · 3.5 + 2.8 = 9.8 mm thick. It’s actually 10.15 mm, which says they were probably trying for 10.0 mm and I’m measuring the edge thickness wrong.
She submitted to all this nonsense with good grace and cooked up an OpenSCAD model that prints the “lens” in two halves:
Printed Lens – halves on platform
Alas, those thin flanges have too little area on the platform to resist the contraction of the plastic above, so they didn’t fit together very well at all:
Printed Lens – base distortion
We figured a large brim would solve that problem, but then it was time for her to return to the hot, fast core of college life…
Seeing this early one wintry morning made me wonder if somebody had ridden away on our bikes in the dead of night:
Bike Tracks on Snowy Driveway – overview
A closer look, as seen from the garage door:
Bike Tracks on Snowy Driveway – detail
We’d gone for a ride two days earlier and, apparently, our tires deposited enough salt dust (?) on the driveway as we rolled them out of the garage to melt the light snowfall. I’m not sure I can believe that, as those same tires left no trace of our return from that same trip, when I’d expect them to carry more dust.
If it’s a thermal effect, it was produced by one brief contact with tires kept in an unheated garage and rolled over an asphalt driveway, after exposure to ambient conditions for two days.
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
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
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
As the pulse repetition frequency increases, the motor speed goes up and the current goes down:
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!
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
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
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
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.
Two mornings after a heavy, wet snowfall, the meltwater atop the concrete patio puckered up into ice crystals:
Ice crystals on patio
It seems the liquid water collects into the crystals as they freeze, leaving the concrete between the ice patches nearly dry. They seem surprisingly linear, with only a few hexagonal flourishes here and there.
This Cooper’s Hawk (*) kept an eye on us as we walked down the driveway:
Coopers Hawk – keeping an eye on us
We obviously pose no threat, so he let us pass unmolested.
I think the real reason had more to do with the dark brown-red stains on his (?) claws: that hawk just ate a fine meal and wanted time for quiet digestion and contemplation…
Hand-held Canon SX230HS, plenty of zoom, lots of purple fringing, and a cooperative bird.
(*) A juvenile, obviously, who could be either a Cooper’s or a Sharp-Shinned Hawk.