Changes
Created page with 'The '''Lab-in-a-Box''' is an introductory electrical engineering project kit and accompanying textbook. It includes a breadboard called the A&D or "ANDY" board. …'
The '''Lab-in-a-Box''' is an introductory electrical engineering project kit and accompanying textbook. It includes a [[w:Breadboard|breadboard]] called the A&D or "ANDY" board.
=ANDY Board=
The ANDY board has ±9V and +5V sources, clock signal, sine/square wave signal generator, 16 dipswitches, 16 LEDs, and two pushbutton switches. The dipswitches and LEDs are used for digital applications in [[Introduction to Computer Engineering]]. The signal generator is for RC circuits in the [[Electric Circuit Analysis Laboratory]].
=Parts Kit=
The parts included with the kit include resistors, capacitors, inductors, light emitting diodes, and a handful of integrated circuits including operational amplifiers, and digital logic chips.
=Software Oscilloscope on Linux=
While [[xoscope]] or the Lab-in-a-Box attenuator circuit could use some tweaking to work out of the box together, xoscope can be readily modified to display scaled maximum, minimum and peak-to-peak values. The first step is to obtain the program source code. On a Debian-based systems like Ubuntu, just run <code>sudo apt-get source xoscope</code>.
Once the source has been downloaded and unpacked, edit <code>sc_linux.c</code> to use <code>/dev/dsp1</code> rather than <code>/dev/dsp</code>:
<pre>
sed -ir 's%(#define SOUNDDEVICE "/dev/dsp)(")%\11\2%'
</pre>
Next, modify the display code in <code>display.c</code> to display a scaled value. Around line 186, change the code to read something like the snippet below. Use your multimeter to measure the the RMS voltage, calculate the peak-to-peak that should be displayed and tweak the divisor, re-compile and re-run until the value is correct.
<pre>
else
sprintf(string, " Max:%f - Min:%f = %f Pk-Pk ",
(float)stats.max / 3.2, (float)stats.min / 3.2,
((float)stats.max - (float)stats.min) / 3.2 );
gtk_label_set_text(GTK_LABEL(LU("min_max_label")), string);
</pre>
To compile the modified source, simply run <code>make</code>. To run the newly compiled binary, run <code>./xoscope</code>. Refer to the [[xoscope article]] for instructions on using the scope.
=ANDY Board=
The ANDY board has ±9V and +5V sources, clock signal, sine/square wave signal generator, 16 dipswitches, 16 LEDs, and two pushbutton switches. The dipswitches and LEDs are used for digital applications in [[Introduction to Computer Engineering]]. The signal generator is for RC circuits in the [[Electric Circuit Analysis Laboratory]].
=Parts Kit=
The parts included with the kit include resistors, capacitors, inductors, light emitting diodes, and a handful of integrated circuits including operational amplifiers, and digital logic chips.
=Software Oscilloscope on Linux=
While [[xoscope]] or the Lab-in-a-Box attenuator circuit could use some tweaking to work out of the box together, xoscope can be readily modified to display scaled maximum, minimum and peak-to-peak values. The first step is to obtain the program source code. On a Debian-based systems like Ubuntu, just run <code>sudo apt-get source xoscope</code>.
Once the source has been downloaded and unpacked, edit <code>sc_linux.c</code> to use <code>/dev/dsp1</code> rather than <code>/dev/dsp</code>:
<pre>
sed -ir 's%(#define SOUNDDEVICE "/dev/dsp)(")%\11\2%'
</pre>
Next, modify the display code in <code>display.c</code> to display a scaled value. Around line 186, change the code to read something like the snippet below. Use your multimeter to measure the the RMS voltage, calculate the peak-to-peak that should be displayed and tweak the divisor, re-compile and re-run until the value is correct.
<pre>
else
sprintf(string, " Max:%f - Min:%f = %f Pk-Pk ",
(float)stats.max / 3.2, (float)stats.min / 3.2,
((float)stats.max - (float)stats.min) / 3.2 );
gtk_label_set_text(GTK_LABEL(LU("min_max_label")), string);
</pre>
To compile the modified source, simply run <code>make</code>. To run the newly compiled binary, run <code>./xoscope</code>. Refer to the [[xoscope article]] for instructions on using the scope.