Digitize at the sensor
first posted
Wednesday January 1, 2003 16:49
Monday January 13, 2003
09:59
There are two basic strategies for digitizing sensor information.
1 digitize at the sensor
2 digitize
by sending the the sensor data through a coax cable to an ISA or PCI bus a/d
card inside.
Let's conduct a reliability and validity experiment to see which architecture works best.
Lots of companies sell ISA and PCI bus a/d converters. For example the Measurement Computing PCI-DAS6023 [$375] and the the National Instruments PCI-6023E [$395].
So let's buy two ISA and two PCI a/d converter cards, all from different companies, of course.
Let's now get four PCs. Say two with ISA bus slots and two with PCI bus slots. The PC's, of course, must run at different clock speeds, say from 100 megahertz to 2.4 gigahertz. And have different motherboards and cases.
Now we need thee different lengths of coax cables and two different supplies of coax cables.
Here's the remote digitization test set up. ![]() Technically competent people have selected the sensor and, therefore, we assume that the sensor is converting from whatever it is measuring - magnetic fields, motion, temperature, ... - to a voltage. So to do the test we'll remove it and replace it with a properly designed and implemented d/a converter. Output of the d/a converter is buffered with an op amp buffer. A serial input d/a is driven with 80C32 mode 0 synchronous serial output. The sample clock is supplied with one of the 80C32 timers. The 80C32 Forth or BASIC-52 software is compiled an assembled from a PC. Naturally since all of the four sampling systems, A, B, C, D are seeing the same input signal, they should all get the same answers. Since the 80C32 d/a sensor replacement is outputting from a digital synched to the sample clock, we know exactly to the bit what should be received by the four sampling systems. So we run several tests, say generating sine waves of various frequencies, and compare results. Now we replace the coax between the analog buffer and the junction box to the four PC systems with different lengths of coax. Hey, the values converted by the a/d converters must be only a function of the sensor output, not of cable lengths to be valid sensor data. Coax of course has both capacitance and resistance which is a function of length and manufacturer. Next we run a variable speed electric drill held close to the coax cable and repeat several experiments to see that we get exactly the same digital values at all computers for each sample clock. Any they say in China and Japan. Rots of Ruch. Raven alludes to dynamometer digitization problems. Here's the digitization at the sensor experimental set up. ![]() We'll use the same four PCs but this time we'll communicate serially rs-232 or maybe even USB 1.0/2.0! This time we're going digitize as closely to the sensor replacement as possible. A serial a/d converter is connect to mode 0 80C32. 80C32's are very noisy so it must be shielded both on the top and bottom of the PC board with at least double wall shielding. The digital inputs of the a/d converter must be optoisolated in an shielded ante chamber. Shielding must be on both sides of the a/d converter board. On-board a/d power regulation for both the a/d and 80C32s. Naturally either a Forth or BASIC-52 operating system is installed on the 80C32 connected to the a/d converter. Both the d/a and a/d 80C32 operating system interfaces can be on a single PC in different windows. Now we repeat the experiments for remote digitization and get exactly the same answers at all PCs. The jury is still out as to whether UBS [lvds] is sufficiently noise immune to work reliably. Opto serial communication would be the best. So the inescapable conclusion is that remote digitization works .... but not very well. Not only don't you get reliable data but you don't get valid data since you are measuring such things as differences in PCs, a/d vendor cards, PCI and ISA bus, and coax cable. In practice bill has seen remote digitization agree on two systems to one leading decimal digit. Bill learned what Teledyne Geotech did in its seismometers by looking at schematics while at Sandia labs. Bob Wayland, retired Sandia labs Ph.D. physicist, designed the analog filters to three axis magnetometers. Bill Goldrick told bill what the Sandia labs satellite groups did for satellite design. We should look at what others do. And listen to their explanations of why they do what they do. DIGITIZE AT THE SENSOR! We're going to see some really neat 80C32 SOC based quality digital sensor products shortly. And hopefully fewer companies selling ISA and PCI "buy out' a/d boards. Provided, of course, that this explanation works as planned! Getting valid and reliable sensor data should increase pricing power. People will pay for accuracy and reliability. As a sad aside about remote digitization, why do people do this when remote digitization doesn't work very well? Several possible explanations come to mind. The designer is unable to design and implement the software for a digital sensor? The designer and the customer doesn't care about accuracy and reliability. Or maybe they don't require either? Maybe they're hucksters? |
Wednesday January 1, 2003 20:57
To dispel remote digitization nonsense, we must first understand the concepts of reliability and validity.
Internal consistency--the coefficient of test scores obtained from a single test or survey (Cronbach Alpha, KR20, Spilt-half).
7. Payne, W. H., and D. E. Anderson, Significance Levels for the Kuder-Richardson Twenty: An Automated Sampling Experiment Approach, Educational and Psychological Measurement, 28, No. 1 (1968): 23-29.
8. Payne, W. H., and D. E. Anderson, Automated Sampling Experiment Program for Cumulative Distribution Functions of the Kuder-Richardson Twenty, Educational and Psychological Measurement, 28, No. 2 (1968).
9. Anderson, D. E., and W. H. Payne, Significance Levels for the Kuder-Richardson Twenty and Automated Sampling Experiments, Proceedings of the 74th Annual Convention of the American Psychological Association (1968).
Monte Carlo computations!
Anderson is one of bill's Ph.D. students.
Validity is getting the right answer.
A study is valid if its measures actually measure what they claim to, and if there are no logical errors in drawing conclusions from the data. 1
Reliability is getting the same answer on repeated trys.
In the practical world of shooting this is hitting the target in the same place on repeated shots. 1 2
Digitizing in electrically noisy environments.
There are two general approaches to digitizing analog signals:
1 Buy an a/d converter card which sits on a PC ISA or pci/cardbus. The run long wires, preferable coax cable to the sensor.
2 Digitize at the sensor.In approach 1 there are different a/d card vendors, different motherboards, different cases so its hard to get the same digital a/d reading independent of the peripheral configuration.
In addition if the system is in an electrically noisy environment, say in a setting where frequency drives are used to control motor speed, one can get a fair amount of electrical noise in the conversion system. This is reflected in the low-order digits on the a/d conversion looking like random numbers .... which they probably are.
Approach 2 is to build a digital sensor where the conversion is physically done at the sensor.
This is the approach generally used with precision seismometers.
Another application is submarine magnetometers.
These magnetometers are apparently trailed behind a submarine on a long cable to isolate from the towing submarine's magnetic and electrical noise.
One advantage to digitizing at the sensor is that the same a/d converter reading is read independent of the computer systems hardware reading the converter.
If the signal to be digitized is very strong and one doesn't care too much about the accuracy in low bits, then remote digitization is okay. But in cases where the signal level is low relative to the noise background, digitization at the sensor is required to get meaningful data.
Field performance of USB 2.0 lvds drivers in electrically noisy industrial environments may be in question. RS-485 differential drivers definitely have problems especially with errors in the first received character.
Opto communications work far-better in electrically noisy environments. And speed is practically unlimited.
Here's a bit of practical history, not using an 8051, but rather a parallel port.
Csd has also used 8051 mode 1 485 network communications. This works pretty well ... so long as you discard the first character!
For the flux gate digital magnetometer no microcontroller was used for a number of reasons including time and cost.
If one can do the computations in a PC that's lots better than doing them at a peripheral microcontroller from a development cost and maintenance standpoint.
USB 2.0 will likely cause computations to be made in a PC rather than at the peripheral microcontroller side for similar reasons.
USB 2.0 can be considered the equivalent of the US interstate highway system. Fast transportation caused a centralization of production facilities.
Think Tyson chicken business. Before fast transportation chickens were produced locally. Tuesday April 23, 2002 07:57
Sandia's seismic data authenticator motherboard was used to evaluate new a/d converters for use in seismic verification programs. We built cards with a/d converter chips on them for the data seismic data authenticator. We also built cards with d/a converters on them! So we could feed the d/a output into the d/a. We evaluated Burr-Brown parts. We submit our card designs to the chip manufacturers so critical analysis. "Hey, did do anything wrong?" The chip designers gladly make comments about you analog/digital board layouts. Shielding and grounding is very important! Oakwood technologies and csd cooperated to build a three axis flux gate magnetometer hardware to detecting hole in pipeline systems. This is an about 9 year old design. Lots of technological improvements have occurred since then so an upgrade is in order. This design used no microcontroller. The sampling time base was done in hardware. Here's the sample clock board
We used the Burr-Brown ADS7807P serial output a/d converter. Here's the a/d board with the 7807.
Both serial data output and clock are optoisolated. There is an linear op amp on the board so that the output of the analog filter board can be amplifed so that it is full-range of the a/d converter. Correction, here's the analog filter board with lots of analog filter adjustments. A physicist designed this.
Bill studied digital interfaces to seismometer analog electronics. We learned that opto-isolation is essential to get good data for low-level analog signals! The digital outputs of the magnetometers were feed into the parallel port of a laptop computer for process. Here's the RS-485 communications board
Bill also learned that one must do on-board power regulation to feed sensitive analog circuits. Here's a power supply board
In electrically noisy environments one must digitize at the sensor, optoisolate, shield, and furnish clean power to get accurate sensor measurements. Or else discover you have designed a new random number generator for terminal data value bits!!! This raises an interesting question with the TI Burr-Brown MSC1020. A 24 bit sigma-delta a/d converter with a potentially-noisy 80C52?! 1/2^24 = 59.6 E-9. How did they do this? |
Csd is starting a page blowing the whistle on remote digitization.
And maybe peripheral microcontroller investment fraud too.
Bill is an official Department of Energy whistleblower.
Steven Fast Wolf, pine ridge sioux spotted tail tribe, and bill cooperated on this project.
Then there is even some more heavy whistleblowing stuff.
Bill is a senior citizen whistleblower.
William H. Payne: Graduate Education: The Ph.D. Glut. CACM 16(3): 181-182 (1973)
But there is good stuff the BSers are now trying to overcome.
But let's try to foil them.
Learn some practical physics, engineering, software, psychology and economic stuff too!
And we'll use internet to expose them all. The creeps.
Now for recent whistleblowing events.
[A]nd all the while there was the black comedy of corporate fraud. Who knew that the swashbuckling economy of the '90s had produced so many buccaneers? You could laugh about the CEOS in handcuffs and the stock analysts who turned out to be fishier than storefront palm readers, but after a while the laughs came hard. Martha Stewart was dented and scuffed. Tyco was looted by its own executives. Enron and WorldCom turned out to be Twin Towers of false promises. They fell. Their stockholders and employees went down with them. So did a large measure of public faith in big corporations. Each new offense seemed to make the same point: with communism vanquished, capitalism was left with no real enemies but its own worst impulses. It can be undone by its own over- reaching players. It can be bitten to pieces by its own alpha dogs. Day after day, one set of misgivings twined around the other, keeping spooked investors away from the stock market, giving the whole year its undeniable saw-toothed edge. Were we headed for a world where all the towers would fall? All the more reason to figure out quickly, before the next blow to the system, how to repair the fail- safe operations-in the boardrooms we trusted with our money, at the government agencies we trust with ourselves-that failed. This is where three women of ordinary demeanor but exceptional guts and sense come into the picture. Sherron Watkins is the Enron vice president who wrote a letter to chairman Kenneth Lay in the summer of 2001 warning him that the company's methods of accounting were improper. In January, when a congressional subcommittee investigating Enron's collapse released that letter, Watkins became a reluctant public figure, and the Year of the Whistle-Blower began. Coleen Rowley is the Fifi staff attorney who caused a sensation in May with a memo to FBI Director Robert Mueller about. the bureau brushed off pleas from her Minneapolis, Minn., office that Zacarias Moussaoui, who is now indicted as a Sep.11 co-conspirator, was a man who must be investigated. One month later Cynthia Cooper exploded the bubble that was WorldCom when she informed its board that the company had covered up $3.8 billion in losses through the prestidigitations of phony bookkeeping. These women were for the 12 months just ending what York
City fire fighters were in 2001: heroes at the scene, anointed by circumstance.
They were people who did right just by doing their jobs rightly - which means
ferociously, with eyes open and with bravery the rest of us always hope we have
and may never we do. Their lives may not have been at stake, but Watkins,
Rowley and Cooper put pretty much everything else on the line. Their their
health, their privacy their sanity-they risked all of to bring us badly needed
word of trouble inside crucial institutions. Democratic capitalism requires
that people trust in the integrity of public and private institutions alike. As
whistle-blowers, these became fail-safe systems that did not fail. For
believing - really believing -that the truth is one thing that must not be
moved books, and for stepping in to make sure that it wasn't, they have chosen
by TIME as its Persons of the Year for 2002. ... Time
December 30, 2002/January 6, 2203 |
Csd is studying and experimenting with the Cypress EZ-USB-FX development system with the object of porting a forth operating system to that board.
In the study process csd located a nasty bug in the plug-and-play Cypress wdm driver code.
What happened is that Cypress code displayed a message that it found development system and was searching for a driver. Then the PC went into reset and windows restarted.
This was stopped by hitting ctrl+break when the Cypress plug-and-play window appeared.
Csd uninstalled the Cypress EZ-USB-FX system, then reinstalled it.
Windows 2000 is an outstanding operating system. Csd believe Microsoft's claim that 2000 is 13X more reliable than 98.
| A forth operating system is on many
orders of magnitude more reliable than windows and perhaps other big
operating systems. This is one reason why forth is selected where high reliability, interactivity, and the ability to download source code to the target controller is required. Like for undersea, borehole, or space applications. And apps located all over the world in remote places. |
98 crashes lot in Visual C/C++ 6.0 causing loss of work if one forgets to key ctrl+s.
This never happens in 2000.
However, 2000 does crash, particularly with a bad driver. So let's see what to do when you get a devastating windows 2000 blue screen crash at start up. Thursday March 21, 2002 08:25
| After reinstalling Cypress's EZ-USB-FX software,
windows wanted to restart. On restart windows crashed with the ultimate bad blue screen ![]() You can't boot into safe mode. So what csd does is to configure bad windows 2000 disk as a slave drive. Then use another windows, preferably 2000, disk as the primary drive. Csd learned this the hard way. Csd experimented with Numega DriverWorks wizard with the pci bus. Csd called the project, naturally, pci. DriverWizard named the driver pci.sys. This replaced windows 2000 pci.sys which caused 2000 to blue screen at start up. Today csd 2000 western digital disk was dead! So csd used 98. Csd examined the setupapi.log file to discover that the cypress driver software was having problems. Csd deleted both the .inf and two .sys cypress files from the inf and drivers folders. Whew! Windows 2000 is back! When windows 2000 crashes on a driver problem, the result can be much more devastating than with 98. Csd is studying the ring 0 monitor output comparing Compuware/Numega wdm output with the Cypress output. Cypress appears to implement a much more complicated driver than does Numega. Hmm. Here's a jpg of the driver development machine. ![]() That's the Cypress EZ-USB-FX 3671 development system on top of the machine. Csd leave many of its drives outside the PC chasis. Works well. Csd wonders if you have to buy a copy of XP for each disk? |
Csd had a bug in its pci/cardbus local register code. Linux is coming to the rescue.
Linux is an open operating system. In Linux you can look to see what pci/USB programmers did!
This is not true with proprietary Windows code in many cases.
So by looking at Linux pic/cardbus code confirmed what csd was guessing was blowing-up windows!
Csd had already changed some of it windows-trashing code. Friday May 3, 2002 07:24
![]() At the left is Measurement Computing PCI-DAS6023 [$375] and at the right the National Instruments PCI-6023E [$395]. ComputerBoard, now Measurement Computing, got its start knocking-off Metrabyte, now Keithly, boards. And doing a better job with the knocks-offs! Note the shielding on the DAS6023 and note the absence of shielding on the National Instruments board. Shielding a/d converters is pretty valuable for accuracy. So is optoisolation of digital I/O signals. And analog filtering sensor signals can be valuable before they are converted to digital. Both boards are digitizing inside a PC, not at the sensor. This, of course, can prove troublesome if the sensor is in an electrically noisy environment. And prove fatal if the signal to noise ratio is very small. Both boards have 16 single-ended or 8 differential a/d channels going through an analog mux. If enough electrical noise is present, then the mux can skip channels! And cause big problems! It's best, of course, to digitize at the sensor. |
Real world
perspectives on
high
tech
for project
success