Other blogs on this project
My new Tek TBS1052B-EDU scope arrived recently. To demonstrate some of the features of the new scope, I’ll measure audio signals generated by the Raspberry Pi (RPi). Figure 1 shows the test set. A Windows XP computer running PuTTY and Xming will be used to communicate and control the RPi. The audio output ports of the RPi will be connected to the scope using a breakout cable. A speaker test program running on the RPi will generate test tones that will be measured on the scope.
The Tek 1052B-EDU Oscilloscope is part of the education series of scopes comes from Tektronix and provides extra features for setting up and managing electronics labs for instructors. Several software packages are provided with the scope and include:
- OpenChoice Desktop is tool for screen capture, waveforms, and controlling the scope.
- TekVISA provides connectivity using the Virtual Instrument Software Architecture (VISA) standard.
- PC Courseware Editor is a tool for creating, editing, and managing course and lab material for use with the scope.
Tek Scope Firmware Update
The TBS1052B-EDU is a dual channel 50 MHz oscilloscope with a 1.0 GS/Ss sample rate per channel. This input sensitivity ranges between 2 mV to 5/div and comes with two 50 MHz 10 MW 10x scope probes. It also has a nice large 7 inch color LCD display, and provides a lot of functions like time and amplitude cursors, math functions, and will show the FFT of the a signal   . Figure 2 shows the scope with channel 1 connected to the scope probe compensation signal.
The Read Me First instruction recommends updating the firmware of the scope. The firmware version was found to be FV:2.02 by pressing the 
Utility button than more -> more-> System Status -> Misc.
The latest version of the firmware is FV:2.52, so I copied the firmware onto a USB drive and placed it in the front USB port of the scope. The firmware update procedure is as follows:
Utility -> more -> File Utilities -> more -> Update Firmware -> Update firmware
The scope warned me not to remove the USB drive, and then after a few minutes the scope asked me to reboot so I powered it off and then back on again. The System Status shows the scope firmware version to be FV:2.52.
OpenChoice Desktop Application Installation
I did a full backup on my computer. I’ve had a VISA driver for a cheap serial port device crash my operating system in the past, so I’ve been cautious with VISA software ever since, even though this application was not involved. I installed OCD_126.96.36.199, which installed TekVISA, C++ and OpenChoice . The install program asked me to install Adobe Acrobat Reader 10.0.1 and I said no because I use Acrobat Pro V9. I had some old NI VISA driver on my computer and let the install program replace these with the TekVISA drivers. The install program asked me if I want to read the ReadMe file and I said yes even with the warning that Acrobat was required. The read me file opened just fine with Acrobat Pro 9. I finished the TekVISA install without rebooting as instructed and allowed the install program it install tool bars into Word and Excel.
The OpenChoice Desktop icon appeared on my desktop, so I ran it and then plugged in the USB cable to the scope. The Windows new hardware program detected the scope by the correct model number, so I selected the Document your work using Tektronix OpenChoice Desktop option and checked the Always perform the selected action.
The OpenChoice Desktop (OCD) then opens and provides the following options:
- Screen Capture
- Waveform Data Capture
- Get & Send Settings
The top Figure 4 shows the Screen Capture tab and the bottom shows the captured trace of the scope compensation signal. The OCD software captures and saves the screen capture as a bit map image. The captured image is of good quality and resolution. I combined the images together and added the text using Visio and saved it as a JPEG (jpg) for this posting. The JPEG compression degrades the image too much so I saved it as a TIFF file format without compression. It’s still not as sharp as the original image, however.
The top part of Figure 5 shows the Waveform Data Capture tab and the bottom part shows the beginning of the CSV file generated by the program.
The top part of Figure 6 shows the Get & Send Tab and the bottom part shows beginning of the file saved by the program. The setting of the scope for different tests can easily be saved and restored as needed.
PC Courseware Installation
I unzipped the PC Courseware package, renamed it, and copied the main directory to  
I also copied the readme and manual to this directory, and made a desktop icon for the main program. I started the Courseware Editor and create a profile under the Option pull down menu (see Figure 7).
The PC Courseware software lets an instructor create and manage courses very easily. The package links the courses together along with their associated labs. Figure 8 shows an example package I would like to create. The package will have two courses on the RaspberryPi and the EnOceanSensors. The titles of the courses are based on the requirements of the software (no special characters and the length is limited). The RaspberryPi course has one lab called the RPIAudio, and the EnOceanSensors course has one lab called the EnOceanEOP350. New labs and courses may be added to the package as they are developed.
Figure 9 shows the Package, Course, and Lab setup.
So then I created the RPiAudio Lab using the editing features of the software. Figure 10 shows the lab that was generated from the export PDF. The lab editor converts all images to display them as they would be seen on the scope. If the image, such the block diagram in this case, does not display well when pasted in the editor, then they will not display well on the scope either. It took me two or three tries to get a good looking block diagram. Converting block diagrams to JPEGs does not work well as the compression removes too much information. I used PNG files that do not compress the image. Lines need to be thickened and text needs to be 14 pt bold to display well.
I exported the whole package even though only one lab was produced (see Figure 11).
The export package files were copied to a USB drive and placed in the scope. The Utlities -> more -> Update Course function was selected with the fmndc_1052b.xpkg file selected. After a short time, the course was imported into the scope. Then I selected the Course -> RaspberryPi ->RPiAudio lab. The Overview shows up on the scope (see Figure 12) along with the procedures. Every procedure step allows the student to make a measurement and capture data.
Figure 13 shows the RPi audio output connected directly to the scope, and a left channel audio tone of 440 Hz being measured on the scope. The frequency function measures the frequency at 444 Hz and the cursors show the output is 65.5 mV peak-to-peak.
Raspberry Pi Function generator
Generating the audio signal from the RPi for the above test was very problematic at first   . A large number of errors were reported from the Advanced Linux Sound Architecture (ALSA). The errors had the form of
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
The errors were fixed by editing /usr/share/alsa/alsa.conf and commenting out all the unused pcm cards as shown below;
The pcm.front cards.pcm.front was also commented out and the pcm.front cards.pcm.default was added to correct another error.
Next, the ALSA refused to connect to the pulseaudio program and had an error message of the form:
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
So I uninstalled ALSA and pulseaudio and reinstalled them.
sudo apt-get purge pulseaudio pulseaudio-utils alsa-base alsa-utils
sudo apt-get install alsa-base alsa-utils pulseaudio pulseaudio-utils
The audio output was selected to use the audio jacks instead of defaulting to the HDMI cable using the following command
sudo amixer cset numid=3 1
Then the speaker test commands worked without producing errors and generated outputs to measure on the scope.
Left speaker: speaker-test -t sine -f 440 -c 2 -s 1
Right speaker: speaker-test -t sine -f 440 -c 2 -s 2
The audio output ports are sensitive to the type of attached cable. I used some high-end audio cables made from coax cable and the output oscillated so non-coax audio cables were used. I also wrote an interactive audio function generator in Mathematica but could not get the EmitSound and Play functions to produce sounds on the RPi . If I figure out what the problem is, then I’ll post a blog about it sometime later.
In summary, the Tek 1052B-EDU is a dual channel 50 MHz oscilloscope that is easy to use, hosts lots of useful features, and provides some interesting education tools for students and teachers. The OpenChoice Desktop program allowed me to make screen captures and capture waveforms for inclusion in this blog. The PC Courseware Editor let me produce a lab for a course and load it into the scope to test the audio output of the RPi. The combination makes for a very powerful set of tools.
The video below show the unboxing and short demonstrations of the Tek 1052B-EDU and the EnOcean EOP-350 UPB.
 tek.com, OpenChoice Desktop Application TDSPCS1, V2.4
 tek.com, PC Courseware Editor Software, V1.0
 tek.com, PC Courseware Editor User Manual
 cagewebdev.com, Raspberry Pi – getting audio working
 raspberypi-spy.co.uk, Raspberry Pi Command Line Audio
 raspberypi-spy.co.uk, Raspberry Pi Model B+ 3.5mm Audio/Video Jack
 wolfram.com, Does sound work on the Raspberry Pi?