You are on page 1of 7


Two-Channel PC ased !scilloscope "# $nroduction More and more experiments are now PC-assisted. Also conventional acquisition systems are very expensive. Since portable PCs are today common and a US lin! is a better solution"ere we present an oscilloscope usin# US port o$ t"e PC t"at operates at up to %& !'( wit" )%*+ input volta#e. ,t "as muc" more improved $eatures t"an t"e PC-based oscilloscope . -"e oscilloscope uses ,C P,C%./011& $rom Microc"ip as t"e main controller2 w"ic" ma!es t"e oscilloscope compact as t"ere is no need o$ additional power supply $or t"e entire circuit board. Circuit description At t"e "eart o$ t"is oscilloscope is US 0.&-compliant microcontroller P,C%./011& $rom Microc"ip. 3ou can also use ,C%./0441 in place o$ P,C%./011&. Speci$ications o$ t"is microcontroller are5%eatures o& 1'%2((0 Programming %. Up to 60 ! o$ $las" memory2 0! 7AM and 01*-byte 88P79M 0. 8xtended instruction set :optimised $or C compiler; 6. .x. sin#le-cycle multiplier 4. Sin#le-supply serial pro#rammin# and easy debu##in# USB transceiver %. US %.% and 0.& $rom %.1 M <s to %0 M <s 0. ,soc"ronous2 bul! and interrupt trans$er modes 6. % ! o$ access 7AM usable wit" 60 endpoints :*4 bytes eac"; Multiple oscillator and power modes %. /rom internal 6% !'( to external 4. M'( wit" P== 0. Possible so$tware switc"in# between run2 idle and sleep modes. ,n sleep mode2 current is down to &.% >A. 6. ?ide operatin# volta#e ran#e :0.&+ to 1.1+;. Use$ul $or battery operations. Complete set of classical peripherals %. Several input<output :,<9; ports2 $our timers wit" capture< compares 0. Sync"ronous and async"ronous en"anced modules 6. Streamin# parallel port 4. %&-bit A@C module wit" up to %6-c"annel multiplexer. -"is microcontroller "as a US 0.&-compliant transceiver and a CPU runnin# up to %0 M,PS.

avobe $i#rue s"ows t"e circuit o$ t"e two-c"annel PC-based oscilloscope. MCP*SA% $rom Microc"ip -ec"nolo#y is an analo#ue pro#rammable #ain ampli$ier t"at is well suited to drivin# analo#ue-to-di#ital converters :A@Cs; and an analo#ue input to a P,C microcontroller. -wo MCP*SA% pro#rammable #ain ampli$iers :,C4 and ,C1; ma!e it possible to c"oose t"e input ran#es $or eac" o$ t"e two c"annels2 by selectin# a #ain $rom %5% to 605%. -"e ampli$iers are small2 c"eap and easy to use. A simple t"ree-wire serial perip"eral inter$ace :SP,; allows t"e P,C to control t"em t"rou#" pins 12 * and B. -"e MCP*SA% ampli$ier is desi#ned wit" CM9S input devices. ,t is desi#ned to not ex"ibit p"ase inversion w"en t"e input pins exceed t"e supply volta#es. -"e maximum volta#e t"at can be applied to t"e input pin is C&.6+ :+SS; to D&.6+ :+@@;. ,nput volta#es t"at exceed t"is absolute maximum ratin# can cause excessive current into or out o$ t"e input pins. Current beyond )0 mA can cause reliability problems. Applications t"at exceed t"is ratin# must be externally limited wit" a resistor to t"e input pin.:pin 6;2 w"ic" is an analo#ue input2 s"ould be at a volta#e between +SS and +@@. -"e volta#e at t"is pin s"i$ts t"e output volta#e. -"e SP, inter$ace inputs are c"ip-select :CS;2 serial input :S,; and serial cloc! :SCE;. -"ese are Sc"mitttri##ered2 CM9S lo#ic inputs. -"e only disadvanta#e is t"at t"ese ampli$iers accept only positive si#nals. -"ats w"y volta#e-s"i$tin# ampli$iers =/616 :,C0A and ,C6A; are used2one eac" $or eac" c"annel input :see /i#. %;. -"e =/616 is a F/8- input operational ampli$ier wit" an internally compensated input o$$set volta#e. -"e F/8- input device provides wide bandwidt"2 low input bias currents and o$$set currents. -"is volta#e-s"i$tin# ampli$ier results in a "i#" input impedance and an attenuation $actor o$ %54.1. A )%*+ input si#nal is t"en s"i$ted to t"e&-1+ ran#e w"en t"e pro#rammed #ain is %5%. -wo "alves o$ t"e =/616 :,C0 and ,C6 ; are used as volta#e $ollowers to provide a low-impedance s"i$tin# volta#e :+re$; to t"e pro#rammable ampli$iers. -"is volta#e must be precisely adGusted wit" two 4.B-

!iloo"m presets to measure precisely 0.1+ level on t"e inputs o$ ,C0 and ,C6 w"en t"e input si#nals are #rounded. ecause =/616 opamps need a symmetrical supply volta#e2 a small @C-@C volta#e converter ,C=B**& :,C%; is used to $eed C1+ to =/616. ?it" its small .-pin @,P pac!a#e2 it needs only two polarised capacitors. ,C=B**& can be replaced wit" a MAH%&44. -"e MAH%&44 and ,C=B**& are monolit"ic2 CM9S switc"edcapacitor volta#e converters t"at invert2 double2 divide or multiply a positive input volta#e.-"ese are pin compatible wit" t"e industry-standard =-C%&44 !verview o& the universal serial bus All t"e data is transmitted on t"e @D<@- symmetrical pins usin# a variable bit rate. -"e position o$ a resistor :7%6; on @D or @- allows you to c"oose between t"e $ull-speed :%0 Mbps; and lowspeed modes :%.1 Mbps;. Iote t"at t"e ,C%./011&<0411 devices "ave built-in pull-up resistors desi#ned to meet t"e requirements o$ low-speed and $ullspeed speed US . -"e UPU8I bit :UC/JK4; enables t"e internal pull-ups. ,n t"is proGect2 7%6 is not used. 8xternal pullup may also be used. -"e +US pin may be used to pull up @D or @-. -"e pullup resistor must be %.1 !ilo-o"ms :)1L; as required by t"e US speci$ication The P$C so&tware -"e pro#ram $or t"e microcontroller is written in C lan#ua#e. MP=A ..B& alon# wit" MP=A MC%. is used as t"e so$tware tool $or development. -"e so$tware tools can be downloaded $or $ree $rom website www.microc" ased on Microc"ips application notes2 t"e pro#ram $or t"e c"ip is centered on a main loop continually pollin# t"e US transceiver state. -"is loop never stops and eac" US operation is done in one pass. All operations are initiated by t"e "ost :t"e PC;2 w"ic" ends a %*-byte command -"e $irst command byte determines t"e c"ip actions. -"e $our possible actions are5 %. Command .&"5 Clears t"e 88P79M calibration memory 0. Command .%"5 7eceives parameters2 and stores t"e #ain-error compensation $or t"e two c"annels. 6. Command .6"5 ,nitiates a (ero calibration sequence o$ t"e two c"an -"e $irst command byte determines t"e c"ip actions. -"e $our possible actions are5 4. Command .&"5 Clears t"e 88P79M calibration memory 1. Command .%"5 7eceives parameters2 and stores t"e #ain-error compensation $or t"e two c"annels. *. Command .6"5 ,nitiates a (ero calibration sequence o$ t"e two c"annel. $nstallation o& the "# driver. %. ,$ everyt"in# is $ine2 plu# t"e oscilloscope wit" a US cable to your PC :runnin# ?indows A.S8 or "i#"er version;. A Nnew "ardware detectedCUS 0-Mini9scilloscopeO dialo#ue box must immediately appear on t"e screen. I9-85- -"e driver $or t"is oscilloscope is not $or windows B or vista. 0. Iow you can start t"e driver installation process. -o download drive clic! "ere . -"e #oal is to select a #ood driver :mc"$; by c"oosin# t"e speci$ic location option. @ont let ?indows ta!e a #eneric driver by de$ault. 6.?"en you are done wit" installation2 #o to device mana#er and c"ec! w"et"er US 0-Mini9scilloscope is under ot"er device in view devices by typeP option. 9t"erwise2 repeat Steps % and 0. "ser inter&ace pro)ram and operations. A user-inter$ace so$tware written in +isual asic *2 called 9scilloP,C2. 3ou can download t"is so$ware clic! "ere to download 7un t"e set up pro#ram 2 -"is will automatically install t"e 9scilloP,C user-inter$ace pro#ram.

application pro#ram loo!s li!e a small di#ital oscilloscope as s"own in t"e screens"ot below. +arious settin#s $or operations are #iven in t"e $ollowin# menu bars5 %. ,nputs5 Selects t"e active c"annels 0. Samplin#5 Sets time-base and number o$ samples 6. -ri##er5 Sets t"e tri##erin# condition 4. Cursors5 Selects "ori(ontal or vertical cursor positions 1. Ium5 S"ows numerical sampled values2 wit" an export command :text $ile $ormat; *. Con$i#5 Con$i#ures #ain and o$$set errors Calibration is to be done as described below be$ore readin# t"e output si#nals on t"e monitor screen by clic!in# c"annels calibration under con$i# menu bar. /eed t"e input wave$orms :say2 sine2 rectan#ular2 sawtoot"2 etc; $rom t"e source. Clic! #o button. -"e output wave$orm will be displayed on t"e monitor screen. C"annel-% and c"annel-0 output wave$orms can be di$$erentiated by screen and red lines2 respectively. y de$ault2 t"e time base is 0&& >s per division and amplitude is 4+ per division. 3ou can set t"ese parameters as per your requirements. Test and calibration

-"e $irst step is to adGust t"e (ero o$$set error. Connect t"e two analo#ue inputs to t"e #round level and tune t"e two 4.B- !ilo-o"m presets until pin 0 o$ bot" MCP*S0% is at 0.1+. A more precise tunin# can be ac"ieved t"rou#" 9scilloP,C so$tware. C"oose t"e smallest calibration value at )&.1+ $or bot" t"e inputs. -"e (ero calibration command tells t"e P,C to start its own internal compensation $or all calibrations. @ont $or#et to connect t"e inputs to t"e #round w"ile calibratin#. -"e second parameter to c"ec! is t"e #ain error. y clic!in# t"e #ain calibration command2 its possible

to speci$y a small correction $actor. -"is can be done a$ter several measurements. 3ou "ave to !now t"e actual levels sine and trian#ular wave$orms and t"e measured levels :wit" t"e cursors; $or t"e two c"annels. -"e #ain error is less t"an &.% per cent. -"e number o$ samples can be set between %& and 1&&. -"e minimum samplin# %& >s $or two c"annels. Construction assembly on a bread board.

An actual-si(e2 sin#le-side PC layout $or t"e two-c"annel PC-based US oscilloscope circuit is s"own in /i#ure and its component layout . Since t"e circuit is compact2 t"e construction is easy.

,t is advised to use ,C bases $or mountin# ,C% t"rou#" ,CB on t"e PC $or easy troubles"ootin#. -"e

US connector :C9I%; must be $irmly soldered and $ixed on t"e board. ,t is located on t"e extreme ri#"t o$ t"e board :re$er /i#ure.;.

-wo IC connectors can be used $or t"e input si#nals $or c"annels %and 02 respectively. -"e connectors can be $ixed on t"e $ront panel o$ t"e enclosure. -"e per$ormance o$ t"e oscilloscope can be improved by c"an#in# t"e P,C and its A@C wit" a $aster model. A@A06. :0& MS<s; is a #ood c"oice. -"is $ast2 parallel A@C converter could be used wit" a power$ul @SP P,C. *!+,-!.* %irmware and PC #o&tware:Clic! "ere to @ownload P,C /irmware Clic! "ere to @ownload PC So$tware and @river Clic! "ere to @ownload PC /ile I9-85- PC $ile optimi(ed $or "ome made process -"atPs w"y t"read are so t"ic!2 i$ you want to PC manu$acture by pro$essional t"e you can reduce t"e si(e $urt"er i$ somebody "as any problem t"e please ma!e a comment