Thursday, 21 June 2012


One of the most enjoyable distractions of the past year has undoubtedly been MIT's online course in Circuits and Electronics. This sparked a renewed interest in discrete electronics which naturally led to the idea of measuring various parts' characteristics using AVRs. (The link with Arduino probably arose from a tutorial showing how to measure capacitance.)

Needless to say, once the idea had germinated it was only a matter of time before I spotted that someone else had done it, and much more thoroughly than I had ever planned to. An initial siting on Dangerous Prototypes led to the original German site where one Markus Frejek had done a magnificent job identifying and measuring characteristics of 15 different kinds of Semiconductor device (plus Resistors and Capacitors) using an AVR. His original design is downloadable here --- this package contains his circuit diagram with a neat transistor latch to turn off the voltage regulator when powering-down the AVR. (I didn't go with this in the end, preferring to use a momentary push-button to power it on.)

I built this circuit over the course of a day and I had translated the strings into English when I discovered that Markus's original announcement in early 2009 had led to a huge thread on (which continues today!). His code had been taken up and extensively modified by Karl-Heinz K├╝bbeler. I went with the latest version (096k) which still works with the original circuit diagram.

The new software which is quite well packaged, is certainly the biggest AVR program I have seen. I edited the Makefile for the following settings:
PORT=/dev/ttyUSB0 -b 19200
The file Transistortester.h should also be edited for the exact values of the resistors connected to the analog inputs, R_L_VAL and R_H_VAL --- test them with a multimeter before soldering them up. (It is probably worthwhile to use 1% tolerance parts.)  Then make && make upload && make fuses will program the microcontroller correctly.

A poor photo of my completed build on stripboard is shown below measuring an IN4148 diode. About the only change I'd make to this great project would be to introduce a software mapping layer for the connections between the AVR and the LCD data pins. (The default connections require a lot of cut-tracks and fiddly crossing-wires for the backpack arrangement I went with.)

It fits perfectly in an old perspex iPod nano case I found lying around!