This is my first attempt at a web site. So things,
will no doubt be, dynamic for a while. Change is
the only constant.
|Visual Basic 6.0 :
|To the left is a recent TestTool "potz.exe".
DIGITALLY CONTROLLED ANALOG ATTENUATOR CALCULATOR
This is the primary GUI. It calculates the gain, (Av), of a digitally controlled Attenuator type
Voltage Divider. Using a "DigiPot", such as a Micro Chip MCP42010 or Analog Devices
As Av = Rb/(Ra + Rb) and dBr as 20*Log(Av).
Calculates the output voltage based on a stated input voltage.
Produces the control code for each step of the pot.
Gain at each step, gain between steps.
Can include a fixed resistor above and below the digital pot.
Exports comma delimited ASCII for importing into Excel.
Power Station :
Additionally there is a Power Calculator that solves for values based on an input value contained in a
text box and selected with the associated button, (example, red button indicates input value is 245mV).
All relevant values are recalculated each time an input button is clicked. If the result could be
ambiguous the "Ohms" value is used. As in the case of entering a power value.
There are a few option buttons for entering some common values.
On the left there is a 4 buffer keypad to hold values in process. The working value is selected with an
option button. By double clicking on an input value text box, the active key buffer contents are copied
In the upper right there is a RC time constant calculator used for calculating -3dB corner frequencies.
These GUIs allow plotting of several of the data grid columns from the primary GUI. The Av, dBr, Vout
and dBr/step can be plotted by selecting one of the four buttons at the lower left. The four buttons above
the data selection buttons allow selecting of the vertical grid spacing. The text boxes above the buttons
contain graphic parameters.
There are 8 trace buffers that are filled as each plot is produced until it runs out of buffer memory. Any
trace can be deleted and the program simply looks for the first available buffer. The red buttons indicated
a used trace buffer, the green indicates the buffer is empty and available.
A few math functions can be applied to the trace memories, the results will be placed in the next
available trace buffer. Any two of the trace buffers can be used as the operands to the functions. The five
available functions are listed on the buttons at the lower left. The "best match" is used for matching the
calculated data points to a file of target values.
This attenuator was implemented with a 12-bit 2 channel DAC and a 2
channel Operational Transconductance Amplifier. The DAC providing a DC
control signal to the OTAs.
To test the actual hardware attenuator it was necessary to send 12-bit level
and 8-bit balance offset values to the device. This GUI is used to send a 12-bit
level code or series of codes to the attenuator. The attenuator is controlled by
a micro controller and receives level commands via a UART from Windows.
Bits 0 - 11 are the 12-bit level command to be sent to the attenuator
Bits 12 & 13 control :
A code loop completion indicator.
Set Debug mode to normal or verbose.
Send balance control data.
Bits 14 & 15 allow writing to DAC 0 or DAC 1.
2-bin frame :
Code, decimal value to be converted to binary.
>B, Converts decimal to binary and loads the 12 bit text boxes.
Contains the start and stop values for sending a series of codes to the
attenuator, including dwell and increment.
|Send COM frame :
Send, sends a single value.
Run, send a series of level control values.
A, send series to channel 0.
B, send series to channel 1.
C, send series to both channels.
No Name frame :
00, send 000000000000
01, send 010101010101
11, send 111111111111
10, send 101010101010
>1, increase 2-bin Code value by 1.
<1, decrease 2-bin Code value by 1.
|This GUI shows PotzCOM in measurement mode where the sending of the level
commands to the attenuator are synchronized with my Audio Precision test set so
that the actual level can be measured and the results then added to the main data
The Apparent DAC output to the OTAs are calculated based on the measured
audio test signals and compared to the predicted amount of attenuation.
|BALANCE CONTROL GUI
|22-bit Delta Sigma A2D control GUI.
This is for measuring the actual DC output of the DACs.