FTOV - Frequency to Voltage converter

Old Content - visit altium.com/documentation

Model Kind

General

Model Sub-Kind

Spice Subcircuit

SPICE Prefix

X

SPICE Netlist Template Format

@DESIGNATOR %1 %2 %3 %4 @MODEL #|PARAMS:| ?VIL|VIL=@VIL| ?VIH|VIH=@VIH| ?CYCLES|CYCLES=@CYCLES|

Parameters (definable at component level)

The following component-level parameters are definable for this model type and are listed on the Parameters tab of the Sim Model dialog. To access this dialog, simply double-click on the entry for the simulation model link in the Models region of the Component Properties dialog.

VIL

low level input threshold (in Volts).

VIH

high level input threshold (in Volts).

CYCLES

cycles per volt output.

Notes

The output is a voltage, the level of which is a linear function of the input frequency.

The frequency to voltage converter is not one of the built-in SPICE engine models. It is a complex device and, as such, is defined using the hierarchical sub-circuit syntax.

All of the parameters will normally have a default value assigned. The default should be applicable to most simulations. Generally you do not need to change this value. Entering a value for a parameter on the Parameters tab of the Sim Model dialog will override its specified value in the sub-circuit file.

To check the default values of the model, open the associated sub-circuit (.ckt) file. You can view the content of this file for the model specified on the Model Kind tab of the Sim Model dialog, by clicking on the Model File tab at the bottom of the dialog. The default parameter values are listed in the .SUBCKT line.

The simulation-ready frequency to voltage converter component (FTOV) can be found in the Simulation Special Function integrated library (\Library\Simulation\Simulation Special Function.IntLib).

Examples

Consider the frequency to voltage converter in the above image, with the following characteristics:

  • Pin1 (positive controlling node) is connected to net IN
  • Pin2  (negative controlling node) is connected to net GND
  • Pin3 (positive output node) is connected to net A
  • Pin4 (negative output node) is connected to net GND
  • Designator is V2
  • The linked simulation sub-circuit file is FTOV.ckt, with the following content:

*Frequency To Voltage Converter
*VIL    = Low level input threshold
*VIH    = High level input threshold
*CYCLES = Cycles per volt output
*Generic frequency to voltage converter
*Connections:
*            NC+
*            | NC-
*            | | N+
*            | | | N-
*            | | | |
.SUBCKT FTOV 1 2 3 4 PARAMS: VIL=1 VIH=2 CYCLES=1k
A2 [1 2] [10 20] adc_mod
A2 [10 20] [40] fcvs_mod
A3 [40] [5] dav_mod
B1 3 4 V=(v(5)/{CYCLES})
.model adc_mod xadc
.model dav_mod xdav
.model fcvs_mod xsimcode(file="{MODEL_PATH}fcvs.scb" func=fcvs VIL={VIL} VIH={VIH})
.ENDS FTOV 

  • Values of 0.1 and 0.2 are entered respectively for VIL and VIH on the Parameters tab of the Sim Model dialog.

The entries in the SPICE netlist would be:

*Schematic Netlist:
XV2 IN 0 A 0 FTOV PARAMS: VIL=.1 VIH=.2
.
.
*Models and Subcircuit:
.SUBCKT FTOV 1 2 3 4 PARAMS: VIL=1 VIH=2 CYCLES=1k
A2 [1 2] [10 20] adc_mod
A2 [10 20] [40] fcvs_mod
A3 [40] [5] dav_mod
B1 3 4 V=(v(5)/{CYCLES})
.model adc_mod xadc
.model dav_mod xdav
.model fcvs_mod
+ xsimcode(file="C:\Program Files\Altium Designer\Library\Sim\fcvs.scb" func=fcvs VIL={VIL} VIH={VIH})
.ENDS FTOV

The Netlister will evaluate the formulae in the sub-circuit definition using the overriding values for the parameters VIL and VIH (as defined in the Sim Model dialog) and the default value for the parameter CYCLES, as defined in the FTOV.ckt file.

You are reporting an issue with the following selected text and/or image within the active document: