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

  • Arduino Connector & Hole Coordinates

    Arduino Diecimila
    Arduino Diecimila

    If you’re building an Arduino shield, you must align the connectors & holes with the Arduino board underneath. That seems to be easy enough, assuming you start with the Eagle CAD layout found there, but when you’re starting with your own layout, then things get messy.

    Here’s how to verify that you have everything in the right spot, at least for Diecimilla-class boards. Start by holding the Arduino board with the component side facing you, USB connector on the upper left. Rotate your own PCB layout appropriately or stand on your head / shoulders as needed.

    With the exception of J3, the center points of the connectors & holes seem to be on a hard 25-mil grid with the origin at the lower-left corner of the board (below the coaxial power jack):

    • J3 (AREF) @ (1.290,2.000)
    • J1 (RX) @ (2.150,2.000)
    • POWER @ (1.550,0.100)
    • J2 (AIN) @ (2.250,0.100)
    • Upper-left hole = 0.125 dia @ (0.600,2.000)
    • Upper-right hole = 0.087 dia @ (2.600,1.400)
    • Lower-right hole = 0.125 dia @ (2.600,0.300)
    • Reset button = (2.175,1.065)

    Offsets between points of interest:

    • connector rows Y = 1.900
    • right holes Y = 1.100
    • UL hole to UR hole = (2.000,-0.600)
    • UL hole to J3 X = 0.690
    • J3 to J1 X = 0.860
    • J3 to POWER X = 0.260
    • POWER to J2 X = 0.700
    • J1 to UR hole = (0.450,-0.600)
    • J2 to LR hole = (0.350,200)

    Note that the three etched fiducial targets are not on the 25-mil grid. They’re not on a hard metric grid, either, so I don’t know quite what’s going on. Fortunately, they’re not holes, so it doesn’t matter.

    Memo to self: perhaps I’ve measured & calculated & transcribed those values correctly. Double-check before drilling, perhaps by superimposing double-size PCB layouts on a light table or window. Finding it then is much less annoying than after drilling the board… ask me how I know.

  • Garden Fork Repair

    Mary intercepted a complete, albeit defunct, garden fork on its way to the trash and brought it home for repair. It turns out that the handle’s socket had loosened and split around the tine shank, but all the pieces were pretty much in place.

    Looks like a job for JB Weld Epoxy!

    Mix the epoxy with my dedicated mixing screwdriver, butter up the shank, blob the excess epoxy into the socket, shove the parts together, clean off the outside globs, and let it cure overnight.

    The trick is to get enough epoxy in the socket to fill the voids and mechanically lock the shank in place. This probably won’t work for forks used by burly guys who heave rocks over the horizon, but for our simple needs it’ll do just fine.

    Every now and again it’s OK to do an easy repair without a trace of CNC…

  • There’s a Safety Flag on the Play

    How not to refuel your truck
    How not to refuel your truck

    Or, perhaps, What’s Wrong With This Picture?

    Maybe that stogie wasn’t lit, but I’m exceedingly glad I wasn’t close enough to be sure!

    You may need to click on the picture to get the joke; I was high up on a gravel bank, but probably still within the blast zone.

    My pocket camera was set to mandatory flash from whatever I’d been doing the last time I used it. The piddly little xenon tube even lit up the retroreflective tape on the semitrailer about 200 feet away across the highway.

  • Remote Control Button Shield

    Button shield in place
    Button shield in place

    Mary was giving one of her vegetable gardening presentations and had the projector go into Mute mode all by itself. It’s hard to debug something like that under pressure, but (as nearly as we can tell) the projector’s remote control (!) got squashed inside the tote bag and managed to tell the projector to go mute itself…

    The remote control has buttons that stand proud of the surface by about 2 mm and, worse, they’re exposed from all sides. There seems to be no way to turn the mumble thing off, other than by removing the batteries, so I conjured up a quick-and-dirty button shield. Not the fanciest thing I’ve ever made, but it’s sufficient for the purpose.

    [Update: Apologies to all you Arduino fans who think this should have something to do with a remote-control circuit board plugged atop a Diecimila, but I think the Arduino designers could have picked a more descriptive term than “shield”. Plenty of folks seem to arrive here by searching for the obvious keywords and go away unhappy. If you’re looking for Arduino stuff, click on the obvious tag in the right-side column that’ll call up everything I’ve written about on the subject… ]

    Sizing the perimeter
    Sizing the perimeter

    I thought about making a tidy form-fitting slab that would fill the entire space between the button matrix and the case, but that gets into curved edges and fussy fitting; fortunately, I came to my senses. Without wanting to make a prototype to get the second one right, I simply trimmed the outside of the polycarbonate slab to a ruthlessly rectangular 33×50 mm. That gives about 2 mm clearance on each side of the button matrix and fits with about 1 mm clearance from the case. The lengthwise dimension is what it is.

    The 29×46 mm pocket must be about 3 mm deep to clear the button tops.

    The G-Code came from the Hugomatic pocketRect2points generator, which worked just fine; normally I hammer out my own G-Code, but I was leaving on a trip the next day. The cut depth of 1 mm per pass was probably too conservative. A cutting speed of 300 mm/min with a 2000 rpm spindle worked reasonably well with water cooling.

    Pocket milling with water coolant
    Pocket milling with water coolant

    A 1/8″ end mill produced corner radii that matched the buttons fairly well, which means it took a loooong time to chew out the pocket. The picture shows the mill knee-deep in a pool of water and swarf; I vacuumed the chips out at the end of each pass and added more water.

    Double-stick tape held the polycarb & sacrificial plate to the tooling plate, which worked surprisingly well given that I just wiped the grunge off and squashed it down. A machinist’s square aligned the rectangle closely enough and, of course, I used the laser aligner to set the coordinate zero to the left-front corner.

    For lack of anything smarter, a rubber band holds the shield in place on the remote. I thought about fancy hinges and Velcro and stuff like that, but the projector is used by non-technical folks and, as nearly as I can tell, the remote control never gets used at all.

    Quick and dirty, indeed: about two hours, first doodle to snapping the rubber band, including a bit of time wasted on an ancient G-Code generator that spat out bad coordinates.

    Plus time to write this up, natch…

  • Geek Scratch Paper Redux

    4x5" grid for 4.25x5.5" stock using 5x8" page
    4×5" grid for 4.25×5.5" stock using 5×8" page

    While attending a recent IEEE talk, I scored a stack of quarter-sheet flyers for a “Green Fair” that were outdated and presumably destined for recycling (or, more likely, the trash can), printed on gorgeous glare-white card stock with one blank side. Couldn’t pass ’em up…

    As described there, I’m the sort of person who thinks on grid paper.

    This being a new paper size, I went to incompetech.com again, set up a nice 4×5″ grid, fetched the PDF, then discovered that 4.25×5.5″ paper isn’t one of the R380 printer’s standard sizes. So I loaded the PDF into The GIMP and aligned it within a 5×8″ page. After a bit of to-and-fro tweakage, the grid came out neatly centered on the flyer.

    The image is the resulting PNG file, which should Just Work if you have a similar setup and print on a borderless 5×8″ page. There may be some interaction with the default 2% borderless printing expansion; I turned that off in the Turboprint driver. You (well, I) want exact 1″ grids!

    If you don’t have a full-bleed printer, some fiddling with the margins may be in order. My Epson R380 printer feeds & prints top-first and left-aligned, if that’s any help.

    Anyhow, I ran off two dozen grids, whacked some cereal-box cardboard to the right size, and padded everything together with Elmer’s Wood Glue to see how that works. It’s a bit stiffer than I’d like, but these flyers are more like thin cardboard than thick paper.

    Quarter-sheet grid tablet - showing binding
    Quarter-sheet grid tablet – showing binding

    My R380 has a continuous-flow ink system, which is basically the only reason this sort of geekage makes sense. At two kilobucks per liter for photo ink, it sure doesn’t…

    [Update: I wonder why somebody rated this one as “Dead Wrong”? It’d be useful to know what went wrong; the comments box works just fine.

    For what it’s worth, I just ran off another stack. Nothing wrong with the process, that’s for sure.]

  • Camera LCD Sunshade & Magnifier: Part 2

    Lens end of viewer
    Lens end of viewer

    With the bottle formed & trimmed to shape, it’s time to mount the lens. This view shows the final result, with the camera body angled upward.

    The general idea is that the bottle cap already attaches securely to the bottle, so I can just cut a rectangular hole in the lid, make it just slightly smaller than the lens, and affix the lens inside with the planar surface facing outward.

    Two motivations for making the hole slightly smaller than the lens:

    • The lens has rounded corners, as it was cut from a 38 mm diameter round lens
    • It won’t stick out, get bumped, and fall off
    Lens opening cut in bottle cap
    Lens opening cut in bottle cap

    The first step was, of course, to make a fixture: a sacrificial wood block with a raised section that fits snugly inside the cap. I found a nice maple disk in the scrap bin, chucked it in the lathe, and turned a section to fit. I don’t have a dust extraction system, so I did this one-handed with another on the shop vac to suck up the swarf. Yuch, wood is dusty!

    That simplified clamping the rather slippery lid in place. It’s probably polyethylene that would slide away under heavy cutting loads, but with a 2 mm end mill that wasn’t a problem. The origin is at the center of the cap, directly atop the convenient injection-molding sprue button.

    The lens is 34.4×22.1 mm, so I cut a 32×20 mm opening using manual CNC. Given a 1 mm cutter radius, the G-Code looked something like this:

    #1=[20/2-1]
    #2=[32/2-1]
    g0 x[0-#1] y[0-#2]
    g1 z-2 f100
    x#1
    y#2
    x[0-#1]
    y[0-#2]
    g0 z30

    That’s from memory, so it might not work quite right. Basically, store the key variables in parameters and use those instead of mistyping a digit somewhere.

    The opening even has nicely rounded 1-mm radius corners from the 2 mm cutter…

    Cutting acrylic lens holder
    Cutting acrylic lens holder

    I added a sheet of acrylic inside the lid to hold the lens in position and provide a more glue-attractive surface. The lens opening here was a slip-fit for the lens: 34.5×22.2 mm. The G-Code looks pretty much the same:

    #1=[22.2/2-1]
    #2=[34.5/2-1]
    g0 x[0-#1] y[0-#2]
    g1 z-2 f100
    x#1
    y#2
    x[0-#1]
    y[0-#2]
    g0 z10
    Trimming outside of acrylic lens holder
    Trimming outside of acrylic lens holder

    The wood disk even had a convenient hole in the middle, making it easy to re-clamp the acrylic from the center with a stack of washers. The laser aligner made alignment easy: make the nut finger-tight, put the spot on the left edge near the front, jog to the rear, twist to split the difference, iterate a few times, then snug down the nut.

    Then the origin is halfway between the edges. Knowing the opening size, find one edge and touch off by half that amount.

    The cardboard lid liner was 43 mm in diameter, so I figured that would work for the acrylic sheet. Circular interpolation makes getting a precise diameter trivially easy, after you remember that this is outside milling so you must add the cutter radius:

    #1=[43/2+1]
    g0 x[0-#1] y0
    g1 z-2 f100
    g2 i#1
    g1 z30
    Finished cap with lens
    Finished cap with lens

    What’s not shown there is the blob of acrylic that welded itself to the cutter because I was taking picures rather than dribbling water on the workpiece to keep it cool. I hate it when that happens.

    But everything pretty much worked out. The holder was a snap fit inside the cap, just like it was supposed to be.

    I glue the lens to the acrylic holder with silicone snot (aka “adhesive” or “caulk”), let it cure overnight, snapped the cap on the bottle, and iterated once to get the lens properly aligned with the opening (the acrylic sheet rotates freely inside the cap).

    Viewer attached to camera
    Viewer attached to camera

    The end result is, admittedly, ugly on a stick, but the first reports from the user community are encouraging!

    We may add a dark cloth ruffle around the bottle cap as an eye shade and eyeglass protector, but that’s in the nature of fine tuning.

  • Camera LCD Sunshade & Magnifier: Part 1

    Viewer attached to camera
    Viewer attached to camera

    Mary take her gardening pictures with our Sony DSC-F505V camera, which has one compelling advantage for the job: the lens and body pivot, so you can take pix at odd angles without groveling in the dirt or hovering over the camera staring downward. Alas, it lacks an optical viewfinder, which means she does a lot of outdoor close-up photography peering into a washed-out LCD panel in full sun. Worse, she’s far-sighted and can’t see fine details without her reading glasses or bifocals, so it’s really hard to get proper focus.

    Something must be done!

    The general notion is to put an opaque shield around the LCD with a lens that magnifies the viewfinder. If you happen to have perfect near vision, the lens is optional and you can probably use one of the commercial sunshades that attach with hook-and-loop strips. That isn’t going to work for us.

    With inspiration from that project, I retired to the Basement Laboratory. [Update: a somewhat less intricate do-it-yourself project starting with a slide viewer. I suspect it works better for normal-looking cameras, not this one.]

    Raw material: rectangular lens and opaque bottle
    Raw material: rectangular lens and opaque bottle

    Rummaging in the Bottle Supply turned up a dark brown plastic bottle made from PETE, the same stuff that makes soda bottles, with a black plastic snap-cap lid. PETE has a glass transition temperature around 75C, which means you can reshape it with a heat gun (not, alas, a hair dryer). Actually, I found two bottles, so I have a backup.

    A bit of soaking in water, followed by a generous application of xylene, got rid of the label & adhesive residue. You can get xylene in small quantities as Goof-Off adhesive remover or just buy a quart at your local big-box home-repair store. Do the xylene part outdoors and don’t toss the rags in the trash until they’re dry.

    Further rummaging in the Lens Supply turned up a 34.4×22.1 mm plano-convex rectangular lens with perhaps a 100 mm focal length. Haven’t a clue where it came from, but perhaps from the Surplus Shed optical supply shop. Pretty nearly any lens with those general specs will work, so use what you have. You do have a box of lenses, don’t you?

    Putting the flat side of the lens close to my (distance-corrected, I’m nearsighted) eyeball and looking through it at the LCD from about 75-125 mmm produces a very nicely enlarged, distortion-free image. This will work!

    Bottle cutting and forming
    Bottle cutting and forming

    The bottle is much thicker than a soda bottle, but easily cut with a razor knife and a bit of care. I removed the bottom and measured the ID as 68 mm. The circumference is, obviously, 214 mm, which is a key dimension: it must fit around the LCD’s perimeter with a bit to spare.

    I made a wood mould block that’s sized and shaped roughly like the back of the camera around the LCD: Mr Block, meet Mr Belt Sander. This avoids the prospect of melting the camera with the heat gun, as it’s largely plastic, too.

    The block is 52×57 mm, for a perimeter of 218 mm, and a totally non-critical 38 mm tall (it came from a 2×4″ chunk of lumber). The pyramidal section acts as a forcing cone to persuade the bottle to stretch around the slightly larger block and become nicely rectangular as it does.

    Wood forming block
    Wood forming block

    Position the bottle over the block, apply the heat gun all around, and ram the bottle downward as it softens. Eventually the bottle will eat the block, even though it’s not completely happy about doing so, at which point you can concentrate on heating each side separately. The bottle will settle down and stretch neatly around the block, giving it a rectangular base with a smooth transition from the round top. The cut edge tends to curl outward in the middle of each flat side, so don’t overheat it.

    Cut the corners back so there’s about one focal length from the cap to the cut, then heat the side flaps (the shape is rectangular: get this right!) and bend them back. I flattened them against the bench to remove the curve. The top and bottom flaps will fit over the top and bottom of the camera and hold the whole affair in place.

    Trim the side flaps to a few mm, as they’ll just form a light shield, and shape them to clear the controls as needed. Form the top & bottom flaps to fit snugly around the camera and trim to fit; they cover up the buttons just under the camera’s LCD, but those aren’t used in normal operation.

    I used plain old electrical tape to hold the bottle in place, as anything thicker will interfere with the lens rotation. If you have a box-shaped camera, hook-and-loop may be your friend.

    That was enough for one day. Tomorrow: a bit of CNC work on the lid