Advertisements

Archive for December, 2009

HP54602 Oscilloscope Trace Conversion Tweakage

The script (writeups there and there) I use to convert the HPGL screen dumps from my HP54602 into PNG images produced a transparent background. I put the files into an OpenOffice mockup of my Circuit Cellar columns and the background turns white, so I figured it worked OK.

Turns out that the workflow at Circuit Cellar Galactic HQ turns the background black. A bit of digging showed that the ImageMagick convert program produced an alpha channel that selected only the traces and left everything else unselected. Why that produces white here and black there is a mystery, but there’s no point in putting up with such nonsense.

Another wrestling match produced this revision (the two changed lines are highlighted), which has no alpha channel and a white background. That ought to simplify things: an image shouldn’t depend on where it’s dropped to look right.

#!/usr/bin/kermit +
# Fetches screen shot from HP54602B oscilloscope
# Presumes it's set up for plotter output...
# Converts HPGL to PNG image

set modem none
set line /dev/ttyUSB0
set speed 19200
set flow rts/cts
set carrier-watch off

# Make sure we have a param
if not defined \%1 ask \%1 {File name? }

set input echo off
set input buffer-length 200000

# Wait for PRINT button to send the plot
echo Set HP54602B for HP Plotter, FACTORS ON, 19200, DTR
echo Press PRINT SCREEN button on HP54602B...

log session "\%1.hgl"

# Factors On
input 480 \x03

close session
close

echo Converting HPGL in
echo --\%1.hgl
echo to PNG in
echo --\%1.png

# Factors Off
#run hp2xx -q -m png -a 1.762 -h 91 -c 14 "\%1.hgl"
#run mogrify -density 300 -resize 200% "\%1.png"

# Factors On
run sed '/lb/!d' "\%1.hgl" > "\%1-1.hgl"
run hp2xx -q -m eps -r 270 -a 0.447 -c 14 -f "\%1.eps" "\%1-1.hgl"
run rm "\%1-1.hgl"
run convert "\%1.eps" -alpha off -resize 675x452 "\%1.png"

echo Finished!

exit 0
Advertisements

Leave a comment

Icicle Formations at Red Oaks Mill Dam

The dam at Red Oaks mill has accumulated several large trees over the past year that often serve as perches for birds surveying the pool.

Waterfall icicles

Waterfall icicles

We spotted these ice formations on a recent walk.

Tree trunk icicle toothbrush

Tree trunk icicle toothbrush

The bottom edge of the toothbrush is just inches over the roiling water.

Leave a comment

Tchotchke Repair

Tchotchke epoxy

Tchotchke epoxy

Sometimes I get to do an easy one. This dust collector came with the house and sits on the fireplace; one of the little guys fell off when Mary went on a cleaning frenzy. As nearly as I can tell, he had a bad butt weld (using the exact term) with marginal penetration.

A dot of JB Weld, an uncomfortable overnight stay on the workbench, and he’s as almost good as new. I briefly thought about resistance-soldering him together, but came to my senses: epoxy to the rescue!

The balance point is sufficiently delicate that the additional weight of the epoxy pulls his side down a bit. I’ll call it art and leave it at that, although I should build a little circuit with a proximity sensor and an electromagnet to keep the thing in motion.

See-saw tchotche repaired

See-saw tchotchke repaired

Yeah, that’s my Tau Beta Pi Bent in the background… along with the little glass bead I made in the Corning Museum of Glass a few summers ago.

4 Comments

Bicycle Tire Liner Abrasion

The front tire (a Primo Comet blackwall) on Mary’s Tour Easy was flat when we rolled out of the garage a few days ago. While a flat isn’t pleasant at any time, it’s much nicer to find one at home, before the ride, rather than out on the road!

I figured the tire ate something sharp that managed to work its way through the tire liner and into the tube; that’s rare, but it sometimes happens. These two pix of the tread show why we use tire liners: sidewall-to-sidewall nicks, cuts, gouges, and gashes, despite the fact that the herringbone tread has plenty of life left in it. Click the pix to enlarge, if you dare…

Tire cuts 1

Tire cuts 1

And another section; it’s like this all the way around the tire. I think this one is the better part of a year old, so it has maybe 2000 miles on it. It handled 200+ miles along the Pine Creek Gorge rail-trail this past summer, which was sharp crushed gravel, but most of the cuts came from roadside debris on our ordinary utility rides around home.

Tire cuts 2

Tire cuts 2

As it turned out, the tire liner had prevented all those punctures from reaching the tube, while killing the tube all by itself. The sharp edge where the the two ends of the liner overlap had worried its way through the tube.

Abrasion from tire liner

Abrasion from tire liner

The tire liner wasn’t a genuine fluorescent green Slime strip, but some translucent brown thing. The difference: Slime liners are thinner and don’t have nearly this much abrasive power.

Alas, I didn’t have a Slime liner in my stash (remedied with the most recent bike parts order), so I put the brown liner back in with a few layers of genuine Scotch electrical tape to build the end up a bit. There’s really no good way to feather the end without making it into a ragged knife edge.

New tire and tube, of course. I’m not that crazy!

With any luck, the liner and tape will behave for another few years, until the tire wears out, and then I’ll replace everything. Other than this event, flats aren’t a big part of our riding experience.

13 Comments

Failed Switch

Switch Innards

Switch Innards

When I flipped this switch on, it started fizzing and emitting ozone-scented smoke while the lights it controlled flickered. This is not a nominal outcome. I toggled the switch a few times, but it continued to misbehave, so I installed a replacement switch and laid the old one out on the desk for an autopsy.

It’s an old-school mechanism, as suits the 1930-vintage structure it came from. The lyre-shaped arch with the spring swings back and forth on its tabs, which rest in the small recesses near the middle of the switch body. The peg on the toggle handle engages the spring, thus providing the over-center snap action.

The switch action takes place at the bottom of the arch, where those two very small tabs stick out. They wipe on the grubby-looking bottom tabs of the oddly shaped flat-brass doodads, the U-shaped ends of which surround the screws that clamp the copper wire to the switch.

I expected to find a scorched contact or perhaps an insect in the mechanism, but nothing seemed out of the ordinary. Apart, that is, from the layer of congealed grease covering everything inside. I suspect the grease was applied in the factory to help prevent contact corrosion, but the volatiles are long gone.

Switch Contacts

Switch Contacts

A closeup of the switch contacts shows (what I think is) the problem.

All the contact points are covered in grease, but the lyre-shaped gizmo looks like it’s been painted: its contact points were black and resisted cleaning by fingernail scraping.

As nearly as I can tell, all the current passed through a very few high spots that were wiped somewhat clean as the contacts closed. As those spots heated up, the grease melted and flowed over them, increasing the resistance and the heat.

The switch had been working for many decades, as the BX armored cable in the box had fabric-covered rubber (stiff rubber) insulation. I managed to install the replacement switch without breaking the insulation, but it was ugly in there.

1 Comment

What’s Inside This Box?

Digital Media Player box

Digital Media Player box

Got a package from halfway around the world that, I thought, corresponded to a recent eBay order. Opened the envelope and pulled out a box containing … a Digital Media Player?

That’s odd. I don’t recall ordering one of those.

At this point, anybody who’s read Frank Herbert’s The White Plague should get the chills. Do you or don’t you open a mysterious package from far away that seems to offer something interesting?

Pandora might have something to say, too.

Digital Media Player box - contents

Digital Media Player box - contents

Well, open it I did, and found exactly what I’d ordered: a stash of female headers pins. Of course, one can’t tell what else might have come in the package, but so it goes.

Now I can hand Eks half a lifetime supply of the strips to replace the ones I mooched.

One other mildly surprising part of the package: it seems we’ve gotten to the point where magnetic closures are cheap enough to replace everything else, including intricate origami tucks. There’s a small steel plate pasted under the flap. Who knew?

Digital Media Player box - magnetic closure

Digital Media Player box - magnetic closure

Leave a comment

A Christmas Season Poem

Twas the Night…
By Mary Nisley

‘Twas the night before September, when outside the house
Many creatures were stirring, not just a mouse;
The garden was fenced all ‘round with care,
In hopes that deer would never come there;
My daughter was nestled all snug in her bed,
While replays of band practice ran through her head;
My husband was sleeping, and hoped for much more,
As I settled down for a short summer snore.
When out in the yard there arose such a clatter,
I sprang from the bed to see what was the matter.
Away to the window I flew like a flash,
But saw nothing on the deck; what was that crash?
Then off to the kitchen to flip on the lights,
To better reveal the outermost sights.
When, what to my wondering eyes should appear,
But an eight pointed buck: a powerful male deer!
His head, it was lowered; his mouth, it was red,
He looked mean and angry, a monster to dread.
When he moved I saw a most terrible sight,
His antler was tangled in the fence very tight.
I ran for my husband, to wake him from sleep,
He groggily blinked, then from the bed he did leap.
We dashed to the doorway, but the buck, he was gone,
One glimpse of my motion made him quite strong.
We surveyed the garden with the help of a light,
What destruction was done before the buck’s flight?
Alas! My poor garden, damage lay all around,
Two heavy steel fence posts he’d bent to the ground.
The ruin was total in two veggie beds:
Stalks twisted and broken, big leaves lay in shreds.
We pushed the posts upright, unsnarled all the net,
As we patched the fence up, we felt it was wet.
Shining flashlight on hands revealed blood on our fingers,
But it was not ours: could deer blood still linger?
Sunshine the next morning revealed all of the damage,
Plus an antler tip broken in the buck’s desperate rampage.
The rabbits and woodchuck say “Thanks Mr. Buck!
You’ve opened the garden, it’s our great luck!
We’re feasting on beet greens, parsley and chard,
To fatten for winter is no longer hard.”
We wish you happy holidays, filled with warmth and good cheer,
And may your next growing season have gardens without deer.

Folks: I couldn’t make this one up; that is exactly what happened. I believe the buck was grazing on fallen apples from my neighbor’s tree when, in the dark, his antlers tangled in my fence netting. They were velvety, still soft and growing, so when he broke a tip trying to escape, there was blood all over. At 2:00AM I was outside, stringing up twine and drenching it with deer repellent, hoping to keep the rest of his herd from testing my jury-rigged fence.

Acknowledgments: Thanks to Clement Clarke Moore and his “The Night Before Christmas” for the shape of this poem and for my lines 9-11. His words fit the situation so well that I couldn’t resist using them.

Ed says: It’s Christmas: we can take the day off from tech, right?

Leave a comment