Using Signals from the Headphone Output Active Learning Modules (M1k , M2k)
The objective of this Blog entry is to show how to connect the audio output from the headphone jack on laptop computers, tablets or smart phones to be used in conjunction with the ADALM1000 (M1k) or ADALM2000 (M2k) while performing certain Lab activities where the built-in AWG sources are being used for other purposes and/or may not be available.
If you are using one of the older model (D) M1k boards with the 6 pin analog I/O connector you can only use the I/O channels as either an output or an input. This makes it very hard to simultaneously drive more than one input of the circuit being investigated while observing more than one other circuit node. If you are using one of the new model (F) M1k boards with the 8 pin analog I/O connector then you can use the Split I/O modes in ALICE 1.2. This will allow you to use both AWG output pins, CHA and CHB, while observing other signal nodes with the AIN and BIN scope input pins.
Beyond using the split I/O mode, sometimes even 2 signal sources is not enough. The following shows how to connect your experiment to the headphone or audio output jack using components found in the ADALP2000 Analog Parts Kit.
Computer sound card outputs:
One alternative would be to use some other signal generator. A possible source for analog input and square wave drive signals might be the stereo audio (headphone) output from a computer, laptop, tablet, or smart phone. There are a number of function generator programs or apps available for download on the web. The ADALP2000 Analog Parts Kit contains an audio connector adapter break out board (BOB) that can be used with a male to male headphone extension cable (not part of the kit) to connect to the breadboard as shown in figure 1. The left and right outputs need to be AC coupled by two capacitors. Any value around 1 uF or larger should work. The DC level is biased to the center of the 0-5 V range of the M1k by connecting the resistors to the fixed 2.5V supply. 47 KΩ is a good starting value for the resistors. If the caps are polarized the + end should be connected to the resistors that set the DC level equal to +2.5 V.
Figure 1, stereo audio output connector
It is important to note that the ground of the audio connector will likely be shorted to the USB ground that the M1k and M2k uses if both are connected to the same computer. So be careful how you connect the ground. For use with M2k the DC offset might not be required since the audio output signals will generally be centered around ground so you can do without the AC coupling capacitors. But if you want to set the DC level of the signals then you will have to include something like that shown in figure 1.
One quick note of caution before proceeding, the M1k input voltage range is limited to only 0 to 5 V. This is not usually a concern with the voltage 3 V peak-to-peak swings seen on most headphone outputs but other audio sources might produce larger signals. Before building any circuits that operate from sources outside the native 0 to 5 V range of the M1k we need to protect the analog inputs when in Hi-Z mode and extend the usable range of input voltages. This earlier Blog post covers techniques to address this limitation.
The ADALP2000 Analog Parts Kit includes a 3.5 mm audio connector break-out-board, figure 2, that can be inserted in a solderless breadboard. The board pins are numbered 1-5. Pin 1 is the sleeve (ground), Pin 2 is the tip (left audio) and Pin 3 is the ring (right audio).
Figure 2, stereo audio connector break-out-board
Adjustable DC offset source:
The ADALP2000 Analog Parts Kit also includes an AD5626 12 bit DAC break-out-board, figure 3, that can be used to provide an adjustable DC voltage source. The 0 to 4 V output of the AD5626 serial interface DAC can be programed through the built-in interface in ALICE 1.2. The SCLK, SDIN and LDAC BAR inputs are controlled by three of the digital outputs from the M1k digital connector, figure 4.
To use the AD5626 to set the DC offset of the audio signals, simply connect the end of the resistors in figure 1 to the DAC output rather than the fixed 2.5V.
Figure 3, AD5626 DAC bread-out-board
Figure 4, AD5626 DAC interface connections
As always I welcome comments and suggestions from the user community out there.