Monday, June 27, 2016

NIR with Raspberry Pi


Pictures from a NoIR 5MP Raspberry Pi camera, not just for seeing in the dark...  You can do EL with a $100 camera/computer, power supply, and some image editing software.

Don't see anything in the raw image???

Change to greyscale and look really closely...

OK, digital time... auto-contrast with Photoshop Elements.  Same picture, I swear.  Do it yourself!
Probably should have covered the red LED on the front of the Pi NoIR camera.

Thursday, June 16, 2016

Treasured memories safe on CD/DVD? Think again...

Not along my normal lines of fixing, but I get into a little of everything.   In my quest to digitize our media library I've stumbled across a few scary things with CDs and DVDs that may change the way you think about these as a 20-50 year "archival" media.

If any of you know my work history of making solar panels, I've always been the "bricks and mortar" type.  Use thick sections of silicon instead of thin films because there's not much there, that's what I always say.  Apparently that transfers across technologies, as the thin films used to produce CDs and DVDs are subject to environmental factors that degrade them faster than you would believe, sometimes less than 10 years.

In digitizing probably over 300 CDs and 200 DVDs, I've found maybe 2% so far that have become unreadable by a modern computer/data grade drive.  There seems to be two primary failure mechanisms, either the lacquer coating to protect the data surface was damaged (and I'm not talking scratches) or the data layer itself has corroded.

On CDs, the data is pressed into a polycarbonate disc blank and then flashed with aluminum in a vacuum chamber before being spin-coated with a lacquer and made ready for silk-screening of the design.  The final disc is read through the bottom polycarbonate blank.  If that lacquer top coat does not seal the edges well or the aluminum is not masked or removed from the edge before lacquering, the aluminum is exposed and will oxidize and react with moisture causing the reflective layer in the CD to wrinkle.  Picture aluminum foil after you've crumpled it...

DVDs are a little different, and particularly 2-sided ones.  2-sided discs are pressed or laser cut both sides and a final lacquer applied.  In this case, the laser reads the disc through the lacquer coat, so if the coating is not applied properly, the disc not cleaned properly, or a sub-standard or contaminated lacquer is used, over time the layer can be permeable to moisture/oxygen and corroded the data layer, or the lacquer itself absorbs moisture and begins to take on an "orange-peel" texture.  Obviously not good for reading or focusing lasers to spot size ~0.8 microns.

So what to do??  Some brilliant people created an open source program for Linux called "ddrescue". Unlike "dd", which is a command line tool to write raw data to and from discs/files/whatever in sequential order, "ddrescue" works around a read error from the source and it skips ahead and keeps going, and flags that area for another attempt at some point.  It is exclusive of "dd", and uses it's own algorithm to attempt to retrieve as much data as possible.  It can even reconstruct a file/drive from two partials, say two drives of mirrored RAID setup that failed in different areas.  It has its limitations, but it's pretty darn good.

How to do it??  Understand what your doing, but essentially, within Linux you treat the CD/DVD as a data disc and recover it to the system hard drive sector by sector.  In my case, I had a side of DVD that was unreadable and truncated a 43 minutes program to 23 minutes and the following on from 43 minutes to 5 minutes.  After letting ddrescue chew on the disc for about an hour, it had recovered all but 69kB and 173kB from two source files, or less than a second of video.  The transcoding reader to digitize the files easily skipped over the error sections and there was hardly a minor blip.

NOTE:  All of my work for digitizing is for private/personal use only.  Whatever you do, understand copyright laws before you do your own work.



Monday, June 13, 2016

Is the A/C ready for summer?

It's been a while, my chances to get into things has dropped off recently with life intervening, but hey, it happens...

I had a useful one that's an easy fix (if that's the only thing that wrong!).   As things are heating up outside, I happened to be in the basement when our ground-source heat pump unit kicked on.  Instead of the familiar click and hum of the compressor starting, I heard a click and wub, no hum.  Thinking, "hmm that's not good" I  went over to the unit, which didn't show any errors, and shut it off on the control panel then turned off the local disconnect.  After waiting about 5 minutes for any energy to dissipate (capacitors), I removed the lid.

I wasn't familiar with the symptom, but knew enough about the motor and compressor setup to understand there was a problem someplace.  A quick online search brought up some similar issues in a WaterFurnace chat forum that the compressor motor run capacitor could be bad.  If you don't know what that is, it looks sort of like a V-8 juice can, right circular cylinder, that is connected with large wires into the motor/compressor circuit.  Here's the control panel side view of it (with tan and blue wires attached).


Usually when they go bad, they short and the can overheats and puffs out on the ends.  This one was very slightly domed, but when I disconnected the spade terminals and took it out, it tested open with an Ohm meter, and no reading on a capacitance meter (the can said 370VAC and 80uF or microFarad).

The chat forum had also mentioned the manufacturer went from a 440VAC rated capacitor down to a 370VAC for home units, which is normally fine since they run 240VAC.  We had recently had a power surge that took out a bunch of stuff in the house (that the power company paid to have fixed!) and could have damaged this too.  I was able to find this capacitor (440VAC, 80uF) at my local Grainger for $53, in stock.  I drove down to get it and the tech there also verified with their capacitor tester that the old one was open.

Came home, popped in the new one after removing the adapter plate which had a 2" opening instead of 2.5" for the larger 440VAC rated cap, closed it up, turned it on....  and the compressor started!

While I was in there however, I also noticed that there was quite a bit of dust underneath the compressor start contactor, and that the control board looked a little cooked under a  transistor and power resistor.  Rather than get that far into it, I called my local service guys that installed the unit (HEY, EVEN I HAVE LIMITS), and they came out and replaced the control board and contactor FOR FREE UNDER WARRANTY.  I was 8 years into a 10 year warranty.  Nice.  The contactor was severely pitted from cycling for 8 years, plus cycling for at least several days with a locked-rotor compressor.  They also checked out the unit and topped up the outside loop pressure, and verified it was delivering about 63,000BTU for a 5 ton (60,000BTU) rating.  All good.

Technical note:  For those of you not familiar with large single-phase motors, they typically have capacitor in series with one motor winding to create a "fake" second phase that makes the motor run much more efficiently.  With that capacitor open, the compressor was trying to turn two windings with only one connected, and that no worky.  See the compressor and cap in the schematic below: