Jon Titus Blog

Titus regularly contributes articles on electronics and measurement. He has extensive experience designing with microprocessors and microcontrollers, and developed data-acquisition and instrument-control systems and taught many courses on software and hardware design. A recipient of the George R. Stibitz Computer & Communications Pioneer Award, he holds a BS from Worcester Polytechnic Institute, an MS from Rensselaer Polytechnic Institute, and a PhD from Virginia Polytechnic Institute.



Monday, January 11, 2010

Cameras as Debug Tools, and the Gerber Ruler

Jan 11 2010 11:49AM | Permalink |Comments (9) |


I started to work with some new FPGA-design software that seemed to take a long time to "build" a simple LED-flasher demonstration project. I let it run for about 45 minutes while I answered emails and had a conference call.

When I took another look, I saw something flash in the corner of the software's display area, but it appeared only briefly every 15 seconds or so. That made it impossible to see what the short message said. The message also appeared superimposed on other information, which increased the difficulty to read it.

That's when I thought about using my camcorder to record the display so I could play it back and see what the message said. I recorded about 15 seconds of video, loaded the video into my iMac's iMovie software and slowly scanned through the frames. Then I saw the brief superimposed image of "Scanning JTag ports..." and figured the FPGA software was hung in a loop. I restarted the software and built the FPGA project without problems. I hadn't thought of a video camera as a debug tool, but it worked nicely in this care.

I suppose a still camera could work equally well in some situations that provide an external trigger signal. Many film cameras and photoflash units used to provide a connection for an electrical trigger, but I'd bet most small digital cameras do not.

My first "exposure" to test-result photography involved a Tektronix oscilloscope, circa 1977, and a camera attachment that used Polaroid "instant" film. As best I can recall, I set the scope's trigger, opened the camera's shutter, ran a test, and the camera captured the scope's trace on the fly. During several weeks of experiments, I went through many packs of film.

After engineers took similar photos, they had to extract the information from the trace or traces with a ruler and then convert the information into useful units. Some lucky engineers had a Gerber Variable Scale, basically a precision spring with graduated marks so a user could set the full-scale point and then directly read off the scaled values. You can read more about the Gerber Variable Scale at: www.nzeldes.com/HOC/Gerber.htm. From time to time, Gerber scales show up on eBay. If you admire older measuring and calculating devices, the Gerber scale is worth adding to a collection. --Jon Titus


Reader Comments



at 1/11/2010 12:03:12 PM, Retired Engineer said:
Clever use of a video camera. I had a Gerber ruler years ago and showed a friend how to use it to pick off peak heights on outputs from strip-chart recorders. Now instruments are equipped with software that will give users information in any unit they want and put the information on a network or USB thumb drive. I guess I was born a generation too soon.



at 1/11/2010 2:51:19 PM, Jeremy said:
Excellent idea - I used a similar setup years ago on my Desktop PC (at the time, a brand-new installation of Windows 2000) which crashed and only showed the diagnostic information on the blue screen of death for a fraction of a second. With iMovie I was able to go frame-by-frame and extract the error codes for the software guys.



at 1/11/2010 2:53:57 PM, Steven said:
An alternate to the Gerber scale and easier to make is an interpolation scale. It can be made linear or logarithmic (or other divisions). It looks like a series of ratlines like they used on old sailing ships. It consists of 11 equally spaced marks on a vertical line (corresponding to 0,1,2,3,4,5,6,7,8,9,10). A perpendicular line comes off the bottom for a convenient distance (arbritrary). The end of the second line is then connected to each division. A series of vertical lines parallel to the first line are created. This is then copied onto a piece of acetate or overhead plastic. By sliding the scale back and forth on the figure to be scaled, you line up the zero and 10 marks with the calibrated distance and note which parallel vertical line corresponds with the correct calibration. Then use this part of the converging lines to make other measurements on the graph.



at 1/16/2010 10:17:52 AM, Erick said:
I had to extract information from an older frequency spectrum analyzer without a digital result output. I took several photographs of the frequency spectgrum and used matlab to convert the (through a user gui point selection method) graph to tabular data of frequency and spectrum data. Tedious but invaluable.




at 1/18/2010 2:13:42 PM, John said:
Don't forget the strobe-o-scope. The most practical application that we old engineers remember is likely the timing light used to tune up gasoline engines. But a strobe light has a lot of other applications when engineers must "stop motion" to observe what happens at a given and repetitive time. You can buy many types of stroboscopes or even build one with high-intensity white LEDs.



at 2/3/2010 12:28:09 PM, Brad said:
In terms of external triggering, some cameras (including my Canon digital point-and-shoot) can be controlled by a PC via USB.

Don't forget using the camera to document what-goes-where during physical disassembly of equipment you are trying to fix.

And dirt-cheap webcams are small enough to give you a view inside places where our head won't fit. (Or where it would be hazardous to place our head.)





at 2/3/2010 3:17:21 PM, bitmechanic said:
On a computer, why not just use a screen capture program ? Then you'll have an .avi or .mpg file to view easily, no need to deal with an external device.



at 2/4/2010 7:24:43 PM, Les, also a devoted programmer said:
Why use anything but a Tek scope for any debugging chore. As long as you can insert a unique IO line of code to create an interrupt or some unique scope trigger signal, and you have a delayed sweep, you can see what the instructions are doing.
Of course a big improvement on all that is to use a storage scope.
It takes a bit of time to master the method, but you can be in complete control of things!



at 2/8/2010 11:57:20 AM, Mohammed Hamed said:
Also a screen capture program could've been used that takes screen captures at frequent intervals.

Post a comment



Display Name

Change Image
Before submitting this form, please type the characters displayed above.
Note the letters are NOT case sensitive.

 Free-Newsletter

 



Development Resource Center

MPLAB ICD 3 In-Circuit Debugger
Date: Oct 5, 2009
The MPLAB ICD 3 is the most cost-effective high-speed emulator for PIC MCUs and dsPIC DSCs. It debugs and programs with the powerful, yet easy-to-use... More...

PICkit 3 Debug Express
Date: Oct 5, 2009
Microchip’s PICkit™ 3 Debug Express uses in-circuit debugging logic incorporated into each chip with Flash memory to provide a low-cost hardware debugger and... More...

Free C Compilers from Microchip
Date: Oct 5, 2009
Microchip has a complete selection of C compilers for programming on any PIC microcontroller or dsPIC digital signal processor. The MPLAB C and HI-TECH C... More...



©1997-2010 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy