Professional Documents
Culture Documents
Digital PC Oscilloscope
Digital PC Oscilloscope
Digital PC Oscilloscope
Table of Contents:
Analog to Digital Stage Clock Circuit Digital to Analog Scalar Stage Analog to Digital Conditioning Stage Aliasing Detection Circuit
Background References
OV RV! "
Our grou" decided to "ick the #ersonal Com"uter Oscillosco"e $ecause it sounded ver% interesting to a""roach& 'e also felt it would hel" us in understanding man% as"ects of hardware and software interfacing& 'e also wanted to do something that we felt was consumer electronic related to the current market and was interesting in working with& This "articular digital "c oscillosco"e that we "roduced was successful in running( although it did not meet all of our ho"es and goals stated in the "ro"osal& Briefl%( the s%stem contained man% stages of o"erations necessar% in a successful model& First of all( the s%stem contained an external circuit la%out that was used to do the Analog to Digital converting( the Digital to Analog scaling( the clocking( and the aliasing detection& The other stages are internal to the com"uter( such as) the *+O card interface( and the Visual Basic "rogramming which dis"la%ed the data& *n this write u" we will $e descri$ing all the necessar% com"onents and how the% are im"lemented into the s%stem functions& 'e will also $e descri$ing the
s%stem software and the necessar% "rogram that allows the com"uter to interface with the external circuit& Finall%( we will give a descri"tion of the $ackground information we received from a local com"an%( stating the current marketing digital oscillosco"e that o"erates on the "ersonal com"uter& D S!#$ %$D M%$&F%C'&R PROC SS 'hen we started working on the "ersonal com"uter oscillosco"e we first needed an excellent A+D converter& The first one we tried was a com"lete mistake& The "ro$lem with this integrating converter was that its sam"ling fre,uenc% was reall% slow -./!( which onl% allowed us to look at fre,uencies under 0./( and even those waveforms were ugl%& Then we decided to "ut in a reall% fast 0123h/( $ut we could not get that converter to work& The 0123h/ converter was ver% difficult to work with( for it re,uired a lot of "recision $iasing& So( we installed the final converter 42k./! which isn5t the greatest converter( %et it was easier to work with and sam"led at a high enough rate for this "articular "ro6ect& 'hile working on the "ro"er A+D converter( we $egan the com"uter interfacing "rocess& This "rocess re,uired a good *+O card and Visual Basic "rogramming to read the card& This "rocess was ever $uilding in the "ro6ect designing( we sim"l% ke"t including extras in the "rogram for ease in o"erating& The *+O card was eas% to decide on $ecause it "rovided us with the a$ilit% to u"grade and it was "rogramma$le for) read( write( or $i7directional& Also( the *+O card had the necessar% amount of $it locations to $e used in our $i7directional interface "rogramming& One "ro$lem that we found with this s%stem was that we could onl% in"ut data with maximum voltage of 8V( otherwise the A+D chi" would $urn u"& So( in order to save the chi" we "ut in 0&4V /ener cli""ing diodes and $uilt a D+A conditioner& This D+A stage circuit divides the voltage down immediatel% from the in"ut signal( runs it through the A+D converter( which sends it to the com"uter& The "rogram then reali/es how much it needs to scale the signal such that the A+D converter gives the $est resolution& And the last thing we did was the aliasing detection circuit& This circuit5s "ur"ose was to recogni/e that the in"ut fre,uenc% was to large for the sam"ling rate& Once this s%stem recogni/ed aliasing( it would send a high signal to the "ort and the window would dis"la% A9*AS on the gra"h& The circuit consisted of a fre,uenc% to DC voltage converter and a com"arator& The s%stem was sur"risingl% coo"erative and we ran into little com"lications( which allowed us to have a successful working model( and a s%stem that $asicall% simulates the market "c oscillosco"e& D S!#$ %$D M%$&F%C'&R PROC SS
'hen we started working on the "ersonal com"uter oscillosco"e we first needed an excellent A+D converter& The first one we tried was a com"lete mistake& The "ro$lem with this integrating converter was that its sam"ling fre,uenc% was reall% slow -./!( which onl% allowed us to look at fre,uencies under 0./( and even those waveforms were ugl%& Then we decided to "ut in a reall% fast 0123h/( $ut we could not get that converter to work& The 0123h/ converter was ver% difficult to work with( for it re,uired a lot of "recision $iasing& So( we installed the final converter 42k./! which isn5t the greatest converter( %et it was easier to work with and sam"led at a high enough rate for this "articular "ro6ect& 'hile working on the "ro"er A+D converter( we $egan the com"uter interfacing "rocess& This "rocess re,uired a good *+O card and Visual Basic "rogramming to read the card& This "rocess was ever $uilding in the "ro6ect designing( we sim"l% ke"t including extras in the "rogram for ease in o"erating& The *+O card was eas% to decide on $ecause it "rovided us with the a$ilit% to u"grade and it was "rogramma$le for) read( write( or $i7directional& Also( the *+O card had the necessar% amount of $it locations to $e used in our $i7directional interface "rogramming& One "ro$lem that we found with this s%stem was that we could onl% in"ut data with maximum voltage of 8V( otherwise the A+D chi" would $urn u"& So( in order to save the chi" we "ut in 0&4V /ener cli""ing diodes and $uilt a D+A conditioner& This D+A stage circuit divides the voltage down immediatel% from the in"ut signal( runs it through the A+D converter( which sends it to the com"uter& The "rogram then reali/es how much it needs to scale the signal such that the A+D converter gives the $est resolution& And the last thing we did was the aliasing detection circuit& This circuit5s "ur"ose was to recogni/e that the in"ut fre,uenc% was to large for the sam"ling rate& Once this s%stem recogni/ed aliasing( it would send a high signal to the "ort and the window would dis"la% A9*AS on the gra"h& The circuit consisted of a fre,uenc% to DC voltage converter and a com"arator& The s%stem was sur"risingl% coo"erative and we ran into little com"lications( which allowed us to have a successful working model( and a s%stem that $asicall% simulates the market "c oscillosco"e& F!$%( H%RD"%R PROD&C' %nalog to Digital Stage) To dis"la% analog signal onto a digital com"uter( such as %our #C( the continuous analog voltage needs to $e converted into a discrete digital num$er that the com"uter can then take and mani"ulate& The conversion $etween analog to digital is done using an A+D converter chi"& The fact that we are changing continuous signal into discrete im"lies that the faster of an A+D converter we have( the $etter we will re"resent the continuous analog signal into discrete digital as well as the fact that we will $e a$le to accuratel% re"roduce higher fre,uenc% waves& Toda%( two methods in A+D technologies seem to give the $est s"eed "erformance&
One( is se,uential a""roximation( in which the analog voltage is a""roximated $% se,uentiall% moving from the most significant $it to least significant $it and com"aring the digital voltage to the analog voltage& The method works similarl% to a $inar% search in which we do a $inar% search for the digital num$er that $est re"resents the analog voltage& One draw$ack to this method is the fact that the chi" must also contain a digital to analog stage to transform the digital voltage into analog and com"are it with the analog in"ut& The second( and $% far the most "o"ular method for use in high s"eed electronics( is a flash A+D converter& Su""ose that one uses an : $it converter& Then( 01; 0<:! com"arators are stacked one on to" of each other and the in"ut voltage is "assed through a 01; resistor network ladder& 'ithout going into too much detail( the resistor network will distri$ute the in"ut voltage evenl% on each resistor and the com"arators com"are each node signal against a fixed reference voltage& Based on how man% com"arators are =on= at one time( a digital num$er re"resenting the in"ut voltage can $e o$tained& *n our design( we decided to use 3otorola5s tri"le :7Bit Video ADC 3C--012!& This flash A+D converter has the following feature which made it extremel% well suited for our "ro6ect> ?13./ Sam"ling @ate& Single 1Volt #ower Su""l%& 8 Flash A+D converters on one chi"& Ver% well suited for future u"grades where we would like our digital sco"e to have two or three in"ut channels!& Click here for schematic&
*f one is to use the chi" at its full s"eed then the ground la%er should $e se"arated into an analog and a digital ground( with enough s"ace in $etween them to minimi/e cou"ling in the a$ove drawing the triangle re"resents analog ground( while the 8 line triangle re"resents digital ground!& 'hen running at s"eeds around 42A./ we did not find it necessar% to worr% a$out cou"ling& 'e were a$le to get awa% with using the same "ower su""l% and same ground for $oth the analog and digital "art of our design& Bach "ower su""l% "in should $e decou"led to ground as close to the "ackage as "ossi$le see reference ?!& De"ending on the environment in which the circuit is $eing $uilt( a large cou"ling ca"acitors might $e necessar% in order to remove an% excessive noise around the com"onents one environment in which this a""lies is when the circuit is $uilt using a $read$oard!& @? is used for current $iasing( and 1&?A is recommended for o"timal "erformance&
Clock Circuit)
Our A+D converter re,uires a clock running at s"eeds u" to ?13./& *n our "ro6ect our s"eed was not limited $% the external hardware( $ut rather $% the "rogramming language we decided to use& .ence( using a ver% high s"eed clock would not have $een of much hel"& *nstead( for our clock we used the $asic asta$le circuit descri$ed $elow see reference 0!& 'ith @? e,ual @0 and C? C 2&2?u we o$tained extremel% good 12 D dut% c%cle! s,uare waves in the range of a$out ?22A./& Again( caution should $e taken on where and how the clock is mounted in the circuit& On a $read$oard( the high clock fre,uencies will cause excessive noise causing certain com"onents to malfunction& *n our setu" we had to mount the clock on a circuit awa% from the $read$oard& Click here for schematic&
'e decided that it would $e nice to have the a$ilit% to measure a ?22V "eak to "eak wave& .owever the D+A converter is rated for onl% 01V& B% using the 8A and ?A resistors we made sure that we have a 01V in"ut to the DAC when the original wave is ?22V& The rest of the circuit acts 6ust like an inverting amlifier where we are using the DAC as the feed$ack voltage& Esing this setu" we are a$le to divide the in"ut signal $% a factor ranging from - to ?20-& B% the fact that we alwa%s divide the in"ut signal one must reali/e that this is not the o"timal configuration for a scalar& *deall% one would like the scalar to have the a$ilit% to $oth am"lif% and attenuate the in"ut signal!
%nalog to Digital Conditioning Stage) Our A+D converter re,uires the in"ut voltage for Vin to range from around ?&4 volts to a$out -&F volts( with an average range of a$out 8 volts& 3oreover( since the A+D data s"ecs did not contain an% information on the in"ut
im"edance it would $e nice to have something that would "rovide high im"edance to the analog in"ut as well as shift the voltage in the G0V to G1V range& The $elow circuit "rovides us with exactl% what we need& The two /ener diodes will clam" the in"ut voltage to "lus or minus 8&-V 2&4 G 0&4!& Ad6usting the gain on the am"lifier( via @0( we can o$tain a translation in the range G0&1V( 70&1V to a range of G0&2V( G1&2V& with no in"ut wave distortion& Click here for schematic
%liasing Detection Circuit) 'hen sam"ling continuous signals caution should $e taken to "revent aliasing& B% definition alias is a false signal caused from $eats $etween signal fre,uenc% and sam"ling fre,uenc% see 'indow Dis"la% for
Oscillosco"e $elow! > in this "icture a ver% high fre,uenc% sine wave is sam"led at a fre,uenc% lower than ?+0 its own and we see something that is "erceived to $e a slower fre,uenc% sine wave!& *n ?F0: H%,uist discovered that in order to "revent aliasing the signal must $e sam"led at a fre,uenc% twice its own& .ence( we thought that it is onl% a""ro"riate to incor"orate an alias detection circuit in our #C Oscillosco"e& Click here for 'indow Dis"la% for Oscillosco"e
The circuit $elow converts fre,uenc% to voltage and then using the 9388F com"arator we com"are this voltage with a "reset voltage ad6usted $% @?8& The voltage at @?8 is ad6usted to $e e,ual to the voltage from the fre,uenc% to voltage stage when the in"ut fre,uenc% is at the aliasing "oint& The com"arator will $e low when we are o"erating in the good fre,uenc% range( and high when we are aliasing&
C? will filter out the DC voltage com"onent( allowing onl% the fre,uenc% to go through& I? and I0 act as two o"en collector high gain am"lifiers& @?( @0( @- and @1 are $iasing transistors I? and I0 'ithout emitter resistors I? and I0 have extremel% high gain and will transform an% sha"e ac in"ut into a s,uare wave of fre,uenc% e,ual with that of the in"ut signal& C8 and @4 are used as a high "ass filter to sha"e the s,uare wave into s"ikes still of e,ual fre,uenc% with the original in"ut signal! necessar% to "ro"erl% trigger the 111 timer& On "in 8 of the 111 timer we will have a monosta$le "ositive "ulse of time e,ual with @?? times C- see reference 8!& As the in"ut fre,uenc% changes so does the distance $etween the "ositive "ulses as in diagram! Click here for Diagram
@?0 and C1 convert the out"ut wave from "in 8 into DC voltage "ro"ortional with the initial in"ut fre,uenc% see diagram!& @?- is re,uired for the com"arator to work& F!$%( SOF'"%R PRO#R%MM!$#) Visual Basic and Flow C*art The Visual Basic "rogram must accom"lish the following tasks> + Collect digital data from t*e %,D converter and properl- displa- it. + Decide if t*e input needs to /e scaled and if so /- *ow muc*0 + "rite to t*e D,% converter a num/er t*at will properl- scale t*e input. + Handle t*e rest of t*e miscellaneous tasks suc* as) + Provide time /ase control and amplitude scaling. + Provide t*e a/ilit- to programma/l- control triggering. + Provide support for printing t*e scope output The first three tasks are tightl% $inded together and the correlation $etween them can $e descri$ed $% the following flow chart& Click here for Flow Chart
The "rogram works as follows& Originall% the attenuator divides the in"ut signal $% 01;& *f our in"ut is a large voltage then the A+D converter will $e a$le to dis"la% a clean wave( and the "rogram follows "ath =a=& .owever( if the in"ut
signal was small to $egin with( then the A+D converter will not $e a$le to read a correct re"resentation of the in"ut signal& 'e will then see a mere =2=& The "rogram will then find the maximum num$er coming from the A+D& This num$er will $e much smaller than our threshold value and num$er 0 from the decision $ox turns out true& Therefore the "rogram will tell the hardware to divide the in"ut $% a num$er twice as small as $% what we were "reviousl% attenuating( and the "rogram follows "ath =$= until the decision $ox turns ? to $e true and the "rogram changes to "ath =a=& How su""ose the we are at a nice voltage( we see a clean wave on the sco"e and ever%thing is ad6usted 6ust right we are following "ath =a=! when all of a sudden the in"ut voltage either dro"s or increases dramaticall%& .ow will the "rogram $ehaveJ 'ell( let5s take each case one at a time& *f the voltage dro"s $ellow the threshold voltage then the collected digital data will have a num$er $elow the threshold num$er and the decision $ox turns num$er 0 as true and we will follow "ath =$= until the collected digital data is a$ove the threshold num$er& Once that ha""ens the "rogram switches $ack to running "ath =a=& Hext( if the "rogram is going along "ath =a= and all of a sudden a high voltage comes at the in"ut( the D+A converter will read a num$er ver% close to FF7hex "lease note that the D+A converter will not damage $ecause of the /ener diodes on the analog to digital conditioning stage!& The num$er read $% the A+D converter will $e larger than the ceiling num$er and the decision $ox will turn out num$er 8 as true& The "rogram tells the attenuator to attenuate to the maximum we are now following "ath =c=!& As soon as this ha""ens the next stage the "rogram will follow "ath =$= can %ou tell wh%J!& *f we were to watch the "rogram for a while one would note that "ath =a= is the e,uili$rium "ath& An%thing that ha""ens our software will tr% to $ring the state of the machine in the state descri$ed $% "ath =a=& Decision Bo1) The A+D converter will alwa%s give a num$er $etween FF and 22 with 4F at e,ual distance $etween the two& An%thing a$ove 4F is "ositive and $elow 4F is negative& B% taking the a$solute value we can deal onl% with the "ositive "art& 'e divide the u""er range as in the following "icture Click here for #icture
Our ADC will give the $est resolution when the am"litude of the signal is $etween 0 and -& See software "rogram on how this is solved sco"e11 ! and scal ! are the functions doing this!
Software 'riggering) The idea $ehind triggering is $est ex"lained $% the following "icture> Click here for #icture
Because the time to sam"le the digital data and the time to dis"la% it are not e,ual we need to add a time dela% to s%nchroni/e the gra"hed( otherwise the gra"hed data will $e 6um"ing around the screen as the screen is u"dated&
B%C2#RO&$D !$FORM%'!O$
Marketing Personal Computer Digital Oscilloscopes Rapid S-stems3 !ncorporated R4 &niversal Digital Oscilloscopes A ver% interesting as"ect of this "ro6ect was talking with engineers that $uild these #C oscillosco"es for actual consumers& One "articular "lace we were a$le to talk with was @a"id S%stems& @a"id S%stems was ver% hel"ful in answering all of our ,uestions& The% even "rovided us with a manual on the three s%stems( Analog to Digital Converter Chi" names( and a demo disk "ertaining to the actual o"erating window& 'hen talking with @a"id S%stem we learned that their s%stem was ,uite similar in $lock diagram la%out that we designed& Due to lack of necessar% time and mone% we were una$le to meet the s"ecifications that the marketing #C oscillosco"e are running at& The three #C oscillosco"es that @a"id S%stems "rovides for the consumer are>
R1000 Digital Oscilloscope (click for details)
@?222 out$oard digital sco"e "eri"heral 3icro 9inear 00;?BC# :7$it 122A./ A+D converter! @822 digital signal "rocessing DS#! interface card or @*7?0 standard interface card $oth a 023./!
Software)
122A./ maximum sam"le rate "er channel 80k data $uffer for each channel From ?22D "re7trigger to ?22D "ost7trigger ca"a$ilit% ? 3eg ohm 82"F in"ut im"edance AC to DC cou"ling of the signal in"ut "rotection to G+7 822 volts Software selecta$le gain range from 2&01;V to 1?0V "eak7to7"eak Full analog triggering with external analog trigger in"ut Trigger ad6ust "otentiometer Small si/e case with "ower su""l% $% com"uter Connect four units together for ?; channels Digital triggering
Data Referenced from ;Rapid S-stems3 !nc. R4 &niversal Digital Oscilloscope Manual;
R1200 Digital Oscilloscope (click for details)
@?022 out$oard digital sco"e "eri"heral Own Design Successful A""roximation ?07$it ?3./ A+D converter! @822 digital signal "rocessing DS#! interface card or @*7?0 standard interface card $oth at 023./!
Software)
C Assem$ler *+O controlling! 3atrix 9a%out signal viewing! Features) ?3./ maximum sam"le rate "er channel B3* "rotected dou$le7shielded metal case Self contained linear "ower su""l% From ?22D "re7trigger to ?22D "ost7trigger ca"a$ilit% ? 3eg ohm 82"F in"ut im"edance AC to DC cou"ling of the signal in"ut "rotection to G+7 822 volts #rogramma$le gain range from 2&-2F;V to -2F&;V "eak7to7"eak Full analog triggering with external analog trigger in"ut Trigger ad6ust "otentiometer Digital triggering on two in"ut channels Data Referenced from ;Rapid S-stems3 !nc. R4 &niversal Digital Oscilloscope Manual;
R2000 Digital Oscilloscope (click for details)
@0222 out$oard digital sco"e "eri"heral 3otorola 3C?28?F :7$it 023./ A+D converter! @822 digital signal "rocessing DS#! interface card or
C Assem$ler *+O controlling! 3atrix 9a%out signal viewing! Features) 023./ maximum sam"le rate "er channel ;-k ex"anda$le to ?0:k data $uffer for each $uffer From ?22D "re7trigger to ?22D "ost7trigger ca"a$ilit% ? 3eg ohm 82"F in"ut im"edance AC to DC cou"ling of the signal in"ut "rotection to G+7 822 volts Software selecta$le gain range from 2&01;V to ?0:2V "eak7to7"eak Full analog triggering with external analog trigger in"ut Trigger ad6ust "otentiometer Out$oard "eri"heral with a full B3* "rotected dou$le shielded metal case for signal integrit% Self contained linear "ower su""l% Switcha$le 12 Ohm in"ut termination with warning light Digital triggering Data Referenced from ;Rapid S-stems3 !nc. R4 &niversal Digital Oscilloscope Manual;
These three oscillosco"es all use C assembler for "rogramming the *+O "ort descri$ed in the details& The% also use Matrix Layout as the software "rogram that allows them to design a well detailed window for viewing "ur"oses& Hoticing the a$ilities of these three well thought out oscillosco"es for the #C( we now can determine what to do differentl% in the future& For one thing( we would like to use an *+O card that sam"les in the 3./ range @a"id S%stems develo"ed their own *+O card!& 'e felt our ma6or set $ack( was the Visual Basic software we used to "rogram the *+O card and viewing window& Visual Basic is reall% excellent in monitoring s%stems or running visual "rograms at lower sam"le rates( $ut is a$solutel% terri$le in running sam"le rates in the A./ range& The limitations of the two interface card and software! were the main contri$utors to the 122./ maximum sam"ling rate& Although( we were a$le to o$serve ver% interesting aliasing wave forms over the 122./ range& Although we o$tained detailed information regarding material used on marketing oscillosco"es( we were una$le to convince them of giving out design information& This information would have $een extremel% hel"ful in answering the more s"ecific ,uestions( regarding the circuit design and software interfacing& One wa% of us o$taining this information would $e to go out and "urchase one of these s%stems( taking it a"art and anal%/ing it&
REFERENCES
(1) Motorola Semiconductor Technical Data MC44250 (2) Radio Shack En!ineer"# Mini $ Note%ook 555 Timer (&) Ra'id S(#tem# )nc* +R2 Di!ital ,#cillo#co'e Manual+ (R1000 R1200 - R2000)