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.

Author: Ed

  • Verizon FiOS: What’s the Real Price?

    So FiOS has finally arrived here in the hinterlands and the latest teaser deal is $70/month for 10/2 Internet and anywhere-in-the-US VOIP. The ad mailers always tout the blazing speed (although that’s not what they offer in the teaser) and voice clarity.

    But there’s an asterisk: the prices are always “plus taxes and fees”.

    So I called the FiOS order line (877-896-2263) with two simple questions:

    • What, exactly, are those taxes and fees?
    • What, exactly, will they add up to each month?

    After five minutes of telling the nice man everything they already know about me and giving him permission to read their own records of our account, I managed to push him off his script long enough to get a word in edgewise.

    He tells me that the taxes and fees depend on my exact location and the services I sign up for. I point out that we’ve just established my address and he should know what services he’s offering, soooo what’s the price?

    We go around and around:

    • He says the only way to find out is to sign up and get my first bill
    • I refuse to buy something without knowing the price

    Eventually he offers to transfer me to billing, where he says (and I have no reason to doubt) that they’ll certainly tell me the same thing. Sounds like a good idea to me, if only to get to the next screen. He’s obviously miffed that I’m not following my lines in his script and just buying FiOS like a good sheeple.

    I hear the usual beeps & boops, a snippet of their on-hold blather, and dead silence. Ten seconds later, the call disconnects and I get the usual “If you’d like to make a call, please hang up and dial again” message.

    They don’t care. They don’t have to. They’re the phone company.

    Right now we’re getting 13/2 Internet from Cablevision (aka Optimum Online) for $50 and a Verizon landline for $25.

    Let’s see: slower Internet and marginally cheaper phone service, plus the asterisk. Not a compelling value proposition in our situation. But, then, we’re cheapskates.

    Incidentally, the “taxes and fees” make up $10.61 of this month’s $25.09 phone bill. I have good reason to believe that if we buy two services from Verizon, the fees will add up to $20 or so. But there’s no way to find out without buying them first, of course.

    I’m seriously thinking of killing the damn landline and struggling along with VOIP and our $5/month cellphone.

    Update: Today’s mail brings an even better teaser with a different phone number: 877-896-5322. It’s still $70/month for a one-year “agreement”, but now with free activation and a $100 cash card and they guarantee the rate for two years. The kickbacks push it just under $60/month for the first year. Still has that asterisk, though. Not to mention that the offers just keep getting better and better … I’m sure the early adopters are astonished at Verizon’s sliding incentive scale.

    Update 2: If you ignore the flyer and sign up for FiOS via the Verizon website, you get an additional $5/month off and you don’t have to deal with Verizon customer service. That brings it down to $55 plus the dreaded asterisk… I wonder what next month’s mail will bring?

    Update 3: Another flyer and the offer is still $70/month, free activation, and $100 cash back. Somehow I think FiOS uptake around here isn’t living up to their expectations.

  • CD V-750 Dosimeter Charger Switch Cleanup

    So I got a classic Jordan Electronics CD V-750 dosimeter charger (for V-742 dosimeters) from the usual eBay supplier, mostly because I’m writing a Circuit Cellar column and need a MacGuffin to talk about HV transformers and power supplies.

    The charger had some corrosion on the cast aluminum (?) knobs, but seemed largely unscathed by four decades in its original box. The charging circuitry depends on a few electrical contacts and, as you might expect, those were badly intermittent.

    A bit of background…

    Charging contact pedestal
    Charging contact pedestal

    The charging pedestal has two parts visible from the outside: an outer sleeve that’s firmly secured to the case and an inner cylinder that slides within the sleeve, with springs inside the charger pressing it outward. Well, there’s a nut, toothed washer, and the bead-chain cap assembly, but those don’t count.

    The inner cylinder has a transparent plastic insert crimped in place, with a metal rod protruding about 2 mm from the flat top of the plastic. That rod presses against the middle contact of the dosimeter and connects the charging voltage to the electrostatic fiber. The outer body of the dosimeter fits snugly over the cylinder to make the other electrical contact.

    The directions tell you to press the dosimeter down gently to read it. A weak spring holds the cylinder outward with about 1.5 lb of force. After about 1 mm of travel an incandescent bulb (remember those?) turns on, transmits light through the plastic insert, and lights up the dosimeter scale and fiber.

    To charge the dosimeter, you press down firmly and twiddle the adjusting knob to position the fiber. Pressing hard enough to force the dosimeter body down to the sleeve, another 3 mm of travel, compresses the dosimeter’s internal bellows (or plastic seal) enough to complete the circuit to the fiber; a sealed dry air gap normally isolates the fiber from the dosimeter’s external contact. A stout leaf spring holds the cylinder outward with (according to one instruction manual) 7.75 lb of force, so it takes more pressure than you’d expect to hold the dosimeter down.

    Charging contact inside view
    Charging contact inside view

    The internal parts of the charging pedestal makes all that stuff work without any formal switch contacts. That, unfortunately, causes the intermittent operation.

    The gray “wire” inside the large 7-lb leaf spring is both the 1-lb spring and the high-voltage electrical contact. The purple wire soldered to the end of the wire spring carries the HV charging potential from the circuitry.

    The black and red wires connect to the incandescent bulb, which fits into the holder near the top of the circuit board sticking up vertically just to the right of the pedestal base; I removed it to reveal the other parts. For what it’s worth, the bulb holder doesn’t do a good job of securing the bulb; I have some improvements in mind for that, too.

    Note the spare bulb just beyond the center bulb contact near the top of the picture. The rubber grommet securing that has turned into black Gummi-bear substance; that sucker is in there forever.

    The battery’s positive terminal connects to the case; this is a positive-ground circuit!

    The leaf spring hitches over two shoulders on the circuit board and presses it firmly against the other side of the spring. The curved fork fingers pressing against the brown insulating washer are firmly mounted to the circuit board and act as one side of the switch contacts.

    Pedestal removed from charger
    Pedestal removed from charger

    When you push the dosimeter against the sleeve, the base of the cylinder slides through the ID of the fiber washer and contacts the fork fingers. Bingo, that completes the circuit, lights the lamp, and fires up the HV circuitry. The charging voltage doesn’t reach the dosimeter fiber because the leaf spring hasn’t started pressing the cylinder against the dosimeter’s innards: there’s no connection inside the dosimeter.

    With that out of the way, here’s what’s needed to get the pedestal working reliably.

    Get the whole pedestal assembly out of the charger, which requires a bit of wiggly jiggly action. This will be easier if you unsolder the three wires, which I didn’t do until I was sure it was absolutely necessary.

    Grab the leaf spring on both sides of the bulb circuit board, pull up while pushing down on the spring’s base with some other fingers, and lift the tabs off the circuit board shoulders. This requires a surprising amount of force; don’t let the spring get you by the soft parts!

    Leaf spring released
    Leaf spring released

    A small crimped metal connector mates the end of the wire spring to the center contact in the cylinder. Pay attention as you maneuver the pedestal out of the leaf spring: you don’t want to deform that connector too much. Or, much worse, lose it under your workbench.

    There’s a rubber O-ring inside the outer sleeve that’s barely visible in the picture of the parts. The 1-lb wire spring had trouble forcing the cylinder back out through the O-ring, leaving the switch just barely closed even with the dosimeter removed. A touch of silicone gasket lube on the O-ring made it wonderfully slippery again.

    The inner cylinder has wire snap ring in a groove that adds a bit of stability and maybe some contact friction inside the sleeve. You need not remove the snap ring; they’re not called Jesus clips for nothing. It’s outside the O-ring’s protection, exposed to the world.

    Basically, clean everything without yielding to the Siren Call of sandpaper. What you want to do is get the oxidized metal off the base material without scarring it.

    Pedestal contact components
    Pedestal contact components

    I applied a tiny drop of Caig DeoxIT Red to the snap ring, worked it around & around, then wiped off the residue.

    The actual switch “contacts” are the wide base of the inner cylinder (to the right in the picture) and the rounded end of the fork attached to the lamp base circuit board. The contact area is broad, smooth, plated-steel-on-steel, and utterly unsuited to the job. Wipe both of them clean, add DeoxIT, wipe them clean again.

    I applied another minute drop of DeoxIT to the base of the cylinder after putting everything back together, rotated it against the fork, and wiped it off. Most likely that had only psychological benefit, but what the heck.

    The parts go back together in the obvious way, again taking care not to let the leaf spring bite you. I routed the wires a bit differently, but I doubt it makes any difference.

    Now the charger works perfectly again!

    Memo to Self: replace that bulb with nice soldered-in-place LED

    V-742 Dosimeter set to Zero
    V-742 Dosimeter set to Zero

    Update: It seems you can actually buy V-750 dosimeter chargers new from www.securityprousa.com/doch.html. However, eBay is significantly less expensive and you might get some quality shop time out of it. Your choice.

  • Changing the Arduino PWM Frequency

    The default PWM frequency for PWM 3, 9, 10, & 11, at least for the Diecimila running at 16 MHz, is 488 Hz. That’s OK for dimming LEDs where you’re depending on persistence of vision, but it’s much too low when you must filter it down to DC.

    The relevant file is hardware/cores/arduino/wiring.c, which is buried wherever your installation put it.

    Turns out that the Arduino runtime setup configures the timer clock prescalers to 64, so the timers tick at 16 MHz / 64 = 250 kHz.

    You can fix that by setting the Clock Select bits in the appropriate Timer Control Register B to 0x01, which gets you no prescaling and a 62.5 ns tick period:

    TCCR0B = 0x01;   // Timer 0: PWM 5 &  6 @ 16 kHz
    TCCR1B = 0x01;   // Timer 1: PWM 9 & 10 @ 32 kHz
    TCCR2B = 0x01;   // Timer 2: PWM 3 & 11 @ 32 kHz

    If you’re finicky, you’ll bit-bash the values rather than do broadside loads. However, it probably doesn’t matter, because Timer 0 runs in Fast PWM mode and Timers 1 & 2 run in Phase-Correct PWM mode, so WGMx2 = 0 in all cases.

    Fast PWM mode means Timer 0 produces PWM at 250 kHz / 256 = 976 Hz. However, the Arduino runtime runs the millis() function from the Timer 0 interrupt, so changing the Timer 0 prescaler pooches millis(), delay(), and any routines that depend on them.

    Phase-correct PWM mode means that Timers 1 & 2 count up to 0xff and down to 0x00 in each PWM cycle, so they run at 250 kHz / 512 = 488 Hz.

    Adroit TCCRxB setting can prescale by 1, 8, 64, 256, or 1024. Or stop the Timer stone cold dead, if you’re not careful.

    Before you fiddle with this stuff, you really should read the timer doc in the ATmega168 datasheet there.

    Memo to Self: don’t mess with Timer 0.

  • Photo Tweakage: Mouse Tunnels in the Snow

    Mouse tunnels in the snow
    Mouse tunnels in the snow

    As the snow cover melts away in the spring, you discover how much activity has been going on.

    The mice make elaborate tunnels with spaces for seed stores, latrines, and numereous secret entrances near the bushes. For a few months, at least, they can scamper all over the yard without worrying about becoming snacks for owls and hawks.

    This kind of picture requires a bit of tweakage, because the default camera settings deliver an essentially gray picture with no contrast. The usual auto-exposure settings assume a more-or-less neutral background, so the camera adjusts the exposure to deliver a neutral result. Unfortunately, you really want most of the background to be white, so the default snow image will be grossly underexposed.

    Set the camera to overexpose the picture by 1 or 2 EV; if your camera has a histogram display, adjust the exposure to put that huge bump on the white end close to the right side of the histogram. It helps if you frame the picture before doing this, as the LCD monitor will be pretty much retina-burn white.

    Take the picture and get it into your PC.

    GIMP Level Adjustment Window
    GIMP Level Adjustment Window

    Now, in your favorite photo-editing software (The GIMP on our desktops), adjust the photo’s levels & contrast. This screen shot shows the logarithmic histogram; the linear one is basically just one peak 3/4 of the way to the right side with a little grass on the rest of the chart. The two little buttons in the upper-right choose linear or log.

    Drag the white point (the teeny white triangle on the right, just below the histogram) until it’s just a bit to the right of the abrupt dropoff’s foot. That sets the whitest part of the picture to real white, not half-a-stop-down light gray.

    You can do the same with the black point (the black triangle on the left), setting it to just left of the black dropoff. In this case, we have some genuinely dark areas, so leave it alone.

    Now, the key part: drag the middle triangle to adjust the gamma. Move it rightward to darken the overall image by decreasing the gamma and emphasize small differences on the bright end of the histogram. That makes the tunnels pop out of the image, although it also tends to make the snow look very contrasty.

    Don’t go overboard with this sort of thing, but a little adjustment can reveal details and bring pictures back to life. It’s not for Ansel Adams quality pix, that’s for sure.

    Here’s possibly more than you want to know about levels & gamma & contrast, but with much better illustrations and more descriptions: Unai Garro’s Blog. He has other useful tutorials, too.

  • Same Content, Different Theme: Redux

    This theme (Rubric) seems less glaring than Shocking Blue Green, it’s flexible-width, and the fonts seem fine.

    A bit heavy on the Javascript that nails that gradient to the screen. Ain’t it amazing how software eats up all the performance of the hardware?

    Heck, it even has a customized header image!

  • Bad Gas!

    No, not that kind!

    Over the last several years, more or less coincident with the switch from MTBE to ethanol, all of my small internal-combustion engines have stopped working with stored gasoline, even when it’s treated with StaBil, even for just a few months.

    After plenty of putzing around, pouring in fresh gasoline has solved the problem in every engine.

    For example, I’d left the snow thrower’s tank empty after tracking down the bad gas problem in 2007. I filled it with gas from about November when we did the last of the leaf shredding; I think I’d dosed it with Sta-Bil, but in any event that’s relatively young gas by my standards.

    The blower didn’t even cough when I leaned on the starter button; not a single pop. I fired a dose of starting fluid up its snout and it still didn’t fire. At all. Period. As a friend puts it, starting fluid should wake the dead.

    Pulled the plug, blew compressed air into the cylinder to dry it out, went out for a can of New Gas, drained the Old Gas, filled the tank, and it fired right up. Surges a bit at idle with no choke, but I can deal with that.

    Lessons learned:

    • You cannot store ethanol-treated New Gas for more than a month or maybe two, tops, at least for use in small engines.
    • Sta-Bil doesn’t work on New Gas. I’d love to be proven wrong, but this whole bad running thing began with well-treated gasoline stored in a closed container.
    • There is no longer any way to have an emergency gasoline stash on hand so you don’t have to go out in the FFC (that’s Freezing obscene-gerund Cold) dawn for a fresh tank.

    Even with fresh gas, the engines surge under light load, which is a classic symptom of an air leak around the carburetor: lean running. But in all the engines? And with no detectable leaks? Even after replacing the gaskets?

    As nearly as I can tell, the problem stems from the 10% ethanol added as an oxygenate. The additional oxygen reduces pollution in modern engines, but causes small engines (at least the ones without electronic mixture control, which are all of mine) to run very very lean.

    The cheap solution seems to be setting the engine at about 1/3 choke for normal running. That richens the mixture enough to make the engine happy, but without farting black smoke out the muffler.

    Although I no longer keep a 5-gallon can of gas for emergencies (which I’m sure will come back to haunt me one of these days), I do keep a gallon with dose of StaBil for the yard equipment.

    Update: As of late-Feb 2009, that entire Cornell website has been dead since I posted the link. If it never comes up again or the link stays broken, here’s the punchline. The link pointed you to their evaluation of Cherokee Trail Of Tears beans, with this review from someone with *cough* experience:

    This is my favorite dry bean for black bean soup. It’s not called “Trail of Tears” for nothing. If you walk behind someone who’s eaten a mess of these beans, your eyes will be burning. It’s a very gassy bean.

    This Internet thing isn’t ready for prime time; stuff just softly and suddenly vanishes away.

    Update 2: Cornell is back online again. It seems their servers got pwned… after their desktops got infected. But, eh, they’re running Windows, what do they expect?

  • Transformer Parameter Extraction & BH Curve Plotting

    In addition to building a Spice model for a transformer, it’s also important to know whether the core can support the flux generated by the primary winding. This is similar to the inductor problem I mentioned there.

    Small HV transformer with test winding
    Small HV transformer with test winding

    Measure the core’s area and path length. One  can reasonably expect all cores to have hard metric measurements these days: Yankees set those calipers to millimeters and get over it. Besides, you need metric units for everything that follows.

    This transformer has two E-shaped core halves, so the center leg (the one with the windings on it) has twice the area of the outside legs, which are 7 mm thick and 5 mm wide. The central leg is twice that width: 10 mm.

    Figure the stacking factor for a ferrite core is, oh, say, 0.9, making the effective core are:

    Ac = 0.9 · 7 · 10 = 63 mm^2 = 0.63 cm^2

    You need cm^2 here to get gauss later on.

    The core is square, 30 mm on each side. Divide it in half, right down the middle of the center leg, then figure the mean path length around the middle of that rectangle:

    MPL = 2 · (30 – 5) + 2 · (15 – 5) = 70 mm = 7 cm

    Again, you need cm here to get oerstead down below.

    Put a few turns Nt of fine wire around the core, outside all the other windings. This particular transformer has three small imperfections where the varnish / sealant didn’t quite bridge from the bobbin to the outer core legs, so I managed to sneak 20 turns of wire through the holes. Call this the test winding: Nt = 20.

    Incidentally, that’s why you should always buy at least three units from surplus outlets: one to sacrifice, one to use, and one for a spare. I usually get five of anything.

    Connect the transformer primary to a signal generator & oscilloscope Channel 1, connect the test winding to Channel 2, set the channels to maybe 100 mV/div. Set the signal generator for sine wave at maybe 1 kHz, crank on a few hundred millivolts, then read RMS voltages from both channels: Chan 1 = Vp, Chan 2 = Vt.

    Knowing Vp and Vt and the number of turns Nt in the just-added extra winding, find the number of primary turns Np:

    Vp / Vt = Np / Nt

    136 / 40 = Np / 20

    So Np = 68

    Repeat that exercise, stuffing voltage into the transformer’s actual secondary winding (the HV winding):

    4000 / 46 = Ns / 20

    So Ns = 1739

    Comfortingly, the turns ratio works out to what you’d expect from the voltage ratio measured while extracting those pi model parameters:

    N = Np / Ns = 68 / 1739 = 0.039 = 1/25.6

    (You may want the turns ratio as Ns/Np = 25.6. Either will work if you make the appropriate adjustments in the equations.)

    Having measured the primary inductance as about 15 mH, the reactance at 60 Hz is:

    5.6 Ω = 2 · π · 60 ·15e-3

    So it’s reasonable to use a 100 mΩ current sensing resistor.

    Plug a 6 VAC (not DC!) wall wart into the Variac and wire it to the primary through the resistor. Connect the oscilloscope X axis across the resistor, set the gain to maybe 10 mV/division.

    Connect a 220 kΩ resistor in series with a 1 μF non-polarized capacitor, connect that to the normal HV secondary winding, connect the Y axis across the capacitor, set it for maybe 50 mV/div.

    The capacitor voltage is the integral of the secondary voltage, scaled by 1/RC. The RC combination has a time constant of 220 ms, far longer than the 16.7 ms power-line period, so it’s a decent integrator.

    Small HV transformer BH curve
    Small HV transformer BH curve

    Fire up the scope, set it for XY display, turn on the Variac, slowly crank up the voltage, and see something like this on the scope:

    Tweak the offsets so the middle of the curve passes through the center of the graticule, maybe turn on the bandwidth limiting filters, adjust the gains as needed, then measure the point at the upper right at the end of the straightest section in the middle.

    That point, as marked by the cursors, is more or less:

    X = 6.5 mV

    Y = 100 mV

    Now plug all those numbers into the equations and turn the crank…

    The magnetizing force H in oersteads:

    H = (0.4 · π · Np · Ip) / MPL = (0.4 ·3.14 · 68 · Ip) / 7

    H = 12.2 · Ip

    Because the 100 mΩ current sensing resistor scales the current by 10 A/V, the scope X-axis calibration is:

    H = 122 · Vsense

    The core flux density B in gauss (noting that the turns is Ns and converting the peak Vcap voltage to RMS):

    B =(0.707 · Vcap) · (R · C · 10^8) / (Ns · Ac) = Vcap · (220e3 ·1e-6 ·1e8) / (1739 · 0.63)

    B = 14e3 · Vcap

    Finally, at that point where the cursors meet in the upper right part of the curve:

    H = 122 · 6.5e-3 = 0.8 Oe

    B = 14e3 · 0.1 = 1400 G

    Assuming there’s a straight line from the origin to that point (which is close to the truth), the B/H ratio gives the slope of the line and, thus, the core’s permeability:

    µ = B / H = 1400 / 0.8 = 1700

    It’s allegedly a ferrite core, so that’s in the right ballpark given the rough-and-ready approximations in the measurements.

    The answer to the key question comes right off the scope without any fancy math, though. Just beyond the upper-right point the BH curve becomes horizontal, which means the slope is zero, which means the core is saturated, which means the circuit stops working.

    Sooo, the maximum value of the primary current is pretty nearly:

    Imax = 6.5 mV ·10 A/V = 65 mA

    My back of the envelope for the high-voltage DC supply is that a peak of 30 mA will pretty much do the trick, so I’m in good shape. Might be a bit higher during startup, but it’ll sort itself out in short order.

    Whew!

    Correction: I did a total arithmetic faceplant in the previous version. I think this is now correct, but you should always cross-check anything you find on the InterWeb, fer shure!