„Kis intenzitású jelek mérése” változatai közötti eltérés

A Fizipedia wikiből
(Bevezetés)
18. sor: 18. sor:
 
$$A_{LED}=(2\cdot S_{Mean})/A_g ,$$
 
$$A_{LED}=(2\cdot S_{Mean})/A_g ,$$
 
ahol $S_{Mean}$ a számolt átlagérték, $A_g$ a gerjesztő jel amplitúdója.
 
ahol $S_{Mean}$ a számolt átlagérték, $A_g$ a gerjesztő jel amplitúdója.
</wlatex>
 
 
== Introduction ==
 
 
<wlatex>
 
The aim of this measurement exercise is to learn a measurement technique suitable for measuring signals with low intensity. During the exercise, we are measuring the light intensity of an LED using a photo element. Similarly to the myDAQ1 exercise, the LED is connected to the analog output of the DAQ card through a 10 kOhm series resistor. The voltage of the photo element is measured with the analog input of the DAQ card. The photo voltage corresponding to the light intensity of the LED is added to the background photo voltage, which is approximately a few tens of a volt produced by the ambient light in the room. The light intensity of the LED is controlled by the current flowing through the LED, while the light intensity measured by the photo element is controlled by the relative position of the LED and the photo element. A collimated light beam exits the LED, when you want to measure a high photo voltage signal, place the photo element and the LED facing each other. The easiest way to achieve small intensity is to position the photo element looking at the side of the LED, perpendicular to the light beam exiting the LED.
 
 
 
 
</wlatex>
 
</wlatex>
  
58. sor: 50. sor:
 
# A négyszögjeles meghajtás esetén használjunk Lock-in technikát a LED fényerősségének meghatározására: ehhez szükségünk van a LED-et meghajtó jelre, amit a mérőkártya másik bemenetén tudunk visszamérni. Szorozzuk össze a LED meghajtó jelét a mért fotofeszültség jellel és számítsuk ki a meghajtó jellel azonos frekvenciájú jel amplitúdóját. Az így kapott amplitúdót ábrázoljuk a felhasználói felületen a mérés indításától eltelt idő függvényében.
 
# A négyszögjeles meghajtás esetén használjunk Lock-in technikát a LED fényerősségének meghatározására: ehhez szükségünk van a LED-et meghajtó jelre, amit a mérőkártya másik bemenetén tudunk visszamérni. Szorozzuk össze a LED meghajtó jelét a mért fotofeszültség jellel és számítsuk ki a meghajtó jellel azonos frekvenciájú jel amplitúdóját. Az így kapott amplitúdót ábrázoljuk a felhasználói felületen a mérés indításától eltelt idő függvényében.
 
# Vizsgáld meg, hogy mekkora  a háttérjel és mi a legkisebb detektálható amplitúdó.
 
# Vizsgáld meg, hogy mekkora  a háttérjel és mi a legkisebb detektálható amplitúdó.
 +
 +
 +
== Introduction ==
 +
 +
<wlatex>
 +
The aim of this measurement exercise is to learn a measurement technique suitable for measuring signals with low intensity. During the exercise, we are measuring the light intensity of an LED using a photo element. Similarly to the myDAQ1 exercise, the LED is connected to the analog output of the DAQ card through a 10 kOhm series resistor. The voltage of the photo element is measured with the analog input of the DAQ card. The photo voltage corresponding to the light intensity of the LED is added to the background photo voltage, which is approximately a few tens of a volt produced by the ambient light in the room. The light intensity of the LED is controlled by the current flowing through the LED, while the light intensity measured by the photo element is controlled by the relative position of the LED and the photo element. A collimated light beam exits the LED, when you want to measure a high photo voltage signal, place the photo element and the LED facing each other. The easiest way to achieve small intensity is to position the photo element looking at the side of the LED, perpendicular to the light beam exiting the LED.
 +
 +
Start by using the NI MAX program to test the measurement layout. Use the analog output connected to the LED to generate a sinusoidal voltage signal with an amplitude greater than the opening voltage of the LED, this way the LED will flash once in every period of the sinusoidal signal. Position the light element facing the LED, then a quasi-square signal will appear in the measured photo voltage signal, which corresponds to the LED light intensity. As the LED turns on and off in every period, the photo voltage produced by the LED is the amplitude of the square signal superimposed on the baseline corresponding to the ambient light. Then, reduce the intensity by changing the position of the light element. The brightness of the LED can be measured until the amplitude of the square signal is greater than the noise of the background. The purpose of the measurement exercise is to develop a measurement program based on the principle of Lock-in detection: from the measured photo voltage signal, it filters the component that has the same frequency as the voltage signal driving the LED and determines its amplitude. This can be accomplished by driving the LED with a square signal having an amplitude greater than the opening voltage of the LED. The voltage signal measured on the photo element is multiplied with the voltage signal driving the LED and the average of this signal is calculated. If the measured photo voltage signal contains some noise with a frequency different from the frequency of the signal driving the LED, then after multiplying the measured photo voltage signal with the drive signal the noise will average out (Figure 1).
 +
 +
{|  cellpadding="5" cellspacing="0" align="center"
 +
|-
 +
| [[Fájl:LED_LockIn3.png|közép|1000px|]]
 +
|-
 +
| align="center"|Figure 1. $A_g$ amplitude of the LED drive signal, $B$ photo voltage corresponding to the ambient lights (measured when the LED is turned off), and $L$ photo voltage measured when the LED is turned on. The photo voltage corresponding to the light coming from the LED: $A_{LED} = L - B$.
 +
|}
 +
 +
The amplitude of the square signal corresponding to the light intensity coming from the LED can be calculated using the formula:
 +
 +
$$A_{LED}=(2\cdot S_{Mean})/A_g ,$$
 +
where $S_{Mean}$ is the calculated mean value, $A_g$ amplitude of the drive signal.
 +
 +
</wlatex>
 +
 +
 +
</wlatex>

A lap 2018. április 19., 14:44-kori változata

Tartalomjegyzék

Bevezetés


A mérési gyakorlat célja alacsony intenzitású jelek mérésére alkalmas technika elsajátítása. A gyakorlat során egy LED fényintenzitását mérjük meg egy fényelem segítségével. A LED-et a myDAQ1 mérés során ismertetett módon: egy 10 kOhm-os soros ellenálláson keresztül kapcsoljuk a mérőkártya analóg feszültség kimenetére. A fényelem feszültségét a mérőkártya analóg feszültség bemenetén mérjük. A terem világítása által keltett fotofeszültség néhány tized voltos, ehhez adódik hozzá a LED fényintenzitásából származó járulék. A LED fényerejét a LED-en folyó árammal tudjuk változtatni, a fényelemre eső intenzitást pedig a fényelem pozícionálásával szabályozhatjuk. A LED-ből kollimált fénynyaláb lép ki, amennyiben nagy jelet szeretnénk mérni akkor helyezzük a fényelemet és a LED-et egymással szemben. Kis intenzitás legegyszerűbben úgy érhető el ha a fényelemet úgy pozícionáljuk, hogy az a kilépő fénynyalábbra merőlegesen, a LED oldalára nézzen.

Elsőként használjuk az NI MAX programot, a mérési elrendezés tesztelésére. A LED-et meghajtó feszültség kimeneten állítsunk be egy szinuszos jelet, melynek amplitúdója nagyobb mint a LED nyitó feszültsége, így minden periódusban felvillan a LED. Pozícionáljuk a fényelemet a LED-el szemben, ekkor a mért fotofeszültség jelében megjelennek a LED fényintenzitásának megfelelő kvázi négyszögjel. Mivel a LED minden periódusban be- és kikapcsol, így a LED fényintenzitásából származó fotofeszültség megegyezik a pár tized voltos alapvonalra (háttér világítás) szuperponált négyszögjel amplitúdójával. Ezután csökkentsük az intenzitást a fényelem pozíciójának változtatásával. A LED fényerejét mindaddig mérni tudjuk, míg a négyszögjel amplitúdója nagyobb a háttér világításból származó alapvonal zajánál. A mérési gyakorlat célja, hogy készítsünk egy olyan mérőprogramot, ami a Lock-in detektálás elve alapján működik: a mért fotofeszültség jelből kiszűri a LED-et meghajtó feszültségjel frekvenciájával megegyező frekvenciájú komponenst és meghatároza annak amplitúdóját. Ezt a következőképpen valósíthatjuk meg: a LED-re kapcsoljunk négyszögjelet, aminek az amplitúdója a LED nyitófeszültségénél nagyobb. A fényelemen mért feszültségjelet összeszorozzuk a LED-et meghajtó feszültségjellel majd számítjuk az így kapott jel átlagát. Abban az esetben, ha a mért fotofeszültség jelhez a LED-et meghajtó jel frekvenciájától különböző frekvenciájú zaj adódik, a meghajtó jel és a mért fotofeszültség szorzása után ez kiátlagolódik (1. ábra).

LED LockIn3.png
1. ábra. \setbox0\hbox{$A_g$}% \message{//depth:\the\dp0//}% \box0% a LED-et meghajtó feszültség amplitúdója, \setbox0\hbox{$B$}% \message{//depth:\the\dp0//}% \box0% a háttér világításnak megfelelő fotofeszültség, amit akkor mérünk, amikor a LED nem világít, valamint \setbox0\hbox{$L$}% \message{//depth:\the\dp0//}% \box0% a LED világítása közben mért fotofeszültség. A LED fényintenzitásának megfelelő fotofeszültség \setbox0\hbox{$A_{LED} = L - B$}% \message{//depth:\the\dp0//}% \box0%.

A LED-ből származó fényintenzitásnak megfelelő négyszögjel amplitúdója az alábbi képlettel határozható meg:

\[A_{LED}=(2\cdot S_{Mean})/A_g ,\]

ahol \setbox0\hbox{$S_{Mean}$}% \message{//depth:\the\dp0//}% \box0% a számolt átlagérték, \setbox0\hbox{$A_g$}% \message{//depth:\the\dp0//}% \box0% a gerjesztő jel amplitúdója.

A mérőkártya programozása

A myDAQ1 mérés során megismert módon Task-okat kell létrehoznunk a feszültség bemenet és kimenet kezelésére. A mérés pontos időzítéséhez valamint nagy mintavételi frekvencia eléréséhez használjuk a mérőkártya belső órajelét a mintavételezés időzítésére. Ehhez a mérés vezérlésére létrehozott Task-oknak az időzítését is konfigurálni kell:

InTask = new NationalInstruments.DAQmx.Task();
InTask.AIChannels.CreateVoltageChannel("myDAQ1/ai0", "", AITerminalConfiguration.Differential, -10, 10, AIVoltageUnits.Volts);
InTask.Timing.ConfigureSampleClock("", sampleRate, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, numSamples);
analogReader = new AnalogSingleChannelReader(InTask.Stream);

Az időzítést a fenti példa kód 3. sora állítja be, az alábbi paramétereket kell megadni:

  • A mintavétel órajelének forrása, az üres string ("") a kártya belső órajelét választja ki
  • Mintavételi frekvencia
  • Az órajel felfutó vagy lefutó élére történjen a mintavételezés
  • Időzítési mód: FiniteSamples / ContinuousSamples
  • A mérendő / generálandó adatok száma

FiniteSamples: A mérés elindítása után a mérőkártya mintavételez numSamples db pontot, majd automatikusan leáll a mérés.

ContinuousSamples: A mérőkártya folyamatosan mér, az adatokat egy pufferben tárolja. A progamban biztosítani kell, hogy rendszeres időközönként kiolvassuk a mért adatokat különben a puffer megtelik és hibaüzenetet dob a kártya.

A kimenet esetében ugyan így kell beállítani a generálás időzítését. Amennyiben a kimenetet ContinuousSamples módban használjuk, akkor elegendő egyszer megadni a kártyának egy tömböt, ami tartalmazza a generálandó adatokat. Ekkor a mérőkártya elmenti azokat egy pufferben és a tomb elemeit elkezdi generálni a kimeneten. Amikor elér a tömb végére, automatikusan visszaugrik az első elemre és folyamatosan ismételi a tömbben megadott adatokat, amíg le nem állítjuk a Task-ot.

Feladatok

  1. Készíts egy oszcilloszkóp programot, ami a következő képpen működik: a start gomb megnyomására konfigurálja a mérőkártyát, hogy a felhasználó által megadott mintavételi frekvenciával mérjen megadott ideig (FintieSamples mód), majd elindítja a timer-t. Minden timer eseménykor beolvassuk a mérőkártyától adatokat és ábrázoljuk egy chart objektummal a felhasználói felületen.
  2. Egészítsd ki a programot egy analóg kimenettel: a mérés indításakor generálunk egy tömböt, amit a mérőkártya folyamatosan kiad. Ehhez célszerű a ContinuousSamples mód-ot használni, így elegendő a mérés indításakor megadni a kártyának a generálandó adatokat.
  3. Helyezzünk el egy checkbox-ot, amivel a felhasználó állítani tudja, hogy konstans feszültséggel vagy négyszögjellel akarja hajtani a LED-et.
  4. A négyszögjeles meghajtás esetén használjunk Lock-in technikát a LED fényerősségének meghatározására: ehhez szükségünk van a LED-et meghajtó jelre, amit a mérőkártya másik bemenetén tudunk visszamérni. Szorozzuk össze a LED meghajtó jelét a mért fotofeszültség jellel és számítsuk ki a meghajtó jellel azonos frekvenciájú jel amplitúdóját. Az így kapott amplitúdót ábrázoljuk a felhasználói felületen a mérés indításától eltelt idő függvényében.
  5. Vizsgáld meg, hogy mekkora a háttérjel és mi a legkisebb detektálható amplitúdó.


Introduction


The aim of this measurement exercise is to learn a measurement technique suitable for measuring signals with low intensity. During the exercise, we are measuring the light intensity of an LED using a photo element. Similarly to the myDAQ1 exercise, the LED is connected to the analog output of the DAQ card through a 10 kOhm series resistor. The voltage of the photo element is measured with the analog input of the DAQ card. The photo voltage corresponding to the light intensity of the LED is added to the background photo voltage, which is approximately a few tens of a volt produced by the ambient light in the room. The light intensity of the LED is controlled by the current flowing through the LED, while the light intensity measured by the photo element is controlled by the relative position of the LED and the photo element. A collimated light beam exits the LED, when you want to measure a high photo voltage signal, place the photo element and the LED facing each other. The easiest way to achieve small intensity is to position the photo element looking at the side of the LED, perpendicular to the light beam exiting the LED.

Start by using the NI MAX program to test the measurement layout. Use the analog output connected to the LED to generate a sinusoidal voltage signal with an amplitude greater than the opening voltage of the LED, this way the LED will flash once in every period of the sinusoidal signal. Position the light element facing the LED, then a quasi-square signal will appear in the measured photo voltage signal, which corresponds to the LED light intensity. As the LED turns on and off in every period, the photo voltage produced by the LED is the amplitude of the square signal superimposed on the baseline corresponding to the ambient light. Then, reduce the intensity by changing the position of the light element. The brightness of the LED can be measured until the amplitude of the square signal is greater than the noise of the background. The purpose of the measurement exercise is to develop a measurement program based on the principle of Lock-in detection: from the measured photo voltage signal, it filters the component that has the same frequency as the voltage signal driving the LED and determines its amplitude. This can be accomplished by driving the LED with a square signal having an amplitude greater than the opening voltage of the LED. The voltage signal measured on the photo element is multiplied with the voltage signal driving the LED and the average of this signal is calculated. If the measured photo voltage signal contains some noise with a frequency different from the frequency of the signal driving the LED, then after multiplying the measured photo voltage signal with the drive signal the noise will average out (Figure 1).

LED LockIn3.png
Figure 1. \setbox0\hbox{$A_g$}% \message{//depth:\the\dp0//}% \box0% amplitude of the LED drive signal, \setbox0\hbox{$B$}% \message{//depth:\the\dp0//}% \box0% photo voltage corresponding to the ambient lights (measured when the LED is turned off), and \setbox0\hbox{$L$}% \message{//depth:\the\dp0//}% \box0% photo voltage measured when the LED is turned on. The photo voltage corresponding to the light coming from the LED: \setbox0\hbox{$A_{LED} = L - B$}% \message{//depth:\the\dp0//}% \box0%.

The amplitude of the square signal corresponding to the light intensity coming from the LED can be calculated using the formula:

\[A_{LED}=(2\cdot S_{Mean})/A_g ,\]

where \setbox0\hbox{$S_{Mean}$}% \message{//depth:\the\dp0//}% \box0% is the calculated mean value, \setbox0\hbox{$A_g$}% \message{//depth:\the\dp0//}% \box0% amplitude of the drive signal.



</wlatex>