Signal Generation
What does a signal generator board do? It generates a signal! But why would we want to do that? In fact it is a very useful mechanism for controlling a real-time data acquisition system. Firstly yes, we can think of a signal generator board as something that can produce a real-time analog signal such as a sine, square, or triangular wave. This is what function generators do! But for our purposes we are not interested in the analog signal generation - we are interested in the digital signal generation.
Remember we spoke of the broadcast of address and command information. These are signals broadcast onto the address lines of the VME backplane, and a signal generator board can act as the source. Signal generator boards are not complex devices. One must merely have a table (computer data file) with the information that is to be broadcast, send it to the on-board memory of the signal generator board, and command the board to generate the signal.
Well, it is a little more complex, but not much. A good signal generator board has a mechanism by which the user can specify the frequency, or rate, at which the signal is to be generated. Also, the number of times to repeat the broadcast of address and command information. Consider that we have a 320 channel data acquisition system. Then there will be 320 address/command words that need to be broadcast by the signal generator in order for the system to acquire one sample point of data from each input channel. Each word will be of the form:
board address channel address gain alias
5 bits 4 bits 3 bits 1 bit
That is, a total of 13 bits for our system, to chose from 20 different boards, 16 different channels per board, 8 different gain levels, and 2 different low pass filter corner frequencies. The signal generation board also provides a "clock" signal, which is usually a square wave and has the same frequency as the data address/command words being sourced from the memory of the signal generator.
Signal generator boards are usually accessed from the computer keyboard. Various keys may be used to command the frequency of signal generation and how many times to repeat the address/command words. The frequency used for broadcast will determine the rate at which data is digitized. We have spoken in previous lectures of a clock signal which is used to drive some of the integrated circuits on the data acquisition boards. The clock signal comes from the signal generation board. The clock signal is generated from an on-board oscillator (quartz crystal). Oscillators can be produced with very specific oscillation frequencies and the frequency of oscillation is very constant. We can exploit the property by building a circuit around it in which the oscillation signal is transformed into a square wave. Based on the primary frequency of the oscillator, one can generate fractional oscillations frequencies using "divide by" circuitry.
Is the 21st slot of our VME bus used for the signal generator board. No - because how would we control it. Remember we said that it is quite possible to use a VME backplane as a basis for constructing a digital computer with keyboard, memory, storage devices, monitor and so on. But that is not what we have elected to do in this particular case. 20 slots in the VME are already used for data acquisition boards; hence there is no keyboard or like input device associated with the system. Rather, one can place the signal generator board inside a PC computer, supposing it can be purchase for use on an ISA or PCI bus (used in PC computers). This way the signal generator board can be accessed via the keyboard, and information about what it is doing can be displayed on the computer monitor. We have one problem yet 0 how to get the signal generated by the generator board over to the address lines of the VME backplane. It is not so hard - just use a suitably shielded cable, which will run out the back of the PC and into the chassis housing the VME bus.
Operating the Signal Generator
OK, only a few more steps left to get the board operating. Really we just need to write the data file from which address/command words will be used for broadcast. It's easy to access the data channels sequentially. Just use:
Bd / ch / byte
00001 000 0
00010 000 0
...
10100 000 0
00001 001 0
00010 001 0
...
10100 001 0
...
...
00001 111 1
00010 111 1
...
10100 111 1
go back to the start and begin again
where Bd is the board number from 1-20, ch is the channel number from 0 to 7, and byte is the lo or hi byte (0 or 1). The alias bit is easy too. Depending on the preference of the operatorm the digitization rate, and the type of signal being acquired, it will be set to 0 (500 Hz corner frequency) or 1 (1000 Hz corner frequency).
That leaves the 3 gain bits. How do we select them? Through a processing termed autogaining.
Autogaining
Autogaining is the process whereby the (usually) second stage amplifier gain is determined to maximize the signal amplitude for best voltage resolution during analog-to-digital conversion. Ok, so here's an algorithm to do so, supposing that the ADC accepts a range of
± 10 volts at the input"Input channel data (length at least twice the period of the signal if it is periodic; else long enough to estimate the signal amplitude)
Determine the maximum value in the sequence.
Determine the minimum value in the sequence.
Select the larger of the maximum or the absolute value of the minimum (call it M).
Desired gain D = 10/M
Actual gain = the allowable gain value that is the one just below the desired gain value.
For example, if the maximum value of the signal during the sequence is 102 millivolts and the minimum values is -123 millivolts during the sequence, then M = 0.123 volts, and D = 10 / 0.123 = 81.3. The allowed gains (if binary steps) are 1, 2, 4, 8, 16, 32, 64, 128. Hence, the actual gain will be 64. Therefore, the gain bits in this case will be 110.