Professional Documents
Culture Documents
Lab 1 NTCArduino 2019 Jan
Lab 1 NTCArduino 2019 Jan
Date by which Work, Feedback and Marks will be returned to Students: 8 April 2019
Mechanism for return of assignment work, feedback and marks to students: In class lecture.
1
Dr Robin Tan Revised: 24/11/19
Content
No Title Page
1.0 Introduction 3
2.0 Aims 4
3.0 Objectives 4
4.2 Task 3 9 – 11
4.3 Task 4 12 – 18
5.0 Conclusion 19
6.0 References 19
2
Dr Robin Tan Revised: 24/11/19
1.0 Introduction
A Wheatstone bridge is combination of four resistor to give a zero Eth signal. It convert
resistance into signal. Wheatstone bridge aims to eliminate DC without offset. The
Wheatstone bridge still be used to measure very low resistance value although multi-meter
can provide the function. The Wheatstone Bridge circuit is operate by more than two simple
series-parallel arrangements of resistances connected between a voltage supply terminal
and ground producing zero voltage difference between the two parallel branches when
balanced. A Wheatstone bridge circuit has two input terminals and two output terminals
consisting of four resistors configured in a polygon like arrangement as shown below.
Simulink is a data flow programming language that uses graphics for modeling,
simulating and multi-domain dynamic system analysis. It is integrated with MATLAB and
both softwares are developed by Mathworks. The software enables the user to apply
algorithms from MATLAB into models and export the results from simulation into
MATLAB to be further analysed. (Powerlab.ee)
3
Dr Robin Tan Revised: 24/11/19
2.0 Aims
To study and able to design Wheatstone bridge circuit and use MATLAB and Simulink for
data analysis.
3.0 Objectives
1. To determine the curve of resistance of NTC temperature sensor with absolute
temperature experimentally.
2. To establish the relationship of bridge ratio and Eth signal.
3. To obtain the response of the system and analyse on the characteristics of the circuit
by using Matlab and Simulink.
4.0 Task 1
RT K exp
. T
4
Dr Robin Tan Revised: 24/11/19
5
Dr Robin Tan Revised: 24/11/19
Comments:
NTC thermistors are resistors with a negative temperature coefficient, which means
that the resistance decreases with increasing temperature as proven by the data.
Thermistors are characterised by their base resistance and their B value. The B value is a
fixed material constant that describes the shape of the slope of the resistive curve over
temperature (R/T).
As showed in the graph plot, the measured values has hysteresis with linear line. The
practical results of measured resistance are slightly lower than calculated resistance from
the equation RT = K exp(B/T). This is due to self-heating effects of Thermistor which
means extremely high operating currents has passed it. More heat is created than that can
be quickly dissipated from the thermistor and as temperature increases, resistance
decreases. Hence, the NTC thermistor is hot due to self-heating up and not by the external
temperature being measured. That is the reason of the measured resistance is slightly lower
than calculated. To avoid this, connecting an NTC thermistor in series with a load is
possible to effectively limit the high inrush currents.
6
Dr Robin Tan Revised: 24/11/19
4.1 Task 2
Design a measurement system using Wheatstone bridge which will give the maximum
output voltage of 5V at the FSD of measured temperature. Determine the appropriate gain
needed.
𝑉𝑠
𝐺𝑎𝑖𝑛 =
𝐸𝑡ℎ 𝑜𝑓 60°
5
=
1.44
= 3.47
7
Dr Robin Tan Revised: 24/11/19
Using superposition theorem by connecting each input to the ground, the ratio of resistor
of op amp can be solved.
If Vb though Rin2 = 0, If Va through Rin1 = 0,
R f1 R f2
Gain = Gain =
R in1 R in2
Assumed Rf be 1k Ω,
1k 1k
3.47 = 3.47 =
𝑅𝑖𝑛1 𝑅𝑖𝑛2
𝑅𝑖𝑛1 = 288Ω 𝑅𝑖𝑛2 = 288Ω
Comments
Wheatstone bridge is a two series-parallel arrangement of resistors connected between
supply terminal and ground. When the bridge is balanced, the voltage between the parallel
branch resistors is 0 volts.
The differential amplifier is used to amplify Eth taken from Wheatstone bridge by
adding resistors in parallel with feedback resistor, Rf and input resistor, Rin connected to
negative terminal of op amp. The ratio of Vout produced by op amp, 5V and the Vin taken
from Wheatstone bridge at 600C, 1.44V is the gain required by op-amp. The resultant
circuit can be made to either “+” or “-” the voltages applied to their respective inputs. By
connecting each input of op-amp in turn to 0v ground, Superposition theorem can be used
to solve for the output voltage, Vout. Then the output expression would simply
be Vout = V2 – V1 and when one of the supply is 0V, the design parameter of Rf and the
Rin of op amp can be determined to produce gain.
8
Dr Robin Tan Revised: 24/11/19
4.2 Task 3
Construct the circuit on the breadboard to verify your design.
Vs = 5V
R1b (balanced) = 9.25k
R2 (Variable resistor) = 9.45k
R3 = 10k
R4 = 10k
9
Dr Robin Tan Revised: 24/11/19
10
Dr Robin Tan Revised: 24/11/19
Comments
To obtain the Eth signal from the Wheatstone bridge, resistance of NTC sensor is to be
measured first.
R1 R2 1 1
Eth Vs Vs R
1
R R4 R2 R3 1 4
1
R3
R1 R2
As shown in the equation above, the calculated result depends only on the set of
resistors. Those are passive components so it is easier to define their own precision. But
during the laboratory session, actual value obtain from the bridge is affected by stability of
NTC thermistor resistance value and losses in the components. Hence, the calculated Eth
signal shows difference compared to measurement Eth signal especially at 321K,
maximum deviation occurs.
11
Dr Robin Tan Revised: 24/11/19
4.3 Task 4
Using Arduino UNO, design a system to read the actual temperature and display the
temperature on Simulink in the range between 30 and 60OC. What is the resolution and
maximum deviation of the measurement?
Data & Results
12
Dr Robin Tan Revised: 24/11/19
14
Dr Robin Tan Revised: 24/11/19
16
Dr Robin Tan Revised: 24/11/19
Data analysis
FSD = 60OC
𝑉𝑟𝑒𝑓
Resolution = 2𝑛−1
5
= 210 −1
5
= 1023
= 4.88mV/bit
Maximum deviation for Simulink and measured signal is at 45OC (318K) as the difference
is biggest showed in table 3.
𝑋60 1
𝐸𝑡ℎ60 = 𝑉𝑠 [ − ]
𝑋60 + 𝑟 1 + 𝑟
0.27 1
= 5[ − ]
0.27 + 1.08 1 + 1.08
= 1.40V
𝑋45 1
𝐸𝑡ℎ45 = 𝑉𝑠 [ − ]
𝑋45 + 𝑟 1 + 𝑟
0.48 1
= 5[ − ]
0.48 + 1.08 1 + 1.08
= 0.865V
𝐸𝑡ℎ45 0.865
=
𝐸ℎ60 1.40
= 0.618
17
Dr Robin Tan Revised: 24/11/19
Maximum deviation,
0.618−0.5
D= 0.5
= 0.236
D = (0.236)(45) = 10.64
Comments
The system is designed in 30OC - 60OC temperature range and the output gain is 0 - 5V
at FSD. Hence, 5V input that convert to 1023 bits in Simulink is given a constant =
0.0293255 that can sum up with 30 offset and get the results of 60OC. The constant
0.0293255 is assume to be the constant of a linear slope of ideal signal varying as
temperature increasing.
Resolution is the degree to which a change can be theoretically detected, usually
expressed as a number of bits. This relates the number of bits of resolution to the actual
voltage measurements. In order to determine the resolution of the system, a Wheatstone
bridge and op-amp system capable of making measurements 0 - 5 V range is build. Next,
the smallest possible increment that can detect is set at 10 bits. That is, 210 – 1 = 1023.
Therefore, from formula Vref / 2n – 1, the smallest theoretical change can detect is
4.88mV/bit.
The maximum deviation is the maximum difference between the linear data and actual
data. For the temperature with range of 30 and 60OC, the maximum deviation is the
midpoint point, 45OC. Hence, ratio between signal of maximum point, 60OC and the point
of 45OC which is 0.618 will be the maximum deviation to be find. This is the actual value
of the data. A linear line graph should be 0.5 ratio and the percentage difference between
actual and linear line will be 0.236(23.6%). Hence, by multiply temperature of 45OC where
deviation occur, will get 10.64.
Temperature reading by Simulink is not exactly the same as data recorded because the
ways of temperature recorded in Simulink is assumed to be linear varying but the practical
data is non-linear. The amplified signal input to Arduino which link to Simulink will have
difference with designed Gain, 3.47 at previous task. This is due to unstable resistance and
self-heating effect of NTC due to difficulty of controlling temperature variable. Also the
voltage losses along the op amp circuit and components internal losses.
18
Dr Robin Tan Revised: 24/11/19
5.0 Conclusion
Throughout the lab experiment, a Wheatstone bridge system is designed by using the
NTC sensor and resistor set up in parallel position. The ways of set up a Wheatstone bridge
and skills of manipulating the Eth signal by using bridge ratio, r and x are be learnt from
the lab. Moreover, the lab provided a control of the gain of Eth signal from Wheatstone
bridge by using op-amp circuit. Although some error existed in this lab, the results still
reflect the relationships and operation of the Wheatstone bridge sufficiently.
Besides, MATLAB has shown the data presentation of Temperature and resistance and
Eth signal. The characteristics of the circuit as relationship between ratio and sensitivity of
Wheatstone ridge and Eth signal are analyzed. Resolution and maximum deviation are also
shown by using Simulink and Arduino.
6.0 References
19
Dr Robin Tan Revised: 24/11/19
Task 1
Task 2
Task 3
Task 4
Total /15
20