This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Gas pressure thermometer versus temperature sensor (Kitchen physics with phyphox)
#1
I was inspired by
Kitchen Physics: Lessons in Fluid Pressure and Error Analysis
Rebecca Elizabeth Vieyra, Chrystian Vieyra, and Stefano Macchia,
Phys. Teach. 55, 87 (2017); doi: 10.1119/1.4974119

Of course I did not want to put my smartphone to a jar and expose it to extreme kitchen conditions. Anyway my smartphone do not have necessary sensors: neither pressure nor temperature. And it is difficult to find a jar sufficiently large for it. But I got a SensorTag (thanks to Julien) which has all sensors that I need so much. The SensorTag is sufficiently small to get into my smallest jar and its price is sufficiently low not to be ruined by its eventual loss.

Thanks to numerous examples of phyphox I could program the SensorTag as I wanted. So I programmed measurements of temperature and pressure at the same time slower (1s per point) and added a p,T phase diagram. I had also to change readings of the temperature from unsigned to signed, otherwise at T<0°C temperature became infinitely large… I will not show the screen captures and will go to treated result (Python).

I thought that pressure p and temperature T would follow the same curve taking into account pV = nRT (V = const). It was not so, and not only due to a different delay of cooling in the refrigerator and heating in the oven (preheated slightly). There is a remarkable difference even when both p and T have stabilized..
I compared also measured T and Tp = pV/nR of the hermetic jar as a gas thermometer.


Figures:
1. Jar in the refrigerator.
2. p and T as functions of time.
3. p,T diagram.

P.S. The SensorTag is still operational.
           
Reply
#2
(04-24-2020, 09:55 PM)solid Wrote: I
I thought that pressure p and temperature T would follow the same curve taking into account pV = nRT (V = const). It was not so, and not only due to a different delay of cooling in the refrigerator and heating in the oven (preheated slightly). There is a remarkable difference even when both p and T have stabilized..

Cool experiment! Do not hesitate to post your program, I would be interested in having a look...

Concerning your result, I may stating the obvious (and if so I apology), but I would say that the main reason your curves look as they do is because of the difference in the response time of the sensors, don't you think? The barometer reacts faster to a change than the thermometer do, due to thermal inertia (thermal inertia from the sensor itself, but also from the whole sensortag), so the pressure and the temperature that are measured at a given time are not in equilibrium. The exceptions are the stabilized temperatures; as you noted they are not exactly what is expected by the theory, but any non-perfect calibration of any of the sensors would explain it. If you only plot the 3 points that are at equilibrium (low T, room T, high T), you are not that far off from what is expected, are you?

Cheers,

Fred
Reply
#3
Hi,

for those who are interested I post the phyphox program (for the SensorTag) which is a slight modification of one given here. I ad also the QR code. The data used are obtained from the SensorTag pressure sensor (tempereture and pressure).

I will add temperature and humidity of the humidity sensor that may give different values. A calibration could be done manually in the water bath using a good calibrated thermometer. I do have one...
       

With Brest wishes.


Attached Files
.phyphox   Pressure and Temperature by SensorTag(PTmin).phyphox (Size: 5.02 KB / Downloads: 187)
Reply
#4
Thank you !
Reply
#5
Hi,
As promised I have done a phyphox program for two SensorTag sensors: Humidity and Pressure. Both provide temperature measurements. After the specification of the humidity sensor (HDC1000 of Texas Instruments) it can measure the temperature (T1) from -40°C to + 125°C, but in reality it starts to have problems below about -10°C (see the corresponding screen capture). The temperature (T2) given by the pressure sensor (BMP280 from Bosch Sensortec, full accuracy temperature range from 0°C to 65°C)  after my correction of the initial phyphox program has no anomalies by passing to negative temperatures. T1 and T2 are close, but temperature estimated from the pressure (pV = nRT, V=const) is changing faster.
               


Attached Files
.phyphox   Barometric and Humidity(HTPTmin).phyphox (Size: 8.2 KB / Downloads: 194)
Reply
#6
Hi
I am new to phyphox and I have a TI CC2650 that I'm playing with currently recording humidity and temp on a window sill as the weather is changing
I could not get the QR code to work so I downloaded your file but sadly it will not connect to my sensortag when all the other experiments do.
Do you have any ideas why
Cheers
David
Reply
#7
Hi David
I am also not an expert in phyphox and I have also CC2650.
So a difference might be in the phone operating system. I am using using Android..
Reply
#8
(05-03-2020, 05:15 AM)DavidStead Wrote: Hi
I am new to phyphox and I have a TI CC2650 that I'm playing with currently recording humidity and temp on a window sill  as the weather is changing
I could not get the QR code to work so I downloaded your file but sadly it will not connect to my sensortag when all the other experiments do.
Do you have any ideas why
Cheers
David

Hi David,

i had a similar connection problem with my cc2650 (hw version 1.2, old firmware < 1.20). After installing the latest firmware update (1.20, Jul 28 2015) with the sensortag app solid's experiments (and others) work on my LG Nexus 4 (stock android 5.1.1) as well as on my iPhone (iOS 13.4.1).

Hope that helps!
Sebastian
Reply
#9
great idea !

concerning the deviations from the ideal gas law i have some suggestions why it does not work:

1: sensor inertia especially of the thermometer as already suggested by fbouquet:
you can see it in the time series of T(P) : it falls and raises faster than T(measured) because the thermometer needs time to adapt to the envirnoment.
There is a way to correct that (see below)

2: Temperature sensitivity of the pressure sensor: pressure sensors are rather temperature sensitive and usually need a temperature correction. Could be that your sensor tag does a T-correction, but you never know. A check of the Temperature senstivy would be interesting: put the thing into the fridge with the jar open, and the door of the fridge not fully closed (i know this is not energy efficient - but we have to ensure that pressure remains constant in the fridge during the experiment)

3: Is your jar 100% airtight  ?
... i think it is airtight ohterwise the T(P) curve would underestimate temperature (... if i am right)
But in principle this is a good exercise to test the understanding of an experimental setup.


Inertia correction:
Lets say a thermometer gives a Temperature Ts. If it has some inertia such that it adapts to a sudden change in temperature with a tiime constant tau i.e. after a time tau it as covered 1/e of the temperature difference. This behaviour of the thermometer can be described by the differential equation
dTs/dt = -1/tau (Ts-Te)           (eq1)
where Te is the environmental temperature you want to know.
On may discretize the differential equation (There is also an analytic, more accurate method to solve the equation but for this forum and the target of phyphox this might be sufficient.)
(Ts(t2)-Ts(t1)) / dt = -1/tau ( Ts(t1) - Te(t1) )        (eq2)
and solve for Te :
Te(t1) = (Ts(t2)-Ts(t1))*tau/dt + Ts(t1)
           = tau/dt * Ts(t2)  + (1- tau/dt) * Ts(t1)    (eq3)
where t1 and t2 are times separated by one time step of length dt.
To use this your time step dt must be sufficiently larger than tau; you have to oversample - measure at a higher temporal resolution than your sensor can resolve.
 
Here is a paper that uses this (or a similar) method for humidity senors on weather ballons (=radiosondes)
https://doi.org/10.1175/1520-0426(2001)0...H>2.0.CO;2

The above equation eq3 for Te can be seen as a recursive digital filter where you use preceeding values and some weights to calculate an underlying quantitiy.
I.e. something like
y(t2) = w0 * y(t1) + w1 * x(t1) + ...
With such filters you can implement low-pass, high-pass, band-pass and many other filters.

What the sensor in terms of filtering does is damping down higher frequencies, i.e. it is a low pass filter. Equation eq3 does than the inverse : it amplifies the damped frequencies. Unfortunetaly it does this for all frequencies, also for those which contain only noise. To remove this noise it might be necessary to smooth Te(t) from eq3 with a cut off frequency fsmooth=1/tsmooth with tsmooth < tau. One can do this with any running averaging or again with a digital filter. Take eq2 which describes how the sensor smoothes the information from Te; replace Ts by Te_sm the smoothed environmental temperature and Te by Te_raw which is the output from eq3. You want to smooth Te_raw with time constant t_smooth and eq2 thus becomes
(Te_sm(t2)-Te_sm(t1)) / dt = -1/t_smooth ( Te_sm(t1) - Te_raw(t1) )        (eq4)
solve for Te_sm(t2):
Te_sm(t2) = (1-dt/t_smooth) * Te_sm(t1) + dt/t_smooth * Te_raw(t1)  (eq5)


In principle it is easy to implent this in python or whatever you use for anlysis.

I tried to build a digital filter of order one with the phyphox editior but ended up with compliceted combintion of exitisng elements and failed so far.
But maybe it is an idea to include such a filter in the analysis modules  Smile
Reply


Forum Jump: