Logic Analyzer Help~

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
User avatar
Lenp
Posts: 1529
Joined: Thu Oct 26, 2006 8:11 pm
Location: Maryland
Contact:

Logic Analyzer Help~

Post by Lenp »

I am considering possibly adding a logic analyzer to my collection of toys. Looking over the ebay lists, I need some directon to go in.

I do not high speed. In fact, what I really need is a slower speed. I often work on PLC systems in industrial controls and would like to monitor various signals maybe 8-20 max at one time. Most of these are simple I/O signals, occurring sequentially,while others arrive at the same time.

The idea is to have an ability to monitor a bunch of signals to see what one is in error. There are many switches and sensors so mechanical timing of the machines is often an issue.

I understand that the inputs would need to be externally 'conditioned' for the analyzer input since the machine controls can range range from TTL to 240 vac! . Currently I use a 'trick box' which is a group of indicators and a tangle of leads. The problem is that it is a realtime display and I often miss a fleeting signal. I guess I could do a latching indictor circuit but that doesn't help with pulses too fast to reset manually!

Maybe a logic analyzer wouldn't be the best choice. I guess the best description of what I could use would be a 20 channel paperless chart recorder!

Thoughts anyone?
Len
Len

“To invent, you need a good imagination and a big pile of junk.” (T. Edison)
"I must be on the way to success since I already have the junk". (Me)
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: Logic Analyzer Help~

Post by MrAl »

Hi there Len,


The basic circuit would look at the various inputs and decide if it is a high or a low.
This could mean that for each input you want to be able to select what levels these are
and what the transition levels are because you will be dealing with logic signals of
many different origins. This isnt a big problem when speed isnt an issue because you
can use comparators as the detectors and use pots and resistors to set the levels
for each input.

The catch is that often in the industrial setting there are various voltage levels and
even different phases so that some inputs need to be galvanically isolated from each
other. This presents another little problem which has to be dealt with.

One way to deal with the isolation issue is to use opto couplers. This isnt a bad
choice because the inputs will all be logic levels, not pure analog, and fairly
decent opto's are pretty cheap on the order of 50 cents each.

The idea then is to develop an input detector building block that consists of one
opto coupler and perhaps two pots and some resistors, and the most important part:
the isolated power supply. You can then use as many of these blocks as you need
to accomodate almost any number of inputs.
The isolated power supply can be as simple as a 9v battery (one for each channel)
or individual windings on a transformer. The 9v battery would provide for the best
isolation as interwinding capacitance can sometimes couple noise into sensitive
circuits when voltage differences are great.
The choice is up to you however, and of course there are always other types of
batteries like AA.

The opto output of each input block would go to the master circuit, which would
simply read each input and send it out to the computer input (like serial).

Sometimes you also want to take a snapshot of the system under test too, so you
might provide some fast memory to hold the logic states and then send them
to the computer all at once. A microcontroller would send all the data.

Power consumption for the input blocks will be minimized with choice of comparator,
and it may be possible to send pulses to the master circuit instead of complete
logic changes where each pulse would represent a change of real world logic state.
This would mean much longer times between battery changes, unless of course
you go with the transformer(s), one winding per input stage.

Overall use would be like using a scope, where you adjust each input to handle whatever
logic levels are present there, and read the results on the computer screen.
The computer software would simply be a port reader and display.

How's that sound so far?
LEDs vs Bulbs, LEDs are winning.
User avatar
Lenp
Posts: 1529
Joined: Thu Oct 26, 2006 8:11 pm
Location: Maryland
Contact:

Re: Logic Analyzer Help~

Post by Lenp »

Hi Al,

I agree, that opto-isolation is the best approach. With some of the NEC 2600 series isolators, designed for AC, there are parallel opposing polarity input LED's. That negates any AC/DC and polarity issues. With proper input scaling resistors the front end could easily and effectivly be protected.

The software might indeed be the most formidible part of the projecy, but, I ran accross this which seems to wrap it all up, and look at the price, $25! Htttp://www.dataq.com/products/startkit/di148.htm

Maybe this is what I need with a custom opto-isolated input module..

Comments...
Len
Len

“To invent, you need a good imagination and a big pile of junk.” (T. Edison)
"I must be on the way to success since I already have the junk". (Me)
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Logic Analyzer Help~

Post by philba »

Here's a fixed version of the url http://www.dataq.com/products/startkit/di148.htm

That's a reasonable price though it's limited to 14.4KHz. More importantly, it's missing the triggering that logic analyzers have. This is key if you are trying to catch transient problems. You can set up complex trigger conditions with even simple LAs.

There are several decent USB LAs in the $140-150 range.
http://www.sparkfun.com/commerce/produc ... ts_id=8938
http://www.usbee.com/sx.html
I've been tempted to buy one of these for a while.

You'd still need to condition the input.

For AC, are you just looking for the presence of AC? In that case you might want to rectify and filter a bit to get a continuous signal. With the AC opto isolators, you will see a series of pulses which makes it harder to trigger on.
User avatar
Lenp
Posts: 1529
Joined: Thu Oct 26, 2006 8:11 pm
Location: Maryland
Contact:

Re: Logic Analyzer Help~

Post by Lenp »

Hi Philba,
I've considered the unit from Sparkfun. It has been out of stock from them and the manufacturer for some time.
The one factor with the Dataq unit that attracted me, besides price, is that the software can handle about 30 chamnnels by just adding more analyzer modules. Since the modules are uniquely numbered, the software sorts it all out from the USB ports. The jury's still out here though.

Opto coupling is a must. The most significant reason is isolation of the individual channels. Since all the logic analyzers use a single common for all channels, hooking this up without complete channel separation would not be possible and likely the smoke will get out!

Here's the plan for each channel...

To Do List
Inherent AC/DC with polarity insensitive inputs
Selectable input voltages of 5/12/24/120/240
Some steps may be elimnated based on the min/max current ratings of the opto isolator
Switched fitering to eliminate line frequency and contact bounce counting
LED for each channel for visual indication without an analyzer attached

Wish List
Continuity with isolated channels and not using a box of batteries!


Comments?

Len





I do plan to use opto's, with diode inputs. Other features would be a switchable filter and selectable resistors for the commonly encountered voltages (5/12/24/120/240) . A standard LED in series with the opto's LED for visual observation without an analyzer if desired is also planned.
Len

“To invent, you need a good imagination and a big pile of junk.” (T. Edison)
"I must be on the way to success since I already have the junk". (Me)
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Logic Analyzer Help~

Post by philba »

I can see how your conditioner pod would work. Some thoughts:
- your indicators could be set up to also indicate polarity. green for +, red for - and both for AC.
- you want to be careful with switching between HV and LV. Could be a hazard. There may be a way to autoswitch but I'm not sure of the technique. probably presume 240VAC and switch down from there. Have to be real careful...
- what kind of software does the DAQ unit have. I've seen a lot of really bad SW from these kind of companies.

By the way, the USBee SX LA looks better than the Salae one from sparkfun. a bit cheaper and nicer SW. also, the USBee SX runs on win2K and up, Salae on XP and Vista only. This is an issue for me since I have a win2k machine for my lab PC.
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: Logic Analyzer Help~

Post by MrAl »

Hi Len,


Wow 25 dollars for 8 channels doesnt sound too bad, but i wonder if the bandwidth will be good enough
for what you need it for. I dont know what your max frequency requirement is.

Another thing i dont know is what your input impedance has to be for each channel. If it has to
be high then you need buffers for each channel because opto's internal diodes will need some
current to drive them. If you dont have to sense high impedance circuit points then maybe you
can get away with just a resistor or two, but you would have to let us know what this
requirement would be.

Now that i think about it, most of the opto circuits i have worked with had to drive somewhat
lower impedance outputs like 5k. At 10v, that is 2ma which is not always insignificant when
measuring some other circuits test point.
I dont think i ever had to design something that had more like 50k output (would might be ok for
an input to an AD converter or uC port) which would then only require 200ua to drive. I say this
because i dont know how well the opto's work with only 200ua input. My guess is that they
would be very slow to switch, the exact bandwidth is difficult to say, but you could do a few
tests with a prospective device before you build up 20 of them of course.

Of course they make more expensive opto's, but im not sure what your budget is for this
project either.

Perhaps give us some idea about the following:
1. Max impedance or max current draw from a typical test point for circuit under test.
2. How much bandwidth does each channel need.
3. What is your budget for this project.
LEDs vs Bulbs, LEDs are winning.
reloadron
Posts: 519
Joined: Sat Jun 28, 2008 8:57 am
Location: Cleveland, Ohio
Contact:

Re: Logic Analyzer Help~

Post by reloadron »

Hi Ya Guys

I can offer up some information on the Dataq line. First and important in some cases is that the DATAQ starter kits are great little starter kits but beware of a few small caveats. Sample Rate being the first. Terms like "Up to 14,400 Hz Sample Rate" sound good but in reality the sample rate of a DI-148 is 240 samples per second without purchasing the additional software to unlock the device for the faster sample rate. Additionally that sample rate be it 240 samples per second or 14,400 samples per second is true of a single channel. Meaning if we have a basic starter kit DI-148 running at 240 Hertz using 8 channels we now have a sample rate of 240/8 = 30 samples per second per channel. Also and I doubt it matters when using the units as a Logic Analyzer the A to D resolution is 10 bits.

Next, I don't believe units in the starter kit family can be cascaded. This only holds true for the much higher end products like the DI-730 and similar units that can get very expensive. I have cascaded the DI-730 as well as their DI-1000TC units. Again, I don't believe the starter kits can be cascaded.

The software? The software comes in a few flavors and really is pretty good stuff for the intended use of the units. The basic software with any starter kit is WinDaq Lite. This allows the user to monitor all the channels but also record the channels. The recorded data can later be played back (playback software included) and that can be a very useful tool. THIS PAGE contains a few screen shots of a small project I did using a DATAQ DI-710. The software, even the basic lite version is good stuff.

Additionally I like the DATAQ stuff because it is very easy to write your own software for. I happen to use VB but they provide great help for other languages as well. Nice feature of the DI-148 and other starter kits is you can trigger a record function at any combination of given points using the Digital I/O functions beyond the analog input channels.

Big downside of the DI-148 as was mentioned is the inputs are single ended unlike the DI-158 which can be used single ended or differential input. However, only has 4 analog input channels.

Anything I can help with or answer for you please do ask as to the DATAQ products.

Ron
User avatar
Lenp
Posts: 1529
Joined: Thu Oct 26, 2006 8:11 pm
Location: Maryland
Contact:

Re: Logic Analyzer Help~

Post by Lenp »

To ALl

I'm amazed at the response, Thanks!
First I think it needs to be clear that although I started this thread as a Logic Analyzer, it probably was a misnomer. A paperless strip chart recorder may have been more accurate. I guess I was looking at all the available logic analyzers and am trying to get a double header from a single play ticket. I'm not sure if a 'logic analyzer' is even appropriate for the long time window I am looking for. Maybe a minute or so.

Here's a typical application...
In book binding, the gathering line assembles the sections of books, passes them to a mill that preps the bound edge, then to the glue applicator then the cover folder then a stacker and a trimmer and lastly the packaging station. All through this line the books pass various sensors to be sure there are no jams or mis-feeds. Sometimes the line will just shut down because one of the limit switches or sensors didn't trip or tripped too soon or in error. No obvious reason. This is all sent to a PLC and generally there are no fault specific status indicators. Forget monitoring the PLC in real time with a computer link. Although it may be possible at the factory level, the manufacturer will not supply any software or details about the embedded program. Not even a ladder drawing or English language documentation is available in most cases. It's a quarter million dollar black box syndrome with spotty overseas support and very independent and limited local service. Regrettably, It's the industry standard!

I'm working with mechanical machines not high speed logic circuits that use hard wire switching, and usually not at the logic level. Maybe a typical 'run' would be 10 inputs over maybe a 1 minute period (think EKGl)

What I would like to do is monitor some of these sequences and create valid documentation to later compare with a fault condition. Maybe then I could see what came first, the chicken or the egg!

So,with all the experience out there, a quick question. Could a 'conventional logic analyzer' monitor slow events?

If it would work, with proper input conditioning, the same instrument could be used for conventional logic analyzer applications and this funky application as well!.

I guess what triggered this whole issue is the proliferation of dedicated logic analyzers in surplus, like ebay and their next-to-dirt costs!

Thanks again!

Len
Len

“To invent, you need a good imagination and a big pile of junk.” (T. Edison)
"I must be on the way to success since I already have the junk". (Me)
reloadron
Posts: 519
Joined: Sat Jun 28, 2008 8:57 am
Location: Cleveland, Ohio
Contact:

Re: Logic Analyzer Help~

Post by reloadron »

Hi Lemp

OK, so things really come down to this. A Logic Analyzer will basically tell you if your signal levels are high or low and is for simple purposes little more than a DI (Digital Input) device. The mentioned DATAQ devices are for the better part (what we looked at) AI (Analog Input) devices. Now there is actually a good thing to all of this. I became familiar with the DATAQ devices years ago as an alternative to paper type chart recorders. We were running several old Honeywell "Visicorders" till the last paper manufacturer (Kodak) quit making the photosensitive paper.

The problem you face is getting the inputs to what you need. Additionally the number of channels you want to record.

Ron
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Logic Analyzer Help~

Post by philba »

A logic analyzer doesn't care how slow it goes. You pay for speed and channels. I think most of your data will be digital (or limited to 2 values - on and off).

Your problem seems to be more of a data acquisition problem, though. You'll probably have to write the analysis code yourself as the issues are pretty specific to your production process.
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: Logic Analyzer Help~

Post by MrAl »

Hi again,

The reason i brought up speed was because if opto couplers are used on the input without any
pre-buffering (which requires a separate isolated power supply for each channel) the speed
comes into question because the circuit under test may not be able to put out much current
without significant load, the load being the opto's input diode (with series resistor of course).

This setup is really simple and cheap, but it will only work with circuits that can put out
a significant current like 2ma (which is VERY significant in some circuits) if 10us rise and
fall delays are acceptable. Turn that down to 500ua however, and you are forced to
wait 100us rise and fall which starts to significantly limit bandwidth.
The other thing is i am not too certain yet how the opto would work with much less input,
like 100ua. My guess is that the output resistor would have to be very high and that might
be a problem if the AD converter input can not work with that high an input impedance.

It doesnt sound like Len needs anything too fast though, so maybe straight 4N35 optos
will work just find, with a series resistor. The drawback is that the exact logic level
for the different states will not be able to be set very definitively, although again this
may not matter for some circuits that need to be tested.

To make the inputs adjustable a comparator could be used with pots that would enable
one to maintain high input impedance while at the same time allowing a full range
of logic level settings. This of course means one isolated power supply per channel,
but there are various ways to get that too. It all depends on how critical the load
impedance is on each channel.
LEDs vs Bulbs, LEDs are winning.
User avatar
Lenp
Posts: 1529
Joined: Thu Oct 26, 2006 8:11 pm
Location: Maryland
Contact:

Re: Logic Analyzer Help~

Post by Lenp »

Ron,
So if I get the drift, the Dataq units could log the on/off states of the inputs if I properly conditioned them. The data would be saved so that it could later be examined, printed, or whatever. It looks like the USB units, while not cascadable, can be used on separate USB inputs and that increases the number of available data channels. Your reference to a 'chart recorder' hit the nail!

Philba,
So would it be fair to say that the self contained logic analyzers, like the multichannel units littering ebay would perform the same function, in this application, as the USB devices? I guess the decision factor is ..do these self-contained units provide data aquisition, or are they more like the Fluke 123 Scopemeter I have. It will save up to two display screens for later recall and dump them to a serial port to print. There is no data collecton except what fits on one screen.

Al,
I appreciate your concern for speed and input loading, but, that is not an issue here. Remember this is a mechanoical device, speed is measured in milli to full seconds and control voltage levels from usually 12 to 240 volts depending on the machine desgn. The sensor outputs may drive relays, contactors, indicators, solenoids or may be PLC inputs. They are robust signals. In an earlier post I mentioned I use a box-o-lights and it works. It just has no memory. The lights are driven directly by the machine control voltage applied to/through the sensors.

To All...
Maybe machine control is unfamiliar to some but the signals usually are not 5 volt logic. The machine is just too electricallly 'dirty' with 3 phase motors starting, DC brakes and clutches operating that all make for an unreliable environment for little logic pulses! PLC's have input modules that accept robust and dirty voltages, switches both , mechanical or transistor as inputs and there may be a few analog, like speed controls. Outputs are either triac or contacts to operate relays, contactors and indicators. The TTL or CMOS logic levels are kept locked up inside the PLC where it is 'clean'! The older, non PLC designs are a sea of relays and contactors since they work on 'screw logic' (The signal goes from this terminal screw to that terminal screw). In the case of safety devices and controls, there may be a slew of contacts, all in series that need to be closed for the machine to run. Here, tracking the status of these contacts, maybe in a group if not individually, would help locate the momentary fault that shuts the machine down. I have found damaged wiring, defective and misadjusted switches and operator 'repairs' that quit as soon as I leave the plant but worked for two hours while I was there!

Thanks again,

Len
Len

“To invent, you need a good imagination and a big pile of junk.” (T. Edison)
"I must be on the way to success since I already have the junk". (Me)
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Logic Analyzer Help~

Post by philba »

I recall reading the USBee literature that you can log your sessions for later playback. Don't know about the Salae unit.
reloadron
Posts: 519
Joined: Sat Jun 28, 2008 8:57 am
Location: Cleveland, Ohio
Contact:

Re: Logic Analyzer Help~

Post by reloadron »

Lemp Wrote In Part:
Ron,
So if I get the drift, the Dataq units could log the on/off states of the inputs if I properly conditioned them. The data would be saved so that it could later be examined, printed, or whatever. It looks like the USB units, while not cascadable, can be used on separate USB inputs and that increases the number of available data channels. Your reference to a 'chart recorder' hit the nail!
Absolutely, the software for the little DATAQ units allows the user to view the input channels in Real Time as well as record the inputs to view later. The merit to this is that I can record a process several times then later playback the process and look at any differences within the same process. Additionally you can for example (much like a scope) set the record function to start off a trigger the user sets up.

I understand what you are looking at in that you have a PLC running a program. The PLC drives a series of modules that provide outputs/inputs that can be analog or digital in nature. The modules then drive possibly motor starters or solenoids as well as look for inputs from switches etc.

Tell you what. I have a few older DATAQ DI-154 starter kits.
THEY CAN BE FOUND HERE and I would be happy to send you one to mess around with. That would afford a first hand look at what the units can do. The older DI-154 uses a serial port (RS232) and is port powered. That includes the software etc. Though not a USB device you would get to mess with a unit and see what could be done with a critter of this type. Keep it for awhile as I don't need it back right away. However, you will need a RS232 serial port on your machine you run the software on.

If you write any code at all in VB (I used VB6) I can also give you some code samples. They are not necessary as the unit is plug and play but writing does expand what you can do.

Ron
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests