Build a cheap oscilloscope and sensor probes for physics experiments in school Wichit Sirichote, kswichit@kmitl.ac.th Physics Department, Faculty of Science King Mongkut's Institute of Technology Ladkrabang, Bangkok THAILAND Rev. 1.0, April 19, 2014 Programme ● ● Day 1 – Morning: basic oscilloscope, introducing a cheap oscilloscope, basic operations – Afternoon: assemble the oscilloscope and voltage probe, learn how to use trigger mode and hands on experiments Day 2 – Morning: basic of sensor probes, using sensor probes with the oscilloscope – Afternoon: assemble the probes, and test the probe for many labs – Discussions and summary What is oscilloscope? An oscilloscope is a laboratory instrument commonly used to display and analyze the waveform of electronic signals. In effect, the device draws a graph of the instantaneous signal voltage as a function of time. http://whatis.techtarget.com/definition/oscilloscope 3 Cathode Ray Tube (CRT) scope http://www.williamson-labs.com/scope-main.htm 4 Digital Storage Oscilloscope, DSO http://en.wikipedia.org/wiki/Digital_storage_oscilloscope 5 Vibrations and Waves http://ocw.mit.edu/courses/physics/8-03-physics-iii-vibrations-and-waves-fall-2004/ 6 7 Waves A wave is a disturbance that travels through a medium from one location to another. A wave is the motion of a disturbance. ● Mechanical wave: sound, Seismic waves ● Electrical wave: voltage, current ● Magnetic wave: magnetic field ● Electromagnetic wave: Light ● Human heart wave: ECG or EKG http://ocw.mit.edu/courses/physics/8-03-physics-iii-vibrations-and-waves-fall-2004/ 8 Using oscilloscope to display waves Sound probe Voltage signal The sound probe built with condenser microphone converts sound wave to electrical signal. The scope can display the waveform of sound pressure. 9 JYE Tech DIY oscilloscope DIY(Do It Yourself) Schematic and firmware are available for educational use DSO 062 1Channel, 1MHz, 20MSample/s http://www.jyetech.com/ 10 DSO 062 : front view 11 DSO 062 block diagram ADC Input signal MEGA64 Amplifier AVR Microcontroller 128x64 pixels Graphic LCD ADC: high speed analog-to-digital converter 12 Hardware schematic DSO 062 oscilloscope 13 Specifications ● Maximum equivalent-time sampling rate 20MSa/s ● Maximum real-time sampling rate - 2MSa/s ● Resolution - 8 bits ● Record length - 256 bytes ● Analog bandwidth - 1MHz ● Vertical sensitivity - 100mV/Div - 5V/Div ● Vertical position adjustable with indicator ● Input impedance - 1M ohm ● Max input voltage - 50Vpk 14 ● DC/AC/GND input coupling ● Horizontal - 0.5us/Div - 10m(minute)/Div ● Auto/Normal/Single trig modes ● Rising/Falling edge trigger ● External trig available ● Trigger level adjustable with indicator ● Hold/run feature ● Save/recall up to 6 captures ● FFT function available - size of 256 points and 512 points selectable, sampling rate of 1Ksps to 2Msps selectable 15 Cheap oscilloscope: renovate the DSO 062 ● Bigger display 128x64 Graphic LCD ● Add RCA jack for +5V sensor probe and trigger input ● Big size push buttons ● Add sensor probes for school lab ● 1500THB (scope) + 500THB (sensors) 16 AVR MEGA64 Microcontroller & ADC & Keypad & LCD 17 Amplifier & Power supply 18 Board layout 19 AVR MEGA64 Microcontroller & ADC 20 Preamplifier TL084 & NE5532 21 Negative power supply & reference voltage 22 Break Handmade acrylic box 23 Blue Scope with DIY sensor probes 24 Set in the box: scope & sensors 25 Voltage probe alligators Shrink tube RCA jack Black wire Red wire 50cm stereo shield cable 26 Power supply: AC adapter 9V AC adapter +9V 300mA 27 HOLD/RUN state Vertical position Coupling Y-scale X-scale Trig-mode Trig-source Window position Trigger-edge Screen layout and indicators Trigger-level 28 T(period)=4 div=4x5ms=20ms frequency=1/ T, 1/20ms = 50Hz X scale has10 Divisions, 1 division= 5 points, 1 point= 0.229 Amplitude=4div=4x5V=20Vpk-pk Y scale has 6 Divisions, 1 division= 5 points, 1 point= 0.2 30 RCA input terminal Multi-Function Terminal, MFT. 1. 500Hz test signal Channel 1 input 2. Ext.Trigger input (White color) 3. Trigger output +5V power supply for (Yellow color) 31 sensors (Red color) Input signal slide switches Y scale per division Input signal coupling types AC or DC Select frequency meter 32 LCD display contrast adjustment POT LCD contrast adjustment 33 Keypad layout Main function Sub function 34 Keypad Functions Select triggering modes, with key + and 1. AUTO 2. NORMAL 3. SINGLE AUTO This trigger mode allows the oscilloscope to acquire a waveform even when it does not detect a trigger condition. NORMAL The Normal mode allows the oscilloscope to acquire a waveform only when it is triggered. If no trigger occurs, the oscilloscope will not acquire a new waveform. SINGLE The Single mode allows the oscilloscope to acquire one waveform, and the trigger condition is detected. The display will be in HOLD state. 35 FFT, Fast Fourier Transform Press key MODE and hold for 2-3 seconds, the FFT display will be displayed. FFT scope 50Hz sinewave Time domain display 50Hz sinewave Frequency domain display 36 Original waveform Fundamental Frequency FFT 2nd harmonic rd 3 harmonic 37 Sec/Div: select time scale for second/division. Use key + or – to adjust from 0.5 microsecond to 10minutes. Toggle between RUN mode or HOLD state. Vertical Position: adjust waveform position in vertical up or down with key + or -. Save waveform to memory in HOLD state. 38 Horizontal Position: adjust waveform position in horizontal with key + or -. Select FFT size 256 or 512 points. Select triggering edge, positive going or negative going. Display waveform that saved in memory. Adjust trigger level with key + or -. Send BMP file of LCD screen to serial port, 38400 8n1 with XMODEM protocol. 39 Press level key also selects the function of Multi-Function Terminal by indicating the single letters “i”, “e” and “o”. Indicator i e o Trigger Source Test Signal Trig Output Internal External Internal Enabled Disabled Disabled Disabled Disabled Enabled 40 Basic operation Connect the signal input to TEST signal. Press LEVEL key to select internal triggering source. (shown i ) Question1: What is the frequency of this signal? 41 TEST signal is square waveform. It can be measured by the frequency meter directly. Slide the 3rd switch to Freq. Position. The readout will show 500Hz. 42 Aliasing Apparent lowfrequency waveform due to aliasing Aliasing occurs when the oscilloscope does not sample the signal fast enough to construct an accurate waveform record. When aliasing happens, you see a waveform with a frequency lower than the actual waveform being input or a waveform that is not stable even though the oscilloscope triggered. 43 One way to check for aliasing is to slowly change the horizon scale with the SEC/DIV then press key -. If the shape of the waveform changes drastically, you may have aliasing. To display a signal accurately and avoid aliasing, you must sample the signal more than twice as fast as the highest frequency component. 44 Afternoon hands on exercise ● Assemble the scope ● Play with basic scope operations – Build a voltage probe – Learn Triggering modes: AUTO, NORMAL, SINGLE – Measure period, amplitude, and frequency – Learn FFT mode – Adjusting display position – waveform saving, displaying waveform – Discussions 45