Info |
---|
For this experiment, it is not necessary to use your own laptop (other than to take notes). |
1. Context of the Experiment
After understanding the mechanical measurement importance and motor power measurement, we can start with sensors. One usual type of sensors is resistive sensor. This type of sensors can be used to measure physical quantities like temperature, displacement, and acceleration. It is used because the resistance of a transducer can be changed due to the effects of the environment. Then by measuring the resistance change, the physical quantities e.g. displacement or temperature can be calculated. The method of difference in resistance is extensively used within industrial applications.
2. Learning Goals of this Experiment
Knowing: changing resistance, different potentiometers, temperature dependent resistors
Abilities: Measuring voltage, changing voltage output, measuring current, calculating resistances and calculating scales
Understand: The impact of resistance on the potentiometer output, temperature dependent resistors
3. Literature
Articles and Books
[1]. Hering, Ekbert, and Gert Schönfelder. Sensoren in Wissenschaft und Technik. Wiesbaden: Vieweg+ Teubner Verlag, 2012.
[2]. Lin, Youn-Long, et al., eds. Smart sensors and systems. Cham, Switzerland: Springer International Publishing, 2015.
[3]. Thorsten A. Kern, Hatzfeld, Christian, and Alireza Abbasimoshaei. Engineering haptic devices. Springer London Limited, 2022.
[4]. Measurement Technology lecture slides
4. Basics/Fundamentals
What is a Potentiometer and how does it work?
A potentiometer is defined as a 3-terminal variable resistor that controls the flow of electric current by a variable resistance. A simple Potentiometer has three connectors. The nominal Resistance is between the outer connections. Between the wiper connection and one of the other pins a variable resistance can be set. All three connections form a voltage divider.
Figure 1: Symbols for Potentiometers. Left: IEN60617 standard used in Europe, Right: ANSI standard used in USA.
The wiper position can be moved mechanically usually by rotating or by linear sliding. It changes the resistance between the wiper contact and the other contacts by varying the position of a sliding contact across a uniform resistance (see Figure 2). By doing so, it can sense the physical variable that should be measured.
Figure 2: Mechanism of two types of potentiometers. Left: Linear Potentiometer Right: Rotary Potentiometer.
There are also different types in therms of the connection between resistance and wiper position. The relationship can be linear or logarithmic. The logarithmic scale can be useful for example in volume control of audio amplifiers, the linear scale can be useful in position sensing. Examples of Potentiometers are shown in Figure 3.
Figure 3: Left: rotatory potentiometer [5], Right: linear potentiometer [6].
If the potentiometer is conneced to a Voltage supply
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Figure 4: Circuit of a potentiometer connected to a voltage source.
With this measured voltage the resistance
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Figure 5: Data points and a linear curve that is fittet into the points.
To get this equation a linear regression with minimizing least squares error can be done. To do so we have to measure
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Now we can see that the linear equation system for all points has the form: :
Mathinline | ||
---|---|---|
|
or
Mathinline | ||
---|---|---|
|
Now the least squares technique can be performed by trying to minimize the sum of the squared errors:
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
Matlab and Numpy have functions already that can do a least square or linear fit. For solving the Vip questions make sure that they are based on the least squares optimization: Matlab:
Python:
|
Temperature measurement with a NTC Thermistor
Temperature measurements can be done with so called NTC (Negative Temperature Coefficient Thermistor) on the other side there are PTCs (Positive Temperature Coefficient). NTCs have lower resistance at higher temperatures. A lot of applications use NTCs and PTCs for temperature measurements. For example temperature sensors, or temperature compensation of electrical circuits.
Figure 6: Symbol for thermistors. IEN60617 standard used in Europe.
The relation between temperature and resistance of NTCs depend on fabrication parameters, which are usually given in the datasheet of the sensor. The approximate equation is:
Mathinline | ||
---|---|---|
|
| material constant that can be found in the datasheet | ||||||||
---|---|---|---|---|---|---|---|---|---|
| Resistance at Temperature
| ||||||||
| Temperature | ||||||||
| nominal Temperature (often 25°C or 298.15K) | ||||||||
| nominal Resistance at nominal Temperature
|
5. Preparations of the measurement
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
Experiment 3.1 and 3.3 have to be done on the testbench connected to a computer in the WorkingLAB. Please start with experiment 3.2 and write down your values. Then perform the experiment 3.1 and 3.3 on a testbench. |
Start with Experiment 3.2 and note your results.
Experiment 3.1: Linear potentiometer with reference sensor
Materials:
Step 1:
Place the potentiometer in the testbench as shown in Figure 7. Then make sure that you can move the potentiometers slider with the rotary knob at the testbench.
Figure 7: This shows how the potentiometer should be placed inside the testbench. The two wires (yellow and black) should be on the left side.
Step 2:
Now you can start the communication with the micocontroller inside the testbench. To do so press the orange button as shown in figure 8. This can take a while, just wait.
Figure 8: Press that button after you connected the USB. This can take a while, just wait.
Next verify your testbench number printed on the testbench and displayed in the app, see figure 9. That is important for calibration of the reference sensor and good for us to know if something is wrong. For that the button next to the connect button is now enabled to enable the GUI press that button.
Figure 9: After connecting successfully the testbench number is shown. If that is correct press the orange button.
Step 3:
Connect the potentiometer to the power supply. The circuit is shown in figure 10. The potentiometer contacts are shown in figure 11. (red: +, yellow: wiper: black: GND)
Note |
---|
A 1k Ohm resistor is soldered at the one side of the potentiometer to prevent students to burn the potentiometer by creating a short circuit. Please connect the voltmeter like this. (yellow - black) |
Figure 10: Connect the multimeter like this to measure the voltage at the wiper to ground.
Figure 11: Contacts of the potentiometer.
Step 4:
Measure the voltage at five different points of the potentiometer and enter them to the app. The reference sensor will be automatically measured if you press the button shown in figure 12. Connect the multimeter in voltage measure mode to the circuit.
It is best to start with 0mm and end with 15mm. It does not really matter what distance values you choose also the potentiometer is longer than the 15mm. Do not choose the same distance multiple times and put them a few millimeters away from each other. Try to make it evenly distributed (e.g. 0mm, 3.3mm, 6mm, 9.5mm, 12mm, 15mm). Use the slider in the app to toggle the position. You will see the values in the table updating every time you press the button. Additionally you will see two plots of linear fits next to the table. You will get the data points in the table sent by e-mail. Now fill the whole table. If you made a mistake just go back to the position and toggle the slider and do it again with new values. The values will be replaced depending on the slider position.
In short: Measure voltage at position 1 (eg. 0mm), fill textfields, press button and position one is filled with your data and the reference sensor value, move the slider to positon 2, move the testbench to position 2 (e.g. 3mm) repeat the process four more times until table is full and you see nice plots.
Figure 12: How to control experiment 3.1.
Experiment 3.2: Rotary potentiometer
Materials:
Step 1:
Take the rotary potentiometer with the resistor soldered to it. This resistor is a
Mathinline | ||
---|---|---|
|
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Current is measured in SERIES. Use the correct INPUTS of the multimeter. Last year more than 25 fuses were DESTROYED due to wrong handling. |
Figure 13: How to control experiment 3.1.
Step 2:
Rotate the Potentiometer to zero scale. you can hear it by the click. After the click it is necessary to turn the potentiometer slighty back until you hear a second click. Now the potentiometer has a low resistance between the wiper and the input pin. Since figure 13 shows a serial circuit the resistance should be around
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Figure 14: Where to enter the values. You can do this experiment without the app. Write down the values and enter them later if you do experiment 3.1 and 3.2
Experiment 3.3: Temperature dependend resistors NTC
Materials:
Step 1:
Make sure that you are still connected. Check out the arduino case (The one on the testbench. It is in a 3d printed box. Not the one in the red box). There is a label: NTC. The NTC is internally connected to a
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Mathinline | ||
---|---|---|
|
Figure 15: This circuit shows what voltage is measured and how the thermisor is connected to the circuit. If you press the buttons for this experiment
Mathinline | ||
---|---|---|
|
Figure 16: Just press the buttons to measure the voltage
Mathinline | ||
---|---|---|
|
7. Evaluation of Experiment Results
You end the experiment by pressing the button shown in figure 17. You will get an E-Mail with all the data you measured in this experiment. The stucture and a few examples of how to work with matlab tables is shown in chapter 7.
For solving the vips task you probably need the datasheets of the potentiometer and the NTC:
F2031-NN0SC2B10K
View file | ||
---|---|---|
|
ntcle350e4
View file | ||
---|---|---|
|
Additionally the *mat file we will send you will contain a struct called “all_evaluation_data_3” if you import the file and open the struct that appears in the workspace you will see something like it is shown in figure 17.
Figure 17: Example struct with the data you entered to the matlab app.
The following three images show examples of the result tables. You should see the values (in your case hopefully a full table in results_3_1, otherwise you did not read the task correctly). in the table.
The header of the table of results_1_1 is as follows: “measurement”, “approximate_position”, “position_teststand”, “voltage_potentiometer”, “resistance_reference_sensor” with the same units as you entered them in the MT App.
Header name | Unit |
---|---|
measurement | number |
approximate_position | percent |
position_teststand | Millimeter |
voltage_potentiometer | Volt |
resistance_reference_sensor | Ohm |
To give you some ideas when working with Matlab to solve the vips task here is some example code to read the mat file and get the values out of the stuct and table:
Expand | |||||
---|---|---|---|---|---|
| |||||
|
If you want to work with python you can aslo load the matlab file. But unfortunately tables cannot be loaded, arrays work well. It is better practice to save the tables as *.csv files with matlab and then load it to a pandas dataframe with python. Then just perform the mathematical operations. You can use numpy and pandas to do for example element wise operations on your data point vector and then you can perform the linear fit to get the results of vips question one to four. Its all very similar to matlab.
8. Vips questions:
The following values should be entered to vips in Stud.ip. Please note that only 30 minutes are available for entering values in vips, after which the vips entry is automatically terminated. The test is only to hand in the final values, so be prepared and have all values ready and at hand!
Matriculation number is needed. For all calculations assume that the voltage source was constant at the value you set it.
Consider the equation
for the the resistance of reference sensor. Based on your measurement results calculateMathinline body --uriencoded--R_%7Bref%7D(x)=\alpha_%7Bref%7D\cdot x+R_%7Bref,i%7D
in Ohm/mm. Use a least squares optimization and use the five data points from your *.mat file.Mathinline body --uriencoded--\alpha_%7Bref%7D Consider the equation
for the resistance of reference sensor. Based on your measurement results calculateMathinline body --uriencoded--R_%7Bref%7D(x)=\alpha_%7Bref%7D\cdot x+R_%7Bref,i%7D
in Ohm. Use a least squares optimization and use the five data points from your *.mat file.Mathinline body --uriencoded--R_%7Bref,i%7D The testbench can only move approximately
. What would be the resistance of the reference sensor if the testbench is build a little bigger and you would move the wiper toMathinline body --uriencoded--15 \text%7Bmm%7D
. Use the results from tasks one and two. It is okay if the resistance is out of the bounds of the reference potentiometer, this should just be a theoretical value which you are not able to measure at all.Mathinline body --uriencoded--x = 20\text%7Bmm%7D Consider the equation
for the resistance of the slider potentiometer as shown in figure 21. Based on your measurement results calculateMathinline body --uriencoded--R_%7Bpoti%7D(x)=\alpha_%7Bpoti%7D\cdot x+R_%7Bpoti,i%7D
in Ohm/mm. Use a least squares optimization and use the five data points from your *.mat file. You can assume that the shunt resistor is exactlyMathinline body --uriencoded--\alpha_%7Bpoti%7D
. Additionally, check the datasheet of the potentiometer you can also assume that the total resistance in the datasheet is exactly the value that is stated.Mathinline body 1000 \Omega
Figure 21: This circuit shows what side of the potentiometer should be calculated for
Mathinline | ||
---|---|---|
|
Consider the equation
for the resistance of the slider potentiomter as shown in figure 21. Based on your measurement results calculateMathinline body --uriencoded--R_%7Bpoti%7D(x)=\alpha_%7Bpoti%7D\cdot x+R_%7Bpoti,i%7D
in Ohm. Use a least squares optimization and use the five data points from your *.mat file. You can assume that the shunt resistor is exactlyMathinline body --uriencoded--R_%7Bpoti,i%7D
. Additionally, check the datasheet of the potentiometer you can also assume that the total resistance in the datasheet is exactly the value that is stated.Mathinline body 1000 \Omega Sometimes it can happen that
is negative, why?Mathinline body --uriencoded--R_%7Bpoti,i%7D You measured two values with the rotary potentiometer: half scale and full scale, additionally you can assume that the potentiometer has a really low resistance in zero scale. Based on that values what qualitative curve matches the potentiometers resistance depending on the rotary angle? You can assume that the shunt resistor is exactly
.Mathinline body 1000 \Omega
Based on your voltage measured at the NTC, What is the resistance of the NTC at room temperature in Ohm? You can assume that the series resistor is exactly
.Mathinline body 11000 \Omega Based on your voltage measured at the NTC, what is the temperature value in degree celsius? The resistor name is NTCLE350E4103FHB0. It has a
resistance atMathinline body R_N = 10000\Omega
. Check the datasheet of the NTC and find the B-Value.Mathinline body T_N = 25°C Calculate the temperature in celsius for the case, when you touched the NTC with your fingers. The resistor name is NTCLE350E4103FHB0. It has an
resistance atMathinline body R_N = 10000\Omega
. Check the datasheet of the NTC and find the B-Value. You can assume that the series resistor is exactlyMathinline body T_N = 25°C
. Don’t worry, when i did this for the solutions equations my body temperature says I would be dead. But that depends on how long you touched the sensor and other factors. We will check our results based on the voltage, not on real human body temperature.Mathinline body 11000 \Omega