vuoi
o PayPal
tutte le volte che vuoi
The error between theoretical conditions and simulation is
= 2,72 − 2,5 = 0,22.
practically null.
1.3 Analog to Digital Converter
On this part, we integrated a PWM-modulated analog-to-digital converter, using a comparator
and a sawtooth signal generated by a waveform generator.
A PWM analog-to-digital converter is a type of ADC that uses the principle of pulse width
modulation to convert an analog signal to a digital signal via the duty cycle of a rectangular
digital signal.
The requirement is to have a PWM signal at a frequency with a duty cycle that varies
= 100
linearly with respect to the input signal from = 0% ℎ = 0° =
100% ℎ = 100°.
We have already implemented the current bridge circuit, which converts a linear change in
temperature into a linear change in voltage. At this point, we simply need to make the
connection between the of the PWM signal and the voltage In other
_.
words, the must be proportional to the value of the ensuring that the
_,
PWM behavior reflects the linear temperature change provided by the current bridge. The
with a was chosen.
082 = ±15 Figure 16 – Comparator
Figure 17 – Active current bridge + Voltage Reference + Comparator on LTspice
The sawtooth waveform parameters were chosen to satisfy the above request:
= 100 → = 0.01, = = 0.005
= 100% = 100° → = 9,8 = 5
Equal rise and fall times are used (no so that there can be correct modulation of the PWM
)
signal at the comparator output.
The selection of and is based on the maximum duty cycle () of A margin
100%.
of is included to ensure that, when , the signal always remains
0.1 = 100° _
higher than the signal.
ℎ
Same procedure for = 0.
After configuring the generator to produce the desired signal, the circuit was simulated on
LTspice.
Figure 18 – Vout_bridge (in blue), Vsawtooth (in red), and Vout_PWM with T = 10ms (in green), the value circled in red is the
Ton of the signal.
From the simulation we obtained a PWM signal with perfectly in line with
25%,
the request since the voltage _ 2,5.
Next, the circuit was mounted on the breadboard. We obtained the following results:
Figure 19 - Vout_bridge (in pink), Vsawtooth (in yellow), and Vout_PWM with T = 10ms (in blue), the value circled in red are the
Vout of the bridge and Ton of the PWM signal respectively.
The value is , higher than the ideal value. However, the behavior of the PWM
_ 2,72
signal confirmed the effectiveness of the signal conditioning: the measured
was of, in line with the expected value, ensuring a perfect linearity
27,2%
between _ ℎ .
ꮄ
The overall error is We can notice that the signal
= = 27,2% − 25% = 2,2%.
conditioning didn’t add more error.
1.4 Error Correction
The last phase of the laboratory was dedicated to correcting errors, which emerged clearly
during the measurements. To address these issues, a potentiometer compensation circuit was
implemented to balance the current bridge and improve the accuracy of the system.
Figure 20 – Circled in red are the potentiometers used to compensate the errors
The first potentiometer was used to adjust the gain of the circuit, with the goal of obtaining a
bridge reference voltage exactly equal to In this case, the value of the potentiometer
10 .
is not critical, as it is used to make a simple partition of the voltage on the output.
The second potentiometer was used to balance any mismatch between the two resistances
1
in the current bridge. The value of this potentiometer has been chosen to be in an order of
magnitude lower than . This choice was made considering the errors introduced by the
1
circuit, in particular those due to the tolerances of the resistances (about 10%), and at the same
time trying to keep the initial model of the circuit as intact as possible.
Adding a resistor in the bridge results in a slight reduction in the current flowing through it,
causing a decrease, even if minimal, in the output voltage. To compensate for this reduction
and ensure proper operation of the circuit, the bridge reference voltage has been increased to
a value slightly higher than
10 .
For simplicity, the same values as 1 2.
1 = 2 = 10Ω