41
1 Understanding Signals With the Parallax USB Oscilloscope With the Parallax USB Oscilloscope Presented by: Presented by: Andy Lindsay Andy Lindsay Parallax, Inc. Parallax, Inc. [email protected] [email protected] om om

1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. [email protected]

Embed Size (px)

Citation preview

Page 1: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

1

Understanding Signals With the Parallax USB OscilloscopeWith the Parallax USB Oscilloscope

Presented by: Presented by: Andy LindsayAndy LindsayParallax, Inc.Parallax, [email protected]@parallax.comom

Page 2: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

2

Copyrights and Trademarks

This documentation is copyright 2006 by Parallax Inc. By downloading or obtaining a printed copy of this documentation or software you agree that it is to be used exclusively with Parallax products. Any other uses are not permitted and may represent a violation of Parallax copyrights, legally punishable according to Federal copyright or intellectual property laws. Any duplication of this documentation for commercial uses is expressly prohibited by Parallax Inc. Duplication for educational use is permitted, subject to the following conditions: the text, or any portion thereof, may not be duplicated for commercial use; it may be duplicated only for educational purposes when used solely in conjunction with Parallax products, and the user may recover from the student only the cost of duplication.

BASIC Stamp, Stamps in Class, Board of Education, Boe-Bot SumoBot, SX-Key and Toddler are registered trademarks of Parallax, Inc. HomeWork Board, Propeller, Ping))) Parallax, and the Parallax logo are trademarks of Parallax Inc. If you decide to use trademarks of Parallax Inc. on our web page or in printed material, you must state that "(trademark) is a (registered) trademark of Parallax Inc.” upon the first appearance of the trademark name in each printed document or web page. Other brand and product names are trademarks or registered trademarks of their respective holders.

Page 3: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

3 Chapter 1, Page 1

Software Versions and Stamps in ClassSoftware Versions and Stamps in Class

Version 4.0 Facts Version 4.0 Facts

For Windows 2K/XP For Windows 2K/XP

Compatible with Understanding Signals Compatible with Understanding Signals v1.0v1.0

Includes FFT and Zoom functionsIncludes FFT and Zoom functions

Includes Help fileIncludes Help file

Version 5.0 (Beta) FactsVersion 5.0 (Beta) Facts

For Windows XP/Vista. For Windows XP/Vista.

150 % Faster Refresh Rate150 % Faster Refresh Rate

Variable Persistence Display Variable Persistence Display featurefeature

Does not have FFT, Zoom, or Does not have FFT, Zoom, or HelpHelp

Page 4: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

4 Chapter 1, Page 1

Software and Hardware Installation Software and Hardware Installation

Say somethingSay something

Say something elseSay something else

Page 5: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

5 Chapter 1, Page 1

Calibrating your Probes Calibrating your Probes

Page 6: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

6 Chapter 1, Page 1

What is an Oscilloscope?What is an Oscilloscope?

Analog vs. DigitalAnalog vs. Digital

Digital Storage ScopesDigital Storage Scopes

TriggeringTriggering

Oscilloscope Safety:Oscilloscope Safety:•Remove metallic Remove metallic jewelryjewelry

•Hands clean/dryHands clean/dry

•No food or drinksNo food or drinks

•Anti-stat mat if Anti-stat mat if availableavailable

•20 V maximum20 V maximum

•If anything gets hot, If anything gets hot, disconnect it.disconnect it.

•ALWAYS disconnect ALWAYS disconnect power to your circuit power to your circuit before leaving before leaving workstation.workstation.

Page 7: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

7 Chapter 1, Pages 7 – 10

The Oscilloscope Display The Oscilloscope Display AreasAreas

Plot Area IndicatorPlot Area Indicator

Plot AreaPlot Area

Files/Settings, Files/Settings, Trigger, Trigger,

Cursors and Cursors and MeasurementMeasurement

s Tabss Tabs

Horizontal, Vertical, FFT and Run/Stop Horizontal, Vertical, FFT and Run/Stop ControlsControls

Cursors and Auto Measurements Display Cursors and Auto Measurements Display ScreenScreen

Page 8: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

8 Chapter 1, Page 11

Files/Settings TabFiles/Settings Tab

Trigger TabTrigger Tab

Page 9: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

9 Chapter 1, Pages 12 - 13

Cursors TabCursors Tab

Measurements TabMeasurements Tab

Page 10: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

10 Chapter 1, Activity #1, Pages 14 - 17

Circuit: Figures 1-14 Circuit: Figures 1-14 and 1-15 on page 15.and 1-15 on page 15.

Program: PinHigh.bs2 Program: PinHigh.bs2 on page 16.on page 16.

√ √ Follow the Follow the checkmarks on pages checkmarks on pages 14-17.14-17.

Page 11: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

11 Chapter 1, Activity #2, Pages 18 - 20

Program: ToggleIO.bs2Program: ToggleIO.bs2

√ √ Follow the checkmarks on pages 18 - Follow the checkmarks on pages 18 - 20.20.

Page 12: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

12 Chapter 2, Pages 23 - 24

DODO

PULSOUT 5, 500 PULSOUT 5, 500

PAUSE 20 PAUSE 20

LOOPLOOP

Page 13: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

13 Chapter 1, Activity #1, Pages 6 - 7

Circuit: Figure 2-2, p. 25 and Figure 2-3, p. 26Circuit: Figure 2-2, p. 25 and Figure 2-3, p. 26

Page 14: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

14 Chapter 2, Activity #1, Pages 25 - 31

Program: ServoCentering.bs2 on page 29Program: ServoCentering.bs2 on page 29

√ √ Follow the checkmark instructions Follow the checkmark instructions on pages 28 - 30.on pages 28 - 30.

Page 15: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

15 Chapter 1, Activity #1, Pages 6 - 7

Program: ServoSweep.bs2, p.31Program: ServoSweep.bs2, p.31

√ √ Follow the checkmarks on page 31.Follow the checkmarks on page 31.

Page 16: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

16 Chapter 3, Activity #1, Pages 31 - 32

Circuit: Figures 3-3 and 3-4, p. 37 Circuit: Figures 3-3 and 3-4, p. 37

Program: TestPiezoWithFreqout.bs2, p. 38Program: TestPiezoWithFreqout.bs2, p. 38

√ √ Follow the checkmarks on pages 39 Follow the checkmarks on pages 39 - 40.- 40.

Page 17: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

17 Chapter 3, Activity #1, Pages 35 - 40

Digitally Synthesized Sine Digitally Synthesized Sine WaveWave

Page 18: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

18 Chapter 3, Activity #2, Pages 41 - 43

Program: Start with TestPiezoWithFreqout.bs2Program: Start with TestPiezoWithFreqout.bs2

√ √ Follow the checkmark instructions on pages 41 - 42.Follow the checkmark instructions on pages 41 - 42.

Page 19: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

19 Chapter 3, Activity #3, Pages 43 - 46

Program: DualSineWaves.bs2 on Program: DualSineWaves.bs2 on page 44.page 44.

√ √ Follow the checkmark Follow the checkmark instructions on pages 44 and 46.instructions on pages 44 and 46.

Page 20: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

20 Chapter 4, Pages 49 - 51

Resistor/Capacitor NetworksResistor/Capacitor Networks

Time Constant = R x CTime Constant = R x C

Where R is in ohms, C is in farads, T is in Where R is in ohms, C is in farads, T is in secondsseconds

Page 21: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

21 Chapter 1, Activity #1, Pages 6 - 7

Circuit: figures 4-4 & 4-5, pp. 52-Circuit: figures 4-4 & 4-5, pp. 52-5353Program:RCTimeConstant.bs2, p. Program:RCTimeConstant.bs2, p. 5454√ √ Follow checkmarks on pages 52 Follow checkmarks on pages 52 -56.-56.

Page 22: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

22 Chapter 1, Activity #1, Pages 6 - 7

Circuit: Figures 4-9 and 4-10 on page 58Circuit: Figures 4-9 and 4-10 on page 58

Program: RCTimeConstantWithPhotoresistor.bs2Program: RCTimeConstantWithPhotoresistor.bs2

Page 23: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

23 Chapter 4, Activity #2, Pages 57 - 61

√ √ Follow the checkmark Follow the checkmark instructions on pages 59 - 60.instructions on pages 59 - 60.

Page 24: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

24 Chapter 5, Activity #1, Pages 65 - 71

Circuit: Figures 5-1 and 5-2 on page 66Circuit: Figures 5-1 and 5-2 on page 66

Program: ShiftinA2DExample1.bs2Program: ShiftinA2DExample1.bs2

√ √ Follow the checkmark instructions on pages 6 Follow the checkmark instructions on pages 6 and 7.and 7.

Page 25: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

25 Chapter 5, Activity #1, Pages 65 - 71

√ √ Follow the Follow the checkmarks on pages checkmarks on pages 67 - 71.67 - 71.

Page 26: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

26 Chapter 6, Page 73

Asynchronous Serial Asynchronous Serial CommunicationCommunication

Page 27: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

27 Chapter 6, Activity #1, Pages 74 - 78

Circuit: Figures 6-2 & 6-3, p. 74 Circuit: Figures 6-2 & 6-3, p. 74 – 75– 75

Program: AsynchSerial.bs2, p. Program: AsynchSerial.bs2, p. 7676

Follow checkmark instructions Follow checkmark instructions on pages 75 – 76 and page 78.on pages 75 – 76 and page 78.

Page 28: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

28 Chapter 6, Activity #2, Page 79

Program: Start with AsynchSerial.bs2Program: Start with AsynchSerial.bs2

√ √ Follow the checkmarks on page 79.Follow the checkmarks on page 79.

Page 29: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

29 Chapter 7, Activity #1, Pages 6 - 7

Pulse Width Modulation with InfraredPulse Width Modulation with Infrared

√ √ Assemble your Infrared Assemble your Infrared LED assembly as shown LED assembly as shown below.below.

Page 30: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

30 Chapter 7, Activity #1, Pages 83 - 91

Circuit: Figures 7-3 & 7-4, pp. 83-84.Circuit: Figures 7-3 & 7-4, pp. 83-84.

Program:38kHzInfrared.bs2 on page 85Program:38kHzInfrared.bs2 on page 85

√ √ Follow the Follow the checkmarks on checkmarks on pages 84 - 85.pages 84 - 85.

Page 31: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

31 Chapter 7, Activity #1, Pages 86 - 88

Object Detection with the Debug TerminalObject Detection with the Debug Terminal

Program: 38kHzInfraredWithDetect.bs2, p. 86Program: 38kHzInfraredWithDetect.bs2, p. 86

√ √ Follow instructions on pages 86 – 87.Follow instructions on pages 86 – 87.

Page 32: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

32 Chapter 7, Activity #1, Pages 89 - 90

Using the External TriggerUsing the External Trigger

Program: Program: 38kHzInfraredWithVaryingFrequency.bs2, p. 8938kHzInfraredWithVaryingFrequency.bs2, p. 89

√ √ Follow the checkmarks on pages 89 - 91.Follow the checkmarks on pages 89 - 91.

Page 33: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

33 Chapter 7, Activity #2, Pages 91 - 96

Program: DecodeSonyIrRemote.bs2, p. Program: DecodeSonyIrRemote.bs2, p. 9292

√ √ Follow the checkmark instructions on Follow the checkmark instructions on pages 91 – 92 and page 95.pages 91 – 92 and page 95.

Page 34: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

34 Chapter 8, Pages 6 - 7

Operational AmplifiersOperational Amplifiers

Schematic SymbolSchematic Symbol

Op-Amp Output Op-Amp Output with slow Slew with slow Slew RateRate

Op-Amp as a BufferOp-Amp as a Buffer

The LM358 outputs 20 mV - 3.5 V The LM358 outputs 20 mV - 3.5 V

Op-Amp Output with a Slow Slew Rate Op-Amp Output with a Slow Slew Rate

Supply Voltage Fact Supply Voltage Fact

An Op-Amp cannot An Op-Amp cannot create output signals create output signals any larger than the any larger than the voltage applied at the voltage applied at the Vcc and Vee pins, minus Vcc and Vee pins, minus “headroom.”“headroom.”

Page 35: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

35 Chapter 8, Pages 103 - 105

An Op-Amp used as a Voltage AmplifierAn Op-Amp used as a Voltage Amplifier

Inverting Voltage Inverting Voltage Amplifier CircuitAmplifier Circuit

Non - Inverting Non - Inverting Voltage Amplifier CircuitVoltage Amplifier Circuit

Gain = -Rf/RiGain = -Rf/Ri Gain = Rf/Ri + 1Gain = Rf/Ri + 1

Page 36: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

36 Chapter 1, Activity #1, Pages 6 - 7

Circuit: Figure 8-8, p. 106 and 8-9, p. Circuit: Figure 8-8, p. 106 and 8-9, p. 107107

√ √ Use 2 kΩ for Ri and 1 kΩ for RfUse 2 kΩ for Ri and 1 kΩ for Rf

Page 37: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

37 Chapter 8, Activity #1, Pages 105 - 109

Program: OpAmpExampleWithFreqout.bs2, page 109Program: OpAmpExampleWithFreqout.bs2, page 109

√ √ Follow the checkmark instructions on pages 108 and 109.Follow the checkmark instructions on pages 108 and 109.

Ri = 2 kΩRi = 2 kΩ

Rf = 1 kΩRf = 1 kΩ

Gain = Rf/Ri +1Gain = Rf/Ri +1

Gain = ½ + 1 = 1.5Gain = ½ + 1 = 1.5

Page 38: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

38 Chapter 8, Activity #1, Page 110

√ √ Follow the checkmark instructions on page 110.Follow the checkmark instructions on page 110.

Ri = 1 kΩRi = 1 kΩ

Rf = 1 kΩRf = 1 kΩ

Gain = Rf/Ri +1Gain = Rf/Ri +1

Gain = 1 + 1 = 2Gain = 1 + 1 = 2

Here, the top of the output Here, the top of the output signal is clipping because signal is clipping because the 9 V battery is nearing the 9 V battery is nearing the end of its useful lifethe end of its useful life

Page 39: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

39 Chapter 8, Activity #1, Page 111

√ √ Follow the checkmark instructions on page 111.Follow the checkmark instructions on page 111.

Ri = 1 kΩRi = 1 kΩ

Rf = 2 kΩRf = 2 kΩ

Gain = Rf/Ri +1Gain = Rf/Ri +1

Gain = 2 + 1 = 3Gain = 2 + 1 = 3

The output signal is now The output signal is now clipping severely as the clipping severely as the 9 V battery fails9 V battery fails

Page 40: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

40 Chapter 1, Activity #1, Pages 6 - 7

Circuit: Figures 8-14 and 8-15 on page 114Circuit: Figures 8-14 and 8-15 on page 114

Page 41: 1 With the Parallax USB Oscilloscope Understanding Signals With the Parallax USB Oscilloscope Presented by: Andy Lindsay Parallax, Inc. alindsay@parallax.com

41 Chapter 8, Activity #2, Pages 112 - 115

Program: OpAmpExampleWithFreqout.bs2, page 109Program: OpAmpExampleWithFreqout.bs2, page 109

√ √ Follow the checkmark instructions on page 115.Follow the checkmark instructions on page 115.

Ri = 10 kΩRi = 10 kΩ

Rf = 20 kΩRf = 20 kΩ

Gain = -Rf/Ri = 2Gain = -Rf/Ri = 2

DC Offset Applied with DC Offset Applied with PotentiometerPotentiometer