Project

General

Profile

Mux

Added by wolfpackmars2 about 5 years ago

A new project forming in the back of my head. I have would like to create an automated test device using Arduino/Jeenode as the controller. I’ve determined that I will need to test a minimum of 204 connections. At the most basic, I need to check connectivity between all 204 test points - that is, I need to know which test points are shorted, which test points are open, and there may be a few test points which have some resistance. The DUT (Device Under Test) is a fairly simple adapter, although it does contain a 3 capacitors and 2 resistors. It also includes a 3v3 Low Voltage Linear Regulator, which I would like to test, as a bonus. However, at a minimum, I would like to just do a resistance check between all test points. Basically, I want to automate this testing so I don’t need to do it by hand with a multimeter :P

I’ve determined that a multimeter measures resistance by applying a small voltage and measuring the voltage drop across a device - so one of the high res ADCs offered by JeeLabs (and which I already have experience with) will work for measuring the resistance/connectivity. I haven’t researched how to measure capacitance yet, but I have seen a few posts around the net that seem to explain how to do it with a ’duino. However, what I’m having difficulty with is my most basic problem: how do I test between 204 test points? So far, I’m pretty sure I need to use a bunch of multiplexers. I believe I will need a separate set of multiplexers for applying the stimulus (voltage), and another bank of muxes to interface the ADC to measure the resistance - basically the positive and negative lead of my probe. I believe it should also be possible to enable different stimuli to be applied (perhaps different voltages to test the LDO regulator, for example) and different measuring devices (the ADC and whatever is needed to measure the capacitance - maybe the ADC can do it all)

I’ve read a little bit about shift registers, which could potentially allow me to use one set of multiplexing devices instead of two - since a mux seems to be limited to selecting one Input/Output at a time whereas a shift register can enable multiple “switches” at the same time. I haven’t researched this much, as shift registers seem to be more geared towards “memory” applications and less towards switching signal paths on and off.

Anyways, the popular multiplexers used in Arduino setups seem to be limited mostly to 16 channels (at a cost of roughly \$1 per 16 channel mux), and limited to 8 max devices on a bus - which brings me up to 128 max testing paths. This is far fewer than the 408 paths I believe I will need. Following this link http://forum.arduino.cc/index.php?topic=90115.0 the last post suggests using one mux to control 16 other muxes, which brings me to 256 paths - more than enough for one side of the testing equation. If I create two separate networks like this, I get 256 testable paths (256 input paths and 256 output paths) for a total of 512 signal paths. While it seems like a lot, at a dollar a piece, 34ish multiplexers will cost less than \$50. However, I haven’t yet found any examples online of using a multiplexer to control other multiplexers (they must be out there, I’m just not finding them). I would like to do this with a single Atmega 328 chip (JeeNode v6) if possible. That is, control both Input and Output signal mux networks and control the stimulus and measurement networks as well, if necessary (possibly use a mux to switch between the different signal source and measurement functions).

There appears to be two common interfaces used by the muxes - i2c and spi - with spi being faster but i2c using fewer pins for control. Both are limited to 8 devices on a network, although the jeenode seems to allow creating multiple virtual i2c networks, iirc. Maybe I can even get away with using only one spi/i2c network - to control 4 muxes, which in turn control their own network of up to 16 multiplexers. So, 1 mux controls 16 additional muxes for the input signals, another mux controls 16 muxes for the output signals, one mux switches between different input signals, and a fourth mux switches between different measurement functions.

My questions:
1) Is this possible?
2) Can it be done with a single Atmega chip?
3) what is the fewest number of pins on the atmega chip I can get away with using?
4) Can it be done with a Jeenode (thereby simplifying my controller design a bit)
5) Is there a better way?

It may seem like a pain, but I figure if I design it right, I could end up with a 256 point automated testing platform which can have different tests written to test different devices by swapping out daughter boards with a common interface. I have extensive experience working with automated testing and quality control of electronics, although this is the first time designing my own test platform from scratch.

As always, thanks in advance for the help :)


Replies (2)

Mux - Added by martynj about 5 years ago

@wolfpack,

Interesting project. Yes it is all possible with some ingenuity - the critical parameters are just how fast do you want to switch from test to test, and what sort of accuracy do you expect/need for the test between any two nodes in the mesh? 
Your aim of basic connectivity (just continuity/ open circuit, both defined by some easy thresholds) is the easiest to achieve, especially on an unpopulated board - measuring actual parameters between the nodes can get as difficult (and expensive) as you wish!

As you may be aware, professional fixtures (e.g. custom bed-of-nails fixtures) for PCB or even wafer probing run into the price bracket that would buy a comfortable home (or several).  They integrate conditioning amplifiers with their select logic as close to the probe tip as possible to get the performance needed for high speed, parametric testing.
This method is an effective solution to the cabling problem when dealing with many potential nodes - buffer the signal and/or node stimulus with select logic and put the output on a common, shielded bus.

If test time is not critical, have you thought of the alternative - shift the problem into the physical space.  Meaning an accurate X/Y table with at minimum a pair of Z-driven probes (maybe one topside and one bottom side) allows complete flexibility in selecting the test points and spending a lot on just two high spec ADC/stimulus circuits.
Leave the ATMega doing what it is more suited to - controlling the XYZ servos. For probe circuitry, it is out of its depth (high speed differential low noise ADC and low impedance, high drive capability DAC’s).

RE: Mux - Added by wolfpackmars2 about 5 years ago

Well, it is an interesting project that I’ve had in the back of my mind in one form or another for several years. 5 years ago I envisioned a set up using a Huntron Tracker (which I used in the military) as the test equipment. Basically, my background is Avionics testing using ATE test stations where you have a multi-million dollar tester full of power supplies, signal generators, RF Spec Analyzers, etc etc. all tied to a common interface where you have an adapter to test the part you are working on. As I progressed, I started working on individual circuit boards and various odd components as a 2M tech, which is where I was exposed to the Huntron. So, I began to think of ways I could use a Huntron as a compact test station with a common multiplexed interface where I could have different adapters to test various parts. I left the military shortly after and that project never got completed. Off and on over the years I have come across various things in my life that I thought could benefit from the increased reliability of automated testing - and, now I’m semi-familiar with Arduino - so here I am again.

What I want to test in this case can’t be tested with a prober, I don’t think. It’s a kit of parts containing a mix of various cables and a pair of circuit boards that all interface together. To be less vague: http://www.dhgate.com/product/1x-16x-pci-e-pci-e-express-riser-extender/181977315.html\#cps-2-5|null:8

My personal experience with these types of things is that the quality is totally hit or miss. The problem is, when you get a bad unit, aside from not working as expected, there is a risk of this \$10 part going up in a puff of smoke and taking thousands of dollars of equipment with it. Trying various Manufacturers hasn’t resulted in any better results - just different types of problems - from visible solder balls floating in flux to “why the hell isn’t this working??” As I see it, I’ve been doing this stuff my whole life, and if I am having this much trouble, and blowing out ports on my motherboards, then others must be having the same problems as well. Which got me thinking - can this problem be solved using ATE to weed the bad units from the good.

Obviously, if I’m going to go through the trouble to come up with such a system, then I want to make it reusable by including a common interface where I can build adapters to adapt my device under test to the tester.

At a minimum, I need to perform a continuity check on all potential contact points - even ones that aren’t technically functional but where a short between two unused pins could cause a more expensive device to be damaged. Ideally my system will have the following features:
Continuity check up to 204 test points (minimum for this project) - 256 test points is better but not required - anything over 204 is gravy
An SD card port, which will be used to load test programs and store test results - this would be a bonus, although I could probably live with controlling the tester through USB and storing the results transmitted across USB
Bonus points if I can add an interface, such as this: http://www.newark.com/adafruit-industries/772/lcd-shield-kit-16x2-blue-white/dp/44W3450?mckv=sdywDsFoj|pcrid|33869889261|plid|&CMP=KNC-GPLA then the system pretty much becomes a stand alone test setup

Some things I’ve not done but which may be required:
I’ve not worked with the Arduino MEGA class of devices - which include more memory and more I/O ports
I’ve never worked with a system that used two ATMEGAs working together on the same board - but again, this would add more I/O and possibly more memory
Bonus points if I can do what I need with a single ATMEGA328

Speed isn’t too critical, since just about anything will be less time consuming than manual probing with a DMM. For the most part, I can hook up the DUT and go have a cup of coffee while the test runs. If the test is 15 minutes or less, I would consider that acceptable. If the test takes an hour or longer per unit, then I might start looking at optimizing the system at that point.

    (1-2/2)