dmercer

Two Input Channels Not Enough For Ya?

Blog Post created by dmercer Employee on Jul 7, 2015

Multichannel analog interface for the ADALM1000

The two analog input channels of the ADALM1000 provide a high input impedance and wide dynamic range which is very helpful for many of the measurements that students would be making around their laboratory activities. However, there are only the two analog inputs and only one if you are using one of the  channels as an output.. Often, there are many more than two signals in the circuit under investigation that you would like to monitor. Or there could be a number of low bandwidth sensors, such as ambient temperature or light levels around a room, that need to be measured or monitored over long durations of time when gathering experimental data. As a solution to this need, much like this earlier blog related to Analog Discovery, the following multichannel analog multiplexer is offered.


This very simple design uses one CD4052 dual 4:1 analog multiplexer (or the equivalent  74HC4052/74HCT4052 ) to switch one or both scope channels, see the schematic in figure 1. The 4:1 mux added to the two ALM1000 analog input channels allows the board to measure up to 8 signal channels.

image001.png

Figure 1, Analog multiplexer schematic

For ease of use the 6 pins on the digital connector (DIGITAL) pass through to the second digital connector (DIGITAL2). Similarly the 6/8 pins of the ANALOG connector pass through to one row of the 2X8 pin second analog connector (ANALOG2). The 8 analog inputs of the mux fill out the other row of 8 pins on the ANALOG2 connector. The X and Y outputs of the mux can be connected to either the CHA/B pin or optional input only AIN/BIN pins through jumpers JP1 and JP2.

Digital outputs PIO 0 and 1 are used to address the four mux channels. Digital output PIO 2 drives the INH inhibit input of the mux which turns off all the switches.

The multiplexer is powered from the fixed + 5V supply on the ALM1000 analog connector which will limit the allowed range of analog input voltages to be within the same 0 to + 5V supported by the analog inputs. The 6/8 analog connector pins of the ALM1000 including the +5 volt and +2.5 volt power supplies are included on the right angle female connector and can be used to power sensor electronics, up to the current limits of the ALM1000 power supplies.

Figure 2 is a rendering of what the top of the PCB will look like. Design files for all the example boards are included in the zip file attached to this blog.

 

m1k_analog_mux_layout.png

Figure 2, Analog multiplexer PCB top layer

Here is another smaller rendition of the analog multiplexer in figure 3, with the multiplexed connections on a separate single row female header rather than putting everything on the 2X8 header. This one stacks well with the two ALM1000 breadboard adapters proposed earlier.

 

m1k_analog_mux_layout_r2.png

Figure 3, Alternate version Analog multiplexer PCB top layer

In figure 4 we have a modified version of the breadboard adapter which now includes the multiplexer and two of the input resistor divider networks.

m1k_breadboard_mux_layout.png

Figure 4 Breadboard adapter with analog MUX and input attenuators

The Another functionally similar dual 4:1 mux is the ADG609 which has a different pin-out than the generic CD4052 multiplexer. While the CD4052 is lower cost at about $0.50 than the ADG609, there are two main advantages of using the ADG609 over the CD4052.

The ADG609 on resistance maximum spec is 30 ohms, where the CD4052 on resistance maximum spec is 240 ohms and the 74HC4052 on resistance maximum spec is 120 ohms. This higher resistance could cause errors and distortions in the measurements under certain conditions.

The TTL compatible digital input minimum logic high voltage spec for the ADG609 is 2.45 V where the CD4052 and 74HC4052 minimum logic high voltage spec is 3.15V which is just slightly lower than the 3.3V typical logic high output voltage generated by the ALM1000. The actual logic threshold for the CD4052 is probably closer to VDD/2 ( 2.5V ) at room temperature and seems to work ( given this will probably be used at room temperature ) but there is little margin. The TTL compatible 74HCT4052 has a 1.6 volt typical logic high threshold which is perfect for the 3.3 V CMOS outputs of the ALM1000.

Higher numbers of input channels could be supported by using a CD4051 or similar 8:1 multiplexer or even 16:1 muxes such as this breakout board from SparkFun based on the CD74HC4067.

This analog multiplexer data acquisition add-on board is a perfect candidate for writing a custom program using the ALM1000 Python interface software package (libpysmu). A modified version of the ALICE python scope program has been developed which turns the ALM1000 into a four ( five counting Channel A ) input scope. The program uses a technique common in analog CRT oscilloscopes ( with a single electron beam ) where multiple input channels were switched in on alternating sweeps of the beam. This trick requires periodic signals and that each sweep be “triggered” or synced from the same input signal. In our case this will be channel A which is not multiplexed. This could be either the function generator output of channel A or a signal input to channel A in Hi-Z mode. As an example note the screen shot in figure 5.

alice_mux_screen_shot.png

Figure 5. Four channel MUX version of ALICE scope program

In this example a CD4024 binary counter is driven by a 0 to 5 V square wave output from channel A. The divide by 2, 4, 8 and 16 outputs of the counter drive a 4 bit resistor DAC using an AD8541 rail to rail CMOS opamp as an inverting summing amplifier. The top green trace is the output square wave from channel A. The bottom orange trace is the DAC output on CB0. The other three inputs, CB1, CB2 and CB3 ( yellow, magenta, red traces ) are connected to the 0 to 5 V binary counter outputs which make up the 3 least significant bits of the DAC.

One important feature of the program is that a sync or sweep start pulse is output on the PIO 3 digital output pin just before each analog sweep starts. This pulse is used to reset the CD4024 digital counter to the same starting condition for each sweep. Using this “reset” pulse would be necessary whenever this program is used to observe a circuit that contains “state” as in this example with a digital counter.

The program has much of the same functionality as the full ALICE program but because it is assumed that a MUX is connected to channel B the output functions for that channel have been removed and also since channel B is always a voltage input the current waveform for that channel has also been done away with. A copy of the modified Python program is included in the zip file.  The MUX program is a work in progress and as always I welcome comments and suggestions from the user community out there.

Doug

Attachments

Outcomes