Prius footrest

On road trips in the (new, 2015) blue Prius, my left foot is frequently unhappy.  It would like a comfy  place to rest – the way IT wants to sit.  While there is a nice left foot rest, it’s not what my foot wants.  I’ve finally hacked in at least a first pass at what my foot has wanted for a long time.

footwell4358The existing foot rest assumes the drivers left foot wants to rest pointing straight forward.  Mine doesn’t – it wants to point to the left by maybe 30 degrees.  And the foot rest assumes the bottom of the foot wants to be flat (though toes raised).  Mine doesn’t – it rolls outward (is that supination?).  Making a new rest with angular correction in 2 dimensions was “interesting”.

I considered a sock full of quick set concrete, smushed into place then with its top shaped by resting my foot on it.  That might have worked.

A physical prototype/strawman usually helps me visualize what I have to make. I put a thin flat piece of wood maybe 3″x6″ on the foot rest and rotated it CCW about how my foot wanted.  OK – I’ll need to trim the bottom at an angle to meet the floor nicely.  Good start.  Now for the wedginess.

makingwedges4367I tried to block it up on the right side ’til it felt good, but couldn’t find a trivial way to do it.  So I rocked my foot back and forth (flat-supinated) to get a very seat of the pants idea what angle it wanted.  I guessed about 20 degrees, and sliced a slightly narrowed piece of 2×4 at that angle on the table saw.  While I was right there I hacked freehand the angle on the bottom, and plopped it on the rest to see how if felt.

thewedge4375Oops – that 20 degrees was too much.  Back to the saw.  After turning the wood lots of ways and scratching my head some, I used the nice blade angle scale to slice 7 degrees off, for about 13 degrees of wedge.  Felt good!  Let’s attach it – at least as version 0.1.

I was going to drill it and put a couple of self tapping screws thru whatever the original footrest was made of, but got spooked at the thought of wires (or brake lines or worse) being routed right behind it.  Very unlikely, but inposition4383high stakes.  Bummer.  Let’s just go with Liquid Nails.  It’ll be a mess if I ever have to take it off, but c’mon – it’s on the floor.

The tube of Liquid Nails has been sitting in the caulk gun for a liquidnailstipsealer4391couple of years now (though to my surprise, I hadn’t put a date on it).  I keep a 1/4-20 bolt “screwed” into the tip to try to keep it from drying out.  Pulled the bolt, squirted some out and sure enough – it was still good!

A lead block on a piece of wood to gluedup4388hold it down and some scrap to keep the bottom of the new footrest up so the floor mats will still slide out, and it’s done for now.

clamped4390It’s cold out – low in the 30s tonight, highs only in the 40s.  Recommended application temp range is 40-100, so it’s a little out of spec.  The good news is that the wood and carpet are both porous, so that should help.  (Well, except for the rubber tread on the original.)  I left the car door open (and clamped the light switch “off”) hoping it won’t smell too bad tomorrow.  We’ll see.

Foot is very anxious to try it out.

Update 1/8/17:

fail4417Well, fail.  Probably due to not letting the glue set up long enough, the wedge fell off the next morning.  Bummer.  And a mess.

itsfoam4418Second try:  I peeled the carpet back to see what I had to work with underneath.  Wow – a big block of nice closed cell foam!  Guess the worrying about puncturing brake lines was unnecessary.  (Well, no.  It was appropriately erring on the side of caution.  Just turned out to be wrong.  No regrets.)  I should be able to hack that foam into submission.

reshaping4422It was a challenge to hold the odd-shaped piece of foam to work on, and a sort of seat of the pants guess for the angle, but I chopped a big piece off.  I removed the most in the mainchunkremoved4427lower left corner to accommodate my heel.  But the upper right needed to be raised a bit more.

gluingonshim4438I cut a shim out of the cut off piece, and glued it on.  There are NO parallel sides or right angles on this sucker.  But I got it stuck on, probably with Gorilla Glue.

foaminplace4482It went back in pretty easily.  You can see some of the glue outline of the upper right shim.  The carpet went back on fine, and I got all the clips and other bits in.  The carpet didn’t seem fazed by upper right shim, but I had to wedge a block of something in below the side molding to hold it down into the heel depression.

cleanedupwell4483Now I had to face the dumb Liquid Nails.  It had had several days to cure by now.  But with a little scraping, it came off very well – even from the carpet.  Yay!  (Hmm – did the glue in the sealed, but aged tube lose some of its sticking power?)

done4494The final result is hard to tell from stock.  You can see the bit of dark stuff I wedged in to push the carpet into the heel hole.

I’ve been driving with it for a month now.  It’s definitely better than it used to be, but not perfect.  I think I was too conservative when I cut out the heel hole.  And in order to gain the maximum outward roll comfort, my heel needs to be way over to the deepest place on the left.  Unfortunately, that compromises the toe’s desire to point out to the left.  I’m not likely to go back and do it again, but my foot appreciates the improvement, tradeoffs and all.

Posted in Miscellaneous | Tagged , , | Leave a comment

Mantis tiller

Mantis+Toys3976After many years of dithering, I finally decided to get a Mantis.  I found a used one for $80? $100? on Craigslist and bought it.  It’s great!  I found edger and dethatcher parts for it and it’s ready to rock and roll.  This note will hold some details about it and its history.

Last summer (2015) I edged all the sidewalks with it and tilled up the big mess where the tree in the inside front lawn was removed and the stump ground out.  Despite its size, the thing is a beast!  I drained the tank and ran out what fuel was left in the carb and put it away for the winter.

When I tried it this spring, it wouldn’t start.  Not even a pop.  Yeah, the fuel was a little old (whatever was in the snowblower/lawnmower can – of course with Stabil, which is great), mixed fresh with oil to 50:1, but I doubted that that fuel was an issue.  I choked it and pulled a lot, but when I pulled the plug, it was completely dry.  Looks like a carb issue.  C’mon – I even ran it dry, which is a lot more than I ever do for any of my other small engines!  I drained the tank and put it away for a couple of weeks.

When I got back to it I’d decided to disassemble and clean the carb.  I had a tuneup kit (almost the right one) with fuel lines, plug, and air filters on the shelf, but no rebuild kit.  If I got in trouble, I figured I could probably find a kit at some local lawnmower place.  And I’d watched a couple of rebuild videos on YouTube.  That’s a pretty amazing resource.

The carb came apart easily, and looked pretty clean inside.  I sprayed carb cleaner kind of randomly thru holes, but didn’t know where it should come out.  The first glitch was when I went to reassemble the machine.  Since I had new fuel lines (and fuel filter and check valve and tank grommet), I figured I’d install them.  But the hoses PartsIboughtMyFuelFittingswere way longer than the originals, and the 3-hole grommet was too big for the hole in the tank.  The parts in the kit I got are on the left, but the originals look like the pic on the right.  The old grommet was still OK, so I cut the other hoses down and put it together.

You’re supposed to pump the primer bulb on top until you see gas in the return (clear) line.  I’d replaced the quite dark (but still flexible) bulb with a new clear one, but it didn’t seem to do much.  I did finally see some fuel in the clear line (a red herring:  it was coming from the tank, not the carb!), but the bulb wouldn’t flex back to normal after pressing on it.  Grumble, cheap chinese parts, grumble, put old bulb back.  Same behavior.  Choked it and pulled a lot – but still not even a pop and the plug was still dry.  Rats.

I took the carb off and apart again, sprayed some more carb cleaner at it, and pondered the primer bulb and its plastic environment.  Sucking and blowing on the (top) fuel return nipple, there was very little flow, but it seemed like a check valve (flowing out of the carb).  The brass insert apparently at the other end of the return fuel passage could be there to hold a check valve in.  But I could barely suck any air thru it.  I worked a bit of wire insulation into the hole and could hear/feel what could be a sticky flap valve.

After working it a bit more, I blew carb cleaner in to the brass fitting and it sprayed out the return nipple!  I’d done that before, but nothing came out.  (A tech doc I found later confirmed that the primer bulb blows fuel/air out the return line thru the check valve, and then sucks fuel thru the carb passages, thru an inbound check valve and into the primer bulb.)

Encouraged, I put it back together again and pumped the (new, clear) bulb.  It filled with fuel!  So that’s how it’s supposed to work!  Some normal steps later, it started and ran.  A couple of tweaks to the low and high speed needles, and it was running well.  I tilled the little flower plot next to the garage (just in time for Lauren to plant the flats of impatiens she’d just bought) and the little Mantis did a terrific job.  I should be able to do the edging the next nice day.  Oh yeah – this was all with the same old fuel I’d tried in the beginning.  Stabil is great stuff.

Label3981Handles-Age3979For the record, here are some pics.  Looks like it’s pretty old, based in part on the white handle grips, and in part on the C1U-K17 carb.  I’m guessing the newer tanks take the larger 3 hole grommet.  The air filters in the tune up kit were the right shape, but a little too large – SerialNum3985presumably another later update.  I was able to poke them into place with a screwdriver.  The SV-4B engine ID is old, too.

The machine ran fine when I got it, and this carb cleanout is the only work I’ve done on it (so far).  I really should check the gear case grease, and I sort of think there’s something about the muffler that should be checked.  I haven’t done anything to the plug since I got it (except pulling it to look for gas).

The used dethatcher I found on Ebay seems to be in good shape, but doesn’t have the sheet metal cowling.  I found a video of a guy (Jim Barry) doing dethatching with a Mantis.  He pulled the cowling off briefly as a demo.  It threw the thatch everywhere without it.  Thanks, Jim!  I should be able to make something pretty functional from the 22 ga sheet steel from the animal cages Ed S tore out.


Posted in House and garden/snow | Tagged , , , , , | Leave a comment

Laser etched rubber stamp

AdafruitPassportEver since Mitch Altman presented the idea, I’ve thought hackerspace passports were pretty cool, if geeky.  (Thanks to Adafruit for the pic.)  I’ve also felt that Workshop 88 should be able to participate with a good stamp.  Of course we couldn’t just buy a stamp – we had to make it.  Thanks to the laser cutter, we can now do that.

GreenFlameA block of rubber stamp rubber from Carlson Art in Glen Ellyn failed the Beilstein test, the green flame showing it contained the dreaded Chlorine.  I then ordered some sheets of 0.09″ by A4 “laser engravable” gray rubber stamp material from China, poised to give negative feedback if that failed Beilstein.  But it didn’t (yay!), so I did some calibration raster etches.  The stuff etched beautifully.  I ended up at 250 DPI 100% power, 2% speed, and did a second etch at 6% speed just for a little extra depth.  It looks like it’s about 0.025″ deep.  I StampF+B3787also etched a non-mirrored (and non-inverted) copy of almost exactly the same artwork fairly deep into a little block of scrap wood to serve as a mount/handle.

Epoxy now holds the roughed up back side of the rubber to the block.  It seems to give quite nice impressions.  One improvement:  There’s a line at the bottom for a date/signature/whatever that’s too thin.  That line should have been considerably bolder.  But it mostly worksPageWstamp3788.

As I got ready to post about it on the W88 blog, excited that we could now produce rubber stamps, I realized that rubber stamps are a thing of those quaint old paper-based days.  Aside from this one, I doubt if any W88 folks will ever have need for a rubber stamp.  But it was an interesting project…

Update 4/1/16: Raster engraving speed depends on the base resolution in Retina Engrave.  It takes twice as long at 500 DPI as at 250 DPI.  For most applications, 250 DPI is fine; many of the raster data entries in the settings Dropbox Paper doc are at 250, including for the rubber stamp.

250v500DPI3801I was  slightly curious about whether etching the rubber at 500 DPI would make a visible improvement, but was even more interested in seeing whether the engraved depth would change.  At higher DPI values, more laser energy is deposited per unit area, so it should engrave more aggressively.  Sure enough, with the same raster power and speed, it etched noticeably deeper at 500 DPI.  I think it looks very slightly smoother and better detailed, but I might be seeing things.  The deeper engraving, however, is completely clear, and needs to be part of our understanding of the raster engraving process.

Posted in Laser Cutter | Tagged , , , , , , , | 2 Comments

W88 Laser Exhaust Fan Replacement

When we first got the W88 laser cutter up and running, we scavenged the ancient circulation blower from the old, gutted in-wall furnace, took advantage of the 8″ flue/fresh air hole in the wall, and hacked a mounting to provide the exhaust for the laser.  That (admittedly overkill) blower died around 3/14/16, about 6 months after we put it in.  After an urgent discussion on Slack Fan3224about flow rates (FSE recommended 60-100 CFM), pressure drop, 8″ and 6″ duct booster fans, a marine ventilation blower, a big honker 110VAC muffin fan from American Science & Surplus, and other possibilities we decided on the sciplus fan.  Daniil picked it up on the 15th, and we hacked it in that night.  (Some upgrades are visible since the original picture:  The vent pipe now runs thru the side of the furnace shell, the water cooling tank has moved inside the furnace, and there’s a power switch up where you can reach it!)

That fan (spec’d at 198 CFM, presumably in free air) (after removing a plastic mount for the electrical connection) fit inside the 8″ pipe perfectly.  There’s maybe 1/8″ clearance around the edge.  By installing it inside the pipe, we gained clearance for the 4″ flex pipe to bend to horizontal.  In the original installation, it fed vertically into the blower. Tom M suggests that mounting the blower with its shaft vertical probably speeded its demise.  It died of a bearing failure, and the bearings weren’t designed for that load.  But it served us well getting the laser running – and it was free!

Fan+MountPlate0237We reused the 4″ flange Daniil had hacked together as the inlet at the bottom of the old blower, screwing it to a plywood plate to mount it and to cover the hole to the 8″ pipe.  We’d planned to mount the muffin fan directly to the back of that same plate, but the motor hub almost completely obscured the air flow from the 4″ inlet.  We found some 1/4-20 threaded rod and tapped holes in the fan for it.  (Thanks for bringing in the tap set, Daniil!)  Setting the fan deep in the pipe provided what seemed like reasonable air path.  A standard IEC power cord lost its C13 end and provided the power connection.  The green wire is even connected to a threaded hole in the fan body!

BeingInserted0238Here’s Daniil about to put it in place.  We left the original wood plate that fit the 8″ pipe.  The new plate mounts over it (with the foam gasket from the old blower still there) with the same long screws ReadyToConnect0239into anchors in the concrete block wall.  It’s all quite solid, and we think it should serve for quite a while.

The only remaining work is to plug/cover up the holes resulting from the flats on the top and bottom of the fan.  Expanding foam is a possibility, as is removing the fan, laser cutting a circular plate and screwing it to the exit surface of the fan.

Done0242With it all buttoned up, the only clue that there’s actually a fan there is the power cord going into the plywood plate.  It also runs MUCH more quietly than the old blower.  While your can hear the whine of the fan spinning up if you listen, the reduced noise is an excellent reason to continue with plans to put an air vane flow sensor in the exhaust port of the laser cabinet.

All in all, it was a fun emergency repair project/hack, and very satisfying to get the laser back up within hours of deciding what parts to use!

FanRing0246Update 3/18/16: Daniil and I stayed late after the meeting Thursday and made a ring to reduce the backflow/leakage around those two non-round areas of the fan.  We pulled the fan, measured, did some quick artwork in inkscape, put the fan back in temporarily, and cut the ring from 3mm plywood without incident.  Well – one incident:  My artwork, on the laser PC, looked perfect in inkscape, but didn’t export as vector to RE.  The design showed up – reversed B/W – in the raster view, but not in vector.  Daniil did the same thing on his laptop and it worked fine.  Troubling.

We feared that drilling the ring for screws would weaken it a lot, as half the width of the skinny ring material would be lost to the holes.  He was for some mysterious and unvoiced reason uncomfortable with using zip ties to hold it on, so we decided to glue it on with some HF 5 minute epoxy.  RingWeightedDown0247We found a very appropriately shaped weight to hold it while the epoxy cured.  It’s all back in place now, looking from the outside exactly like it did before.  But we know we picked up maybe 5% better airflow from the patched up leakage path.

Unrelated to the fan ring, I worked a lot that Thursday putting in NewOutletsA0249better AC power wiring for the whole laser setup.  I scrounged some of the Greenfield apparently ripped out of the media room initial electrical rough in, and put 2 duplex NewOutletsB0254outlets outside and one inside the furnace shell, all powered from the original BX-connected box.  I cut a hole in the side of the shell at a comfortable height NewSwitch0258and put a in switch that controls all 6 outlets.  It’s a little close to the edge for a normal switch plate, so I made a narrow one from fluorescent acrylic.  The possibility of some UV LEDs has not been ruled out.  The sign above it was vector engraved, as the artwork I made up in inkscape for that one imported as vector but not as raster.  That remains troubling.  But I’m delighted and relieved to have much more civilized power control for the laser.  That was one of the last big punch list items to get the laser “production ready”.  Maybe now I can go back and do some work on the Shapeoko 2!

InkscapeOpacityUpdate 4/29/16: I discovered the problem that caused my inkscape prints to Retina Engrave to work wrong:  I had the “Opacity” set to less than 100%.  Apparently RE doesn’t like that.  It had become a default value, and all docs created since that happened were so corrupted.  Changing the opacity back to 100% (and making sure it stuck as the default!) completely fixed the problem.  Who knew?

Posted in Laser Cutter | Tagged , , , , | Leave a comment

Observations on laser cutter kerfs

I wanted to have the laser cut center holes in 3mm acrylic gears that would provide just enough clearance to use 4-40 screws as pivots while allowing the gears to spin freely.  I didn’t know exactly how much clearance that was or what the laser kerf in that plastic was, but since the kerf is significantly wider at the top GearHolesurface than the back surface of the cut, an experimental approach seemed suitable.

The nylon 4-40s I was using were about 0.105″ OD.  After a couple of tries, I found that a  0.090″ hole in the svg produced a (conical) hole 0.115″ at the top and 0.107″ at the bottom.  (180 LPM, 10% S, 100% P, 100% VC)  I don’t think Retina Engrave tries to make up for the kerf like CAM for a milling machine (or EASEL) does.  But whatever it does, those were the FilingHole3439results.  Those holes were sloppy for the screw at the top, and too tight for it at the bottom.  (Yeah, should have fit.  I don’t know.)  This approach did let me do the final fitting with a round jeweler’s file for just the clearance feel I wanted.  If I had to do a whole bunch I’d want a perfect drill bit, but for hand made onesy-twosies, this worked out very well.

So to produce that hole, I needed to provide a circle in the svg about 0.017″ smaller diameter than what I wanted.  Another set of measurements showed needing 15 mils smaller.  I think that represents the (whole) kerf (at the bottom surface).

As for the conical nature of the holes, these ended up about 80 mils smaller at the bottom.  Other notes during the same set of experiments showed 60, but making those measurements was difficult, and probably not very accurate.

KerfIn2mmAcrylic3436In another note in the kerf tests done for the gear hole, I noted that the kerf in acrylic was about .030″ (presumably at the top surface).  In a separate cut for a finger joint box in 2mm acrylic, I measured the kerf using a graticule at about 0.5mm, or 20 mils at the top surface.

Searching for “kerf” in the FSE laser product forum provides some more points of reference.

RaisedEdges3428RaisedEdge3435In addition to the actual kerf and the difference between the kerf at the top surface and bottom surface, there’s usually a small raised lip of presumably melted plastic above the top surface at cut lines.  (Not much on the bottom.)  On a straight line cut it seems to be about 0.4mm wide.  There was a comment in the FSE forum about covering acrylic with a wet paper towel to reduce some effects like this.

Posted in Laser Cutter, Workshop 88 Stuff | Tagged , , | Leave a comment

AT&T Uverse failures


The damn NVG589 modem on my ATT Uverse internet/phone service failed again today 12/5/15.  This post will be a place to keep details of this and subsequent failures.  There have been many in the past; I’m sure there will be more.

I put router reset stuff into the home automation system years ago (4/11) to protect against router/modem lockups making the home monitoring system unavailable when we were out of town.  The local server pings our ISP’s first router, and if those pings fail for a while, it tried to reset the modem and router (then separate devices) by cycling AC power to them.  It took a couple of rounds of rewrites before timing issues causing infinite reset loops were ironed out (oops), but it finally got pretty robust, and automagically kept our internet connection up when we didn’t even know there was a problem.  Reset events are posted on the main HA page.

When we switched to Uverse VOIP (when? a year or so ago?), AT&T swapped our old modem for an NVG589 (and started charging us $7/month for it!).  That device has internal battery backup (most appropriately for a phone connection), so my dear old power cycling would no longer work, and so I disabled it.  The modem runs off my local UPS, so removing the battery wouldn’t be a show stopper (and would let power cycling work again!), but somehow I haven’t been quite willing to do that.  I investigated rebooting the modem programmatically, but at least partly due to a password dialog, I gave up.  Now I no longer have automated reboot capabilities.  I’ve considered a solenoid striker strapped to the back of the 589 to hit the reset button, but have done no work to implement it.  (A servo might be a practical, lower power solution.)  After the latest failure, just removing the battery is looking better and better.

The 589 was replaced a few months after we started with Uverse, basically for the same kind of failure, and I think a guy came out one time since then for similar failures, but didn’t replace it again.  There was also a very unpleasant incident with AT&T support where they remotely did a factory reset of the modem when they said they were going to reboot it.  That wiped out all my network customizations, Wi-fi SSID and passwords, etc, made me a very unhappy customer, and caused a lot of extra work to get my network back up as it was.  I had them put a note in the account file to NEVER do that without expressly asking me.  I’d like to back up the config, but several investigations have all pointed to the fact that there is no way to back the config up except looking at the screens and writing everything down!  (OK, could take screen captures.)  That really sucks, Motorola/Arris.

It looks like rebooting the modem also wipes the logs.  I learned that after the reset button reboot today when I tried to go into the logs to see when it first detected a problem.  I hope I remember to grab the logs before I reboot it next time.

Current status

(last updated 7/2/16, 7/27/16)  We’re on about the 5th modem now, a Pace 5268.  My ping/power cycle stuff is back in place and seems to be working.  Had a bad case 7/27/16 of a reset loop which might have been my fault.  Increased time between resets to 700 sec, but have no info if that’s appropriate.

Failure event details

(first) Event: 12/5/15  As has happened 3 or 4 times previously, both Internet and phone were out, with the modem showing green on both Broadband lines, green on Service (!) and off for phone line 1.  My watchdog noted old file on the host at ~7:30 AM.  We noticed internet out about 10 AM.  The ping stats display on the home page showed ~1000 missed pings.  I showed Laur how to reset the modem, but since it’s hard to get to, that wasn’t pleasant.  I need to add bookmarks to browsers on all the devices to check modem status.

I called AT&T service (after it was back up) and complained that the modem knew at least that the phone was out, but didn’t fix itself.  The rep (Cara) seemed puzzled that both broadband lights had been green as well as the service light, but internet had been out.  She did a remote reboot, and after the usual 15 or 20 minutes it came back up and internet and phone were good (again).  She scheduled a service call for Monday AM.  She also told me that the My ATT phone app would allow remote rebooting.  Cool.  I just set that up on Laur’s phone as well as mine.  Actually, that reduces the pressure for an auto-restart facility driven by fearing failures while we’re out of town.  Of course we’d still like it to fix itself even when we are at home.  (Doesn’t actually work:  see update 1/18/16.)

While I was still on the phone with her, the modem spontaneously restarted.  She offered to wait ’til it was up again, but I said I was pretty confident it would be OK, and I’d call again if it wasn’t.  Sure enough, maybe 20 minutes later all was working, and seems to have been OK since.  My watchdog noticed the second outage, and again said the datafile on the hosting server was > 1260 seconds old.  I wonder if I can get that watchdog to send me a text on failures.

Update 12/6/17: AT&T guy came as scheduled.  Did several tests inside and outside with a tester that plugged into my bonded VDSL pairs, saw it sync WAY faster them my modem ever did.  He replaced a couple of connectors and the last cable to the modem, but his tester sync’d in less than a minute at the end of the same cable that my 589 took many minutes to sync on.  While the modem does usually take a little longer than the tester, the difference was more than he would accept.

He replaced the 589 with a brand new one – same slow sync behavior.  Then he replaced that with a new NVG599.  That’s bigger, faster, supports high end service.  That sync’d up quicker, and that’s what he left in place.  Of course I had to reconfigure it with my local network and wifi details, but at least I’d cleverly gotten screen snaps of those bits of config before he came. 🙂  Unfortunately, just like the 589, the 599 has no way to save config info to a file.

Interestingly, my all-but-static IP address changed with the new modem.  The little wget-based screen scraper that runs in a cron job to read the gateway’s /cgi-bin/dslstatistics.ha page and emails me if the IP address changes no longer looked for the right hard-coded strings, so I had to touch that up.  While the main PC has a fixed address allocated by the DHCP server, and stayed on my non-standard subnet, the nice red laptop in the kitchen runs a normal DHCP client, and so by pulling and replugging its network cable could see the gateway on its default address and let me do the initial config without having to drag a laptop down to the basement and wrassle cables.  Much more civilized.

I continue to consider pulling the battery on the 599, but continue to hold off.  The home monitor page reports occasional “router resets” – presumably meaning it missed more than 20 consecutive pings (pings every 5 sec).  But the ping stats graph doesn’t show any missed pings.  I should look into that.  But especially with those not consistent, it’s hard to pull that battery.

(a few hours later)  OK, there’s one bogus reset reported 12/8/15 06:47.  I can’t find any evidence of missed pings near that time.  There are a whole bunch of resets mid 12/7, but there’s a big bunch of missed pings at that time as well, so those match up.

Ohhhh…  When I was trying to figure out how the reset stuff had been turned off, I’m medium sure I touched a file (presumably “resetFlag”)  to see if it got picked up by the main poll program.  (It did.) writes its ping info (including the critical “got reponse after N…” entries) to pingstats.csv, from which the ping stats graph is made (by graphs.php).  But completely separately, when it thinks there should be a reset (power cycle) it touches resetFlag.  The main poll program – which of course is the only thing that can talk to the 485 modules – like the power cycle controller – looks for that flag file to know when to send a reset message.  The resets reported on the main monitor page come from the main poll program’s datafile.csv – essentially independent of the actual ping stats, linked only by the reliability of  I broke that reliability by experimentally touching the flag file.  So that bogus reset report was truly bogus, created by me trying to figure out how stuff worked.  So it can safely be ignored.

That removes the concern about flaky false positive reset requests – yay!  I’m still not going to run right over and pull the battery out of the 599, but at least I have confidence (once again) in the reset detection stuff.  And I recorded it all here so maybe I won’t break stuff the next time I need to know how it works. 🙂

Update 1/18/16: Discovered that Internet and phone were out again this morning.  The good news is that the NVG599 knew about it and was working on it.  Unlike the 589, the status page showed broadband and phone down, and from the lights on the front it was clearly trying to resync.  The bad news is that after 15 minutes or so, it was still failing.

I thought it would be a great opportunity to test out the remote restart capability the rep told me about in the My AT&T app on my phone.  Found the app, logged in, found the U-verse restart screen.  There were 2 choices: Automatic and Manual.  Since I wanted to test doing it when we’re on vacation, I chose Automatic.  Click, whirr – and an error message came up to the effect that this service is not available at this time.  Apparently you can only restart the services when they’re already working.  That’s dumb, AT&T.

Went downstairs and hit the reset button.  In a few minutes, we were back on the air.

Ping stats showed about 350 missed pings (in 2 or 3 batches), for about 29 minutes of outage.  The reset algorithm logged 10 tries to restart between 10:38 and 11:14AM.  Of course that doesn’t actually do anything right now, but re-enabling it and pulling the 599’s battery is looking better and better.

Update 4/5/16:   Service went out again last night.  Phone and internet were out suddenly.  From router web interface tried to restart phone line, got something like “verification error”.  Tried to restart broadband, somehow failed.  Restarted device (still from web interface).  Eventually got both broadband lights green, service red.  Waited a few minutes, gave up and hit red button on back.  It rebooted, came back to both broadband LEDs green, service red.  Waited more minutes – no change.  Called AT&T (from cell).  They said they were going to run some tests.  Service came back while on the phone – don’t know if it was something they did.  Also don’t know if it just took a long time and would have eventually come back after the web interface restart.

Rep (Andrew) said it looked like cabling from NID to modem, and they would send someone out.  HA showed ~120 lost pings, 9 “resets” over 38 minutes.

Colin came out today (Tues 4/5) (again tried to go to Villa Park instead of Elmhurst).  We talked, but apparently miscommunicated, and he reset modem to Factory, fucking my whole network!  He said something about multiple IP addresses but wasn’t clear.  I said I thought I was clear to do whatever I wanted on my side of the modem.  He replied something like “Well, mostly.”  Couldn’t pin him down on what I couldn’t do.  What I eventually got out of him was that anything non-stock (changing wi-fi, local subnet, DHCP allocations, etc) increased the risk of something going wrong, for example when an update came down.  He said the problems seemed to start Apr 1.  I asked if an update had been sent down and he replied quickly that he couldn’t tell anything like that.  Nice.

His resets showed up as another 120 missed pings, for 37 minutes of 10 “resets”.

I asked about the MyAtt app only being able to restart service if it was already working.  He said if at least some broadband lights were green – like flashing trying to sync – they could talk to the modem enough to restart it.  Don’t know if I believe that.

Took advantage of the factory reset to refine my notes on what needs to be done to get back after such a reset.  Again used red Gateway to get into modem on default 192.168.1 net.  Had to pull the cable to get new IP.  Did ipconfig/renew on main PC to refresh its IP.  It got its same IP back, and then I was able to tell the modem’s DHCP to always give that IP.  Added details on enabling outside access to the Pogo.  All details are in My Documents PcSetup/RouterConfig.txt.

Also couldn’t talk to the new TP-Link access point.  Lights showed a problem.  Power cycled it and it seems to be back on the network.  Seems like I couldn’t connect to that AP (Jims G Router) for quite some time.  Wonder if it’s been down for months.

I still need to call AT&T: change service addr Villa Park->Elmhurst, and ask for specific answers to when MyAtt app can restart modem.

Update 5/13/16: Got home and found internet and phone down again.  Logged into modem; it said broadband was down (as well as phone).  At least that was right.  Tried to restart broadband, but didn’t help.  Hit the red button on the back, and it was back up in a couple of minutes.  Why should I have to do that?  Ping stats showed 1100 missed pings.  At 5 sec/ping, that’s about an hour and a half.

Called AT&T.  Rep “Dawn” was friendly and responsive, but couldn’t see anything wrong.  Right – it’s all working fine after I hit the reset button.  I asked if she could confirm the 90 minute outage my ping stats showed, and she said they couldn’t tell anything like that (in the past).  She offered to send someone out, but it didn’t seem worthwhile.  She offered to monitor the line for a week, and I said to go ahead with that.  My estimate was 95% probability that there would be no problems.

It looks like the problem is that the modem gets stupid and can’t recover.  I don’t know how often the modem notices a problem and does reset itself.  I suppose that might (better!) be shown in the logs.  I think I tried to get the logs sent to the PC, but it probably didn’t work or isn’t working any more.

Hmm – I wonder if the connection between the battery and the modem is accessible.  Maybe I could add another relay to the reset node and have it both power cycle and temporarily disconnect the battery.  If I just pulled the battery, they might notice it and want to send someone out to fix it.  Maybe that solenoid on the reset button isn’t such a bad idea.  If it were AC powered, normally retracted (reset button not pushed) and spring loaded normally “pushed”, it would require no additional software changes.

Maybe I should have the reset stuff email me when it kicks in.

Update 6/19/16: Damn modem locked up again – this time while we were away on vacation.  According to the 106 “router reset attempts” it was out for about 7 hours.  Hit red button when we got home and it all came up promptly – just like every other time.  Called AT&T, spoke with “Sherry”.  She says there’s  a problem with signal to the modem and that’s why it fails.  They say that most every time, but I don’t believe it.  (I can believe the signal isn’t perfect, but I have trouble believing that’s why the modem locks up and can’t restart itself.)  Tech will come out tomorrow morning.

Oops – the time slot I agreed to with the rep on the phone won’t work.  My fault.  I logged into My AT&T phone app and was able to change the appointment time with no problem.  Gold star for AT&T for providing a simple, effective tool for at least that application.  Too bad it can’t restart my hung modem, but they do get credit for what does work.

That outage was the straw that broke the camel’s back:  I’m going to re-implement my router reset stuff.  Found a schematic for the resettable power outlet, and it looks like the PIC node puts out 5V to operate a relay.  I should be able to use that to hit the reset button.  Looking around for a solenoid I can bolt to the back of the 599 to hit the red button…

Update next day 6/20:  Service guy came (to Elmhurst instead of Villa Park – progress!) and swapped the NVG599 out for a Pace 5268AC.  Took quite a while to sync, download an update (power LED blinking yellow), install, restart.  He said the 5268 was a more stable modem.  We’ll see.  Reconfigured the new gateway with my network stuff, updated Jim/Documents/PC Setup/RouterConfig.txt.  Got new IP address.  The user interface on the new modem is completely different, so in addition to slowing me down in setting up the config, it breaks the monthly ‘warm fuzzy IP check’ script (perl/  I made a quick first try at patching it, but failed.  Just need a little more time.  Update: Fixed.

Set up a syslog 1.2.3 server from Sourceforge on the (now Win10) machine to capture the logs.  Seems to function, but won’t log much.  Status bar shows messages coming in, but nothing sticks.  Still noob playing with it.

We’ll see whether the new modem locks up the same way the 599 did.  This one didn’t come with a battery (though there’s a place for one).  Guess instead of mechanically pushing the reset button I’ll just hack the timeouts in the existing ping test stuff and enable it so it actually power cycles the new modem.

Update 6/21/16:  Touched up to 30 consecutive missed (5 sec) pings to declare time to restart modem, and dead time between restarts to 500 sec to give the gateway a good chance to resync.  Restarted  Ensured only modem was plugged into controlled outlet, and reconnected the outlet control line to the reset PIC node.  I’d cleverly put a well-labelled dummy connector on the same pins and in the same orientation as the wire to the controlled outlet, so reconnecting was trivial.  I think it’s all in place and armed.  I think.

Update next day 6/22/16:  Touched resetFlag, and sure enough it power cycled the modem!  Broadband lights came on (red) after about 4:30; Service went solid green after about 6:40, with phone up several seconds later.  Since I triggered the reset artificially, the dead time between resets wasn’t in force yet, so I think it detected ping loss while the modem was restarting, and power cycled it again.  Main HA page showed 2 resets – again because of touching resetFlag plus one normal ping loss detect plus power cycle.  Hooray for having written up how that works above!  All is good.

Update 7/1/16: The new 5268 apparently failed today.  The good news is that the restart stuff kicked in, power cycled it, and it all came back up automagically.  I was on the computer when it went down, and was inconvenienced for a little while, but other than going downstairs and noticing the lights on the 5268 were in a restart pattern and picking up the phone during and after the reset to check, I did nothing to help the process along.  I haven’t decided whether to call AT&T about it.

The syslog server seems to work, but doesn’t start or save the filtered log data automatically, so I don’t have the logs from the most recent reboot.

The main HA page showed one reset (07/01 20:34:02) and about 160 missed pings.  So as near as I can tell, everything (except log capture) worked perfectly.  Yay!

Update 7/7/16: Another fully automatic reset.  Didn’t even know about it – it just worked.  Main HA page showed about 130 missed pings.  At 5 sec/ping and a count of 30, I’d expect more like 150.  But the missed ping spike was still completely clear, and I’m confident the reset was justified.  I suppose the question of whether the modem might have taken care of it by itself remains.  Guess I need to get the logging stable to see if I can infer anything from that.

Update 7/27/16: Another auto reset yesterday 7/26.  I sort of quit even logging them here because it just works!  Well, not quite.  Log on home page currently looks like this:
0   07/26 15:21:43
1   07/27 09:09:24
2   07/27 12:03:30
3   07/27 12:11:54
4   07/27 12:20:18
5   07/27 12:28:42
6   07/27 12:37:05
7   07/27 12:46:32
8   07/27 13:08:34
9   07/27 13:10:40
10   07/27 13:18:01
11   07/27 13:19:05
12   07/27 13:27:28
13   07/27 13:28:32
14   07/27 13:35:53
15   07/27 13:37:59

I noticed the phone said “No Line” today 7/27/16; RG was in the process of resetting.  Fine.  Checked back in a few minutes – still down.  Started poking around on the Pogo, and it looked like it might be in a pingstat-initiated reboot loop.  Unfortunately, all the “Resetting router” timestamps in pingstatstdout were the same – from the very first instance.

I moved the global timestamp code in to a new function and called appropriately so resets would show correct time.

But it was still looping.  So I kicked the $resetTimeout minimum dead time between resets from 500 to 600 sec, waited until it resynced to restart  But then the reset loop restarted!

Pingstatstdout showed continuous ping fails to ISP.  Ooooohhh – did they change me to another router (so my pings will fail forever?)  The IP of the AT&T router I ping is hard coded.  Killed  <waits…>  Nope – same IPs for the RG ( and its first router (  Manual pings work fine.  Restarted  Seems to have gotten a ping response.  So I don’t know whether my $resetTimeout was too small and caused the loop or their stuff was screwed up for a long time.

WTH?  I’ll post more if it fails again.  Kicked dead time from 600 to 700 sec several hours later to be even more conservative, though no new resets before that.

But how do I protect against the case where they change me to another AT&T router?  Shouldn’t happen often, but I’ll stay down (or at least in a reset loop) until I fix it manually.  I guess just killing pingstat process should stop the looping, though that would be almost impossible remotely when it’s in a reset loop.  I suppose if I wanted to be really anal I could scrape the router IP from the router broadband page (, looking for the first (IPV4) instance of
 <td>Default Gateway</td>
Of course I’d have to code around sometimes not being able to reach the page, and when not connected getting some kind of <none> value (or look for the much more complex Internet – Connected table entries before it).  And I’d have to catch that new value during the narrow window of a reset loop after the RG is running but before I reset it again.

I suppose I could add a state to and when pings fail (and after my powercycle!), scrape Internet Connected status from the RG.  Then if not connected, I could forego pings ’til it came back up.  And if I have that much, I guess I could scrape the AT&T router IP as well.  Yeah, but getting a ping reply is even more absolute indication of success.  Ugh.

Update 7/28/16: One more automatic reset I didn’t even know about until I saw it on the HA page, no drama, just as designed. 🙂   07/28 10:23:58.

Update 8/14/16: Another automatic reset I didn’t know about.  Yay!    08/14 10:23:29  I sort of think there was another a week or so ago, but I didn’t think to log it.

Update 10/9/16: Wow.  After an email from a watchdog timer saying the HA web site wasn’t being updated, I checked and found the router reset robot had fired 4 times while we were out:
0   10/09 16:40:22
1   10/09 16:52:58
2   10/09 17:04:30
3   10/09 17:16:03

Everything was running fine again when I checked it at around 7 PM.  I don’t know what to do.  I could call AT&T, but all they’d do is come out – interrupting my day – find that it was working fine, do some tests, maybe swap out the modem again.  And it would still be running fine when they left, except I’d have to reconfigure my network back to the way it was.  How does that help anything?  Thankfully, it only happens once a month or so.  Nuisance.

Update 10/21/16:  This one wasn’t AT&T’s fault!  My 9 year old D-Link 1108 8 port 10/100 switch died.  First symptom was no internet, so despite a working in-progress phone call (sorry, Lauren and Cathy!) and the unusual indication from the main PC that the network cable was unplugged on and off, I power cycled the router.  (Manually, of course – since I couldn’t even log into the Pogo to have it do it via the sendusr1 interface to  Ordered a new switch from Frys.

Update 10/26/16: More failures cheerfully and invisibly fixed by the auto power cycler.

0routerresets10-26-16   10/21 20:22:21
1   10/22 12:49:14
2   10/22 13:00:47
3   10/26 10:23:18
4   10/26 10:34:50
5   10/26 10:46:23

The first one was from the post above – not their fault.  Presumably the other 5 were legit fixes.  The ping stats show the traditional signature of the outages today and 4 days ago.  All I can say is that AT&T ought to be paying me for the service calls I’m saving them!  I should call and ask/force them to make notes in my account record of the failures.

Update 3/18/17:  There was also an hour-long series of outages that resulted in kicking up the “dead time” after a restart that it waits before declaring another outage from 700 to 800 seconds.  I suspect the line wasn’t coming back in time, triggering another restart.  Disconnecting the power cycle stuff and doing a manual button press brought it back.

While 700 sec had been OK before, at least some times it takes more than 700 sec for the modem to get back on line after a power cycle.

Update 3/27/17: The automagic router restarter worked on this presumed outage:

0   03/27 10:22:45

I think there have been a couple of others since the previous updates (not since 3/18).  Pretty much it just takes care of itself, just as designed.  Yay!

Update 4/20/17:   The modem has failed a few more times – and quite a few recently.  It has recovered each time without manual intervention.  That’s good.  Looks like there were ping loss spikes that probably line up with the resets.  That’s good, too.

0   04/17 04:45:31
1   04/17 08:08:58
2   04/18 08:00:30
3   04/19 06:39:43
4   04/19 06:52:18
5   04/19 23:12:52





Update ~4/24/17:   Lost internet and phone, but it was completely my fault.  (Well, at least not AT&T’s fault.)  The system thumb drive on the PogoPlug home automation system failed (maybe 4/20/17?) and I got it back up using an ancient backup.  I’d just run that up and immediately made an important phone call (Fidelity guy) when the phone went dead a minute or two into the call.  I finished the call on my cell (confirming that no longer having a real landline – but rather one dependent on the internet connection – wasn’t as critical as it once was), but noticed immediately that the modem was resetting.

When I got off the call several tens of minutes later, the modem was still rebooting – apparently in a loop – so I unplugged the router resetter node.  Then the light slowly came on:  That old image didn’t even know the current ISP first router to ping – so pings failed and it tried to reset the modem.  Add to that that since the early version of the pingstat tool I’d had to bump up the “dead time” between resets – because it takes so long for it to come up – from 240 to 800 seconds.  I was doomed to a reset loop.  The resetter remained disconnected for several days, but it’s back.  I hope it works again.

Update 9/14/17:  I was just listening to Pandora, and all of a sudden the music stopped.  The Win10 machine showed a yellow triangle/exclamation point over the network icon, but interestingly the phone had a dial tone.  I logged into the router and it said “connected”.  Liar.  This should resolve itself.

A little later, perl/pingstatstdout on the Pogo showed 2 router reset attempts.  At various points I could ping by IP, but not  I considered disconnecting the router resetter just in case it was trying too soon to reset again, but decided to let it do its thing.  I also considered adding a check either to or the main to check for the existence of a file called, say, NoReset, upon finding which it would not honor the request for a router power cycle.  That way I could give it some more time without climbing over stuff to get to the resetter node.  Looks like either would work, but not sure if I’d end up with a whole mess of log messages about it, or worse – mess up logic that assumed the reset was done.  Maybe a good way to implement that would be a script that created the file, slept for say 10 minutes (or a command line param?) then removed the file to avoid defeating future, valid resets.   Maybe someday.

Anyway, it eventually fixed itself on the third try:

0   09/14 14:31:44
1   09/14 14:44:19
2   09/14 14:57:58

On the plus side, it’s been quite a while since the internet connection failed.  Either that or the system I put in place to fix it when it happens works so cleanly and invisibly that I never noticed. 🙂

Update 9/25/17: Just noticed another nice, invisible reset that fixed things I didn’t even know were broken:

0   09/23 06:28:53

I think this reset system is one of the best things I’ve made.  And AT&T should be paying me for the service calls it saves them. 🙂

Posted in Home Repair | Tagged , , , , , | 2 Comments

Shapelock lesson with zipper pull repair

Bag+BrokenZipper3337The bits of hardware that attach the zipper pull to the slide broke off on the orange mesh bag that holds adapters in my black recording bag.

Candidates3339As a replacement, I made a loop out of 17 ga baling wire with extra wire to provide surface area about matching the slide for gluing.  The first one I made (without looking at the slide) was silly too small.  Oops.  I cleaned and roughed up the surfaces and stuck the loop on with 5 minute HF epoxy.

Pull3348Done3352For a pull, mildly inspired by a zipper pull replacement Andrew made out of a paper clip and Suguru, I formed a bit of paper clip wire so it wouldn’t slip out and folded and squished a rectangle of Shapelock around it.  It’s completely functional.

I tried to make a fairly uniform sheet of the plastic by shaping it into a rough rectangle, pressing it against a smooth flat surface, flipping it over and pressing it again.  That worked pretty well for thickness, but because the overall outline wasn’t a neat rectangle, the finished pull looks fairly sloppy.  Next time, by paying attention to both the thickness (by flattening as above) and making a neat squared-off outline (maybe cutting it hot with scissors?) I bet you could make quite a neat looking whatever.  It’s interesting to watch the progression from the initial ‘aha’ that you can actually make stuff with Shapelock to polishing and refining the techniques.

Posted in Shapelock stuff | Tagged , | Leave a comment

Shapeoko 2 calibration runs


After some issues with accuracy drilling holes in PCBs and concern about backlash with the GT2 belt drive that makes some real machinists roll their eyes, it was time to do some initial calibration investigation.

Bill P brought in a USB microscope for such use some time ago, and at the great personal cost of a virus infection, Daniil found a good driver for it.  We put a viewer and the driver on the SO laptop and got pictures!  The lines scribed on my dear old 6″ Craftsman vernier caliper served as a good linear calibration reference.

MicroscopeMounted2334_HDRThe microscope friction fit perfectly in a scrap of PVC pipe we clamped in place of the spindle.  As a “crosshair”, we taped a .007″ strand of hookup wire across the bottom of the ‘scope.  We found we needed WholeSetup9831_HDRmore light than the little built-in LEDs provided when we zoomed in like we wanted, so we clamped a reflector lamp near by to provide that light.  Here’s the whole setup.

I had to disassemble the movable jaw from the caliper to let the ‘scope get close enough.  That’s the first time it’s been off in the 50+ years (!) I’ve LookingAtCaliper1910had that caliper.  It went back together perfectly after the testing.

MicroscopeViewThe image from the ‘scope was very nice.  The white stripe is the crosshair wire.  A finer wire would have been even better.  The marks shown are spaced at 0.025″.


The calibration runs

As soon as we started playing using UGS jog controls to move the gantry, the backlash was clearly visible.  We decided to record observations every 0.2″ for the 6″ of movement the caliper allowed, going first one direction, then coming back the other way.  Based on the informal backlash observations, we were careful to approach the initial mark going in the right direction.  We did a run each way in X, then moved the caliper and did another pair in Y.

Since the 0.2″ steps should always have fallen exactly on a (long) etch line, we recorded the error at each point.  We started out using “wire diameters” as the unit of measure, but as some errors became larger, we switched to eyeball estimates based on the 0.025″ line spacing.  The red lines are X, green are Y.  CalibrationChartThe dotted lines are coming back in the reverse direction (toward X|Y=0).  Observations:

  • Especially in X (solid red), the first couple of inches of steps were right on – and then got worse.  Similar patterns in all runs suggest some belt stretch.  Of course the X and Y stretch happening about the same place is coincidence.  (And no, I don’t think my caliper is stretched at that point.)  The fact that there’s a clear overall worsening of error with larger displacements from 0,0 supports belt strech.
  • Backlash is completely obvious.  Taking difference between average of observed values going forward and backward, average backlash on X is 0.0055″; on Y 0.0125″.  Similarly with max values, the worst case backlash on X is 0.0146″; on Y it’s 0.026″.  I wonder how new belts would behave.
  • In terms of the real-world task requiring the highest precision we’ve asked of the SO2 RelativeErrsso far – drilling PCBs – the results are “interesting”.  With holes from my favorite #64 drill at about 0.039″ diameter (black circle), the average absolute error in X (red) of about 0.0028″ and even worst error of 0.0053″ aren’t bad at all.  The Y (green) average error of 0.0062″ isn’t too bad, but the worst case error of 0.013″ is a third of a hole diameter – worth some concern.  (There must be a better way to present this visually.)

Of course the backlash observed with the microscope involved no loading of the gantry.  If we tried isolation milling of PCBs, adding some load deformation to that backlash might result in requiring much larger features (like traces) than we’d like.  Of course it would be much poorer than the photo PCB process, but at least it would involve no tool-rusting vapors!

Possible next steps

Another possible calibration approach would use an optical belt scavenged from a printer or scanner.  Its 350mm length is plenty to observe the full 200mm or so of travel on each axis.  From a good graticule on a loupe, I believe the lines are 1/180″ (0.00555…”).  A laser diode scavenged from one of the laser levels and some scrap lens assembly may focus the beam to small enough to resolve the lines at the focal point.  While the resolution isn’t as good as the microscope, with an Arduino sending gcode steps and counting bars, it could provide an automated tool with lots more points and no human error.

Given the possibility of stretched belts and Inventables price of $2/foot for 6mm G2 belting, a $10 investment in all new belts probably makes sense.  And with automated calibration runs of old and new belts, it would provide an interesting observation experiment as well as a probably a more accurate Shapeoko.

Posted in Shapeoko, Uncategorized | Tagged , , | 1 Comment

Shapeoko 2 PCB drilling – and scale error

Thanks to some urging from Steve S, we finally got geared up to try PCB drilling on the Shapeoko 2 at the space last Thursday (8/13/15).  (We had planned to use it to drill badge boards last September, but during initial accuracy verification we found it was off by a lot – 0.1″? – over 8 inches or so.  I was shocked, but we didn’t have time to troubleshoot it, and so bought a couple of Dremel drill presses and drilled all the boards by hand.  SO2 PCB drilling dropped out of view after that.)  The first test for Steve was again accuracy verification.  But this time it was over just a few inches, so I was pretty confident it would be OK.

We rediscovered that we used the pcb-gcode User Level Program in Eagle to generate drill gcode.  We downloaded the latest version, rediscovered how to use it, generated some gcode, and were ready to test.

Well, almost.  Since we wanted to drill from the bottom (foil) side of the board, we discovered that the gcode generated for a bottom drill was mirrored in X, with all values negative.  Bill, Steve and I did a LOT of talking and waving our hands around trying to get our heads around the problem and find a solution.  We finally did so, and after a couple of air-drills, mounted a #64 carbide bit and actually drilled the holes for Steve’s test adapter board in foam.  There’s little question that the machine can actually drill PCB material, so all we needed from the foam was an accuracy test.

It passed!  NiceHoles8836A piece of 0.1″ header – a quite accurate ruler/test gauge that’s always around – fit the holes for a header very well.  Steve didn’t have an etched board to drill, but went home happy with the accurately drilled foam for show and tell.

Nanino and the dreaded scale error

I was pretty confident that once we could get good gcode the SO2 would work, and wanted to bring a board we could actually drill that night.  I found a nice minimal, single sided Arduino (no USB chip) called Nanino.  I downloaded the Eagle files (thanks, robelix!), made up the board as usual, and it looked fine.  Or so I thought.  We generated the gcode, did the magic X axis inversion, used one of the fiducials I’d cleverly included in the corners of the board to set, jog, and reset workpiece home.  Just to be sure, we jogged to the opposite fiducial – and it was off – by more than 50 thousandths!  WTH?  We did lots of measurements, including with a digital caliper and the venerable 0.1″ header as ruler.  The problem was that board was just slightly too big.  And by enough that holes didn’t have a prayer of lining up all over the board.  We gave up on the board and went home.

ScaleCompare3209At home the next day, I did some more checking.  The check plot on paper – which I always do to make sure it’s placed correctly before printing the artwork on clear film – was much closer.  You can see the comparison on the left.  (The check plot is reversed wrt the board.)

This is the third time I’ve had boards come out the wrong size – but close enough to not be caught until it was almost time to populate the board.  The first was with latch boards for the never-finished scrolling LED display I inherited from Rich, Inc.  The second, and most expensive, was some 40 badge boards that got etched and some drilled GimpPrintSetupProblembefore we found it.  As I recall, at least one of those first 2 was due to some arcane print setting in gimp.  By ignoring or not, it decided to scale to fit the page under some rare circumstances.

BadPrintSettingThis one turned out to be similar:  In the Epson custom PCB printing settings I’d recreated after somehow losing them, I’d selected “Borderless prints”, which enabled some arcane “Enlargement” feature.  When I set that to “Retain Size” instead of “Auto Expand”, my plots using the custom PCB settings came out the same size as the check plots (which used default document settings that didn’t fall prey to “Enlargement”).  I resaved those settings as “PCB 2”, printed new artwork, and made up a new board.  This time a header actually lines up with the pads!

Drilled and working Nanino!

DrilledBoardFrameI took the board to the space, did all the magic setup and rechecked the far fiducial.  It was right on!  FinishedNanino3239We drilled a piece of paper, and the holes lines up with the board beautifully.  We drilled the board, and it looked great – probably better/more consistent than I could do by hand on the drill press.  (Sorry for only a fuzzy video screen snapshot.)  I stuffed and soldered the board, and got a working Arduino!  Although it doesn’t have an ICSP header, it’s still a very usable Arduino.  I’ve already tested it with strandtest and some Neopixels, and it works fine.

Gory registration details (updated)

A critical setup step to getting holes drilled in the right places is how to register the board so the X,Y coords in the gcode match the physical board.  Pcb-gcode will provide either or both top drill or bottom drill gcode files, and we chose to drill the board from the foil side – the ‘bottom’.  That adds an extra layer of obfuscation, since Eagle’s view is always from the top of the board.  I used Universal Gcode Sender to talk to the SO2’s Arduino running (hacked) grbl0.9g., so the instructions below are with that tool in mind.

I laid out a registration hole in each corner, such that the 2 holes along each edge changed only the X or the Y value.  That proved very valuable, though any 2 holes fairly far apart and whose Eagle coordinates were known would have worked.

Since we’re drilling from the foil side, the ulp rotates the board around the Y axis at X=0.  It picks the far right edge of the board up and flops it over into negative X space so you’re looking at the bottom of the board.  If the bottom edge of the board used to go from say X=0.2 to X=3, it will now reside at X=-0.2 to X=-3.  The Y coordinates are unchanged, but all the X coordinates are the same values, but negative (assuming they were all positive to begin with).   Knowing that the hole in the corner nearest the N in Nanino was at -o.85,0 and the second was at -2.7,0, I tried the following steps (now simplified using G92)and they worked.  This all assumes the board is accurately horizontal so if the bit is just clear of the surface at one point it will be just clear of the surface at any other point!

How and where we locate the board needs to reflect the X-axis mirroring we get by drilling on the foil side.  Say the board is 3″ wide.  Looking from the top/component side, some corner (call it the ‘home’ corner) will be near 0,0 in Eagle coordinates.  Instead of being near the corner of the plastic registration guides on the SO2, when viewed from the foil side, the ‘home’ corner will be out in the middle of the spoil board – maybe 3″ or 4″ to the right of the registration guide corner.  Nothing changes for the Y axis.

Place the board so the ‘home’ corner is off to the right and near the “bottom”/X axis plastic guide, and the left edge is comfortably clear of the far left registration guide.

– Locate the board comfortably on the base and temporarily tape it down.  I used a corrugated cardboard spoil board under the PCB.

– Manually position drill bit precisely over one known hole (here, the one at -0.85, 0).
– Drill the hole using the UGS jog controls.  Drill into the spoil cardboard.  Raise the bit to barely clear the surface – maybe 0.5mm.  This will be Z=0.
 – In the UGS Command tab, manually enter gcode to set the workpiece coord system to match the coords of this hole.  Because we’re drilling the foil side, all the X coordinates – including this hole – are NEGATIVE – so be sure to reflect that.  For our first hole, that gcode would be:  G20G92X-0.85Y0Z0.  Never move the gantry by hand after this!
– Raise the bit up with the jog controls to give you access to the hole – maybe 2″.

– Now insert a pin (0.39″ diam rod or wire would be nice, but a 0.025″ square pin will do) thru the hole in the board and into the spoil board.  Gently untape the board.  At this time, the board and the machine’s coord system match at that one hole.
– Manually enter gcode to move to the absolute X,Y coords of another known hole and say 0.05″ above the surface.  Here that hole was at -2.7,0.  (G20G90G0X-2.7Y0Z0.05)  Going to Z=0 is risking the bit.
– Carefully rotate the board around the pinned first hole until the second hole is exactly below the bit.  If you can’t get it exactly below, you have some other problem!  At this point, your board is exactly in position.
– Tape or clamp the board down securely, and recheck the second hole.  Pull the pin out of the first hole.  You should be ready to go!

I hope that conveys what it took us a fair bit of time to become comfortable with.  I think Bill said he even found doc that corroborated what we’d figured out.

PCB design rules

Since we had some issues with how Steve’s board was designed – trace and clearance widths and hole sizes in particular – I’ll abuse this space to start collecting PCB design rules for the photo process (I and) Workshop 88 uses.  Folks accustomed to sending designs out to board houses think in term of different limitations than our homebrew PCB system requires.   Some of this is “how I’ve always done it”; some is what I think we can/can’t get away with.  Yeah, I suppose they could be entered into a design rules file, and while that’s exactly what the DRC is for, that seems somehow excessive for a hacker process.  But that’s probably just me.

Trace widths

My usual practice is 16 mil traces, with 24 or 32 mils for power and ground.  The photo process can handle those traces on a bad day, with a headwind, and when your timing’s off.  16 mils is way overkill for the current carried by most any Arduino-class project.  I’ve done 12 mil with little difficulty, and even a few 10 mil sections under duress.  And the 8 mil (!) traces on Steve’s board came out looking quite good, so my 16 mil traces remain VERY conservative.  I’m unlikely to change that standard.

Clearance between traces

I almost always leave (at least) 16 mil clearance between traces.  Again, this is very conservative for a well-tuned process.  I guess I’d have to say that 12 mils was quite safe.  I’d start getting uncomfortable  with anything less, tho.

Other clearances

I also try for 16 mil clearance between anything else – traces and the corners of pads, between pads, etc.  Since there are most aways some nice 16 mil traces nearby, it’s pretty easy to eyeball that clearance.  I guess I’d get uncomfortable with anything under 12 mils.  Obviously some SMT components force smaller clearances than that.  You do what you’ve gotta do.

Hole sizes

A perennial problem with component footprints from imported libraries is that the holes in the pads are too big.  I drill almost everything with a #64 (carbide) bit (0.039″), and if the hole in the pad is bigger than that (or even if it’s that size and I miss centering the hole a little), there will be an unsolderable gap between the pin and the copper pad.  I never want the process to make soldering more difficult than necessary.

I’ve redefined many parts so the pads have the smallest offered drill size – maybe 0.019″.  All the new footprints I make have those holes.  That way there’s a nice small target if I’m drilling by hand; the small hole helps center the bit; and there’s always copper all the way to the edge of the hole.

A possible downside would be if drilling with the Shapeoko and if the hole location and drill bit location didn’t exactly match, the centering effect of the hole might exert a lateral force on the bit, potentially breaking it.  I’ve never seen this happen, but I’ve only drilled a very small number of boards.

Pads and vias

I often use oblong pads to give a little more copper to solder to while increasing the space between pads in case I have to put a trace thru there.  By using oblong pads with holes near one end, I can get a little more space “down the middle” of dual row 0.1″ headers.  When I need a jumper, I use a via.  I try to make it 0.07″ or even 0.086″ so I have a fair place to solder to.  As always, holes are as small as possible.

Single sided prototypes for designs ultimately to be sent to a board house

I’ve made single sided boards as prototypes for designs I want to send to a board house, and had fairly good luck.  I try to minimize the number of traces on the back of the board, and use my oversize vias for the jumpers.  I route the trace on the other side of the board in Eagle, so I have indication where the jumpers go (although I obviously turn off the layer for that side of the board when printing).

Posted in Shapeoko | Tagged , , , , , | Leave a comment

Security camera

This is a sort of an append-only history of details of the camera project.  After I get all the software and server hardware running, I should make a nice concise writeup of the whole thing.  Someday.



I’ve about given up on trying to mount a security camera in a tree in the parkway outside the house, even though it would have exactly the view I’d like the camera to have.  Power is the issue – I could get the data to the house by radio.  If instead I mount the camera under corner of the generous eave overhang, I can get a workable picture, and I can get wires to the camera!  Pics here taken with my SD600 on the end of a stick, probably considerably different lens than the actual camera.

I got an Escam QD 520 PeashooterEscam 720p wired IP camera for $36/free on Ebay.  It supports ONVIF open protocol, so I hope to be able to cobble together something to grab snapshots every 10 minutes or whatever.  It defaults to, so I had to put a machine on that net to talk to it initially.  The camera contains a web server that requires Active-X, so IE is best.  With that, I reset its IP to and tried it on the home network.  Pointing IE to it seems to provide a ‘live’ feed.  I’ve also been able to get VLC on the main PC to display the video (with more delay) using rtsp://  There’s also an ONVIF viewer app I can run on my phone or tablet.

FromBothCamsOK, let’s get some idea how the 2 camera lenses compare.  Here are pics from the same place (Escam is from 2″ lower than my SD600), matched at right edge, scaled to same width.  Original Escam was 970×540.  The Escam (top) gives a slightly wider but much shorter field of view.  With that lens comparison info and the outside pics above, I think I could move the camera a little closer to the door (but still as close to the outside edge of the overhang as possible).  I might have to give up a sliver of sky, but should still get a very usable view.

The camera seems pretty good (and seems to get good reviews) for the price.  It’s color and has IR cut for more natural colors.  It also has a light sensor and automatically switches to B/W mode and turns on its IR LEDs at night/low light.  That seems to work in an indoor test.  There’s an audible click when it changes over – which I suspect is mechanically moving the IR cut filter.  The IR LEDs glow dim red, which some reviewers looking for a stealth night camera have complained about, but isn’t a concern for me.


I’ve seen a couple of references to getting a jpeg snapshot with something like this:

ffmpeg -ss 2 -i rtsp://ip:554/h264_2 -y -f image2 -sameq -t 5 /path/to/output/$MONT/$DATE/$DATETIME.jpeg

None of the ffmpeg binaries on my Win7 machine support rtsp protocol.  I installed it on the Dell Mini 9, but now it’s out of disk and doesn’t work well.  One more thing on the list.


I made up a pair of passive POE adapters, using the brown/white pair bonded for +, blue/white for ground, with 2.1mm barrel connectors to match the camera’s connector.  (Orange/white, green/white are straight thru for the network.)  Seems to work with a 50′ patch cable between the adapters.  I figured the actual run at maybe 70′, so it’s probably OK.  I considered running a piece of lamp cord along with the Cat 5E for power, but I think I can get away with DC over those other 2 pairs.  I was a little reluctant to add the pair of RJ45 connectors – one essentially outside, though protected – but went that way for convenience of assembly, testing, repair, etc.

I got 100′ of brown Cat5E solid for the run.  Working in the attic won’t be fun, and I don’t really know how I’m going to get to the corner where the camera will be located.  I could probably take the USB-camera-on-a-cable up there with a laptop (or the Win8.1 tablet?), snake it down between the roof and the wall top plate on the end of a stick (8′ furring strip?) and get a reasonable view of what’s down there above the soffit, but that would probably cost an extra trip to the attic.  It would be really nice if I could make it all in one trip.

There’s already a piece of Cat5 run in the attic and thru the soffit right in the corner near the front door – diagonally opposite where I need it – but I can’t figure any way to use that to save the dreaded trip into the attic.

OK – I finessed some aluminum soffit down (thanks for the suggestion, Ed!) to get a look under it and found – wood.  There’s sheathing (presumably the old soffit) under all the aluminum near where the camera will be mounted – and probably everywhere else, as well.  Yeah, yeah, there must be some kind of vent holes – maybe only near the vented aluminum panel?  The good news is that I can mount the camera with longish wood screws instead of just sheet metal screws into the aluminum.  There’s 1/2″ between the main flat areas of the aluminum and the wood above, but I’ll deal with that later.

That means I can’t see what’s above that wood until I go thru it (and thru the aluminum!)  Ed suggested a hole saw – good idea – but since I’m working so close to the outside edge of the soffit, to locate the hole I need to know where the rafters are.  (Or more accurately where the “soffit bearers” tying the rafter ends to the wall are.)  Maybe I can find the nails that attach the fascia board to them?  Yes!  I RafterFinder3044made a nail finder by taping a nice hard disk magnet to a yard stick.  Sweeping that along the fascia board, it stuck very satisfyingly to (what I presume are) the nails holding the fascia to the rafter ends.  Very sensibly and conveniently, the aluminum fascia is attached with aluminum nails, so I don’t even get false positives from those.  Now I know where not to cut my access hole!

Given no access to nice long fiberglass fish poles, one possible approach for pulling the wire would be to plop a magnet on the end of a pull string up just inside the access hole, and fish for it with a magnet on the end of a 8′ furring strip that also had the USB camera attached by heading for the daylight.  If I can see any.  Maybe stick an index card up thru the hole to make a larger lighted target?  If I could set that up before I went into the attic, and if I could grab the end with the magnet and pull it up into the attic, I could tape the pull string to the end of the Cat5 I’d just run, leave enough slack nicely laid out so it would pull smoothly, go down and pull the wire with the string, and never have to go back into the attic!  If.


FishingMagnet3084Here’s the magnet taped to the end of my 8′ furring strip “fishing pole”.  I left the original mounting bracket on and bent it hoping to bring the field lines from the stick surface of the magnet closer to the exposed surface, hoping to make it more attractive to the magnet on the pull string.  Time to go up to the attic.

CardInHole3052Here’s the view down into the soffit – much less obstructed that I’d feared.  (No USB-camera-on-a-wire needed.)  You can see the card I stuck thru the hole.  That worked out well.  It’s waaay over there, appropriate for having located the hole as close to the corner (where I originally wanted the camera) as I dared put it, considering the as yet unseen rafters, etc.  Time to go fishing.

PullString+Cable3055I never heard a ‘clunk’ of the magnets getting together, but they did, and on the first try.  And here’s the phase 1 payoff picture:  The end of the successfully fished pull string and the cable it’s DisturbedInsulation3074about to be taped to!  I was hoping for a selfie of me working in that corner of the attic, but it was way too unpleasant to bother setting it up.  Here’s the after-the-fact picture of the disturbed insulation where I was working.  It was beautifully laid down before.  You can just barely see the Cat5 to the camera sloppily running across the top of the insulation.

ABeautifulThing3063And here’s a beautiful thing!  Some might just see it as yet another hole in the house, or another wire dangling out of something.  But those of us who have been there and done that know it’s a FirstCameraTest3082Beautiful Thing.

Of course I had to see if I could actually get pictures over the new cable, so I hung the camera from a piece of baling wire, the crude POE pigtail dangling.  It works!

As I got the parts assembled, thought and rethought what I’d need to optimize that unpleasant forray into the attic, collected intel about where I could/should put the hole, I came to feel real urgency to get closure on pulling that dumb wire.  It was a huge relief/satisfaction when I got it thru.  Interestingly, now that it’s pulled, my feelings about actually mounting the camera and getting that all sealed up are much more “pretty soon, when I get around to it”.  I still don’t understand how my head works.

Getting pictures

The software that comes with the Escam includes a viewer that runs on IE (only) thru an unsigned Chinese Active X plugin.  It provides access to quite a variety of config parameters in the camera itself, including the critical IP address.  It displays video vlcsnap-2015-07-09-18h59m26s781streamed from the camera, and can record it.  There’s a snapshot button, but it always reports failure.  I did make a brief recording, played it through VLC, and used that tool’s snapshot feature to get the first actual still from the system.  This is essentially what the final 1280×720 results will look like.  I still have no snapshot software.  It looks like cameras like this often have a jpeg snapshot mode, but after playing quite a bit, I’m pretty convinced that this camera just doesn’t support direct jpeg.

I downloaded an Onvifer app to my phone that takes advantage of the open ONVIF protocol the camera supports.  Results – with the phone on wifi to the same segment the camera is on – are poor.  You can see a picture, but it’s usually badly distorted, and performance is surprisingly poor.  Fortunately, that wasn’t a target use case.  VLC on the phone provides good, smooth video.

ONVIF is just a standard management protocol to talk to the camera for internal params, PanTiltZoom, etc.  The actual streaming video goes over the also standard rtp over rtsp protocols.  Fortunately, those are standard enough that VLC and many other streaming players can start and read them, using the rtsp:// URL above.  The Onvifer dev replied to a rating comment I made on Playstore and included a pointer to the Windows app ONVIF Device Manager (hosted on the besmirched sourceforge).  That very nice software can also talk to the camera (on and mess with most, but not all of the in-camera params.  I guess only the supplied Chinese Active-X plugin supports all the local device extensions.

It’s quite interesting that now that there’s an actual video camera mounted up there, scope creep is rearing its head.  (OK, it’s not actually mounted there yet.  But Real Soon Now.)   The vision – from way back when I thought I could get the camera in the tree – was to get a still picture maybe every 5 minutes.  But maybe I should take advantage of the hardware and capture actual live video to some local storage.  Maybe 24 hours at 1 frame/sec, rolling over automatically?  Heck, storage is cheap.  A 38 sec test recording at 5 F/s was 5.5 MB, or 13 GB/day.  I guess thumbdrive flash isn’t suitable for the application, but I certainly have old hard disks that would hold that or a lot more.  Or that no-longer-hot-stuff 230 GB USB-connected external hard disk.  That’s 2 weeks @ 5 F/s!  And I bet that spare PogoPlug could handle it and maybe even serve it!  Of course there’s the question of how to make all that work, including snapshots, and freezing or archiving or something in case of emergency.  “But that’s just software.”

Looking at memory needed for stills, a jpeg compressed 16:1 compared to a png looked really good at 200% display in gimp.  That jpeg (still 1280×720) was 90KB.  The latest plus one/hr for 24 hours is 2.3MB – trivial even if I pushed them up to my hosting account.  Or I could just host them on the Pogo.  Decisions, decisions.

If I want to serve from a machine at home:  I had some free DDNS service, but I had to log in every so often to keep it active.  For the access I need to the home server, keeping a bookmark in my phone, laptop, tablet with just the IP address is probably good enough, especially given that the U-verse IP address doesn’t change often.  Heck, I could just put the home IP address off in a corner of the main HA page.


BaseMounted3124To get a sound mounting for the base, I put three 1/2″ thick wood blocks (with holes for the screws) between the aluminum soffit and the old soffit board.  The screws went through the soffit board, and it’s nicely solid.  I put silicone caulk under the edge, mainly to fill 3 wire chase holes, but later realized there’s such a gap between the camera ball and the big fixed part of the base MountWithWoodRelieved3140that the caulk was a waste of time.

Unfortunately, the ends of the blocks covered enough of the hole that I couldn’t fit the connectors thru any more.  A little work with a chisel made the hole usable, if even uglier.

To best protect the two RJ-45 connections that would live forever above the soffit, I took 2 steps.  TapedCablesPartA3136First, I sprayed the actual contacts with Caig Pro Gold G5 snake oil.  (I suppose I should write up my actively conflicted reactions to that stuff some time.)  AllTapedUp3145As outermost protection, I wrapped the whole thing – Cat 5 cable, POE splitter, OEM camera connector – with self bonding silicone tape.  First I did the easy part – camera and splitter – at the comfort of my bench.  Then I plugged the cable in and did the rest on a ladder outside.  A bit of incompletely wiped off snake oil softened/compromised some of the self bonding tape over the punch-down RJ female into which the cable was plugged.  Hope it lasts OK.

TapeSeparators3155The first part took just 10″ of tape; the outside part 5.5″.  It was easy to come up with those numbers after the fact by measuring the backing liner from the 2 pieces.

InPlace3149The final assembly was almost anticlimactic.  I’d managed to do things in the right order, and by that time I could get good live video on my phone, so even the last bit of aiming/alignment was easy to do standing on the ladder.  The soffit doesn’t look stained like that to the naked eye – not sure what caused that.  But the outside (and attic) work is all done!  Now it’s just computers and software. 🙂


Update 7/26/16: Just (barely) in time for our Kirkwood vacation, I have snapshots every 2 minutes from the camera, hosted on the Pogo.  Looks like our outside IP address thru U-verse is pretty stable.  Some look-up-my-ip site showed it as a static address.  I set up a cron script to check it and email me if it ever changes.  Anyway, a bookmark to that IP address in phone, tablets, laptop should be fine to find it even without DDNS.

I used a shell script calling avconv (successor to ffmpeg) to get the snapshots.  The camera doesn’t seem to serve the brief new sessions to get those snapshots if it is also streaming, so probably no 24×7 video capture.  Boo.

And in an inappropriate fit of boldness, I hacked my main home automation stuff to push the latest image out to the web server on my hosting account, and added a link at the very top of the page to the picture.  It seems to work, but changing both the main HA program and the main web page was a very brash thing to do hours before leaving home on vacation.

Update 10/19/15:  I just checked the latest pic, and it was from a day ago.  OK – now what?  I restarted the cron job on the Pogo with all watering turned off yesterday – could that have done it?  Then I realized I had zero recollection of how the snapshots worked.  Here are the current ugly details.

The script  ~/gosnaps running on the Dell Mini reads from the camera and writes a snapshot every 2 minutes to a hard coded path on the locally attached Free Agent external drive.  (I had unplugged the drive – wondering why it was plugged in – to use the mini as a portable controller for the watering while shutting it down yesterday.  I saw no need to plug it back in.  Wrong.  Dumb, but wrong.)  Gosnaps calls ~/putpic which ftps the latest pic to the Pogo, twice:  once with its timestamp name (like snap10-19-13-16.jpg), again as “latest.jpg”.  The hack referred to above is to to ftp latest.jpg up to the hosting server.  There’s a cron job on the Pogo to clean out pics older than 2 days, but nothing on the mini to clean off the Free Agent!  Fortunately, it looks like it’ll take a long time to fill it up.  Plugging the external drive back in seems to have fixed it.  Ubuntu automagically remounted it – thanks!

It’s a crude and non-resilient way to do it, but at least next time I’ll be able to look it up here.  (Which, after all, is why these notes are here!)  I guess I wanted to keep some pics, but didn’t want to thrash flash on a thumb drive or something.  I think I was reluctant to host it on the Pogo out of performance fears which I didn’t have time to confirm/allay.  Hopefully I’ll put something more appropriate in place before I break it again.

Update 7/26/16 ~2AM: I happened to notice that the “latest.jpg” was from 12:53 on 7/25/16 (yesterday).  After chasing a bit (doing ps and df on jimsdellmini and the pogo) it looked like nothing was out of disk, and gosnaps was still running.  I was very pleased to find these notes so I had a clue how this stuff worked.  Very suspicious was that there was a lot of stuff dated 7/25/15 – just a year ago.  Was there a collision since the timestamps had no year?  I think even when there’s a crash, files should just get overwritten, so I think that shouldn’t be a problem.

There was a comment in gosnaps saying
# Added timelimit in hopes of avoiding problem where avconv hangs for days if
# it can’t connect or something.  Not tested 🙁  12/3/15 jw
and it looked like avconv had a valid “-timelimit 60”, to kill after one minute.  There was a running avconv process:
jim       8940  3482  0 Jul25 ?        00:00:57 avconv -v quiet -timelimit 60 -vframes 20 -i rtsp:// -vsync 1 -q:v 15 -r 0.1 -t 1 -y /media/FreeAgent Drive/pics/snap07-25-12-55.jpg
– trying to write the next pic after the stuck one.  I killed that process, and it all started working again.  I hate to have to put yet another watchdog in to manage hung avconv processes, but if it happens while we’re out of town it would take an awkward double ssh session to get into jimsdellmini to fix it.

I suppose an additional watchdog on the GoDaddy host to check for old pic wouldn’t be too hard (as there are a couple already).  <checks script>  Oops – there’s already one there – with a threshold of 21 minutes.  <checks for text on phone>  Why didn’t it trigger?  Ahh – I bet the pogo kept sending the same “latest.jpg”, thus updating the timestamp on the host, which is what the script checks for.  I guess that script functions correctly to catch failure of the pogo to send pics – just doesn’t check the actual time of the pic.

Yeah, I suppose I could include a timestamp file as well as the jpeg, yada, yada.  Ugh.  I suppose the next approach would be a cron script on jimsdellmini to check for a hung avconv process, try to kill it, and report.  Ugh.  Or maybe just check for old timestamp on latest.jpg, try to pkill avconv, and send a text.  Shouldn’t be too hard.  Hmm – looks like jimsdellmini doesn’t know how to send text and email yet.  Still shouldn’t be too hard.  Of course, based on the timestamp in the comment, the problem has only happened about every 6 months.  How much effort do I want to put into it?  Of course if I’m on vacation when it happens…  Ugh.  But at least it’s running again today, and I know a pkill has some chance of fixing it.

Update 8/30/17:  This is a dup of an update to the “resurrecting the pogo” post.  I’ve been fighting on and off with being out of storage on the “camera drive” on jimsdell mini.  It’s been running a 1GB thumb drive for a while, and just failed again.  Thankfully the “house picture old” watchdog fired and sent email.  Turns out once again the drive was full.  There’s a cron job purging files matching a find -mtime +30, but that wasn’t aggressive enough.  After I manually deleted several days’ worth of pics, it started working again.  How many days’ worth will the drive hold?  It looks like nite pics are ~26KB, while day pics are more like 110KB.  Doing on ls |wc gave 10586 files, while df showed 658048K used.  So that averages about 62KB/pic.  At 24*30 pics/day, we burn about 45MB/day, so the 1GB drive should hold around 22 days of pics.  I changed the cron job to -mtime +15, so it should take care of itself now, and run around 30% free.  We’ll see.

Posted in Home Automation | Tagged , , , , , , , , | 2 Comments