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.

Month: August 2009

  • Tree Frog: The Video

    Frog walking on tent
    Frog walking on tent

    Watching the tree frogs crawl up the tent from inside let us see how they move: hand-over-hand up the fabric. A dozen of them crawling along was spooky…

    I took a movie with my pocket camera that turned into an 8 MB AVI, which I can’t upload here. Most of it isn’t all that interesting, anyway, an observation which hasn’t stopped YouTube dead in its tracks yet, but we can do better than that.

    A pair of Free Software programs extracts the interesting part and produces a (somewhat) smaller animated GIF that works with WordPress.

    First, shatter the AVI into separate JPG images:

    mkdir frames
    ffmpeg -i cimg3781.avi -sameq frames/frame-%03d.jpg

    A bit of browsing showed that I wanted frames 227 through 265 and that the frog was pretty much in the upper-middle of the image. So, crop a 320×240 image around the frog from those 640×480 frames:

    cd frames
    mkdir stills
    for f in `seq 227 265` ; do convert frame-$f.jpg -crop 320x240+160+60 stills/still-$f.jpg ; done

    Then convert them into an animated GIF with a 500-ms frame rate (the -delay ticker is 10 ms):

    cd stills
    convert -delay 50 still-2* frogwalk.gif

    It’s a 1.6 MB wad, but gets the message across: frogs keep three paws stuck to the floor.

    Remember, that little guy is moving at glacial speed in the GIF: those 40 frames of video last just over a second in real time.

    Memo to self: MPEG-1 and MPEG-2 only support video-style frame rates around 30 fps.

    Update: Regular reader Przemek Klosowski showed me how to generate those numeric sequences on the fly, without using a for loop:

    There's this neat Bash construct {1..10} that you can use directly after ffmpeg:
    convert -delay 50 still-{227..430}* result.gif
    
    You can even skip every nth frame:
    convert -delay 50 still-{227..430..5}* result.gif
    

    Thanks!

  • Tree Frogs!

    Tree Frog - View Through Tent
    Tree Frog – View Through Tent

    We bicycled along the Pine Creek Gorge rail-trail in north-central Pennsylvania on a Rails-to-Trails Conservancy group ride, camping at schools and campgrounds along the trail. Quick summary: for four days we rode in the sun and slept in the rain.

    Tree Frog - Natural Light
    Tree Frog – Natural Light

    As we set up camp at Pettecote Junction, the wet ground was hopping with tiny tree frogs. It was impossible to avoid stepping on the critters. When we got the tent set up, they swarmed up the sides between the tent and the rain fly; perhaps they had an imperative to get above the flood?

    The lines in the tent fabric are about 3.7 mm apart, so the frogs are perhaps 10 mm from snout to butt. That size rules out everything in our RTP Eastern Reptiles & Amphibians book except the Little Grass Frog, which used to live only south of Virginia. The spot pattern doesn’t match, either, although they’re said to be highly variable. Who knows what’s going on in these degenerate days?

    cimg3787 - Tree Frog - Flash
    Tree Frog – Flash Illumination

    They didn’t like the mesh vent screens, favored the rougher tent fabric over the smoother seam binding, and didn’t seem to mind falling off the tent.

    Things are different when you’re small.

    Tomorrow: the video

  • Pedal Cadence Sensor Magnet Attachment

    Cadence Sensor Magnet Pedestal
    Cadence Sensor Magnet Pedestal

    We’ve been using Cateye Astrale “computers” on our bikes for decades, mostly to get the cadence function. After all this time, we pretty much know how fast to pedal, but old habits die hard.

    The cadence sensor counts pedal revolutions per minute, which requires a magnet on the crank arm. They provide a small plastic-encased magnet with a sticky-tape strip that’s worked fine on our previous crank arms.

    Our daughter’s Tour Easy arrived with fancy curved pedal crank arms that put the cadence sensor magnet much too far from the frame. You really want the magnet & sensor close to the bottom bracket so that it doesn’t get kicked and doesn’t snag anything as you pedal, but that just wasn’t going to work out here.

    A turd of JB Weld epoxy putty solved the problem: mix up a generous blob, shape it into a pedestal, glom the magnet atop it, adjust so the magnet is parallel to and properly spaced from the sensor, then smooth the contours a bit.

    Add the cable tie for extra security; you don’t want to lose the magnet by the side of the road!

    The black electrical tape is mildly ugly, but serves the purpose of keeping the cable from flapping in the breeze. The adhesive lasts about a year, then it’s time for routine maintenance anyway.