Feeding a digital to analog converter

First posted
Sunday January 16, 2005 10:00

Updated
Friday February 11, 2005 07:13

The example of transmitting the mux channel number in noise along with data may be a bit hokey because the mux channel number could be append to the 16 bit data + noise to make an 18 bit message.

Let's try to insert the information in the noise at the digital to analog [d] converter seen in at the blue star in Diagram 1.

Several options for feeding the d/a are available:

1 We can write digital data into the input of the d/a.

2 We could try to generate genuine noise, feed this into op amp, then into a a/d converter and feed this into the d/a converter.

Here's a Texas Instrument/Burr Brown block diagram a/d in ECN Jnauary 2005.



Note that the ADS8342 is advertised as converting to 16 bits at 250kHz!


Here's specs on the TI OPA727.

We can handle surface mount and SOT-23 packages real easy and inexpensively with ExpressPCB.

One of bill's job assignments at Sandia labs was to test chip a/d converters for the seismic program.

One reason for the job assignment was that bill could get the hardware and software working super-fast using 8051 family forth.

Continued interest is accuracy of analog measurement along with industrial experience digitizing at the sensor and inside a PC prompts this tutorial.

To further expertise in interest in a/d and d/a converters, bill attended the Analog Device Data Converter Seminar on June 2, 2004 in Austin, TX.

Look where the seminars are being held!!!

Students received the below package for $60 seminar.



The foils for the seminar are in the green star book.

An outstanding number of articles are in the blue star book.

Here's some of bill's notes listing the instructors.



Arnold Williams and bill had good discussion about the importance of digitizing at the sensor.

Several employee of National Instruments were in the audience.

National Instruments, of course, promotes digitizing inside a PC. This doesn't work very well or at all if the signal to noise ratio is small.

Analog Device instructors said the the above two books will be posted on Internet in about a year or two.

Let's examine option 1 to feed the d/a first.

Theory is that number written to the a/d will be converted to a voltage at the output of the d/a. The voltage will be buffered with an op amp, then fed into a a/d converter.

The number which was written to the d/a might hopefully be read from the a/d converter?

Here's a block diagram test setup.

Let's be a bit suspicious that perhaps there are variation between a/d converters supplied by a single vendor. And differences between a/d converters supplied by a second vendor.

Vendors Analog Devices, Texas Instruments/Burr Brown, Linear Tech. ... all have competing similar analog to digital converter products.

What we want to do is to write 16 bit binary number to the d/a converter, then read all six a/d converters to see if we get the same number out that we wrote!

Let the number written be represented in in binary b15b14b13b12b11b10b9b8b7b6b5b4b3b2b1b0 where b15 is the most significant bit and b0is the least significant bit.

The hardware we want to use is 80C51 family microcontroller running 8051 family forth, naturally.

The 8051 family is an eight bit microcontroller so we have our first technical problem to overcome.

D/a converters come in two flavors: parallel input or serial input.

With a parallel d/a interface, the 8051 has to write both the high- and low-bytes to two '374 type octal latches, then transfer the cotentes to the a/d converter.

With a serial d/a interface, the 8051 has a super-neat mode 0 synchronous serial read/write communiations mode.

So with only a clock and data wires you can read and write synchronous serial by a write to the SBUF register [to write] or a read from SBUF register [to read].

Here's the timing diagram

The critical part of the above timing diagram is that the data is latched on the rising edge of the clock. I've marked the eight rising edges with a red square.

SBUF is used to read or write from shift registers.

74HC164s are written to using SBUF.

74HC165s are read to using SBUF.

'164s and '165 can be put end-to-end with to construct an 8051 serial expansion bus.

So now we can write to the d/a converter and read from the a/d converters.

Let's now set b15 = 1 and all of the other bis = 0 and write this to the d/a converter.

Now let's read all six a/d converters.

Do you think, in the real world, we get back exactly what we wrote?

Very unlikely. What we likely see as the bit index, i, gets smaller is that the bits look more and more random.

So we might ask what bit index, i, is the smallest so that all six converter values agree for all i greater.

Hopefully this will agree with what what written to the d/a converter!

So how is the maximum accuracy achieved.

You can't do anything inside the a/d or d/a chips. But you can do something about board design.

Here's some suggestions:
1 on-board power regulation
2 separate analog and digital power regulation
3 optoisolate digital inputs to mixed signal chips
4 power and ground planes on the board
5 physical shielding on both the top and bottom of the board
6 double wall shielding of feed-throughs
7 ...

Depending on the accuracy [number of meaningful bits] you wish to achieve, you may implement one or more of the above. 1 and 2 are pretty important.

Let's look at project using both a a/d and d/a converter and its implementation ... connected to a 80C52 microcontroller running 8051 family forth, of course.

The project involved detecting zero voltage crossing for a veneer tester.

Here's the prototype wire wrap with inexpensive, but very function, Jameco kit power supply.

The green star marks an ADC 0803 LCN 8 bit analog to digital converter.

The red start marks an DAC 0830 LCN 8 bit digital to analog converter.

Here's a close up made with a Fuji A340 4 megapixel digital camera working in macro mode.

Here's the back side of the 8051 forth daughter board.

Both the DAC and ADC worked okay for the application without fancy board design.

But this is only 8 bits!

And this is old technology. Through hole is out. Surface mount is in.

Let's look at how 8051 forth was used to debug the ADC and DAC harware on the above board.

The approach to get the board working above is to first wire in power and ground. Plug the board in and see if 8051 forth still works!

If not, unplug the board and see 8051 still works. If not, figure out what the board did to the 8051 forth board.

In reality the 8051 is super-tough and bill never recalls a case of a daughter board wrecking the 80C52 motherboard permanently.

One chip at a time is added starting with the decode chips.

Embedded controller forth for the 8051 family uses the Princeton [von Neumann] architecture with the extension of 256 bytes of i/o space at addresses FF00 to FFFF.

A logic probe is used to check digital outputs when the chips are interactively exercised with C! [byte store - byte/address C!] to see that the chip is working in a DC mode.

Chips are successively added and debugged until the entire board is working.

Don't even think of stuffing the entire board, then testing!

Instructors at the Analog Devices Data Converter seminar stressed the importance of prototyping.

Here's from the blue star book above.

Here's a fun article you might want to read on mixed signal board design.

Printed Circuit Design and Manufacture

http://pcdandm.com/pcdmag/mag/0502/0502rizvi.pdf

The point of this part of the tutorial is that if care is not taken in board design, then a fairly good random number generator has been designed!

Back to signal bits as opposed to noise bits - in truth, some of the terminal bits have both signal and noise content!

All six a/d converters should hopefully agree i significant bits over the entire input range.

However, the six a/d converter may agree to i + j bits, j > 0 over subranges! In other words, the accuracy of terminal bits depends on the significant bits.

Sending mux channel number in least significant signal bits positions

Let's suppose that the six ad converts agree to 8 significant bits over the entire input range.

If so, then we can swipe the least two significant bits by ANDing FCFF [the right two FFs are left to preserve training bit noise], then ORing in the mux channel number [two bits].

If we test significant bits then, of course, the mux channel number could possibly be send in even less significant bits.

The point of this, from transmitting, information is that it can be darned hard to tell how information is being transmitted on a covert channel.