Drawing Lissajous Curves on a Oscilloscope
Lissajous curves () are two dimensional figures where the points (x,y) are defined by sine functions with different coefficients:
잠시 리자주 커브의 어원을 살펴보자면 아래와 같다.
서로 수직 방향으로 진동하는 단진동을 합성하였을 때,
그 궤도가 그리는 도형. 두 개의 진동수의 비가 유리수라면 닫힌 도형이 됨.
프랑스의 물리학자 리사주(J. A. Lissajous)가 발견하였음.
리사주 도형.
x = sin(t) //pitch가 1, phase 0.
y = sin(at+b) //위아래로 pitch가 a만큼 늘어났고, 좌우로 phase가 b만큼 shift했다.
By modifying a and b over the period t,
a wide variety of fascinating curves
can be drawn, some of which look almost 3D!
조절함으로써 a와 b를 over 주기 t너머로,
a 넓은 변수들.. of 매혹적인 커브들의
..은can be 그려질수있다, some of which 보이는 거의 3D!
For example,
if y is a sine wave that is exactly 90 degrees offset (“out of phase”) from x, the plot is a perfect circle:
예컨데,
만약 y가 sine 웨이브라면 that is 정확히 90도 오프셋인 from x로부터,
the plot은 완벽한 원이된다:
x = sin(t)
y = sin(t+pi/2) //pitch는 그대로 1, phase가 오른쪽으로 π/2 만큼 shift
-------------------------------------------------------------------------------------
In the lab,
an oscilloscope is the ideal instrument for plotting x and y coordinates. Typically, an oscilloscope will plot the voltage of an primary input
on the y axis
vs. time on the x- axis.
실험에서,
an Oscilloscope는 the 이상적 장비이다. for 그래프화하는 x와 y 좌표를.
전형적으로, an Oscilloscope는 will 그릴것이다. the 전압을 of an 초기입력의
on the Y축상에
반면 시간은(그릴것이다.) on the X축상에
----------------------------------------------------------------------------------------
However,
most oscilloscope will allow you to supply an external input
that will allow you to directly control the x axis.
We can connect a function generator to both the x and y axis
and begin to draw Lissajous patterns.
헌데,
대부분의 Oscilloscope는 will 허락할것이다. 네가 to공급하는걸an외부입력을
that will 허락할 네가 to 직접적으로 제어하는걸 the x축을.
우린 can 연결할 수 있다. a 함수발생기를 to 두 XY축에
and 시작할수있다. to 그리는걸 Lissajous Patterns를.
----------------------------------------------------------------------------------------
By shifting the frequency and phase of the signals, you can get different shapes.
However, even at the office we don’t yet have two (working) function generators which can be phase locked.
In the picture above, you can see that we’re using a HP33120A and a HP 200AB.
The 33120A has a trigger input, but no such luck for the old-school 200AB. With some fiddling, they can be brought into phase, but it’s much easier and more fun to build our own frequency generators. That’s where the DAC Shields and an Arduino come in.
---------------------------------------------------------------------------------------
The DAC Shield has inputs for positive and negative power and an output for the signal. For this exercise, we’ll be using two bench power supplies (Mastech HYB3003 and Mastech HYB3003), but you could also use two batteries.
----------------------------------------------------------------------------------------
The output of one shield is connected to the X-axis input of the ‘scope the other is connected to the Y-axis. On the Tektronix 2246 shown here, channel 1 can be set to drive the X-axis.
The trick to initially plotting a circle is to make sure that the amplitude of both axis move the cursor equal amounts, so make sure to set both “volts/div” settings the same.
-----------------------------------------------------------------------------------------
To start with a circle we simply write a program that generates a sine wave at a given frequency on channel 1 and then creates a second sine wave on channel two which is 90 degrees out of phase.
while(true):
write(channel1, sin(t));
write(channel2 sin(t+pi/2))
While this pseudo code is close, some considerations have to be made due to the discrete nature of the DAC. For instance, the resolution of the DAC will determine the value of the minimum output, zero and the maximum output. In this case we have a 12bit DAC with positive and negative supply rails at 10 V and -10V, respectively. Writing a “0″ to the DAC will result in an output of -10V. Similarly, writing “2048″ will output 0V and “4096″ will output 10V.
Thus, we need to scale our original pseudo equations:
write (channel1, (sin(t) * 2048 + 2047))
Where t = 0 would be 2047, t=pi/2 is 4096 and ….
Another consideration is the base frequency for the sine wave; this will depend on how fast you can write to the DAC and how many cycles it takes to compute the sine wave. Inserting different delays between samples of the wave generates different frequencies. For example if you the second channel is doubled in frequency from the first you will generate the following shape.
-----------------------------------------------------------------------------------
Also by increasing the phase of one the the sine wave though every iteration of the loop the figure can be animated as seen here on a Rigol MSO4050 in which we are evaluating.
Example source code and schematic for the DAC shield can be found on Github here, Also the Power DAC Shield can be purchased from Tindie.