Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
university:tools:m1k:analog-mux [19 Aug 2016 20:17] – add 74HC4051 based bob Doug Merceruniversity:tools:m1k:analog-mux [30 Dec 2020 17:17] – add sparkfun links Doug Mercer
Line 1: Line 1:
 ======Multichannel analog interface hardware for the ADALM1000====== ======Multichannel analog interface hardware 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. Often, there are many more than two signals in the circuit or system 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, the following multi-channel analog multiplexer is proposed.+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. Often, there are many more than two signals in the circuit or system 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 duration times when gathering experimental data. As a solution to this need, the following multi-channel analog multiplexer is proposed.
  
-A first example incarnation of this very simple design uses one CD4052 dual 4:1 analog multiplexer (or the equivalent 74HC4052/74HCT4052 ) to switch one or both analog input channels, see the schematic in figure 1. The 4:1 mux added to the two input channels allows the board to measure up to 8 signal channels.+A first incarnation of this very simple design uses one CD4052 dual 4:1 analog multiplexer (or the equivalent 74HC4052/74HCT4052 ) to switch one or both analog input channels, see the schematic in figure 1. The 4:1 mux added to the two input channels allows the board to measure up to 8 signal channels. More information and CAD design files for this and the other ADALM1000 accessory boards can be found [[university:tools:adalm1000:accessory-boards-index|on this Wiki page]].
  
-{{ :university:tools:m1k-analog-mux_f1.png?500 |}}+{{ :university:tools:adalm1000:analog-mux-bw-sch.png?550 |}}
  
-<WRAP centeralign>Figure 1, Analog multiplexer example schematic</WRAP>+<WRAP centeralign>Figure 1, Analog Mux Circuit Schematic</WRAP>
  
-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 JPA and JPB.+{{ :university:tools:adalm1000:m1k-analog-mux-4052-top.png?400 |}}
  
-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.+<WRAP centeralign>Figure 2, Analog Mux Circuit PCB Top artwork</WRAP> 
 + 
 +{{ :university:tools:adalm1000:analog-mux-2.png?300 |}} 
 + 
 +<WRAP centeralign>Figure 3, Analog Mux Circuit configured for use in ALICE</WRAP> 
 + 
 +For ease of use 6/8 pins of the ANALOG connector pass through to the second 1X8 pin  analog connector (ANALOG2). The 8 analog inputs of the mux fill out the other 8 pin MUXIN connector. The X and Y outputs of the mux can be connected to input only AIN/BIN pins through solder jumpers. 
 + 
 +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 in the female connector on the right and can be used to power sensor electronics, up to the current limits of the ALM1000 power supplies. 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 in the female connector on the right 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 board layouts are included in the zip file linked to at the end of this document.+{{ :university:courses:alm1k:alm-signals-labs:alm-ss-poly-phase-fig7.png?200 |}}
  
-{{ :university:tools:m1k_analog_mux_layout_h1.png?350 |}}+<WRAP centeralign>Figure 5, ALICE Analog Mux controls</WRAP>
  
-<WRAP centeralign>Figure 2, Analog multiplexer PCB top layer</WRAP>+There are many use cases that can benefit from more than two scope inputs. Below in figures 6 and 7 are examples showing the Mux being used to view multiple outputs of a poly-phase filter.
  
-Here is another smaller incarnation 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 in this document.+{{ :university:courses:alm1k:alm-signals-labs:accesory-mux.png?500 |}}
  
-{{ :university:tools:m1k_analog_mux_layout_h2png.png?350 |}}+<WRAP centeralign> Figure 6, M1k Mux accessory board attached to poly phase filter and an M1k</WRAP>
  
-<WRAP centeralign>Figure 3, Alternate version Analog multiplexer PCB top layer</WRAP>+Another use case is the artificial lumped LC transmission line [[https://github.com/analogdevicesinc/education_tools/tree/m1k-accessory-boards/experiment-boards|experiment board]] shown in figure 7.
  
-In figure 4 we have a modified version of the protoboard/breadboard adapter which now includes the multiplexer and two of the input resistor divider networks.+{{ :university:courses:alm1k:alm-lc-atl-fig3.png?600 |}} 
 + 
 +<WRAP centeralign> Figure 7, M1k plus Mux accessory board connected to lumped LC transmission line. </WRAP> 
 + 
 +The simplest way to use the 74HC4052 is just on a small bit of proto-board with male jumper wires attached as show in figure 8. 
 + 
 +{{ :university:tools:m1k:74hc4052-bb-mux.png?600 |}} 
 + 
 +<WRAP centeralign> Figure 8, Simply attach 74HC4052 on proto-board and jumper wires</WRAP> 
 + 
 +There are other analog multiplexer configurations in the generic CD4XXX series of CMOS ICs. The CD4051 is a single 8:1 mux and the CD4067 is a single 16:1 mux. The old Motorola MC14529B analog selector can be a configured as a dual 4-channel or single 8-channel device depending on how the input controls are used. By using 3 or all 4 of the digital PIO bits and two of these single multiplexers either 16 or even 32 signal channels could be measured. This [[https://www.sparkfun.com/products/9056|16:1 mux breakout board]] available from SparkFun is based on the CD74HC4067 and works well with the ALM1000. Another [[https://www.sparkfun.com/products/13906|8 Channel Multiplexer Breakout]] based the 74HC4051 is also available. 
 + 
 +The SparkFun analog mux boards do not come with header connectors so they would need to be added. The pins on the connector do not line up with the M1k connectors so male to male jumpers would be needed as shown in the figure 9. 
 + 
 +{{ :university:courses:alm1k:alm-signals-labs:sparkfun-mux.png?500 |}} 
 + 
 +<WRAP centeralign> Figure 9, CD4067 mux break out board attached to poly phase filter and an M1k</WRAP> 
 + 
 +In figure 10 we have a modified version of the protoboard/breadboard adapter which now includes the multiplexer and two of the input resistor divider networks.
  
 {{ :university:tools:m1k_breadboard_mux_layout.png?300 |}} {{ :university:tools:m1k_breadboard_mux_layout.png?300 |}}
  
-<WRAP centeralign>Figure Breadboard adapter with analog MUX and input attenuators</WRAP>+<WRAP centeralign>Figure 10 Breadboard adapter with analog MUX and input attenuators</WRAP>
  
-There are other analog multiplexer configurations in the generic CD4XXX series of CMOS ICs. The CD4051 is a single 8:1 mux and the CD4067 is a single 16:1 mux. The old Motorola MC14529B analog selector can be a configured as a dual 4-channel or single 8-channel device depending on how the input controls are used. By using 3 or all 4 of the digital PIO bits and two of these single multiplexers either 16 or even 32 signal channels could be measured. These two mux breakout boards are available from SparkFun, the [[https://www.sparkfun.com/products/9056|74HC4067 16:1 mux]] and the [[https://www.sparkfun.com/products/13906|74HC4051 8:1 mux]]. Either works well with the ALM1000.+There are other analog multiplexer configurations in the generic CD4XXX series of CMOS ICs. The CD4051 is a single 8:1 mux and the CD4067 is a single 16:1 mux. The old Motorola MC14529B analog selector can be a configured as a dual 4-channel or single 8-channel device depending on how the input controls are used. By using 3 or all 4 of the digital PIO bits and two of these single multiplexers either 16 or even 32 signal channels could be measured. These two mux breakout boards are available from SparkFun, the [[https://www.sparkfun.com/products/9056|74HC4067 16:1 mux]] and the [[https://www.sparkfun.com/products/13906|74HC4051 8:1 mux]]. Either works well with the ADALM1000.
  
 Another functionally similar option is the [[http://www.analog.com/media/en/technical-documentation/data-sheets/ADG608_609.pdf|dual 4:1 ADG609]] and single ADG608 8:1 multiplexers, which have a different pin-out than the generic CD4051/52 multiplexers. Through-hole and surface mount ADG609 based boards similar to the one in figure 3 are also included in the zip file. Another functionally similar option is the [[http://www.analog.com/media/en/technical-documentation/data-sheets/ADG608_609.pdf|dual 4:1 ADG609]] and single ADG608 8:1 multiplexers, which have a different pin-out than the generic CD4051/52 multiplexers. Through-hole and surface mount ADG609 based boards similar to the one in figure 3 are also included in the zip file.
Line 41: Line 67:
 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 could be little margin in certain cases. 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. 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 could be little margin in certain cases. 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.
  
-This analog multiplexer data acquisition add-on board is a perfect candidate for writing a custom program using the ALM1000 Python interface software package ([[https://github.com/signalspec/libsmu|libpysmu]]). A basic example Python program (eight-channel-mux.py) is written with a minimal display but provides all the ALM1000 libpysmu specific code to pole the dual 4:1 MUX inputs through the two analog input channels A and B. The display window as shown in figure displays the 8 raw voltage values. The program can of course be further customized by the user to display the input signals in the appropriate scale factor with any gain and offset calibration for the sensor(s) being used. A copy of the Python program is included in the zip file.+This analog multiplexer data acquisition add-on board is a perfect candidate for writing a custom program using the ALM1000 Python interface software package ([[https://github.com/signalspec/libsmu|libpysmu]]). A basic example Python program (eight-channel-mux.py) is written with a minimal display but provides all the ALM1000 libpysmu specific code to pole the dual 4:1 MUX inputs through the two analog input channels A and B. The display window as shown in figure 11 displays the 8 raw voltage values. The program can of course be further customized by the user to display the input signals in the appropriate scale factor with any gain and offset calibration for the sensor(s) being used. A copy of the Python program is included in the zip file.
  
 {{ :university:tools:m1k-analog-mux_f5.png?300 |}} {{ :university:tools:m1k-analog-mux_f5.png?300 |}}
  
-<WRAP centeralign>Figure Basic 8 input MUX data display</WRAP> +<WRAP centeralign>Figure 11 Basic 8 input MUX data display</WRAP>
- +
-A modified version of the [[university:tools:m1k:alice:users-guide|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 6.+
  
-{{ :university:tools:alice_mux_screen_shot.png?600 |}}+The [[university:tools:m1k:alice:desk-top-users-guide|ALICE (Software used for ADALM1000)]] has an optional mode 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 12.
  
-<WRAP centeralign>Figure 6Four channel MUX version of ALICE scope program</WRAP>+{{ :university:tools:m1k:alice:analog-mux-window.png?720 |}}
  
-In this example a CD4024 binary counter is driven by a 0 to 5 V square wave output from channel A. The divide by 24, 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.+<WRAP centeralign>Figure 12Four channel Mux display of ALICE desktop</WRAP>
  
-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+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. Using this "reset" pulse would be necessary whenever this program is used to observe a circuit that contains "state" such as to reset a digital counter to the same starting condition for each sweep.
-  +
-The program has much of the same functionality as the full [[university:tools:m1k:alice:users-guide|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. To allow the program to be used with multiplexers with active low control signals ( INH in the CD4052 ) or active high control signals ( EN in the ADG609 ) a widget to set PIO 2 low or high is included under the Options drop down menu. A copy of the Python program ( alice-mux-1.0.pyw ) is included in the zip file+
  
  {{:university:tools:m1k-analog-mux.zip|Design file archive:}}   {{:university:tools:m1k-analog-mux.zip|Design file archive:}} 
  
university/tools/m1k/analog-mux.txt · Last modified: 21 Dec 2022 18:49 by Doug Mercer