Advertisements

Archive for category Aphorisms

Driving While Shouting

We generally don’t get hassled during our bike rides, perhaps because we ride like narrow vehicles and don’t pull stupid bicyclist tricks. The few folks who do hassle us seem to be twenty-something males, an endangered species of its own.

A shout of “Assholes!”

This slideshow requires JavaScript.

Unusually, there was no nearby traffic, so it’s not a case of mistaken identity.

Protip: Don’t do something in your employer’s vehicle that your employer may regret.

A shout of “Fuck you!”

This slideshow requires JavaScript.

Protip: Your car has a license plate. JCX-1393, matching my high-res version against the audio track; I shout the license plate and identifying information while I can see it.

Yes, I was young once … and stupid.

One hopes they outgrow it, too.

Advertisements

2 Comments

Digital Tattoo Power Supply: Polarity Doesn’t Matter

When I rewired the guts of the digital tattoo power supply to eliminate the series foot switch, I kept the original wiring polarity, with the black wire to the sleeve and the red wire to the tip:

Tattoo Digital Power Supply - internal view

Tattoo Digital Power Supply – internal view

It’s the same color code I (strongly) recommend in the Squidwrench Electronics Workshops: use any color for the ground / common wire as long as it’s black, then, if you have a red wire, use it for the positive supply. You can use yellow for the higher supply voltage, but stop being clever.

I put suitably colored Powerpoles on the far end of the cable to replace the standard tattoo machine spring clip connector, so I can attach clip leads, battery test fixtures, and so forth and so on.

We wired the supply into a clip-leaded diode measurement setup with a current limiting resistor and a pair of multimeters to measure the diode current and forward voltage, whereupon we noticed all the meters displayed negative voltages and currents.

After a frenzy of wire-checking verified their setup was all good, I forced the simplest possible test, herein recreated on my bench:

Tattoo Digital Power Supply - polarity test

Tattoo Digital Power Supply – polarity test

Which produced this display:

Tattoo Digital Supply - reverse polarity

Tattoo Digital Supply – reverse polarity

Huh.

After a brief exploration of “Trust, but verify” territory, we swapped the clip leads from the power supply and continued the mission.

Back on my bench, I pulled the supply apart and measured the voltage at the jack terminals:

Tattoo Digital Power Supply - jack wiring

Tattoo Digital Power Supply – jack wiring

Still negative. Huh.

The bottom of the power supply PCB shows exactly what you should expect by now:

Tattoo Digital Power Supply - reversed color code

Tattoo Digital Power Supply – reversed color code

The red wire near the top of the board is, indeed, soldered to the trace labeled GND and goes to the jack’s tip terminal; the adjacent black wire goes to the front-panel LED. Similarly, the black wire just below it, soldered to the same trace as the yellow wire, goes to the jack’s sleeve terminal; that trace also connects to a resistor leading to the trace labeled LED+ and the LED’s red wire.

Although tattoo machines run from DC supplies, their motors or vibrators don’t depend on any particular polarity and will run fine with a backwards supply.

Resoldering the red and black wires where they should go produces the expected sign at the jack:

Tattoo Digital Supply - meter leads

Tattoo Digital Supply – meter leads

Although measuring and plotting diode voltages and currents may seem tedious, actually wiring stuff together and taking data reveals how difficult the real world can be.

I trusted the supply’s internal color code and, although I’m certain I tested the Powerpoles, I obviously didn’t notice the meter’s sign.

Memo to self: Sheesh.

, ,

2 Comments

Fairchild and Stoddard RF Current Probes / EMC Field Sniffers

I’ve always wondered how noisy those Arduino + fake Neopixel lamps might be and these RF sniffers might come in handy:

Fairchild MFC-25 and Stoddart 91550-1 Current Probes

Fairchild MFC-25 and Stoddart 91550-1 Current Probes

Even though they’re long obsolete, RF fields haven’t changed much in the intervening decades.

Fairchild Electronics may have become Electro-Metrics before they vanished in turn; the single useful search result offers a limited spec sheet that describes it as part of a set of three “loop probes covering the frequency range 10kHz-230MHz designed to search for RF magnetic leaks, especially in cabinets and shielded enclosures”. This one, with the blue coating, has a bandwidth of 22 MHz to 230 MHz. It has a TNC connector that now sports a cheap BNC adapter; note that it has standard polarity, not the reverse polarity required by FCC regulations that don’t take Amazon Prime into consideration.

Stoddard Aircraft Radio Co, Inc passed the 91550-1 baton to ETS-Lindgren, which (as of right now, anyway) offers a datasheet for a gadget that looks remarkably similar. The 30 Hz lower limit on the data plate suggests it’s roughly equivalent to ETS-L’s contemporary 20 Hz 91550-1L probe, but I doubt that makes much practical difference for my simple needs. The adapter takes the probe’s N connector to BNC.

The Word According to Mad Phil: If you can get to BNC, you can get to anything.

 

Leave a comment

Hard Drive Platter Mood Light: Correct Phase Timing

As noted earlier, the timing for a π/16 phase delay works out to

218 steps = (π/16) * (1 cycle/2π) * (7 * 1000 step/cycle)

which amounts to a delay of 5.45 s = 218 step * 25 ms/step. That means a color should appear on the top platter 11 s after it appears on the bottom platter:

Mood Light - pi over 16 phase - composite

Mood Light – pi over 16 phase – composite

But when I actually got out a stopwatch and timed the colors, the bottom-to-top delay worked out to a mere 3.5 s…

After establishing that the steps ticked along at the expected 25 ms pace, the phase-to-step calculation produced the right answer, the increments were working as expected, I finally slept on the problem (a few times, alas) and realized that the increment happened in the wrong place:

for (int i=0; i < LEDSTRINGCOUNT; i++) { // for each layer byte Value[PIXELSIZE]; for (byte c=0; c > PIXELSIZE; c++) { // figure the new PWM values if (++Pixels[c].Step >= Pixels[c].NumSteps) {   //  ... from incremented step
            Pixels[c].Step = 0;
        }
        Value[c] = StepColor(c,-i*Pixels[c].PlatterPhase);
    }
    uint32_t UniColor = strip.Color(Value[RED],Value[GREEN],Value[BLUE]);
 
    for (int j=0; j < LEDSTRIPCOUNT; j++) {              // fill layer with color
        strip.setPixelColor(Map[i][j],UniColor);
    }
}

The outer loop runs “for each layer”, so the increment happens three times on each step, making the colors shift three times faster than they should.

Promoting the increments to their own loop solved the problem:

	MillisNow = millis();
	if ((MillisNow - MillisThen) > UpdateMS) {
		digitalWrite(PIN_HEARTBEAT,HIGH);
		
		for (byte c=0; c < PIXELSIZE; c++) { // step to next increment in each color if (++Pixels[c].Step >= Pixels[c].NumSteps) {
				Pixels[c].Step = 0;
				printf("Cycle %d steps %d at %8ld delta %ld ms\r\n",c,Pixels[c].NumSteps,MillisNow,(MillisNow - MillisThen));
			}
		}

		for (int i=0; i < LEDSTRINGCOUNT; i++) {				// for each layer
			byte Value[PIXELSIZE];
			for (byte c=0; c < PIXELSIZE; c++) {				//  ... for each color
				Value[c] = StepColor(c,-i*Pixels[c].PlatterPhase);		// figure new PWM value
//				Value[c] = (c == RED && Value[c] == 0) ? Pixels[c].MaxPWM : Value[c];	// flash highlight for tracking
			}
			uint32_t UniColor = strip.Color(Value[RED],Value[GREEN],Value[BLUE]);
			if (false && (i == 0))
				printf("L: %d C: %08lx\r\n",i,UniColor);
			for (int j=0; j < LEDSTRIPCOUNT; j++) {				// fill layer with color
				strip.setPixelColor(Map[i][j],UniColor);
			}
		}
		strip.show();

		MillisThen = MillisNow;
		digitalWrite(PIN_HEARTBEAT,LOW);
	}

And then It Just Worked.

Verily, it is written: One careful measurement trumps a thousand expert opinions.

Sheesh

(The WordPress editor wrecked these code snippets. I’m leaving them broken so WP can maybe fix the problem.) The problem isn’t fixed, but these are OK now… as long as I don’t unleash the “improved” editor on the post, anyway.

, ,

5 Comments

DC Motor Mounting Plate

The Squidwrench Power Wheels Racer needed a mounting bracket for its DC motor, so Matt handed me a precut steel slab and some drawings. I did a manual layout to get a feel for the sizes:

Motor Mount - dye layout

Motor Mount – dye layout

Yes, it’s slightly rhomboid & irregular on the sides; it’ll be welded to a U-channel. The front edge is the straightest and I scribed a perpendicular datum line over on the right, from which to measure the motor center point.

But then, realizing I’d have to mill the central hole anyway, I did what I should have done from the beginning and lined it up on the Sherline:

Motor Mount - Sherline laser centering

Motor Mount – Sherline laser centering

With the part zeroed at the center, everything has polar coordinates. The bolt holes are #10 on a 50 mm BCD, which is G0 @25^[45+90*i]. Rather than writing & debugging a program, I did it all by feeding manual instructions into the interpreter; the i gets typed as 0, 1, 2, and 3 by clicking on a previous command, backspacing, and retyping, which is both faster and easier than it sounds. The holes are drill cycles: G81 Z-7 R1 F30

This being steel on a Sherline, the rule of thumb that says you can drill at 100x the drill diameter (in inch/min or mm/min, as appropriate) at 3000 RPM gets derated by at least factor of 10. I settled on 30 mm/min for a #10 drill (0.194 inch = 4.9 mm → 500 mm/min = hogwash) after trying the first hole at 50 mm/min:

Motor Mount - bolt holes

Motor Mount – bolt holes

The least horrible way to cut out the hole for the motor mounting boss involved chain drilling to excavate the most steel with the least effort. These center drill points are at G0 @14 ^[15*i] with i in [0..23]:

Motor Mount - chain center drilling

Motor Mount – chain center drilling

I drilled every even hole #27, then every odd hole #28, both at 50 mm/min, to get a thin web:

Motor Mount - chain drilled

Motor Mount – chain drilled

Then helix-mill downward with a 1/8 inch end mill at 1 mm per pass:

Motor Mount - helix milling

Motor Mount – helix milling

That started at 14 mm from the origin to match the hole circle: G3 I-14 F100 Z-1

Then I switched to a 3/8 inch = 9.5 mm end mill to bring the hole up to size, ending with G3 I-12.75 F300

Motor Mount - center hole milled

Motor Mount – center hole milled

A trial fit showed the hole was slightly off-round, probably due to a few mils of backlash in both axes, and slightly too small, because that’s how I wanted it. Flipped back-to-front, reclamped, recentered, ran the cutter around at 12.75 mm to clear the ovalness, then crept out to 12.8 mm, and it was all good:

Motor Mount - test fit

Motor Mount – test fit

That’s an easy fit with maybe 0.1 mm = 4 mil radial play around the boss. Better than that, I cannot do.

Lacquer thinner stripped the layout dye and it’s ready for welding:

Motor Mount - with motor

Motor Mount – with motor

Reminders for next time…

The drill feed on a rigid machine with plenty of spindle power is 100 x (drill dia) @ 3000 RPM. On the Sherline, in steel, 10 x dia is optimistic. Aluminum feeds run higher, but don’t get stupid.

Re-centering to the accuracy required for this job is a matter of noting the coordinates where the cutter kisses the perimeter across a diameter along each axis, adding the coordinates, dividing by two, moving to that position, and zeroing the origin. Do that in X, Y, X, and Y and it’s good enough. You could automate that with a touch probe, of course. Hand-turning the spindle with the cutter in place to feel it kiss the workpiece is fine, but use the same cutting edge on both sides of the diameter.

Figure the chain drill diameter thusly:

  • Pick a reasonable drill diameter; #10 is about as large as you want on a Sherline
  • Drill circle dia = final milled hole diameter – drill dia – 2 mm, round down to lower integer
  • # holes = π x DCD / drill dia, rounded down to lower integer
  • Hole angle = 360 / # holes
  • Hole radius = DCD / 2

Wisely is it written that a man with a CNC milling machine has many friends.

,

12 Comments

Butt Fire!

As I rolled into the Stewart’s Shop on a milk-and-eggs run, a plume of smoke spiraled out of the cigarette butt station near the door, way off on the left side:

Smoldering Cigarette Dump

Smoldering Cigarette Dump

A closer look:

Smoldering Cigarette Dump - Detail

Smoldering Cigarette Dump – Detail

By the time I unhitched myself from the bike and reached the door, two smoke jets squirted from the top and a pall of breathtakingly foul smoke filled the parking lot. I mooched a big cup of water from the folks behind the counter and pulled off the container’s lid, which let in enough oxygen to ignite a full-up fire in the heap of cigarette packs, plastic wrappers, butts, lottery tickets, receipts, and other combustible junk atop the sand bucket in the base of the butt dump. Sprinkling the water over the blaze knocked it back; I replaced the lid and declared victory.

I always take a shower after returning home from a ride, but, this time, we also ran all my bike clothing through the washer right away.

Phew…

Verily, it is written: Kissing a smoker is like licking an ashtray.

4 Comments

Green Grass Location: Goat Edition

Just because it’s a cliché doesn’t make it wrong:

Goats vs. fence - green grass

Goats vs. fence – green grass

Spotted at the U-Pick Blueberry Field Formerly Known As Secor’s.

Leave a comment