You are on page 1of 5

5/9/2016 Measuring small inductances and capacitance with the "AVR transistortester"

PA3FWM 'samateurradiowebsite >TechnicalNotes> ......

Measuringsmallinductancesandcapacitancewiththe"AVR
transistortester"
PieterTjerkdeBoer,PA3FWMpa3fwm@amsat.org

(ThisisanadaptedversionofpartofanarticlethatIwrotefortheDutchamateurradiomagazine
Electron,December2015.)

The"AVRtransistortester"
ThesocalledAVRtransistortesterisahandyandpopulartesterformanykindsofcomponents,
aboutwhich,tomysurprise,littlehasbeenwritteninamateurradiomagazines.Itconsistsofnot
muchmorethananAVRmicrocontroller,anLCDdisplayandsomepassivecomponents.Asthe
nameindicates,itcantesttransistors,butbesidesthatitcanalsodealwithdiodes,thyristors,triacs,
resistors,capacitors,andinductors,andthereforeshouldperhapsbecalled"AVRcomponent
tester".Thetesterfiguresoutautomaticallywhatkindofcomponentisconnectedtoitandwhich
piniswhich.Furthermore,itmeasuressomekeycharacteristicsofthecomponent,likethecurrent
gainincaseofatransistor.ItwasoriginallydesignedbyM arkusFrejekandisnowadaysdeveloped
furtherbyKarlHeinzKbbeler(seehere).Itcaneasilybehomebuilt,butisalsosoldreadybuilt,
amongothersonEbayandatradiofleamarkets.

http://www.pa3fwm.nl/technotes/tn11b.html 1/5
5/9/2016 Measuring small inductances and capacitance with the "AVR transistortester"

Theleftpartofthefigureshowstheessenceofthetester'scircuitdiagram.Weseethateachpinof
theDeviceUnderTest(DUT)isconnectedtothreeI/Opinsofthemicrocontroller:directlytoone
I/Opin,viaa680ohmsresistortoanotherI/Opin,andfinallyvia470kiloohmtoathird.Nowwe
shouldknowthateachI/Opinofthemicrocontrollercaneitherbeprogrammedasinaninput(then
itgoesintoahighimpedancestate),orasanoutputinthelattercaseitwillbeconnectviaalow
internalresistanceofabout20ohmsto0volts(logical0)or5volts(logical1).Theresultisthat
eachpinoftheDUTcaneitherfloat,orvia20,700or470kohmsbeconnectedto0or+5volts.
Furthermore,thethreeI/OpinstowhichtheDUTisconnectedwithoutresistors,arealsoinputsof
themicrcontroller'sbuiltinA/Dconverter,sothevoltageoneachoftheDUT'spinscanbe
measured,andofacomparator.Allofthisleadstotheequivalentschematicshownattheright,
wheretheswitchesareallcontrolledbythemicrocontroller'ssoftware.

http://www.pa3fwm.nl/technotes/tn11b.html 2/5
5/9/2016 Measuring small inductances and capacitance with the "AVR transistortester"

Howcancomponentsbetested?Thatisillustratedinthenextfigureusingacoupleofexamplesthat
canberealisedbythesoftwarebysettingtheswitchesintheappropriatepositions.Fromleftto
rightweseeresistancemeasurement(theunknownresistor(red)formsavoltagedividerwiththe
knownresistorinthetester),diodetest(voltagedropacrossthediodeismeasured,0.6Vfora
conductingsilicondiode,5Vinthereversedirection),currentgainofatransistor(basecurrentis
suppliedvia470k,andtheresultingcollectorcurrentismeasured),andcapacitance(afterclosing
theswitch,itismeasuredhowlongittakesforthecapacitortobechargedto1.1V).Automatically
figuringouttheconnectionsofatransistorisdonebysimplytryingallpossibilitiesandchoosing
theonewhichgivesthelargestcurrentgain.

So,it'saveryhandydevice,whichdeservesmoreattentionintheamateurradioliteraturethanit
getssofar.However,italsohassomelimitationswhichareunhandypreciselyforradioamateurs:it
cannotmeasureinductancesbetterthanin10Hsteps,whichisratherlargeforHFandalsothe
measurementofsmallcapacitancesislimited,witharesolutionof1pF.

Measuringsmallcoilsandcapacitances
Theproblemwithmeasuringsmallcapacitancesandinductanceswiththistester,isthateverything
happensfartooquickly.Justdothemath:1pFwith470k(whichisthelargestavailabletest
resistor)resultsinanRCtimeofabout0.5s,and10Hwith20(thesmallestavailabletest
resistor)resultsinanL/Rtimeofthatsameorderofmagnitude.TheA/Dconverterinthe
microcontrollerneedsabout100sforasingleconversion:that'swaytooslowforthis.Asan
alternative,themicrocontroller'scomparatorcanbeusedtomeasurehowlongittakestoreacha
(fixed)thresholdof1.1volt,withanaccuracyintheorderoftheclockfrequencybutthat'snot
reallygoodenougheither,hencethelimitationsonmeasuringsmallCandL.

Iwantedtoimprovethis,andgottheideaofusingthesample&holdcircuitwhichisinthe
microcontrollerinfrontoftheA/Dconverter.ThiscircuitmakessurethatalthoughtheA/D
conversiontakesabout100s,thesignalbeingmeasureddoesnotneedtobeavailableduringall
thattime:itis"sampled",i.e.,storedinanalogform,andthatvalueisconvertedtodigital.

http://www.pa3fwm.nl/technotes/tn11b.html 3/5
5/9/2016 Measuring small inductances and capacitance with the "AVR transistortester"

WithsuchanS&Honecan,despitetheslowA/Dconverter,stillmeasurefastsignalsinmuch
detail,iftheyarerepetitive.Onedoesthisbytakingasampleeverytimethesignalrepeats,but
everytimealittlebitlater,assketchedinthefigure.Together,thesamplesstillrepresenttheoriginal
signal.Thistrickwasalreadyusedhalfacenturyagoinoscilloscopes:withanS&Hatitsinput,the
scopecouldbeusedforsignalsatmuchhigherfrequenciesthanwhattherestoftheelectronicsin
thescopecouldhandle.

Usingthis,thecapacitancemeasurementcanmostlybeimprovedbymeasuringmanypointsonthe
(dis)chargecurve,insteadofonlyoneasdonewiththecomparator.Intheory,thesepointsshould
lieonanexponentialcurveby"fitting"suchacurvethroughthemeasuredpoints,thetimeconstant
canbefound,whileaveragingouterrorsintheindividualmeasurements.

Fortheinductancemeasurement,thisisstillnotgoodenough,becauseatsmallinductancesthe
currentsimplyrisestoquickly:alreadywithin1clockcycleoftheprocessorthefinalvaluehas
almostbeenreached,leavinglittletobemeasured.Inordertostillmeasuresmallinductances,I
connectacapacitorofabout22nFinparallel,forminganLCcircuit.Bytheapplyingavoltageto
thisLCcircuitduringashorttime(viaoneofthemicrocontroller'sI/Opins),thecircuitis"excited"
fromthatmomenton,thevoltageacrossitisadampedsinewave,whichcanbemeasuredusingthe
samplingtrick.

http://www.pa3fwm.nl/technotes/tn11b.html 4/5
5/9/2016 Measuring small inductances and capacitance with the "AVR transistortester"

Thefigureshowsanexampleofsuchameasurement.Wesee256consecutivevoltage
measurements,madebythemicrocontroller,usingtheS&H,eachtime62.5ns(thatis1periodof
themicrocontroller's16M Hzclockfrequency)fartherawayfromthemomentatwhichtheimpulse
isapplied.Weseeonlythepositivehalfofadampedsinewave.Thenegativehalfisinvisible
becausetheA/Dconvertercannothandlenegativevoltages.Butevenwithjustthepositivehalvesit
iseasytodeterminethedurationoftheperiod,andbyinterpolationaresolutioncanbereached
whichismuchbetterthantheperiodofthemicrocontroller'sclock.Fromtheperiodthefrequency
canbecalculated,andtogetherwiththeknowncapacitance,theinductancefollows.Furthermore,
thecircuit'sQfactorcanbedeterminedfromhowquicklytheamplitudedecreases,andthiswill
usuallybeagoodindicationoftheinductor'sQ(unlessalowqualitycapacitorisused).

Inpractice,thisprincipleturnsouttobeusableforinductorsaslowasabout100nH,usingatest
capacitorof22nF.Atevensmallerinductances,theresultingfrequencybecomestoohightobe
measured,giventhemicrocontroller's16M Hzclockusinganevenlargercapacitorwouldsolve
this,butitturnsoutthattheresonancethenbecomessoweak(lowQ)thatthemeasurementfails.

ThisnewmeasuringmethodforsmallcapacitancesandinductancesthatIdeveloped,arenotyet
integratedinthestandardsoftwareforthesetesters.However,I'mnowworkingwithitsauthor
(KarlHeinzKbbeler)tointegratemyextensionsintoit,andimprovethemfurthertheyare
alreadyavailableintheproject'sSVNserver(seehere).

Textandpicturesonthispagearecopyright2015,P.T.deBoer,pa3fwm@amsat.org.
Republicationisonlyallowedwithmyexplicitpermission.

http://www.pa3fwm.nl/technotes/tn11b.html 5/5

You might also like