Source: https://wiki.analog.com/university/tools/m1k/alice/desk-top-users-guide
Timestamp: 2019-04-18 22:24:28+00:00

Document:
This version (15 Apr 2019 21:27) was approved by dmercer.The Previously approved version (27 Jul 2018 19:35) is available.
This document serves as a User’s Guide for the ALICE Desktop software interface written for use with the ADALM1000 active learning kit hardware. If you are looking for ALICE for the ADALM2000 (M2K) look here.
Hopefully, through the use of this software along with the ADALM1000 active learning kit hardware, Students can explore the strange and wondrous world of Circuits, Electronics and Electrical Engineering.
X-Y display for plotting captured voltage and current vs voltage and current data as well as voltage waveform histograms.
DC Ohmmeter, measures unknown resistance with respect to known external resistor or known internal 50 ohms.
The ALICE Desktop program is written in Python and if run from the source code requires version 2.7.8 or greater of Python be installed on the user’s computer. The program only imports modules generally included with standard Python installation packages.
Windows users who do not wish to install Python and the other required software packages can install the standalone executable from here.
The installer should include all required packages but not the USB device drivers for the ADALM1000. The drivers can be installed by installing the Libsmu library and clicking on the install WinUSB driver box when prompted. If you encounter any issues, the Visual Studio 2015 runtime library may need to be installed which can be downloaded from this Microsoft web page.
Run the alice-desktop-1.1-setup.exe or alice-desktop-1.2-setup.exe installer program. ALICE desktop opens and saves info and data to various files in the installation directory. Because of user permission issues with some installations of Windows you may need to install the software in a directory other than the default “Program Files”. C:\ALM Software\ would be a good second choice. The installer adds desktop icons for each tool in the suite. Alternatively, under the properties for the icons, you can change the directory the program(s) start in.
Most releases of the Linux operating system have Python included and many also include the numpy numerical package as well. Linux ( including Raspberry Pi ) and OSX users must manually compile libsmu/pysmu. Directions on how to manually install Numpy can be found here.
Note: ALICE Desktop 1.1 requires the older 0.89 version of libsmu. The Windows executable contains the proper version of libsmu. To run from source code you need to have version 0.89 installed.
Note: The source code for ALICE desktop 1.2 requires libsmu version 1.0. To run from source code you need to have version 1.0 installed.
To manually install on Windows download either, libsmu-setup-x86.exe or libsmu-setup-x64.exe, depending on your Python installation, from the libsmu page on GitHub. When prompted be sure to select installing pysmu for Python as well.
OS X and Linux users will currently have to compile their own version of libsmu.so from the libsmu source in GitHub. The command(s) to make things are shown in the GitHub Readme. You will also need the development version of python installed (apt-get install python2.7-dev).
Run `cmake -DBUILD_PYTHON=ON -DCMAKE_INSTALL_PREFIX=/usr/local/ .`, for the documented `cmake` step for libsmu on github.
Run dos2unix on the alice-desktop-1.1.pyw script.
Edit alice-desktop-1.1pyw for the #! to point at your homebrew python and not /usr/bin/python.
The last step may be needed to getting rid of “pysmu not found” error. You may also try updating your PATH so homebrew python will be found first and set PYTHONPATH, but possibly not needed.
Be sure that the ALM1000 board is plugged into a USB port before starting the program. Once the program is running the main window, as shown in figure 1, should appear. This is the main desktop window and serves as the Oscilloscope Tool Window as well as controls for opening the other display windows and certain common control functions. It is sub divided into 4 sections.
Many of the drop down menus on the main oscilloscope screen and the screens for the other instruments include accelerator keys, indicated by  around the accelerator keyboard character next to the menu item. Typing one of these characters while the mouse cursor is inside the graphics drawing area will invoke that menu function. For example typing 1 or 2 will toggle on and off the CA-V and CB-V traces.
The Green Conn button in the top row indicates that a ALM1000 board is connected and ready to go. If the button is red and says Recon then a ALM1000 board was not found. Connect board and click on the button to connect to board.
It is possible to save the graphics display area to an encapsulated postscript file (.eps). This is used to save a graphics file to be included in another program like a word processor to write a Lab report. It is also possible to save the captured channel A and B voltage and current signal data to a coma separated values file (.csv). For most Time/Div settings the number of sample points is 2 screen widths with a minimum of 2,000 samples and a maximum of 90,000. This saved table of raw sample values can then be loaded into other programs for analysis such as a spreadsheet program or numerical processing program like MATLAB, or Octave. Similarly, it is possible to load in trace data into the channel A and B voltage and current signal data buffers from a saved csv file. This only works when stopped. If the green Run button is pressed new data is captured over writing the data that was loaded from the file.
The Graphics display area can be drawn with either a Black (default) or White background. Use these two buttons to select which is used. The last option button starts the self calibration procedure. See later section for more details.
The CA and CB measure drop down menus, figure 3, list which vertical measurements for the Channel A and B voltage and current signals are to be displayed along the bottom of the graphics display area.
CA-CB and CB-CA differences of the Average ( DC ) voltage values of the channels.
Figure 3g shows examples of many of the possible waveform measurements. Six of the vertical measurements are derived directly from the waveform data array. These are Avg, Min, Max, Top, Base and RMS. The rest are calculated from these six. P-P is obviously Max – Min. Mid is (Max + Min / 2). CA-CB is CA Avg – CB Avg.
The Math menu button, figure 4, opens a control screen that lists which sample point by sample point calculated waveform combining the Channel A and B voltage and current signals is to be displayed vs time.
The first three calculations result in voltages and share the corresponding left side voltage scale on the display grid. The two current differences result in a current and share the corresponding right side current scale on the display grid. The two product waveform calculations result in mW and share the corresponding right side scale on the display grid. The two voltage over current waveform calculations result in Ohms and share the corresponding right side scale on the display grid. These calculated waveforms can produce strange looking results for periodic waveforms driving non-resistive loads such as capacitors or inductors. The final two ratio calculations can be used to calculate voltage gain and current gain respectively and are dimensionless.
If Formula is selected then the mathematical formula entered in the top formula, will be plotted vs time. This allows greater flexibility in waveform plotting at the expense of typing in the function to be plotted. See section on Advanced Math Traces below on how to enter formulas. Any one of the four channel vertical axis controls can be chosen for the Formula axis using the Math Axis entry. Generally when plotting using Formula, one or the other of the four channels are not being displayed and its axis controls will be available to be used. Two more math formulas, X Math Trace and Y Math Trace can also be entered/edited through these controls.
To keep production costs of the board low, certain trade offs were made. One was to forego programmable input gain ranges that use resistor dividers and perhaps adjustable frequency compensation capacitors. This limited the usable input voltage range to 0 to +5V.
At the bottom of this section, just above the ADI logo, are entry windows which allow input gain and offset adjustments or corrections for any external resistor divider attenuator networks that might be added to the channel A and B inputs ( possibly used when in the high impedance or Split I/O modes ). Save and Load Adj buttons can be found under the File drop down menu.
The input capacitance, CINT, of the analog inputs in the high Z mode is approximately 390 pF (for the rev D design and slightly higher for the rev F design). This relatively large capacitance along with relatively high resistance dividers can significantly lower the frequency response. In figure In1 we again revisit the input structure of the M1k and connecting an external resistive voltage divider R1 and R2,3<sub>. The contents of the blue box represent the input of the M1k in Hi-Z mode. To introduce an optional DC offset for measuring negative voltages resistor R<sub>2 is included and could be connected to either the fixed 2.5V or 5V supplies on the M1k. The CINT and effective resistance of the divider network form a low pass pole in the frequency response. To give you a rough idea let's use 400 pF for CINT and 1 MΩ for the resistor divider. That would result in a low pass response with a 3 dB roll-off starting at around 400 Hz.
A capacitor would generally be needed across the input resistor R1 to frequency compensate the divider. Such a hardware solution generally requires the capacitor (or alternatively the divider resistors) to be adjustable.
It would be nice to not have to use a compensation capacitor, adjustable or otherwise. A digital (software) frequency compensation feature has been implemented in the ALICE 1.2 Desktop software package.
The software frequency compensation for each channel consists of a cascade of two adjustable first order high pass filters. The time constant and the gain of each stage can be adjusted. Normal first order high pass filters do not pass DC so a DC gain of 1 path is added to the overall second order high pass software compensation filter. This structure is often called a shelving filter because of the shape of its frequency response.
In figure In2 we show the new controls for the input compensation. To turn on and off the compensation for Channels A and B check boxes are added under the Curves drop down menu. Turning on compensation applies to both the Scope and Spectrum tools (time and frequency measurements). The filter time constant and gain settings can be set using new entry slots in the Settings Controls screen. The DC gain and offset adjust controls are unchanged.
The following examples use resistor values from the ADAPL2000 Analog Parts Kit and the intention is to keep the input resistance equal to at least 1 MΩ. No external compensation capacitor was used. A 500 Hz square wave from the Channel A AWG output is used to observe the step response of the example resistor dividers and adjust the compensation filter settings.
As a simple first example we can just use the 1 MΩ R1 resistor and not include the other resistors from figure In1. This gives us a total input resistance of 2 MΩ.
As we can see the DC gain setting is slightly more than 2 which is to be expected based on the internal 1 MΩ resistor and external 1 MΩ R1 resistor forming a 2:1 voltage divider. There is a small DC offset due to the leakage current from the ESD protection diodes on the M1k inputs and the parallel combination of RINT and R1.
The input gain factor of 2 (2.17 to be exact) increases the allowable measurement range from 0 to +5 V to about 0 to +10 V. Enough to work with circuits powered from a 9 V battery.
The stage 1 filter Time Constant is adjusted to correct for the majority of the AC roll-off and the stage 2 filter Time Constant and Gain are tweaked to take out the remaining higher frequency (2nd order) roll off. A number of TC and Gain combinations are potentially possible and there may be more than one “right answer”.
A factor of 2X might not be enough of an increase in the maximum voltage to be measured. We might also like to measure negative voltages. For a second example we use two 470 KΩ resistors for R2 and R3 along with the 1 MΩ R1. R2 is connected to the fixed +5V supply to introduce some positive offset.
As we can see the DC gain setting is slightly more than 6 based on the internal 1 MΩ resistor in parallel with the equivalent parallel combination of the two 470 KΩ R2,3 resistors (235 KΩ) and the external 1 MΩ R1 resistor forming a voltage divider of about 6:1. The input range is now slightly more than 30 V p-p.
The Trigger button is a drop down menu listing which signal to trigger on, CA-V, CA-I, CB-V, CB-I or none. The use of Triggering to display a stable trace is generally only necessary when viewing externally generated signals. When viewings internally generated signals from one or the other of the AWG channels a stable trace happens automatically in that the beginning of the AWG output waveform is restarted at the same point at the start of each time sweep.
The Edge button is a drop down menu listing either the rising or falling edge for triggering. The Trigger Level entry window contains the trigger level in volts for CA-V and CB-V or mA for CA-I and CB-I. The 50% button sets the trigger level to the midpoint (50% point) of the selected trigger waveform. i.e. to the (maximum + minimum)/2.
The Hold Off entry window, in mS, is used to shift the horizontal position ( apparent time 0 start point ) within the acquired sample point buffers being displayed. The data used for the vertical and horizontal waveform calculations is also shifted by that amount. The sample buffer is generally two screens long so setting the hold off time to more than one screen width is not recommended. This is mainly used when synced to the AWG. Due to the discontinuous nature of the AWG outputs this allows the user to skip over any initial transients that might appear if the system being measured has “inertia” or “state” that needs to settle out. Alice (Python) only supports discontinuous mode right now so the AWG outputs turn off and go into a high impedance state between sweeps.
The Curves button allows the selection of which signal waveforms will be displayed when plotting vs time. The All button selects all four curves to be displayed and the None button clears all four curves. It is also possible to select which of the possible stored reference time traces, if saved via the Snap-Shot option, will be displayed.
The green PWR-On button toggles on and off the fixed analog +2.5 V and +5 V power supplies. The button turns red when the supplies are off. The power supplies do not turn completely off but go to around +2 V and can supply only about 20 mA when shorted to ground. This is much less than the 200 mA or so they could supply if accidentally shorted when on. It is good practice to turn off the supplies ( or better yet disconnect them ) when making any modifications to the circuit under test.
The menu section along the bottom contains the range ( V/Div, mA/Div ) and position controls for the Channel A and B voltage and current waveform displays. The entry labels are color coded to match the waveform trace colors. The V/Div and mA/Div spinboxs set the corresponding vertical ranges in the standard 1, 2, 5 step increments. Other values maybe entered manually. The position entry windows determine the vertical position of their scales with respect to the blue center line on the grid. That is to say the value entered corresponds to the number displayed next to the blue center line.
The graphics display area, show in figure 5, is where the various signal waveforms are plotted on either a black or white background depending on which is selected under the Options drop down. It consists of a main 10 by 10 grid with the center vertical and horizontal grid lines drawn in dark blue. Each major grid is sub divided into 5 sub grids by the short tick marks along the blue center lines. The horizontal grid lines are labeled with color coded text to match the corresponding waveform trace with the voltage scales on the left and current scales on the right.
The red triangle, drawn on the left side in the example shown because the trigger input is set to CA-V indicates the trigger level.
Above the main grid area is a line of text showing the device ID and Sample rate and if the acquisition loop is running or stopped. Below the main grid are three lines of text which display various information about the displayed plots. The first line shows the current time per division setting and the horizontal position of the left most grid line with respect to 0 time i.e. the trigger point.
The second and third lines of text are for displaying information related to Channel A and Channel B respectively. The selected V/Div is displayed along with any of the vertical measurements selected for that voltage channel. If a current waveform is being displayed the selected mA/Div is displayed along with any of the vertical measurements selected for that current channel.
While stopped (red Stop button clicked) if you left click anywhere within the display grid a numbered marker “x” point will appear at that position. In the upper left corner of the display grid the maker number along with the vertical ( voltage or current ) and horizontal ( time ) values will also appear. For marker points > 1 the vertical and horizontal delta to the previous point will also be displayed. Clicking the red Stop button again will clear the markers. Clicking on the green CA-V/Div, cyan CA mA/Div, orange CB-V/Div or yellow CB mA/Div buttons along the bottom of the main Time display window will select which vertical range / position axis will be used and the marker will be drawn in that color.
As the program iterates over the time index t, the channel B voltage value is subtracted from the channel A voltage value and then offset on the screen by the channel A position variable. This replicates the built-in math trace CA-V – CB-V.
Again as the program iterates over the time index t, the channel B voltage value at t-1 is subtracted from the channel B voltage value at t and then multiplied by 100. The 100 scales the time from the 10 uSec per time sample to 1 mSec. The screen shot in figure 6, shows the result for a 4 V p-p triangle wave at 1 KHz. Since we are not displaying the channel B current we can use its settings as the vertical axis for the math trace by setting the Math Axis to I-B. The orange triangle wave changes 4 V in 500 uS for a slew rate of + and – 8 V/mSec shown with the magenta Math trace.
There are two identical sets of controls for configuring the Channel A and B outputs. First there is a drop down menu for selecting the Mode, figure 8. The SVMI option is for sourcing voltage / measure current. The SIMV option is for sourcing current / measure voltage. The Hi-Z option disables the generator output (High Impedance mode). The default at start-up is that both channels are in Hi-Z mode. The Split I/O option separates the generator output signal from the voltage measurement input. In the Rev D version of ALM1000 hardware only the source current function operates when the output and input are on separate pins so the Split I/O option automatically puts the hardware into the source current configuration. To turn the sourced current into a voltage the output termination options can be used. The hardware includes two 50 Ohm resistors that can be connected to the generator output pin. One resistor is tied to ground and the other is tied to the 2.5 V power supply. The drop down menu provides three options Open, To GND, and To 2.5V. If you are just looking at voltage in SVMI mode there should be no noticeable change in the voltage waveform. The current waveform should change to reflect the current now flowing into the resistor. If you are in SIMV then the resistors can act as current to voltage converters.
The Min and Max entry windows program the minimum and maximum values for the output waveform. When in the source voltage mode the values are in Volts, when in source current mode the values are in mAmps. If the value entered in the Min window is higher ( more positive ) than the value entered in the Max window the apparent phase of the output wave is inverted. While this is somewhat redundant for the Sine, Triangle and Square wave shapes, given the Phase control described later, it is useful for determining if the Sawtooth or Stairstep shapes are rising or falling ramps.
The Freq entry window programs the frequency of the waveform in Hertz. Given the 100KSPS maximum sample rate, the maximum possible frequency is, by definition, 50 KHz but the practical upper limit is more like 20 KHz or less.
The relative timing between the two AWG channels can be set as either a phase angle or delay in time. The Phase and Delay buttons choose between the two methods. The entry window programs either the phase of the output waveform in degrees from 0 to 360 or the time delay in mSec. The % entry window only applies to the Square shape and programs the duty cycle in percent from 0% to 100%.
The 0.89 version of the low level ALM1000 software library used in ALICE 1.1 only outputs the signals as single bursts each sweep when the analog signals ( voltage and current ) are being generated. The analog outputs will enter the high impedance state ( Hi-Z ) between sweeps and when the program is stopped ( Red Stop button pressed ). The 1.0 version of the low level ALM1000 software library used in ALICE 1.2 supports outputing the signals as single bursts each sweep or as continuous streams when the analog signals ( voltage and current ) are being generated.
With the Sync AWG check box in either version the outputs are produced in sync with the analog trace sweeps. In version 1.1 if the Sync AWG check box is not checked the outputs are in Hi-Z mode. In version 1.2 if the Sync AWG check box is not checked the outputs stream continuously.
The Shape drop down menu is used to select the shape of the output waveform. There are 6 built in waveform shapes, DC, Sine, Triangle, Sawtooth, Square, and a 10 level Stair Step. When DC is selected the constant value of the output voltage or current is set by the value in the Max entry window.
Wave Shapes below the line separator in the menu use the AWGAwaveform or AWGBwaveform array buffers to contain the waveform sample data points. A new data set based on the entered values is generated each time the button is clicked. The Impulse, Trapezoid, U-D Ramp, UU Noise ( uncorrelated uniform distribution ) and UG Noise (uncorrelated gaussian distribution ) buttons are used to build waveform arrays based on user input parameters.
The Fourier Series shape builds a waveform based on the Fourier series of cosines for a square wave. The number of odd harmonics of the fundamental, is entered in the % entry slot which changes to Harmonics when in Fourier shape mode. The minimum and maximum values of the fundamental are set using the Min and Max entries and the fundamental frequency is set using the Freq entry. Entering 1 for the number of harmonics will result in just the cosine wave at the fundamental frequency. Entering 3 for the number of harmonics will include the third harmonic, entering 5 for the number of harmonics will include the third and fifth harmonics and so forth. More information on this can be found in the Advanced Users Guide.
Waveform data point values can be read in from a simple single column csv text file ( one row per time sample ) by clicking on the Read File button. For voltage waveforms the values can be decimal numbers ranging from 0 to 5 in volts. For current waveforms the values can be decimal numbers ranging from -0.2 to 0.2 in amps. If the .csv file contains more than one column the user will be prompted to choose which column number to import. The contents of the Min, Max, Freq, Phase and % entry slots are not used for wave shapes input from a file. Use the Custom Math Waveforms feature below to change the amplitude and offset of the waveform. The contents of the AWG A or B waveform arrays can be saved to a csv file by clicking on the Save File button.
Waveform data point values can also be read in from an audio file in .wav format, 16 bit data. The sample rate is assumed to be 100 KSPS. Mono files can be read into either the AWG A or AWG B waveform buffers. To read a stereo file use the Read WAV File button for AWG A. The Left channel will be loaded into AWG A and the Right channel will be loaded into AWG B. The 16 bit integer data is scaled and offset to fit within the 0 to 5 V range of the ALM1000. Up to 90,000 sample points ( 900 mSec ) will be loaded. The open source audio program Audacity is a good option for generating and editing wave files.
If the number of sample points in the waveform array is less than the time sweep the output of the AWG will continuously output the last sample value in the array until the end of the sweep. To repeat the data samples in the waveform array for longer time sweeps click on the Repeat option button.
For example to copy the CH A captured data from the VBuffA array to the AWGBwaveform array you would simply click on the Math option under the AWG B Shape menu and type VBuffA as the formula, as in figure 11.
The resulting output wave shapes are shown in figure 12. The CH A trace shows the shape as read in from the file. The CH B trace shows the calculated wave shape with the added noise and offset.
To demonstrate how to use the Oscilloscope Tool as a DC voltmeter consider the resistor voltage divider network, shown in figure E1. We wish to measure the voltages at the 4 nodes and the voltages across the 6 resistors. In the figure the nodes are numbered from N0 to N4 with N0 being the ground or common node that all the voltage measurements will be made with respect to. With the Oscilloscope Tool we can measure two node voltages at a time and the voltage difference between those two nodes. Set both AWG channels to Hi-Z mode in the AWG control window and from the Meas CA menu select from the –CA-V- section the Avg and CA-CB check boxes. Likewise from the Meas CB menu select from the –CB-V- section the Avg and CB-CA check boxes.
We start with the network powered from the fixed +5 volt power supply at node N1 and the channel A input also connected to N1. The channel B input is connected to node N2. Click on the Run button and the N1, N2 node voltages will be displayed along with the difference between them as CA-CB and CB-CA. We can now proceed around the network measuring pairs of nodes until we can fill out table 1 below. Figure E2 shows the voltmeter inputs connected to nodes N3 and N4. Any combination of two nodes can be measured and the voltage difference between the two nodes will be displayed.
From the measured node voltages ( and the difference voltages ) we can get the voltages across the 6 resistors shown in table 2.
The menu on the right allows selection of which of the four possible input channel waveform signals or Math formula is to be used for the X and Y axis. Given four possible signals, Channel A voltage and current, Channel B voltage and current, there are in theory 16 possible combinations for X and Y. Not all 16 have been implemented since, for example, plotting a signal vs itself such as CA-V vs CA-V is a rather meaningless straight line.
Under the -X Axis- heading there are two options to display the histogram of either the channel A voltage or the channel B voltage waveforms. The horizontal axis is in volts and controlled by either the CA or CB V/Div and V Pos controls. The vertical axis is the histogram count or number of hits at a given voltage level. The vertical axis scale is controlled by the CA or CB mA/Div control.
To demonstrate some of the features of the ALICE Oscilloscope and X-Y Plot Tools the following example circuit is offered. In figure E3 we see a simple NPN transistor ( 2N3904 ) in the common emitter configuration with a 100 KΩ resistor used to bias the base and a 1 KΩ resistor as the collector load. The collector load is supplied from the fixed +5 V power supply. We will use the ALICE software to plot IB vs VBE. We will also determine the value of CA-V corresponding to IC = 2 mA and then measure the input to output voltage gain around that operating point.
To plot VBE and IB we first start out with the channel B input (CB-V) connected to the base of the transistor. As the formula in figure E3 states, IB can be calculated by taking the difference of CA-V and CB-V and dividing by the 100 KΩ resistor value. 100 KΩ is chosen to simplify the calculations so that the current is found by just moving the decimal point of the measured voltage ( i.e. 1 V = 10 uA ).
Set up the AWGs as follows: Channel A, Mode set to SVMI, Shape set to Triangle, Min set to 0.0, Max set to 5.0, Freq set to 100. Channel B Mode set to Hi-Z. Be sure that the Sync AWG box is selected.
The time base should be set to 0.5 mSec/Div so that the rising half cycle from 0 to 5.0 volts will fill the grid. Set the Hold Off to 10 mSec so the start of the second cycle will be displayed. Under the Curves menu select CA-V and CB-V. Under the Math menu select CAV - CBV.
The green CA-V trace is the 0 to 5 V ramp that is being applied to the 100 KΩ resistor. The orange CB-V trace is the voltage on the base of the transistor or VBE. The magenta CAV-CBV math trace is the voltage across the 100 KΩ resistor and represents IB as 10 uA/V.
To make an XY plot of IB vs VBEopen the X-Y Plot Window and check the X-Y Plot box. In the X-Y Display window press the CB-V button in the -X Axis- section and the Math button in the -Y Axis- section. In the X-Y Window set the CB V Pos entry to 0.5 and the CB V/Div to 0.1. Press the green Run button. You should see something like figure E5.
To plot the collector current move the Channel B input to the collector of the transistor. Now we need to go back to the time display window. Uncheck the X-Y Plot box and make sure the Time Plot box is checked. Under the Math menu select none for now.
If we set the Offset equal to the actual value of the +5 V supply divided by the Gain adjustment (1.0) factor and change the sign of the Gain factor ( i.e. make it -1.0) we have the formula for IC from figure E3. After changing the channel B offset and gain factors press the green Run button and you should see something like figure E7.
IC should be nearly zero where CA-V is less than 0.6 V. You may need to tweak the Offset factor to get IC to be exactly on the 0.0 grid line. An easy way to check this is to temporarily move the channel B input to the +5 V power supply. Now the difference between CB-V and the supply is exactly zero.
Remember that the vertical voltage scale ( 0.5 V/Div ) is divided by the 1 KΩ resistor so it is 0.5 mA per division. With the program paused, under the Options menu press the SnapShot button. This saves a copy of the displayed CA-V and CB-V traces. Under the Curves menus select RB-V. This will now display the saved IC plot.
Now move the channel B input back to the base of the transistor. Under the Math menu select the CAV-CBV math trace. Reset the Channel B Offset and Gain calibration factors to their normal values. Press the green Run button. You should see something like figure E8.
Now we have plots of IC ( dark orange ), IB ( magenta ) and VBE ( orange ) on the same grid as the base resistor bias CA-V is swept from 0 to 5 V ( green ).
Under the Curves Menu select the V cursor. Right click on the dark orange IC curve where it crosses the 1200uSec time grid. The voltage value at that point will appear next to the horizontal cursor line. The Use the mouse wheel it adjust the cursor up or down so it lines up exactly where the IC curve cross the time grid line. It should look like figure E9.
The beta of the transistor can now be calculated by scrolling the cursor down till it lines up exactly where base current (magenta trace) at the same time grid line. The displayed voltage will represent the base current. Beta will be IC / IB. For this example IB is about 13 uA so beta will be around 154. The CA-V value where the green trace crosses the same Time Grid as IC = 2 mA should correspond to the base bias point where IC is equal to 2 mA. This is the bias point we would like to center our input signal on for the next measurement of the amplifier gain.
Move the channel B input back to the collector of the transistor.
Calculate new Min and Max values for Channel A by adding and subtracting 0.25 V to the 2 mA bias point we just measured. Enter these for Channel A. Set Channel A mode to sine wave. Under the Curves menu turn off the RB-V trace and under the Math menu select none. Set the time base to 2.0 mS/Div and the Hold Off to 0.0 so that two cycles of the input waveform are displayed. Under the Meas CA and CB menus in the -CA V- and -CB V- sections select Avg and P-P to be displayed.
The DC average of the output waveform should be at about 2 V ( 2 mA in the collector load resistor ) below the +5 V power supply or about +3 V. The voltage gain of the amplifier will be the Channel B P-P value divided by the Channel A P-P value. Which for this example is about 1.5.
Save Data, command for saving the captured channel A and B amplitude vs frequency data to a coma separated values file (.csv). The amplitude data can be saved as magnitude in Vrms ( type a 0 ) or in dBV ( type a 1 ).
The Curves button allows the selection of which signal waveforms will be displayed. The All button selects all four curves to be displayed and the None button clears all four curves. The Marker option turns on a text marker which displays the amplitude and frequency at the peak of the displayed signal. Options to display the difference ( subtraction ) of the CA-dBV – CB-dBV traces or the CB-dBV – CA-dBV traces. It is also possible to select which of the possible stored reference traces, if saved via the Store trace option, will be displayed. The color of the CA-dBV and CB-dBV traces will turn red if the input signal goes beyond the 0 to +5 V analog input signal range.
Under the Curves Drop down menu there are selectors for displaying the F cursor ( frequency ) and dB cursor ( amplitude ). When selected if you right click anywhere within the display grid either a vertical or horizontal cursor line, or both, will be drawn at that location. The vertical, horizontal, or both values for that point will be displayed. Scrolling with the mouse wheel will move the vertical line left–right when only the F cursor is selected and the horizontal up-down when only the dB cursor is selected. When both are selected the mouse wheel moves the vertical line left–right.
Used to set the start and stop frequency of the display.
The amplitude of the swept source is generally held constant across frequency but in some special cases it might be desirable to change the source amplitude at each frequency step. Checking the Sweep From File check box will prompt the user for a .csv file. The csv file should contain two columns of values one row for each frequency amplitude combination for the sweep. The first column should contain a monotonically increasing list of frequency steps in Hz. The second column should contain the corresponding amplitude value in dB. The Start, Stop and number of Steps will be filled in based on the contents of the file. After reading in the csv file the program will display the highest ( maximum ) amplitude value found and ask the user to input the desired maximum the values should be normalized to. This is done because the ADALM1000 has an upper limit to the range of output amplitudes ( around +4.5 dBV ). Also it might be useful to scale the amplitude values up or down to optimize the dynamic range of the swept signal.
The ALICE Desktop program uses the Fast Fourier Transform (FFT) to produce the frequency spectrum of a set of time samples of the input signals. The FFT takes as an input a set of time samples at a given sample rate and produces a set of frequency samples or values from DC ( 0 Hz ) to one half of the sampling frequency. In the case of the ALM1000 the sample rate is fixed at 100 KHz so the highest frequency will be one half of that or 50 KHz. The number of individual frequency bins the FFT produces is one half the number of time samples that are used. So the width of the bins or frequency resolution will be 50 KHz divided by one half the number of time samples taken. The number of time samples can be set from 64 ( 26 ) to 65536 ( 216 ) in the program.
In ALICE Desktop you can choose from a number of FFT window functions. But what is an FFT window and what is it doing? The principle is very simple. The program reads a number of samples from the ALM1000 and puts them in an array. The size of the array has to be a power of 2 for the FFT calculation, for example 2048. With no window weighting function, all samples have an equal contribution or weight in the FFT calculation. You should expect to have an optimal result, but that is not the case if there is not an exact number of repeating cycles in the array. Another way of thinking about this is the starting value of the time waveform must be the same as the ending value. The end of the waveform will line up with the beginning if wrapped around on itself. This will almost never be the case in actual practice.
The following example shows a technique where the ALICE spectrum analyzer tool can be used to measure the amplitude vs frequency response of two simple RLC configurations. Shown in figure E11, first on the left is a parallel LC bandpass configuration and second on the right is a series LC bandstop configuration. Indicated by the green boxes are the connections to the ALM1000. Channel A is setup to output the driving function of the network. Channel B is setup as an input to measure the response seen across the LC network. For this example R1 is 1 KΩ, L1 is 15 mH and C1 is either 0.22 uF or 0.44 uF.
If we set the number of FFT samples to 8192 the total sample time will be 81.92 mSec which is the same as one cycle at 12.2 Hz. By setting the Channel A function generator to a 12.2 Hz square wave with a very narrow duty cycle of only 4 – 6 samples wide the resulting test signal will contain frequency content every 12.2 Hz with nearly equal amplitude out to high frequencies. At 12 Hz each 10 uSec sample period is equal to about 0.012 % of duty cycle. We can set the duty cycle to anything from 0.012% to 0.08% and get similar results. The only difference is how fast the signal level falls off with increasing frequency. For a given pulse amplitude, the narrower the pulse the less energy in each 12.2 Hz spaced frequency but the flatter vs frequency they will be. The wider the pulse the more signal energy but a faster frequency roll off. 0.08% gives an acceptable frequency roll off out to 10 KHz.
Channel B is set in Hi-Z mode as an input.
Below in figure E12 is a screen shot for the bandpass RLC configuration of figure E1. The green trace for channel A is the narrow pulse forcing function response. The light and dark orange traces are the output responses seen by channel B for C1 = 0.44 uf and 0.22 uF respectively. The light and dark magenta traces are the subtraction of the Channel A trace ( in dBV ) and the Channel B trace ( in dBV ). As we know subtraction in dB ( logs ) is the same as division in magnitude. The magenta traces are the actual input to output transfer function of the RLC network. The Yellow trace is the phase response.
The basic concept that is used to make gain/phase, impedance and RLC measurements using ALICE Desktop is shown in figure 23. Channel A of the ALM1000 is used to apply a known frequency sine wave at VA and measure the applied voltage waveform. Channel B is used to measure the voltage waveform seen across the network under test. FFTs are calculated on the two waveforms which provide amplitude and phase information at the applied frequency. From these the relative gain ( CHB amplitude / CHA amplitude ) and relative phase ( CHB phase – CHA phase) are obtained. Further these values can be used to calculate the impedance (RLC) of the network in the dashed box. The resistor, REXT, is a known value. For the audio frequency range measurements possible with the ALM1000 hardware it can be adjusted as needed depending on the magnitude of the impedance being tested. Impedances in the range of about 0.1 to 10 times REXT can be accurately measured. REXT can range from 50 Ω to 50 KΩ.
1. VA is the applied voltage ( from Channel A of the ALM1000 ).
2. VZ is the voltage across the unknown impedance ( from Channel B of the ALM1000 ).
The angle Φ is the measured relative phase between channel B and channel A. The law of cosines is used to calculate the cosine of the angle, Θ.
Connections to the ALM1000 and the network to be measured are shown in figure 25. In this case we show a simple series connected resistor and capacitor. REXT is 1000 Ohms and the series resistor RS is 100 Ohms and the capacitor CS is 1 uF. The channel A AWG generator output should always be set to be in source voltage mode (SVMI) and with a sine wave shape. The user can control the output voltage amplitude and offset with the Min and Max entry slots as when using the scope and spectrum analyzer displays. A good place to start is with Min set to 1.086 and Max set to 3.914 which produces a 1 Vrms amplitude centered on 2.5 V DC. The Channel B analog input is set in the Hi-Z mode when using the Impedance Analyzer and it always considered as an input.
The current low level ALM1000 software only outputs signals as single shot bursts when the analog output signal is being sampled. The Sync AWG check box must be checked if you are using the ALM1000 function generator output as the applied signal source. If you are using an external signal source rather than CH A the box should not be checked. This will keep both channel A and B in a high impedance voltage measurement mode while capturing data.
Used to change the number of samples in the FFT calculation. This number has to be a power of 2. More samples means a longer time sample which is important when low test frequencies are used. It also provides higher frequency resolution but a slower update rate for the screen. Fewer samples provides a lower frequency resolution, but a faster update rate for the screen. Increasing the zero-stuffing factor can improve the frequency resolution. The program starts up set to 16,384 samples.
Save V-Cal, Load V-Cal buttons. ALICE-VVM uses the same calibration file as the Voltmeter Tool. To load the saved calibration factors press the Load button. To save the calibration values to the file for future use, press the Save button. The values are saved to a file with a unique name for this particular ALM1000 board based on the first 9 characters of the board device ID serial number. For example something like: 203131543_V.cal.
Cut-DC, an option that will remove the DC component from the sampled data record. It sample by sample subtracts the average value of the sample record. Any DC offset in the FFT could result in that being the peak amplitude and resulting in meaningless measurements. The program starts up with this turned on. This is important given the 0 to 5 V analog input range of the ALM1000 and the inherent 2.5 V DC offset.
To the left of the grid the relative gain of Channel B to Channel A is displayed in dB. Next the relative phase is displayed in degrees. Next the measured frequency in Hz is displayed. Next the measured Impedance Magnitude, Angle, R series and X series are displayed. Finally the calculated capacitance ( if X series is negative ) or inductance ( if X series is positive ) is displayed.
In all three cases the series R measured stays nearly the same at about 155 Ω.
We can use ALICE Desktop to measure the input capacitance of channel B. We know that the input capacitance is small so we will need to use a large value for REXT and measure at a high frequency. In figure E18 we show the connections used which is simply to connect CHA to CHB with a 47 KΩ resistor.
In the ALICE Impedance Analyzer screen shot shown in figure E19 we see that Ext Res is set to 47000 and the test frequency is set to 19000 Hz. The calculated capacitance is 371 pF which agrees nicely with the capacitance reported in the document on the ALM1000 analog inputs.
To measure capacitors around the same value as the input capacitance or even smaller it would be useful to null out this stray parasitic capacitance. This can be done using the Gain Cor and Phase Cor Entry widgets to enter correction factors for the gain and offset. If we enter 7.4 (dB) from the measured Gain for the Gain Cor entry and 62.64 (degrees) for the Phase Cor entry we get the result shown in figure E20.
Now the Measured Gain difference is 0.0 dB and the Measured Phase difference is 0.0 degrees. The calculated capacitance is 0.2pF. If we now add a 39 pF ceramic cap, from the Analog Parts Kit, from the channel B input to ground we get the results shown in figure E21.
Now the calculated capacitance reported is 36 pF which is what we can expect from a +/- 20% tolerance on the capacitor.
There is a certain advantage to using this voltage divider method over the Ohm's Law method in that a much wider range of resistances can be measured. The Ohm's Law method is limited in one extreme by the maximum current that the ALM1000 can safely source ( about 200 mA or 5 Ohms ) and in the other by the minimum current that the ALM1000 can accurately measure ( about 200 uA or 25 KOhms). Using the voltage divider method, because we can choose a range of R1 values, we are only limited by the voltage measurement resolution of the ALM1000 ( about 100 uV ). R1 can range from as low as 10 Ohms to as high as 10 KOhms in practice which extends the range from 1 Ohm or less to nearly a MOhm.
For the highest values of R2 the internal 1 MOhm resistance of Channel B comes into effect and the software removes this parallel resistance when calculating the value for R2.
Built into the ALM1000 is a switch that can connect an on-board 50 Ohm resistor from the channel B input / output pin to ground. We can use this “known” resistor as R2 in the voltage divider figure and calculate for R1 instead.
The series resistance of the switch, which is approximately 1 Ohm, must be included in the value of R2. The actual value for R2 is more like slightly less than 51 Ohms. Of course the true value for R2 can be found by calibrating its value based on measuring a known precision resistor standard.
Both ways can be used in the DC Ohmmeter tool. The test voltage can be adjusted as well as the value of the known resistor. The Ext Int selector picks which variation will be used to calculate the unknown resistance.
The ALM1000 hardware provides four 3.3V CMOS digital input / output pins. The four general purpose input/output pins along with ground and the 3.3V power supply are provided on the digital port connector as shown in figure 27.
Part of the ALM1000 rev D schematic is shown in figure 28. As can be seen each of the four general purpose PIO pins ( connector P3 ) is connected to a 220 Ω and a 470 Ω resistor. The 220 Ω resistors connect to Port A pins 0-3 and the 470 Ω resistors connect to Port A pins 4-7. This configuration with two digital port pins connected though two different series resistors is unique and not generally typical of digital pins in other small portable USB based hardware such as the Analog Discovery module.
The state of the Port A pins can be controlled using the simple digital control interface shown in figure 29. At this time only static hi / low functionality is supported. Eight rows of selectors are provided, one for each microcontroller pin for Port A ( PA0-PA7). Each port pin can be set to either a logic low, 0, a high-impedance or floating state, Z or a logic high, 1. When in the high-impedance or floating state that pin can be used as a logic input.
This configuration with two digital output drivers connected to a single connector pin through two different series resistors could be viewed in a different light. We might consider the CMOS output diver of the microcontroller pin as a three position single pole switch that can connect to ground or the 3.3 V supply or open circuit as shown in figure 30. This is more of an analog representation of the circuit. Looking at the circuit in this way it can perhaps be used in part to teach and learn concepts in DC resistor networks such as Thevenin and Norton equivalent circuits, series/parallel resistors, KVL, KCL, voltage dividers and nodal analysis etc.
There are nine possible combinations of the switches which give rise to the 8 Thevenin equivalent circuits shown in figure 31, with the ninth being of course an open circuit. It is important to note here that the resistance and voltage values given are for ideal nominal conditions and actual values may be noticeably different. It also assumes that the ON resistance of the MOS FET switches is zero which is actually never the case.
A 9 level DAC can be created on each output pin by connecting an external resistor divider, R1, R2, as shown in figure 32. Using two 1 KΩ resistors as shown presents effectively a 500 Ω resistance to 3.3/2 (1.65) volts on one of the PIO connector outputs. This effective resistance to 1.65 V and the switchable equivalent circuits from figure 31 results in the 9 different output voltages shown in figure 32. Other values for R1 and R2 of course can be used to produce different ranges of output voltage.
Simply shorting two of the PIO pins together results in 9 X 9 or 81 total possible combinations. Many are redundant and some give the same voltage but with different source resistance values. Shorting all four pins together results in 6561 possible combinations using no external resistors. Limited only by your imagination and far more than can be listed in this document.
In addition when one or the other digital window is open the state of PIO 0, PIO 1, PIO, 2 and PIO 3 from left to right and are displayed in the Oscilloscope graphics area and are updated once each time the analog scope display is refreshed.
ALICE Desktop can perform a self-calibration sequence. An accurate 2.5 V reference source such as the AD584 precision reverence from the ADALP2000 analog parts kit is used. Plug it into a solderless breadboard and connect as shown in figure 33. The AD584 is configured as a 2.5V reference by connecting pins 1 and 3 together. A more permanent suggestion is soldering the circuit onto a small piece of circuit board rather than using a solderless breadboard as shown in figure 34. Connect both input channels to the 2.5V output of the AD584 when directed to do so.
First, the program asks if user wishes to reset internal calibration values to default. The program expects the default values to exist in a file named: calib_default.txt and will ask for file if it is not found in the local directory.
If a calibration file from a previous self calibration for this board exists the program will ask if you want to load the settings from the previous file.
Next the programs requests user to: Connect an External Voltage reference (AD584) to both CHA and CHB inputs.
With both AWGs in disabled Hi-Z mode, program takes average of 1000 samples ( for this and all subsequent measurements ).
Program checks if measured values for CHA and CHB are within 2.2V and 2.8V to make sure the external reference was attached. If it measures results outside this range it asks user to check connections and tries again. Program assumes external voltage is exactly 2.5 V but variable AD584act can be adjusted if actual value is known ( see section on customizing ALICE below ). Program uses measured values and variable AD584act to calculate channel gain factors to adjust all subsequent measurements.
Next the program requests user to : Disconnect everything from CHA and CHB pins.
Program sets the following switches, CHA 2.5 V switch to open, CHA GND switch to closed, CHB 2.5 V switch to open, CHB GND switch to closed. With the AWG mode set to disabled ( Hi-Z ) it then measures the input offset ( ground voltage ).
Program sets the following switches, CHA 2.5 V switch to closed, CHA GND switch to open, CHB 2.5 V switch to closed, CHB GND switch to open. With the AWG mode set to disabled ( Hi-Z ) it then measures the internal 2.5 V rail. This voltage is later used in calculating actual current in ( internal ) resistor.
Program sets all the switches to open. Sets both CHA and CHB to SVMI mode DC voltage of 0.0 V. It measures the actual output when forcing 0.0 V.
Program sets all the switches to open. Sets both CHA and CHB to SVMI mode DC voltage of 2.5 V. It measures the actual output when forcing 2.5 V.
Program sets the following switches, CHA 2.5 V switch to open, CHA GND switch to closed, CHB 2.5 V switch to open, CHB GND switch to closed. Sets both CHA and CHB to SVMI mode DC voltage of 5 V. It measures the current when forcing 5 V into the internal 50 ohm resistors ( connected to ground). Program uses measured voltage and current values and variable OnBoardRes ( set = 50.83 to allow for switch Ron but can be set by user, see section on customizing ALICE below ) to calculate actual current.
Program sets the following switches, CHA 2.5 V switch to closed, CHA GND switch to open, CHB 2.5 V switch to closed, CHB GND switch to open. Sets both CHA and CHB to SVMI mode DC voltage of 0 V. It measures the current when forcing 0 V into the internal 50 ohm resistors connected to internal 2.5V rail. Program uses measured voltage and current values and variable OnBoardRes ( set = 50.83 to allow for switch Ron ) to calculate actual current.
Program sets the following switches, CHA 2.5 V switch to closed, CHA GND switch to open, CHB 2.5 V switch to closed, CHB GND switch to open. Sets both CHA and CHB to SIMV mode DC current of 0.0 mA. It measures the current and voltage when forcing 0mA into the internal 50 ohm resistors connected to internal 2.5V rail. Program uses measured voltage and current values and variable OnBoardRes ( set = 50.83 to allow for switch Ron ) to calculate actual current.
Program sets the following switches, CHA 2.5 V switch to open, CHA GND switch to closed, CHB 2.5 V switch to open, CHB GND switch to closed. Sets both CHA and CHB to SIMV mode DC current of +100.0 mA. It measures the current and voltage when forcing +100mA into the internal 50 ohm resistors connected to ground rail. Program uses measured voltage and current values and variable OnBoardRes ( set = 50.83 to allow for switch Ron ) to calculate actual current.
Program sets the following switches, CHA 2.5 V switch to closed, CHA GND switch to open, CHB 2.5 V switch to closed, CHB GND switch to open. Sets both CHA and CHB to SIMV mode DC current of -45 mA. ( -45 is used because internal 2.5 V may actually be less than 2.5 V and resistor is greater than 50 so that voltage does not go below ground ). It measures the current and voltage when forcing -45mA into the internal 50 ohm resistors connected to internal 2.5V rail. Program uses measured voltage and current values and variable OnBoardRes ( set = 50.83 to allow for switch Ron ) to calculate actual current.
Program returns all switches to open.
Program calculates all needed calibration factors from measured data and writes out values to a calibration file named based on last 16 digits of board serial number.
Program asks user if they wish to actually write new calibration settings to board.
Your ALM1000 is now calibrated.
The way to check the calibration results is to set both AWG channels to Sine shape with 0.25 Min and 4.75 Max values set in SVMI mode. Also under Mode set the termination to the 2.5 V rail to on. You should now see about -45 mA to +45 mA or 90 mA p-p in the current traces, a little less due to the Switch Ron. Then turn off the termination (Open) and connect a known 50 Ω resistor from the outputs to the 2.5 V pin. The current traces should now be much closer to 90 mA p-p.
You can then switch to SIMV mode with -45 Min and +45 Max settings. Again with the termination to 2.5V rail turned on you should get 90 mA p-p but the voltage traces will be slightly larger due to the Switch Ron. And again you can compare to an external accurate 50 Ω resistor.
Run the Self Calibration as usual. When asked to connect the AD584 reference, connect the 2.5V pin to both CH A and CH B inputs using a Y shaped jumper wire with 3 male pins on each end. Remove the wire jumpers when prompted to disconnect everything from CH A and CH B. The program will now calibrate based on the now accurately measured value for the on board 2.5 V rail.
The analog Mux control window is shown in figure 31. The CB voltage and current controls on the main scope window no longer function when this window is open and are replaced by the four new sets of voltage controls. The check boxes select which of the four Mux input channels will be displayed. The Mux-Enb checkbox sets PIO-2 either low ( when not checked ) or high ( when checked ) for Muxes like the CD4052 with enable low inputs or the ADG609 with enable high inputs.
The analog Mux interface in ALICE desktop uses a technique common in analog CRT oscilloscopes ( with a single electron beam ) where multiple input channels are switched to the beam deflection circuits on alternating sweeps. This trick requires periodic signals and that each sweep be “triggered” or synced from the same input signal. In this case the triggering signal will be channel A which is not multiplexed. This could be either the AWG generator output of channel A or an external signal input to channel A in Hi-Z mode. Because it is assumed that a MUX is connected to channel B the AWG output function for that channel is set to Hi-Z mode and also since channel B is always a voltage input the current waveform display for that channel has also been disabled. As an example note the screen shot in figure 37.
With this interface, ALICE Desktop can apply digital filtering to the captured Channel A and B voltage waveform data before being displayed in the Time and/or Frequency domains. ALICE uses the numpy convolve function to perform the filtering function. The supplied list of coefficients is convolved with the captured data buffer. The list of filer coefficients for either Channel A or B is first loaded from a single column .csv file by using the “Load CH A Filter Coef” and “Load CH B Filter Coef” buttons. The length ( number of coefficients ) and file name will then be displayed. The digital filter(s) will be applied to the voltage waveform data buffers if the “Filter CH A” and/or “Filter CH B” checkboxes are checked.
Alternatively, a formula for the filter coefficients can be entered using the CH A or CH B Filter formula buttons. The program puts up an entry window where the formula can be entered. Conventional Python syntax is used and all the math and numpy library functions are available as in the the rest of ALICE. The program looks at the arithmetic sum of the coefficients and scales them appropriately for an overall gain of 1 through the filter.

References: V. 
 V. 
 V. 
 V. 
 V.

 V. 
 V.

 V. 
 V.