NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

JDK1.0.2 simulations (1996-2001) => Electromagnetics => Topic started by: Fu-Kwun Hwang on January 29, 2004, 09:43:07 pm



Title: Basic Function of an Oscilloscope
Post by: Fu-Kwun Hwang on January 29, 2004, 09:43:07 pm
(http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=dlattach;topic=34.0;attach=4087;image)

Like a televison screen, the screen of an oscilloscope consists of a cathode ray tube. Although the size and shape are different, the operating principle is the same. Inside the tube is a vacuum. The electron beam emitted by the heated cathode at the rear end of the tube is accelerated and focused by one or more anodes, and strikes the front of the tube, producing a bright spot on the phosphorescent screen.

The electron beam is bent, or deflected, by voltages applied to two sets of plates fixed in the tube. The horizontal deflection plates, or X-plates produce side to side movement. As you can see, they are linked to a system block called the time base. This produces a sawtooth waveform. During the rising phase of the sawtooth, the spot is driven at a uniform rate from left to right across the front of the screen. During the falling phase, the electron beam returns rapidly from right ot left, but the spot is 'blanked out' so that nothing appears on the screen.

In this way, the time base generates the X-axis of the V/t graph.

The slope of the rising phase varies with the frequency of the sawtooth and can be adjusted, using the TIME/DIV control, to change the scale of the X-axis. Dividing the oscilloscope screen into squares allows the horizontal scale to be expressed in seconds, milliseconds or microseconds per division (s/DIV, ms/DIV, µs/DIV). Alternatively, if the squares are 1 cm apart, the scale may be given as s/cm, ms/cm or µs/cm.

The signal to be displayed is connected to the input. The AC/DC switch is usually kept in the DC position (switch closed) so that there is a direct connection to the Y-amplifier. In the AC position (switch open) a capacitor is placed in the signal path. As will be explained in Chapter 5, the capacitor blocks DC signals but allows AC signals to pass.

The Y-amplifier is linked in turn to a pair of Y-plates so that it provides the Y-axis of the the V/t graph. The overall gain of the Y-amplifier can be adjusted, using the VOLTS/DIV control, so that the resulting display is neither too small or too large, but fits the screen and can be seen clearly. The vertical scale is usually given in V/DIV or mV/DIV.

The trigger circuit is used to delay the time base waveform so that the same section of the input signal is displayed on the screen each time the spot moves across. The effect of this is to give a stable picture on the oscilloscope screen, making it easier to measure and interpret the signal.

Changing the scales of the X-axis and Y-axis allows many different signals to be displayed. Sometimes, it is also useful to be able to change the positions of the axes. This is possible using the X-POS and Y-POS controls. For example, with no signal applied, the normal trace is a straight line across the centre of the screen. Adjusting Y-POS allows the zero level on the Y-axis to be changed, moving the whole trace up or down on the screen to give an effective display of signals like pulse waveforms which do not alternate between positive and negative values.
The above information are quoted from http://www.doctronics.co.uk/scope.htm


This java applet shows the basic functions of an oscilloscope.
The oscilloscope is an electronic instrument widely used in making electrical measurements.
The main component of the oscilloscope is the cathode ray tube (CRT).
The CRT is a vacuum tube in which electrons are accelerated and deflected under the influence of electric field. The electrons are deflected in various directions by two sets of plate placed at right angle to each other in the neck of the tube.
Signal for the horizontal deflection plate (X-axis) is generated by the scope
It mathematic form is Fx(t)= C t + D (default)
C : time scale
D : horizontal offset
The external signal (need to be measured) is applied to the vertical deflection plate (Y axis).
The default form for this java applet is Fy(t)=A sin(w t + B)
    You can change X or Y axis signal to either kind of signal.

It can be operated in different mode



X = C t + DX = A sin( w t + B)
Y = A sin(w t + B)default modeLissajou's figure
Y = C t + Dnot supported for an oscilloscope


For parameter B please enter value in degree.
Click within one of the knobs and drag the mouse button clockwise/countercolockwise to change values for Time/Div, Volt/Div , yOffset and xOffset.

For example: You can produce Lissajou's figure:


Title: The Applet of the oscilloscope
Post by: Jeanke on February 24, 2005, 07:17:38 pm
Hi,

is it possible to download this applet?
I'm very interested, because I have to make an end work for school.

Greetz,

Jeanke


Title: topic34
Post by: Fu-Kwun Hwang on February 25, 2005, 06:58:39 am
You will find "GET APPLET FILES' button at the end of the first posted message if you are a registered user and login to the system.
When you click the button, you will get files related to the applet in your email.


Title: topic34
Post by: bobsmith on May 03, 2005, 06:29:05 pm
is possible to actually obtain the code for this in *.java format?


Title: topic34
Post by: Fu-Kwun Hwang on May 04, 2005, 07:06:58 am
You shpuld have received in your email account.
 However it was written many years ago with JDK1.0.2.
You might need to make some change to make it works with current verison JDK.


Title: Oscope
Post by: mcbeeone on October 24, 2005, 08:18:46 am
This is a very nice demo.  I think I shall have my students try it BEFORE I let them touch the real thing.  :)


Title: Re: Basic Function of an Oscilloscope
Post by: abby on September 30, 2007, 04:27:16 am
than you sir for this demo


Title: Re: Basic Function of an Oscilloscope
Post by: raktekan on November 04, 2007, 04:37:42 pm
thank you


Title: Re: topic34
Post by: jack on November 20, 2007, 12:47:04 pm
is possible to obtain the code for this in *.java format?


Title: Re: Basic Function of an Oscilloscope
Post by: Fu-Kwun Hwang on November 20, 2007, 07:43:20 pm
Could you let me know why you need the source code?


Title: Re: Basic Function of an Oscilloscope
Post by: jack on November 26, 2007, 04:05:52 pm
i need it for a project to my students


Title: Re: Basic Function of an Oscilloscope
Post by: Fu-Kwun Hwang on November 26, 2007, 07:50:55 pm
You should have received the source code now. However, could you tell me what you want to do with it?
Is there something need to be improved for the applet?
Let me know and may be I can help.


Title: Re: Basic Function of an Oscilloscope
Post by: DolphinDream on December 27, 2007, 11:30:16 pm
Hi, I was wondering...maybe you can help me with similar program. I need to make a program that calculates frequency of, how i say it in english, coinciding of two frequencies.
For example if i had two frequencies in Hz:
__|'''''|____|'''''|____|'''''|____|'''''|____
__|''''''''|______|''''''''|______|''''''''|____
I need a program that calculates frequency when both of them are '''''.
 ;D


Title: Re: Basic Function of an Oscilloscope
Post by: Fu-Kwun Hwang on December 29, 2007, 09:03:37 am
Are you talking about the beat product from two very close frequency signal?


Title: Re: Basic Function of an Oscilloscope
Post by: DolphinDream on January 07, 2008, 06:43:34 pm
Are you talking about the beat product from two very close frequency signal?

Yes, i think so... i need a program that calculates frequency...if i put two frequencys ontop eachother, then in what frequency they are at same point (that is at max).


Title: Re: Basic Function of an Oscilloscope
Post by: Fu-Kwun Hwang on January 07, 2008, 09:15:40 pm
Assume one of them is y=y0 *sin(w*t) another one is y=y0 *sin((w+dw)*t)
And add those two wave together y=y0 *sin(w*t)+y0 *sin((w+dw)*t)
Work out the mathematics, you can find out when you will get maximum (or minimum)...


Title: Re: Basic Function of an Oscilloscope
Post by: farrukh on October 24, 2008, 03:41:19 am
can i pls get the source code
thx


Title: Re: Basic Function of an Oscilloscope
Post by: Fu-Kwun Hwang on October 24, 2008, 08:07:47 pm
You can find the source code as attachment of the first message.
It was written almost 10 years ago with JDK1.0.2
Some code might need to be modified to use with latest JDK.


Title: Re: Basic Function of an Oscilloscope
Post by: chatria on October 25, 2008, 01:54:41 pm
hello Prof. Fu-Kwun Hwang
   
What is the offset? Referring to the oscilloscope, and also in general terms I would like to know its meaning, for example, I have heard this term in electronica

 
thank you


Title: Re: Basic Function of an Oscilloscope
Post by: Fu-Kwun Hwang on October 26, 2008, 09:29:02 am
I do not fully understand what is the "offset" you are talking about?

Do you mean the DC voltage component in the Y axis?

I would not be able to help if I do not understand your question.


Title: Re: Basic Function of an Oscilloscope
Post by: arufuredo on August 10, 2009, 02:11:26 am
the file that i download is oscilloscope.rar. Inside this rar file, there is only oscilloscope.class and knob.class. May i know where can i download oscilloscope.java , which is the original source code?  i am currently doing my final year project on a website that introduce the school oscilloscope and this applet is very useful to me. i have some experience with java , and i hope i can get the java file and modify it to introduce more controls of the oscilloscope.  This is the link to the current oscilloscope website of my school  , http://www3.ntu.edu.sg/home/askklee/scope/ .

someone please sent the code to my email , arufuredo2@msn.com


Title: Re: Basic Function of an Oscilloscope source code
Post by: Fu-Kwun Hwang on August 10, 2009, 09:01:43 am
Please download the source code (attachement file of the first message) by yourself.


Title: Re: Basic Function of an Oscilloscope
Post by: arufuredo on August 10, 2009, 12:55:22 pm
sorry for my mistake, i finally spotted the oscilloscope.java file. May i suggest including the oscilloscope.java file inside the oscilloscope.zip so that it is easier to find instead of having to download them separately?


Title: Re: Basic Function of an Oscilloscope
Post by: Rare on October 04, 2009, 08:42:22 pm
This simulation show this objective 8) "Computer simulations, or demonstrations using a cathode-ray oscilloscope, are powerful methods of demonstrating alternating currents {( deduce that the mean power in a resistive load is half the maximum power for a sinusoidal alternating current), ( represent a sinusoidally alternating current or voltage by an equation of the form x = x_osinωt), is it? Correct? ???Thank you very much


Title: Re: Basic Function of an Oscilloscope
Post by: Fu-Kwun Hwang on October 04, 2009, 11:01:25 pm
No. The purpose of the simulation is to show how the oscilloscope work -- what are the signal of x/y component look likes.
The signal in the x compinent is sawtooth shap -- to represent the time.
The oscilloscope show the signal as a function of time.

When two signals are feed to x/y simultaneously, you will find Lissajou's curve (http://en.wikipedia.org/wiki/Lissajous_curve).

And it can be used to teach student how to operate an oscilloscope (basic function), too.


Title: Re: Basic Function of an Oscilloscope
Post by: cdurfee on January 29, 2010, 08:05:35 pm
This is a nice applet. One suggestion is to have a mode which is slightly more realistic where the time/div and volts/div are incremental (and have the same units) in the same way as on a real scope. Also, on a real scope there would be a knob for moving the trace vertically (moving the ground reference) as well as a voltage offset. 


Title: Re: Basic Function of an Oscilloscope
Post by: Fu-Kwun Hwang on January 29, 2010, 10:38:04 pm
Thank you for your suggestions.
There are many different kinds of oscilloscope.
Yes. There are many oscilloscopes which the time/div and volts/div knobs are fixed steps.
However, there are also digital oscilloscopes which the time/div and volts/div knobs can be adjusted continuously.

The above simulation already provide a yoffset knob for moving the trace vertically.

The purpose for the above simulation is to help user understand how the trace of the oscilloscope was formed.
That is why it provide options for users to select types of X/Y functiona: A sin(wt+B) or C t +D


If you need a simulation which is very similar to the one you are using. I will try to create one for you if you can provide a picture of the oscilloscope need to be simulated.


Title: Re: Basic Function of an Oscilloscope
Post by: nolkelvin on February 22, 2011, 12:45:03 am
I have downloaded, but it's not working for offline


Title: Re: Basic Function of an Oscilloscope
Post by: ahmedelshfie on February 22, 2011, 01:05:18 am
You have to choose first download file after you hit by mouse Get files for offline use
After finish download unzip the file you will be already to access applet in your PC.
The download offline is work normal  ;)


Title: Re: Basic Function of an Oscilloscope
Post by: Fu-Kwun Hwang on February 22, 2011, 08:20:59 am
I have downloaded, but it's not working for offline

There is no way to help you if you did not tell us what you did with the download file?
Is there any error message,...etc.
We do not know how to help if you just said it's not working.

Try to unzip downloaded file,then open html file with your browser.


Title: Re: Basic Function of an Oscilloscope
Post by: lookang on March 24, 2011, 10:32:44 pm
this is a good jdk simulation of the Cathode Ray Oscilloscope (CRO).

will there be an Ejs version soon? i don't think anyone has made one in Ejs yet.
for your consideration  ;D



btw i found some java applet here
http://www.phys.hawaii.edu/~teb/java/ntnujava/oscilloscope/oscilloscope.html by hwang@phy03.phy.ntnu.edu.tw
http://www.ece.ncsu.edu/virtuallab/JAVA/applets/osc.html by daniel hoag and erwin d'souza copyirght NC state university
http://www.csupomona.edu/~pbsiegel/gsix/oscilloscope.htm by Peter Siegel California State Polytechnic University

the learning objective is
Determine the frequency of sound using a calibrated C.R.O.

Determination of frequency of sound using a calibrated C.R.O.

•   Sound are longitudinal waves of compressions and rarefactions through a physical medium, for example air.

•   The frequency of the sound waves from a given source could be determined using a calibrated cathode-ray oscilloscope (C.R.O.) as follows:

-   the source of sound e.g. a loud speaker is placed a short distance from a microphone connected to a calibrated C.R.O. as shown.
-   The time base of the C.R.O. is adjusted until a stationary trace is obtained.
-   The period of the sound wave is given by the product of the length of one wave cycle and the time base setting.
-   The frequency of the wave is the reciprocal of the period.


Title: Re: Basic Function of an Oscilloscope
Post by: Fu-Kwun Hwang on March 27, 2011, 03:24:58 pm
Here is the EJS version of the same applet


Title: Re: Basic Function of an Oscilloscope
Post by: lookang on March 27, 2011, 11:10:10 pm
awesome!

will study it and remix it soon  ;D

thanks!


Title: Re: Basic Function of an Oscilloscope
Post by: mike1966 on June 15, 2011, 01:38:19 am
Thank you for all.
You are very helpful. I enjoy your work and you make me more comfortable in the classroom.
Michael Petropoulos
Patras, Hellas
 :) :) :) :)


Title: Re: Basic Function of an Oscilloscope
Post by: MelissaDaisy99 on June 22, 2011, 02:26:07 pm
Well, great work! You have helped me to improve my knowledge about this field. Thank you so much for sharing.

-*-


Title: Re: Basic Function of an Oscilloscope
Post by: kwinter on February 20, 2012, 11:31:21 pm
I downloaded the ZIP files.  After un-zipping, I have the following files:
        back                                GIF Image   
        index                           Chrome HTML Document   
   knob.class                        CLASS File   
   oscilloscope.class                CLASS File   
   oscilloscope   Chrome           HTML Document   
   oscilloscope_kr                Chrome HTML Document   
   oscilloscope_s                Chrome HTML Document   
   sample                        GIF Image   
   scope                                GIF Image   
My problem is that I don't know what to do next.  Also, what version of JAVA do I need?
Any help?
Thanks,
Ken Winter


Title: Re: Basic Function of an Oscilloscope
Post by: Fu-Kwun Hwang on February 21, 2012, 10:07:21 am
Double click index.html to open it or use your browser open file and select index.html file.

Any version of java will do since it was created with JDK1.0.2 !


Title: Re: Basic Function of an Oscilloscope
Post by: lookang on October 05, 2012, 02:05:32 pm
Here is the EJS version of the same applet


dear prof!
i solved a bug
please replace the following line in the code.

// yfun2="("+yfun+")/vdiv+v0";
yfun2="("+yfun+")/vdiv*dy+v0";

missing dy :)
thanks again for advancing the world of physics education.


Title: Re: Basic Function of an Oscilloscope
Post by: koclup1580 on December 29, 2012, 01:12:30 pm
 thank you so much.  :)
-*-


Title: Re: Basic Function of an Oscilloscope
Post by: tcruise7771 on March 31, 2013, 03:27:56 pm
Is it possible for you to modify the code to be able to use the input of the audio in of the microphone as a signal input and thus capable of displaying syne waves and frequency of the input signal ?


Title: Re: Basic Function of an Oscilloscope
Post by: diinxcom on January 30, 2015, 08:17:43 pm
-*-
I am very interested because I have to make an end work for schools.
Thanks :)