VOLTAGE-TO-FREQUENCY CONVERTER
Internal circuit of LM331 IC S R Q Q+
+
+
VOLTAGE REFERENCE +Vcc +Vi n +Vcc +Vcc +Vcc FoutLM331
Q1 Q2 Q3 Q4 Q5 Q6 1 2 3 15 R 2R R1 R1 1,89V RS RL CL RT CT RP VOLT COMP VOLT COMP OP AMP CURRENT MIRRORONE SHOT TIMER
2 1 6 7 8 5 4 3 RB IS IS
In direct transmission of an analog signal (below), VAN will be more easily corrupted by noise.
IN TERFA C E TEM PERA T URE
SEN SO R
V
AN SIGN A L+
N O ISE SIGN A LFILT ER
V
ANBy converting VAN to a large signal whose frequency is proportional to VAN, the transmission of the signal
becomes much less corruptible by external noise.
TEM PERA T URE SEN SO R IN TERFA C E V to F CO N V ERTER FIL T ER -LEV EL DECTECTO R F to V CO N V ERTER
V
ANV
AN SIG N A L+
N O ISE SIGN A LTiming Diagram V in VCL=V6 I1 VCT=V5 IS 0 0 0 2/3 V cc FIXED PW VARIABLE SW 1,1CTRT Tout -1,1CTRT V ave m+= I s-(Vave/RL) C L m- = Vave RL CL ∆VCL initial transient charging C L from 0 to V in+∆VL V out V cc 0 m+= I s CL V cc SET RESET RIPPLE VOLTAGE
The DC current, or average current, through capacitor CL is 0A once the VCL waveform has settled.
I
SW (ave )= I
RL( ave)+ I
CL(ave)PW
T
× I
S=
V
in+
0, 5∆V
C LR
L+ 0 ≈
V
inR
Lif V
in〉〉 ∆V
CL L R ISW TIMER IS i n V L C 0 A aveF
out=
1
T
out≈
V
inI
SR
L× PW
=
V
in× R
SV
refR
L× Ln(3) × R
TC
T=
V
in× R
S2,09
× R
L× R
TC
T∆V
L= PW × m
+= PW ×
I
S−V
inR
LC
L
= SW × m
−= T − PW
(
)
×
V
inR
LC
L
NOTE: To obtain good linearity at low values of Vin, the ripple voltage ∆VL must be very small which means that
the time constant RLCL must be very large and this makes the converter very slow to react to changes of Vin.
When ripple is very small, the frequency of the V to F depends on a very small signal easily corruptible with noise or spurious signals which may result in an erratic O/P frequency.
For small values of Vin, the equation derived for Fout is not accurate because ripple must be factored in and Fout becomes a non-linear function of Vin.
Basic V-F Converter L M 3 3 1 in thr Ire Isw RC out Vcc gnd 8 4 1 5 3 7 6 2 Vi n Vcc Fout RT CT RL CL RS RBAL Cin RP RHYS CBY L M 3 3 1 in thr Ire Isw RC out Vcc gnd 8 4 1 5 3 7 6 2 Vi n Fout 0 , 1 µ F 0 , 1 µ F 0 , 0 1 µ F +1 5 V 6 , 8 K 1 0 K 1 0 0 K 4 7 1 µ F 1 2 K 5 K 1 0 0 K 1 0 Hz t o 1 0 kHz +1 0 mV t o +1 0 V Fmax adj ust From
F
out=
V
in× RS
2,09
× RL
× R
TC
T we find that Rs = 14212 will produce a 10 kHz full scale output given thestandard values on the diagram. The 5k pot will have to be adjusted to some other value because of component tolerance.
PW = 1,1 RTCT = 1,1*6800*0,01µ = 74,8 µs fixed Is = 1,89V/14212Ω = 133 µA
For F = 10 Hz to 10 kHz, duty Cycle = 74,8µ/(0,1 to 100µ) * 100 = 0,0748% to 74,8%
NOTE: PW and duty cycle refer to the switched current source Isw(pin#1). The duty cycle of the output waveform
is inverted, that is D/Cout = 99,925% to 25,2%. Vo+ ≈ +15V and Vo- ≈ 0V
Ripple Voltage
∆V
L= PW × m
+= PW ×
I
CC
L= 74,8µ ×
133
µ − 10m → 10
(
)
100k
1
µ
= 9,94m → 2,47mV
ppNOTE: Those small ripple values make the V to F vulnerable to noise and unreliable operation may result.
At 10 Hz the discharge of CL is not linear (it is exponential) because RLCL = 0,1s = T ≈ SW.
The speed of the V-F converter is determine by the time constant RLCL. For the above circuit, the rise time of Vthr
is : tr = 0,35/(Fc) = 0,35* 2π*RLCL = 0,22s which is rather slow.
For a faster response of Vthr (and Fout) RLCL should be made smaller but this will entail more ripple voltage
across CL and therefore less accuracy at low Vin and Fout values.
Hysteresis
The amount of hysteresis of the input comparator, for clean and faster switching (no crossover oscillations), is ∆VHYS = IsRHYS = 133µ * 47 = 6,25 mV - this will impair low Vin operation.
Choice of RinCin
The input RC low-pass filter produces a cutoff frequency of Fc = (2π*100k*0,1µ)-1 = 15,9 Hz.
It is used to filter down any HF noise that contaminates the DC input voltage. If the input DC voltage is changed abruptly to a new value, the LM331 input (Vin at pin 7) will settle to its new value in about 5RinCin=5*100K*0,1µ =
50 ms. Therefore the response time of the output frequency will the compounded value of tr of Vin + tr of Vthr.
Choice of RTCT
Maximum duty cycle (PW/T)*100 = 1,1 RTCT * Fmax < 95% and should leave enough time for the internal circuit to
reset when SW = T-PW becomes very small. PW should not be too small either.
Choice of RLCL
Select RLCL for desired maximum ripple
∆V
L= PW ×
I
S− V
inR
LC
L
= T − PW
(
)
×
V
inR
LC
L
and for desired rise time of Vthr : tr = 0,35*2π*RLCLWaveforms showing effect of hysteresis provided by RHYS on V6 waveform. When Vin is detected by
the comparator, V6 pulls up abruptly to prevent oscillations (chattering) at the internal comparator output.
∆VCL VRHYS V6 Vin HYST IMPROVED V to F CONVERTER L M 3 3 1 in thr Ire Isw RC out Vcc gnd 8 4 1 5 3 7 6 2 A1 +1 5 V I NTEGRATOR V t o F CONVERTER Vo1 I sw I s 0 A av e RE CF Rp RT CT Rs Ps Fout Vin1 IE -ve
The above converter has a very linear V to F characteristic because its output frequency is totally independant of the ripple voltage present at Vin (pin 7) of the LM331. For fast and reliable operation of the V to F converter, CF
can be made very small in order to get subtantial ripple - 1Vpp recommended
Converter equations
I
SW= I
S×
PW T= I
E+ I
CFave= I
E= −
V
inR
EI
S×
PW T=
−V
inR
E⇒
V
refR
S+ P
S× Ln(3) × RT
C
T× F
out=
−V
inR
EF
out=
1
T
=
−V
in× R
(
S+ P
S)
V
refR
E× Ln(3) × R
TC
T=
−V
in× R
(
S+ P
S)
R
E× 1.89 ×1.1 × R
TC
T∆V
in=
I
EC
F× T − PW
(
)
=
I
sw− I
E(
)
C
F× PW
The basic waveforms are shown below.
V
thrV
thr- 0,5
∆
V
in∆
V
inV
inI
swVout
0A
0V
15V
I
Sm+= I
E/C
Fm- = -(I sw -I
E)/C
FPW = R
TC
TLn(3)
The output frequency can be made to respond very rapidly to an abrupt change in Vin by selecting a small value
BASIC F TO V CONVERTER L M 3 3 1 in thr Ire Isw RC out Vcc gnd 8 4 1 5 3 7 6 2 + Vi n +1 5 V 6 , 8 K 1 2 K 5 K 1 0 Hz t o 1 0 kHz +1 0 mV t o +1 0 V 0 , 1 µ F Vmax adj ust 0 , 0 1 µ F 1 0 k 1 0 k 1 0 k 1 5 k 4 7 0 pF 3 k 1 0 0 k 1 0 0 k 0 , 1 µ F 0 , 1 µ F Vout IC SUPPLY BY- PA SS CA P DC OUTPUT
V
inV
in(IC)SET
V
CTRESET
I
SWV
C1V
C2V
THR 0V +5V +9V +7,5V +12,5V +2,5V +10V 0V 0AV
REFR
SPW
SETPW
TV
OUT (DC)The DC output voltage is :
V
out (ave)= ISW (ave )
× RL
= IS
PW Tin( )
× RL
=
V
refR
S×
1, 1R
TC
TF
in× RL
=
2,09
× RT
C
TF
in× RL
R
SThe output ripple voltage is given by - see appendix for derivation:
∆V
out (pp )=
I
SR
L8
×
PW
R
LC
L
2×
1
F
× PW
−1
for F>
(10π
RLCL)-1 The output filter has the following TF:F(S)
=
1
R
2C
2S
2+ 3RCS +1
=
R
2C
2(
)
−1S
2+
3
RC
S
+
1
R
2C
2=
R
2C
2(
)
−1S
+
0,382
RC
×
S
+
2,618
RC
The above TF allows us to determine the rise and fall times of Vout in response to an input frequency jump. The approximate value can be determined from the first cutoff frequency:
t
r= t
f≈
0.35
F
C1=
0.35
0.382
2
π RC
= 5.757 × RC
The internal latch SET pulsewidth (PWset) must be less than the current pulsewidth PWT = 1,1 RTCT , otherwise
the circuit will not work properly. PWset is determined by the input coupling capacitor and the input resistance
10K 10K
.PW
SET= R
inC
in× Ln
V
1− V
FV
2− VF
= 5K × 470 p × Ln
12.5
9
− 7.5
− 7.5
=
2.83
µs
PW
T= 1,1 × RT
C
T=1,1 × 6.8K × 0.01µ = 74.8 µs
NOTE: PWset = 2.83 µs may not be long enough to set the internal RS latch - minimum time not specified.
NOTE: If the input square wave has a large amplitude, the protection diodes will turn on and the exponential
pulses at the junction of the two 10K resistors will have two time constants, that is:
10K 10K
+ 3K
(
)
× 470 p
when one of the diodes is ON (10K 10K
) x 470p when the diodes are OFF.APPENDIX 1 Derivation Of Output Ripple Voltage R1 C1 R 2 C2