0:00:00.000,0:00:19.700
36C3 preroll music
0:00:19.700,0:00:27.700
Herald-Angel: Good. Ladies and gentlemen,[br]we have here a talk by Sebastian Staacks.
0:00:27.700,0:00:29.770
Do I pronounce this well?[br]Sebastian Staacks: Yes.
0:00:29.770,0:00:33.160
Herald: Yes. Staacks. Staacks. [In German][br]Ich musste das mal in Deutsch sagen. And
0:00:33.160,0:00:40.640
he's related to the University of Aachen.[br]He did a PhD physics. And he was in a team
0:00:40.640,0:00:47.160
that developed a fantastic application, as[br]I mentioned earlier on. He developed the
0:00:47.160,0:00:51.620
app phyphox. Do I pronounce this well?[br]Staacks: I would say phi-phox, physical
0:00:51.620,0:00:55.350
phone experiments.[br]Herald: Okay. Yep. Of course. I'm sorry.
0:00:55.350,0:01:02.380
I'm not in that kind of department. But[br]this application actually gives you all
0:01:02.380,0:01:07.160
the possibilities off your the usage, off[br]your smart smartphone. Really? Really
0:01:07.160,0:01:12.610
extending certain borders, to my opinion.[br]So please give a warm, warm welcome here
0:01:12.610,0:01:14.250
to Stefan.
0:01:14.250,0:01:20.790
Applause
0:01:20.790,0:01:24.560
Stefan: Thank you. Thank you for the[br]introduction and welcome everybody to my
0:01:24.560,0:01:31.009
talk. Yeah. As you've just heard, I'm a[br]physicist from the RWTH Aachen university
0:01:31.009,0:01:36.310
where I developed the app phyphox. Phyphox[br]is an app for those of you who do not know
0:01:36.310,0:01:41.041
it already. That uses the sensors in the[br]smartphone for physics teaching. So the
0:01:41.041,0:01:46.380
idea is that students can use their own[br]phones to do experimentation in class, in
0:01:46.380,0:01:52.110
the lecture hall. So for schools and[br]universities. I should explain. That in
0:01:52.110,0:01:56.500
contrast to some other talks by me. This[br]one will not be that much about education
0:01:56.500,0:01:59.780
because it is the chaos communication[br]Congress and this is the hardware track
0:01:59.780,0:02:04.710
here. So I tried to tell you a little bit[br]about the app, a little bit about the
0:02:04.710,0:02:10.160
sensors that we have on our phones and.[br]Yeah. Would we love to get in touch with
0:02:10.160,0:02:15.410
some, especially people from maker[br]community and from open source communities
0:02:15.410,0:02:20.840
to find some connections, how he can get[br]many open source projects together?
0:02:20.840,0:02:25.489
Because I've got so much feedback from[br]teachers and I think I could also use some
0:02:25.489,0:02:31.909
feedback from other developers as well. So[br]I would like to start with a short
0:02:31.909,0:02:37.409
explanation of what we actually do. So[br]yes, I said I come from a university and
0:02:37.409,0:02:42.310
there we have this introductionary lecture[br]for physics students, which is called
0:02:42.310,0:02:47.360
experimental physics one. And it's typical[br]lecture. Looks like this. We have a fancy
0:02:47.360,0:02:52.120
new lecture hall by now, but the situation[br]is the same. We've got 300 I think 370
0:02:52.120,0:02:57.150
students this year sitting in a lecture[br]hall and doing no experimentation at all.
0:02:57.150,0:03:00.319
There's only one guy experimenting and[br]that's the professor. And the students are
0:03:00.319,0:03:05.569
sitting there and enjoying the whole show[br]like they would enjoy a YouTube video and
0:03:05.569,0:03:09.640
maybe they are mildly amused if something[br]goes wrong. OK. And we thought we could
0:03:09.640,0:03:14.080
change this by using the sensors in the[br]smartphones. We're not the first ones with
0:03:14.080,0:03:18.030
the idea to use the sensors there, but for[br]some reason we decided to write our own
0:03:18.030,0:03:23.019
app, which turned out to be quite[br]successful then. So in contrast to the old
0:03:23.019,0:03:26.310
version where students just had to look at[br]and I'll get the assignments where they
0:03:26.310,0:03:30.280
can do their own experiments with their[br]own measurement devices. And to give you
0:03:30.280,0:03:34.540
an idea of what this looks like. I would[br]like to start with the first experiment.
0:03:34.540,0:03:39.120
Which is about centrifugal acceleration or[br]centripetal acceleration depending on your
0:03:39.120,0:03:45.189
preferred frame of reference. So the idea[br]is from a rotation movement, we want to
0:03:45.189,0:03:50.060
measure the radial acceleration as a[br]function of the angular velocity. So the
0:03:50.060,0:03:55.389
rotation rate. To do this we take a[br]regular smartphone, this is an iPhone 8 in
0:03:55.389,0:04:00.020
this case and we put it into a salad[br]spinner. Okay. We get some rotation in
0:04:00.020,0:04:09.700
there and whoops let me just place it in[br]there. Sound is not important, but it
0:04:09.700,0:04:17.360
sounds nice. I have been told. So here we[br]get the live data from the phone already.
0:04:17.360,0:04:22.950
Acceleration on the y axis and angular[br]velocity on the x axis. If the salad
0:04:22.950,0:04:27.000
spinner is actually moving. And what you[br]see is the faster I rotate the spinner,
0:04:27.000,0:04:31.850
the farther on the right you get your data[br]because that's angular velocity and also
0:04:31.850,0:04:36.840
the radial acceleration increases. If I'm[br]not going too fast because then I do not
0:04:36.840,0:04:41.690
get any data at all anymore. Let's slow[br]down again and we can fill up the gaps
0:04:41.690,0:04:47.950
there by going really slow and filling up[br]this path. And in the end, if so, who here
0:04:47.950,0:04:54.750
has a physics background some more than[br]expected. Great. Because those of you who
0:04:54.750,0:04:59.140
just raised their hands would not be[br]surprised that we expect a square
0:04:59.140,0:05:03.400
relationship between the radial[br]accaleration and angular velocity. Those
0:05:03.400,0:05:07.860
of you who do not know will believe me[br]from this plot where on the x axis we've
0:05:07.860,0:05:13.111
got the angle of velocity squared and on[br]the y axis the radial acceleration we get
0:05:13.111,0:05:17.699
a straight line and that's what you would[br]expect. So besides the physics, because
0:05:17.699,0:05:21.641
this is not that much about the physics.[br]This is a simple experiment all our
0:05:21.641,0:05:25.860
students could do and actually they ge, we[br]gave them this assignment. We gave them
0:05:25.860,0:05:31.120
also a bonus point if they created a[br]video. Don't worry. Their consent to that
0:05:31.120,0:05:34.340
we use the video was not related to the[br]point, they first got the point and then
0:05:34.340,0:05:39.160
we asked for their consent to use the[br]video. And we learned two things from
0:05:39.160,0:05:43.530
these videos. A Our students do not really[br]have salad spinners. they've got bicycles
0:05:43.530,0:05:48.759
and office chairs, but b and that was the[br]most important thing. It looks like I
0:05:48.759,0:05:54.990
mean, these are from this year where we[br]got almost 100 videos they we actually
0:05:54.990,0:05:58.310
could trigger them to go out, search for[br]something where they've got the
0:05:58.310,0:06:04.520
rotationary movement and they could repeat[br]this experiment. Ok. Another example which
0:06:04.520,0:06:09.180
actually changed just the course of the[br]lecture a little bit is a situation where
0:06:09.180,0:06:14.389
we first give the assignment before we[br]actually let them, before we actually
0:06:14.389,0:06:18.969
discuss the theory behind this, which[br]means in this example, this is a little bit
0:06:18.969,0:06:25.049
older because we did not get there yet this[br]year, we assigned our students to build
0:06:25.049,0:06:30.490
string pendulums. They look very similar[br]because we were very precise about how
0:06:30.490,0:06:35.270
they should build them. And then we had an[br]online form where they could submit the
0:06:35.270,0:06:39.080
length of their pendulum and the frequency[br]they received from it that they measured
0:06:39.080,0:06:44.479
with the pendulum. They should do this for[br]three different cases. And the idea was
0:06:44.479,0:06:48.920
that we did this assignment long before we[br]discussed the pendulum in the lecture so
0:06:48.920,0:06:53.130
that they have got a little bit of[br]research experience. And after we
0:06:53.130,0:06:57.380
collected all the data from them, then the[br]lecture would discuss the pendulum. So the
0:06:57.380,0:07:01.629
physicists were there now. We do a small[br]angle, approximation solving differential
0:07:01.629,0:07:05.330
equation. All this theory stuff. And in[br]the end we were done, we could tell our
0:07:05.330,0:07:09.409
students, well, we do not have to do this[br]experiment on stage. Now, because all of
0:07:09.409,0:07:13.680
you did this experiment and we simply can[br]compare the theory that we just arrived
0:07:13.680,0:07:19.450
with your data. And it worked out quite[br]well. So you see most of the white points,
0:07:19.450,0:07:23.220
which is the data from the students[br]matches the theory, which is the orange
0:07:23.220,0:07:27.770
line, except maybe for those three who[br]should proceed on a career of theoretical
0:07:27.770,0:07:33.289
physics. But yeah, so this is all[br]something got nice feedback from and this
0:07:33.289,0:07:37.539
is in principle how we use the app and[br]what it's designed for. There are also of
0:07:37.539,0:07:41.509
course many applications in school by now.[br]More teachers use this in school than we
0:07:41.509,0:07:45.819
use it at the university. So we take this[br]into consideration as well. But that's the
0:07:45.819,0:07:49.449
reason that I am standing here talking[br]about the sensors in the smartphone.
0:07:49.449,0:07:54.720
That's the reason that I am trying to[br]access them. so let's have a look at what
0:07:54.720,0:07:58.920
sensors we actually have in our phone. I[br]think the first one that most of you would
0:07:58.920,0:08:04.120
think often talking about sensors besides[br]obvious stuff like the microphone would be
0:08:04.120,0:08:10.190
the accelerometer. So I think yeah, I[br]think I first explain how the
0:08:10.190,0:08:13.900
accelerometer works. OK, so the[br]accelerometer in your phone is actually a
0:08:13.900,0:08:18.169
so-called MEMS device. MEMS is M E M S[br]stands for Micro Electrical Mechanical
0:08:18.169,0:08:24.009
System and it looks roughly like this.[br]It's a simplification. If you search for
0:08:24.009,0:08:28.650
actual MEMS devices, simply search for M E[br]M S and accelerometer and you find some
0:08:28.650,0:08:31.270
pictures. They usually are a little bit[br]more complicated, although the
0:08:31.270,0:08:35.570
accelerometer is not that much more[br]complicated. It consists of an orange
0:08:35.570,0:08:40.280
case. Yeah, well so far so obvious, but[br]also two contacts. The blue and the red
0:08:40.280,0:08:45.230
one and important part is this silvery[br]structure here or the metallic structure
0:08:45.230,0:08:49.130
which is under etched its bit hard to see[br]on this picture, but it's actually
0:08:49.130,0:08:53.211
floating. It's only attached to the sides,[br]you see light in between here. So if you
0:08:53.211,0:08:59.360
move around, the accelerometer the inner[br]path, can actually move. So let's do this.
0:08:59.360,0:09:03.580
So at each point where the device is extra[br]riding in one direction or the other
0:09:03.580,0:09:11.340
direction, due to inertia the that the[br]metallic part in here is distorted, moved
0:09:11.340,0:09:16.090
into one direction and we can measure the[br]amount by which it is deflected by this
0:09:16.090,0:09:20.980
movement with the two contacts by[br]measuring the capacity between these
0:09:20.980,0:09:26.460
structures. So that's the principle of the[br]accelerometer. One thing to mention at
0:09:26.460,0:09:32.880
this point is that it's in the sense of[br]physics. It does not really only measure
0:09:32.880,0:09:36.850
acceleration. It measures acceleration you[br]see in this image of the device
0:09:36.850,0:09:41.170
accelerating. We get some data, but if you[br]imagine we take this device and rotate it
0:09:41.170,0:09:47.270
like this, then of course you also get a[br]deflection of the of the metallic part by
0:09:47.270,0:09:51.030
gravity. So gravity is pulling it down as[br]well. And that's the main reason the
0:09:51.030,0:09:55.840
accelerometer is in there because the[br]developers and manufacturers of the phones
0:09:55.840,0:09:59.950
are not really interested in measuring[br]acceleration, at least there aren't that
0:09:59.950,0:10:04.290
many use cases for it. But instead, what[br]they want to have is an indication on
0:10:04.290,0:10:08.450
which direction is down or which direction[br]is up. So when you rotate the screen of
0:10:08.450,0:10:12.740
your phone, actually they can rotate the[br]content of the phone as well or with this
0:10:12.740,0:10:17.690
you can also then control video games by[br]tilting your phone and stuff like this.
0:10:17.690,0:10:24.080
Because gravity also deflects the[br]accelerometers. Earth's acceleration,
0:10:24.080,0:10:27.090
which you try to avoid because from[br]didactic point of view, this is a
0:10:27.090,0:10:33.910
nightmare to distinguish these both. But[br]the point is that we can detect rotations
0:10:33.910,0:10:39.080
like this and this is pretty much in every[br]phone. I mean, this is not really a
0:10:39.080,0:10:43.000
statistic. This is just the first pie[br]chart we have about availability. I have
0:10:43.000,0:10:48.400
never encountered a single phone or tablet[br]that does not have an accelerometer. So if
0:10:48.400,0:10:53.731
anyone ever encountered some special[br]device, some very unique device that
0:10:53.731,0:10:57.270
doesn't have one. Let me know because I[br]would be interested in this at least. I do
0:10:57.270,0:11:00.990
not know of any device on which phyphox[br]actually runs, which doesn't have an
0:11:00.990,0:11:06.920
accelerometer. A bit more interesting is[br]which data rate we can achieve. So most
0:11:06.920,0:11:12.180
accelerometers have several hundred[br]samples per second. Actually the fastest
0:11:12.180,0:11:18.850
ones go up to 500 hertz and but there are[br]also many devices that only do one hundred
0:11:18.850,0:11:23.900
hertz That's 100 values per second. These[br]are mostly the cheaper Android devices and
0:11:23.900,0:11:28.830
all the iPhones. So I think the internal[br]accelerometer will do more on an iPhone.
0:11:28.830,0:11:34.630
But I have to admit, at some point I can[br]understand why they might limit this. But
0:11:34.630,0:11:39.000
on an iPhone, you get 100 hertz. That's[br]the limit. From the API, what you can get
0:11:39.000,0:11:46.410
there. But this is actually quite a lot. I[br]will later see what we can do with this.
0:11:46.410,0:11:50.450
And one other point about calibration of[br]this thing. Actually for all the sensors
0:11:50.450,0:11:54.900
to get reasonable units from the system so[br]the acceleration is given in meter per
0:11:54.900,0:12:00.020
square second. I just realized that if I[br]get the units, that's something I would
0:12:00.020,0:12:05.580
really tell my students. But yeah. So on[br]the x axis, it's a meter per square second
0:12:05.580,0:12:11.380
and you see that as a wide range of values[br]that you get there. So this data is from
0:12:11.380,0:12:14.610
our sensor database. I would mention it[br]later as well. This is contribution from
0:12:14.610,0:12:19.330
our users what data there this. This only[br]absolute value that we get from resting
0:12:19.330,0:12:23.790
phones and we would expect nine point[br]eight one meter per square second for
0:12:23.790,0:12:29.030
earth acceleration. There are some local[br]variation, but not on that scale. So do
0:12:29.030,0:12:33.110
not expect your sensors to be well[br]calibrated. Also, if you've got any app
0:12:33.110,0:12:37.800
that tells you you can push a single[br]button and then calibrates your sensor,
0:12:37.800,0:12:42.910
don't trust it. It's not that simple.[br]These sensors may have different errors on
0:12:42.910,0:12:48.510
each axis. They're all 3D sensors we've[br]got an X, Y and z axis. These errors can
0:12:48.510,0:12:52.360
be linear errors so you have to multiply a[br]correction. It could be an offset. So it
0:12:52.360,0:12:56.680
would have to add an correction. And on[br]top of this, the entire device could be
0:12:56.680,0:13:01.180
tilted within your phone. OK. So actually,[br]if you look into the data sheets of the
0:13:01.180,0:13:06.610
accelerometer, they have some tolerance on[br]how much they might already be shifted or
0:13:06.610,0:13:10.810
rotated within the package. And when[br]soldering it into the phone, I would
0:13:10.810,0:13:15.030
assume there will be an additional error.[br]I've seen so many different errors on
0:13:15.030,0:13:19.570
different phones. It's not that easy to[br]simply calibrate that. But let me give you
0:13:19.570,0:13:24.590
an example of what you can do with it. Or[br]just a quick look first. So we see in our
0:13:24.590,0:13:29.360
app. Yeah. So this is phyphox. OK. Thank[br]you. Got this. You have an entry
0:13:29.360,0:13:34.370
acceleration with G. That's the extra raw[br]data from the sensor or as raw as we get
0:13:34.370,0:13:41.470
it. If I started you see if I shake it,[br]you get some readings there. It's fast.
0:13:41.470,0:13:46.450
It's already great. You can apply to[br]pendulum and measure the acceleration of
0:13:46.450,0:13:51.550
the pendulum like this. But something I[br]want to demonstrate is that we can also
0:13:51.550,0:13:56.370
get the frequencies from this data by[br]doing a fourier transform and calculating
0:13:56.370,0:14:01.660
the frequency spectrum of this exploration[br]data and to demonstrate this I brought a
0:14:01.660,0:14:07.810
little device a old hard disk drive. It says[br]it's broken, but it's still rotating and
0:14:07.810,0:14:13.510
that's important part for us. So if I[br]place my phone on top of it, start the
0:14:13.510,0:14:19.780
measurement. Turn on the hard disk drive.[br]And then you see a peak showing up in the
0:14:19.780,0:14:24.740
spectrum and it settles at 120 hertz. If[br]you don't believe me. Unfortunately, we
0:14:24.740,0:14:28.160
don't have a camera here right now. You[br]can later have a look. It's supposed to
0:14:28.160,0:14:34.350
run at seven thousand two hundred RPM,[br]which is 120 hertz. We can even get a time
0:14:34.350,0:14:38.570
resolution of this. So if I turn it off[br]again, you see how the frequency drops
0:14:38.570,0:14:46.670
down. And if I turn it on again. There it[br]comes up again. OK. So this an example of
0:14:46.670,0:14:49.330
what you can do. It's great for students[br]that can check if the washing machine at
0:14:49.330,0:14:53.640
home is working properly or they can[br]check other things. But usually I do not
0:14:53.640,0:15:00.011
like to bring washing machines to talks.[br]So I used the hard disk drive here. One
0:15:00.011,0:15:04.150
other thing you might have noticed before[br]is that we've actually got acceleration
0:15:04.150,0:15:10.440
with G and acceleration without G. The[br]second one is actually a sensor that
0:15:10.440,0:15:15.920
removes Earth's gravity. So if I start the[br]one with G, you will notice that down here
0:15:15.920,0:15:21.610
on the Z, the axis you still have the 9.81[br]meter per square second, which is great
0:15:21.610,0:15:25.780
because if i rotate the phone. This[br]contribution goes to other axis and we can
0:15:25.780,0:15:29.490
determine the orientation of the phone.[br]But this is bad actually for dedactics
0:15:29.490,0:15:33.460
because actually the phone is resting.[br]It's not moving at all. There's no
0:15:33.460,0:15:37.331
velocity involved. There's no[br]acceleration. So luckily, there's also an
0:15:37.331,0:15:42.580
acceleration without G, which gives us[br]roughly 0 an all axis unless I actually
0:15:42.580,0:15:47.750
accelerate this thing. Problem with this[br]is this is only a virtual sensor. This is
0:15:47.750,0:15:52.371
a sensor that's fusing the data from the[br]accelerometer with an additional sensor
0:15:52.371,0:15:57.060
like the gyroscope. So we can actually[br]distinguish between rotating the phone or
0:15:57.060,0:16:01.760
accelerating it in one or the other[br]direction. Usually you only get
0:16:01.760,0:16:06.760
acceleration without G. If you also have a[br]gyroscope in your phone, I've seen two or
0:16:06.760,0:16:10.480
three devices that offer you acceleration[br]without G, even though they don't have a
0:16:10.480,0:16:16.780
gyroscope. This case, don't trust them.[br]This is merely guessing. OK. So it's. They
0:16:16.780,0:16:23.730
probably have only low frequency filter[br]on top of this, or they're averaging out
0:16:23.730,0:16:29.890
your movement and this doesn't really work[br]for anything. Yeah so that's the
0:16:29.890,0:16:34.300
accelerometer or one other thing I want to[br]mention is if you look into the API to
0:16:34.300,0:16:37.750
access the sensors yourself for some[br]reason you will notice acceleration
0:16:37.750,0:16:41.680
without G is usually called linear[br]acceleration in our app since it's made
0:16:41.680,0:16:45.360
for teaching. We decided to call it with[br]and without G. So if you find
0:16:45.360,0:16:49.410
accelerometer, that's the one with G and[br]linear acceleration is the one without G.
0:16:49.410,0:16:54.720
If you look at other apps or the API.[br]Okay. Next up, I already mentioned this
0:16:54.720,0:17:00.220
one is a gyroscope. If you have, some[br]physics background. Then when you think of
0:17:00.220,0:17:05.189
a gyroscope, you're thinking of a device[br]that's spinning fast so it has some angular
0:17:05.189,0:17:10.360
momentum and then usually you want it to[br]be heavy and to have the weight at the
0:17:10.360,0:17:15.910
large radius. We've got a strong moment of[br]inertia so that you get when it's spinning
0:17:15.910,0:17:20.650
fast, a strong, angular momentum and due[br]to the conservation of angular momentum.
0:17:20.650,0:17:24.720
These spinning devices can keep an axis[br]regardless of rotating the frame around
0:17:24.720,0:17:30.120
it. That's what I was thinking about, a[br]gyroscope of what I think is a gyroscope.
0:17:30.120,0:17:34.669
When you just give me the term out of[br]context, of course, a heavy, huge, fast
0:17:34.669,0:17:38.179
spinning device is the last thing you want[br]in your phone. So that's not what's meant
0:17:38.179,0:17:42.660
with the gyroscope when people are talking[br]about gyroscopes in your phone. Instead
0:17:42.660,0:17:48.480
there again you have a MEMS device. So[br]again, micro electromechanical system. You
0:17:48.480,0:17:52.500
notice this looks almost exactly like[br]accelerometer. If you look for real
0:17:52.500,0:17:56.129
devices, those are actually much more[br]complicated because they need some
0:17:56.129,0:18:02.460
specific geometry to make sure that they[br]do not act like an accelerometer. But the
0:18:02.460,0:18:08.289
principle is easy to explain with the same[br]geometry. So we again have this floating
0:18:08.289,0:18:13.889
metallic part and we've got 2 contacts. So[br]again, we've got a part that can wobble in
0:18:13.889,0:18:18.299
this direction here. But on top of this,[br]we've got the motion that's perpendicular
0:18:18.299,0:18:22.539
to this. So this is now not depicting the[br]motion of your phone, but this is
0:18:22.539,0:18:27.149
depicting a vibration that the gyroscope[br]does by itself all the time. So there are
0:18:27.149,0:18:30.760
different ways to build them. Some have a[br]rotary motion, some have this linear
0:18:30.760,0:18:34.990
motion. Also, the way to create this[br]motion makes this device so much more
0:18:34.990,0:18:39.480
complicated. But in principle, it's a[br]similar structure which is vibrating forth
0:18:39.480,0:18:46.280
and back and now if you add rotation to[br]it. It's a little bit hard to see it as
0:18:46.280,0:18:50.889
it's rotating the inner part now suddenly[br]gets deflected. That's changed, right?
0:18:50.889,0:18:55.100
Frame of reference. So let's get the[br]camera in sync with this device. What you
0:18:55.100,0:19:00.010
now see is that the inner part is moving[br]left and right, although the device itself
0:19:00.010,0:19:06.260
is only moving up and down. And the reason[br]is I don't want to deduce it entirely
0:19:06.260,0:19:09.900
here, but most of you probably have heard[br]of it. This is the Coriolis effect. So,
0:19:09.900,0:19:14.649
yes, in fact, your phone is determining[br]the rotation rate of your phone, not the
0:19:14.649,0:19:18.460
actual angle, but the rotation rate or[br]angular velocity due to the coriolis
0:19:18.460,0:19:24.710
effect, which is just mind blowing if you[br]do some of the calculations. There are
0:19:24.710,0:19:32.200
some manufacturers on the Internet which[br]claim that they can detect a movement of
0:19:32.200,0:19:36.669
the order of magnitude of a single atom.[br]And I believe them because we use similar
0:19:36.669,0:19:41.799
structures in solid state physics. So[br]that's possible. If you want to try it,
0:19:41.799,0:19:47.080
just turn on the gyroscope on your phone.[br]And do slight rotation like this, which is
0:19:47.080,0:19:52.980
about the Z axis, one perpendicular to the[br]display, you can detect really slow
0:19:52.980,0:19:58.090
rotations with this. And think about the[br]fact that this is done using the coriolis
0:19:58.090,0:20:04.480
effect and it's just mind blowing I think.[br]So this sensor is a bit more available.
0:20:04.480,0:20:10.370
Actually, almost 80 percent of the phones[br]have them. This has become significantly
0:20:10.370,0:20:15.370
more since Pokémon GO. The reason is[br]when this game came up, suddenly people
0:20:15.370,0:20:19.039
noticed that there's a device called the[br]gyroscope. And if it's not present, they
0:20:19.039,0:20:22.540
did not have this AR mode where you can[br]actually take pictures of the nice cute
0:20:22.540,0:20:27.649
Pokémon and so on. So this is when the[br]many people noticed it and the
0:20:27.649,0:20:32.320
manufacturers decided, OK, let's just[br]throw in the gyroscope as well, because
0:20:32.320,0:20:35.440
it's not that expensive, in fact, usually[br]it's on the same chip as the
0:20:35.440,0:20:39.289
accelerometer. Then they're sold as one[br]thing it's an IMU - Inertia Measurement
0:20:39.289,0:20:45.389
Unit not important at home, but so it's[br]quite a common thing. And the sensor rates
0:20:45.389,0:20:50.809
look pretty much the same. You mostly[br]notice the dip in the 100 hertz regime
0:20:50.809,0:20:54.610
because those are the real cheap phones,[br]which then also don't have a gyroscope.
0:20:54.610,0:20:59.620
But most of the phones achieve higher[br]rates. Again, since we were laughing
0:20:59.620,0:21:05.512
before the iPhones also are here again at[br]the 100 hertz. Wouldn't make sense to have
0:21:05.512,0:21:10.809
the gyroscope faster at this point. Yeah,[br]but that's it about the gyroscope you've
0:21:10.809,0:21:16.460
seen it in action in the salad spinner.[br]And that's one of the sensors you do not
0:21:16.460,0:21:21.950
really see that often directly, but were[br]just mostly there to assist other things
0:21:21.950,0:21:28.460
that you do where you need to get smooth[br]motion like controlling games, AR . And
0:21:28.460,0:21:34.409
actually removing the Earth's acceleration[br]from the accelerometer. Next up is a
0:21:34.409,0:21:39.399
magnetometer, which I think is a more[br]obvious sensor because that's your compass
0:21:39.399,0:21:45.350
in your device. So when you're doing[br]navigation with a GPS in your car, it's a
0:21:45.350,0:21:49.539
simple thing. GPS gets a position, you get[br]a sequence of position as you going and
0:21:49.539,0:21:52.480
from the sequence of the positions you[br]get, the direction you're moving in your
0:21:52.480,0:21:56.530
car and your phone is attached to the[br]dashboard at least i hope so. So it's
0:21:56.530,0:21:59.419
pointing in the same direction you're[br]moving, everything's obvious. But if
0:21:59.419,0:22:04.259
you're standing on an open space looking[br]for not sure a train station or anything
0:22:04.259,0:22:07.710
and you wondering which direction you want[br]to go from point of view of GPS, it's
0:22:07.710,0:22:11.929
always the same position it doesn't get an[br]orientation. You need a compass, which is
0:22:11.929,0:22:17.350
the magnetometer. How do we get a compass[br]on your phone? This is usually a hall
0:22:17.350,0:22:23.210
sensor. A hall sensor is in principle just[br]a conductor with charge carriers so these
0:22:23.210,0:22:27.759
are the nice shiny white balls here[br]drifting from one side to the other so
0:22:27.759,0:22:31.860
it's just an electric current. And if you[br]apply a magnetic field to an electric
0:22:31.860,0:22:36.759
current or to any electric charge, then[br]there is an effect. You might know from
0:22:36.759,0:22:41.039
school, which is called the lorentz[br]effect. So there is a charge going one
0:22:41.039,0:22:44.710
direction, you get the magnetic field[br]perpendicular to this and then the charge
0:22:44.710,0:22:50.579
is deflected into a direction[br]perpendicular to the flying direction. And
0:22:50.579,0:22:54.539
yeah, that's lorentz effect the older[br]guys, of you would know it from CRTs. If
0:22:54.539,0:22:59.610
you bring a magnet close to a CRT, the[br]entire image is messed up due to this
0:22:59.610,0:23:05.980
effect. And that's what we're using in[br]hall effect sensor or hall sensor you've
0:23:05.980,0:23:12.059
got this electric current and if you bring[br]a magnetic field close to it, the charge
0:23:12.059,0:23:17.190
carriers are deflected to one side or the[br]other. And therefore, if you're measuring
0:23:17.190,0:23:22.629
the voltage perpendicular to the flow of[br]the count, you get. Yeah. You get an extra
0:23:22.629,0:23:26.230
voltage that's proportional to the[br]magnetic field. That's the hall effect.
0:23:26.230,0:23:32.399
That's how your phone is able to determine[br]the magnetic field. This one is even more
0:23:32.399,0:23:37.299
common than the gyroscope simply because[br]it's used for navigation and people start
0:23:37.299,0:23:42.330
to notice if it's not. If it's not present[br]and they do not get an orientation in the
0:23:42.330,0:23:49.900
navigation software. But the actual rate[br]of the sensors is much slower than for the
0:23:49.900,0:23:54.710
accelerometer. Most of them are running at[br]100 Hertz. It will be important in two
0:23:54.710,0:24:00.440
more slides. Besides that, there's not[br]that much strange about the availability
0:24:00.440,0:24:05.759
of this, but it's extremely sensitive[br]because it's supposed to measure Earth's
0:24:05.759,0:24:10.070
magnetic field. Earth's magnetic field has[br]the strength around 50 micro Tesla. This
0:24:10.070,0:24:15.649
is not much actually if ever carried the[br]magnetic magnet with you. Did you fear of
0:24:15.649,0:24:19.919
some force from the Earth's magnetic[br]field? Of course, it didn't need to build
0:24:19.919,0:24:23.110
some compass where the needle is floating[br]on something like this to actually get a
0:24:23.110,0:24:28.279
rotation. It's a very weak field and[br]that's good news and bad news as well,
0:24:28.279,0:24:32.080
because on one hand, it's very sensitive.[br]downside is it's very sensitive. Which
0:24:32.080,0:24:36.069
means it saturates very early. If you want[br]to measure the magnetic field of an actual
0:24:36.069,0:24:41.769
magnet. Don't even try it will saturate[br]right away. You do not get anything to
0:24:41.769,0:24:47.749
demonstrate how how sensitive this[br]actually is. I've brought a flashlight, so
0:24:47.749,0:24:55.091
a very simple one. And I switch to a modus[br]where we've got an s.o.s signal. That's
0:24:55.091,0:25:00.679
coming up, a point in this direction and I[br]place it next to the magnetometer in my
0:25:00.679,0:25:05.909
phone. And yeah, you see right away so[br]much of his seeing the lights are pointing
0:25:05.909,0:25:09.999
in this direction. You see the s.o.s[br]signal popping up in the magnetic field
0:25:09.999,0:25:14.629
reading simply because of the current[br]going through the LED. So that's what we
0:25:14.629,0:25:17.909
call an Oersted-field. This is just the[br]typical magnetic field you get from any
0:25:17.909,0:25:22.739
current flowing. So I stop it. We got a nice[br]SOS signal over there. Three short, three
0:25:22.739,0:25:31.090
long and three short signals. And it's just[br]coming from this simple flashlight. And
0:25:31.090,0:25:36.629
this is also a good indicator on how[br]sensitive this thing is. I mean, if you
0:25:36.629,0:25:43.580
place your phone in a case with a magnetic[br]some magnetic closing mechanism, compass
0:25:43.580,0:25:47.259
wouldn't work anymore. If you're not[br]careful when paying your clothes and you
0:25:47.259,0:25:51.750
place your phone on the big magnet that[br]removes the theft protection from the
0:25:51.750,0:25:55.860
clothes, something in your phone would get[br]magnetized and would certainly be stronger
0:25:55.860,0:26:01.110
than Earth's magnetic field. For the rest[br]of the day, your compass would be pointing
0:26:01.110,0:26:06.740
in the wrong direction. Okay. Luckily,[br]usually the phones are able to notice this
0:26:06.740,0:26:11.999
and they recalibrate the phone to simply[br]subtract any constant fears. That again is
0:26:11.999,0:26:15.259
bad. If you want to do absolute[br]measurements because you have not much
0:26:15.259,0:26:22.700
control over the recalibration mechanism,[br]you can access the raw data value. So if
0:26:22.700,0:26:27.039
you folks there's a checkmark where you[br]can disable the calibration, but then you
0:26:27.039,0:26:30.850
have to do everything by hand. You will[br]certainly have some background that's
0:26:30.850,0:26:34.980
annoying. And one other thing, you should[br]also take care and notice where your
0:26:34.980,0:26:38.929
actual magnetometer is because in most[br]phones it's on top left corner, top right
0:26:38.929,0:26:44.100
corner, top center. And this Pixel 3 is a[br]very strange one. It has it on the right
0:26:44.100,0:26:48.919
hand side, but it's never dead center. I[br]think because of all the currents in the
0:26:48.919,0:26:53.360
phone, I mean, you're charging your[br]battery with three amps. How much you
0:26:53.360,0:26:57.330
charge them now? This would yield a[br]stronger field than a flashlight and you
0:26:57.330,0:27:03.120
would see it in the magnetometer again.[br]Now for what you can do with this. So as
0:27:03.120,0:27:07.490
little homework for all of you who came by[br]train yesterday, when I came here on the
0:27:07.490,0:27:13.379
ICE, I turned on the magnetic spectrum,[br]the same thing as the acceleration
0:27:13.379,0:27:17.279
spectrum you just seen. And when you're[br]doing it on train, you would see a peak at
0:27:17.279,0:27:24.450
16.6 hertz. It might depend on your actual[br]seat. You might move it around a little
0:27:24.450,0:27:31.190
bit. But so far I usually always saw this[br]peak. This is the electrification
0:27:31.190,0:27:36.480
frequency of the German railway. So you[br]can simply check if it's working properly.
0:27:36.480,0:27:43.179
You should see 16.7 hertz. Okay. One other[br]thing that some of you might get in your
0:27:43.179,0:27:46.350
head right now, that you could do this[br]with simple electrical outlets. There you
0:27:46.350,0:27:49.590
would get a problem with the rate. So[br]that's what I mentioned, that the rate of
0:27:49.590,0:27:55.799
the sensor is quite important. I also got[br]something via Twitter yesterday. Just as a
0:27:55.799,0:27:58.289
response to the other one, I thought,[br]well, I was looking for an example like
0:27:58.289,0:28:02.489
this for this talk talk, so I just put it[br]in. This is a measurement of an American
0:28:02.489,0:28:07.919
power outlet which is run at 60 hertz. But[br]this guy is seeing 40 hertz and he was
0:28:07.919,0:28:15.990
wondering about this. That's what's called[br]aliasing. So the alias effect, sort of you
0:28:15.990,0:28:19.830
might notice this from computer games.[br]They usually use it in slightly different
0:28:19.830,0:28:25.619
context. The idea is if you're measuring a[br]frequency that's higher than half of the
0:28:25.619,0:28:29.570
data acquisition rate of your sensor. So[br]this one is runningat 100 hertz like most
0:28:29.570,0:28:35.759
of the phones do. Then half of this[br]frequency is what's called the Nyquist-
0:28:35.759,0:28:39.559
frequency. And you notice that the[br]spectrum goes from zero to the Nyquist-
0:28:39.559,0:28:45.499
frequency. This is simple math, not simple[br]math, but its maths. The roots of the
0:28:45.499,0:28:49.309
fourier-transformation, you could say so.[br]And if you try to detect a frequency
0:28:49.309,0:28:53.769
that's higher than this, so an American[br]power outlet with 60 hertz, actually the
0:28:53.769,0:29:00.320
higher frequency is showing up as on the[br]other side of this upper limit at 40
0:29:00.320,0:29:03.309
hertz, even if you go to a higher[br]frequency, it would shift down further and
0:29:03.309,0:29:06.420
further until reaching zero and then it[br]would shift up again. So if you're
0:29:06.420,0:29:13.450
interested in this. Check out some[br]articles about aliasing. If you're not
0:29:13.450,0:29:16.649
that interested in this. Just keep in[br]mind, if you're measuring frequencies that
0:29:16.649,0:29:20.340
are higher than half your data acquisition[br]rate, you will not see the correct
0:29:20.340,0:29:26.840
frequency. OK. Then one of my favorite[br]sensors, the pressure sensor for this one
0:29:26.840,0:29:32.960
I need. Again, the phone. That's not on a[br]wire. Let me before before I show
0:29:32.960,0:29:37.559
anything. Let me demonstrate what it can[br]do, because that's something I find quite
0:29:37.559,0:29:42.250
surprising. Let's turn on the measurement.[br]By the way, those who are wondering how
0:29:42.250,0:29:47.970
this works. There's a function in phyphox,[br]we call it remote access. It's basically a
0:29:47.970,0:29:53.469
web server running in the app which[br]provides the data so we can simply access
0:29:53.469,0:29:59.049
the data on the phone to demonstrate or to[br]control the measurement. And now here we
0:29:59.049,0:30:04.049
see the pressure sensor. Right now, just[br]mostly noise or what I do now is I hold it
0:30:04.049,0:30:07.769
up. And if we wait a few seconds, you[br]would see that the pressure's actually
0:30:07.769,0:30:15.450
dropping. It has dropped far enough. Then[br]I place it on the ground and the pressure
0:30:15.450,0:30:20.190
is rising again. So actually, your phone,[br]if it has a pressure sensor, has a
0:30:20.190,0:30:25.850
pressure sensor that's sensitive enough.[br]So we turn it off to measure a change of
0:30:25.850,0:30:33.279
pressure of a distance like this. OK. And[br]that's again, when I first tried this, I
0:30:33.279,0:30:39.529
repeated this test several times before,[br]believed it was just not by accident. And
0:30:39.529,0:30:43.509
how do they do this? You have got another[br]device that actually has a cavity. So
0:30:43.509,0:30:47.649
below the bluish gray part, there's a[br]cavity in there which is covered by a
0:30:47.649,0:30:52.519
silicon membrane, which is the bluish[br]part. And if you change the pressure this
0:30:52.519,0:30:57.530
simply moves it like you would expect from[br]a membrane just in small. And to detect
0:30:57.530,0:31:02.779
this movement, here is some material on[br]top of this which changes its resistance.
0:31:02.779,0:31:11.950
Or resistivity depending on the strain[br]created by morphing, dismembering. And
0:31:11.950,0:31:15.580
unfortunately, this sensor is not that[br]much available. So about a third of the
0:31:15.580,0:31:19.869
devices that we know of have the sensor.[br]Of course, there's some bias in there from
0:31:19.869,0:31:27.429
the users that submit data to us. This[br]means that, yes, these are usually the
0:31:27.429,0:31:31.739
more expensive devices. So my rule of[br]thumb is if it's an iPhone, they usually
0:31:31.739,0:31:36.159
have the pressure sensor except for the[br]iPhone SE or some older models. If it's an
0:31:36.159,0:31:39.700
Android, if you payed half as much as you[br]paid for an iPhone, then you have a good
0:31:39.700,0:31:47.229
chance that you have to pressure sensor as[br]well. But OK, that data rates? Yeah.
0:31:47.229,0:31:54.581
Varies a lot. So the iPhones, like you[br]just saw the rate of about 1 Hertz. Most
0:31:54.581,0:31:59.440
Android phones are on five, ten or twenty[br]five hertz. I've never had a device like
0:31:59.440,0:32:02.619
this in my hand. It does 100 hertz. I[br]don't really believe that this makes sense
0:32:02.619,0:32:09.720
because I already noticed on my phone that[br]I think it does 25 hertz. Just handing it
0:32:09.720,0:32:15.740
because of the sealed casing introduces[br]more noise than you can actually use, at
0:32:15.740,0:32:20.919
least for these small distances that I use[br]it for. But you can do other funny things
0:32:20.919,0:32:26.489
with this. So this is something I received[br]by Dianna Cowern. You might know her as a
0:32:26.489,0:32:32.259
YouTuber called "The Physics Girl". She[br]used a pressure measurement on the flight.
0:32:32.259,0:32:35.509
It's something you should do anyways,[br]because that's the way you can figure out
0:32:35.509,0:32:39.139
how much air you get to breathe up there.[br]It's much lower than you might expect.
0:32:39.139,0:32:43.659
But she saw something else. So at some[br]point she saw the drop in the pressure and
0:32:43.659,0:32:48.350
increase again. And she asked her[br]followers, what could this be? And I'm not
0:32:48.350,0:32:51.909
asking the audience right now. I just give[br]you the solution. She wasn't lavatory and
0:32:51.909,0:32:56.100
she flushed the toilet. So when water and[br]air gets sucked out, you can actually
0:32:56.100,0:33:01.480
measure this. And then about a month ago,[br]I found someone else who allowed me to use
0:33:01.480,0:33:09.350
his measurement. So this guy, Phillip[br]Smith, was on an airplane again. But he
0:33:09.350,0:33:12.820
did not actually go to the lavatory. He[br]stayed on his seat and he just checked
0:33:12.820,0:33:19.019
when people were flushing the toilet. So[br]as he sat, there was there were
0:33:19.019,0:33:21.610
turbulence. So they couldn't go for a[br]while. And then there was the rush while
0:33:21.610,0:33:27.299
the toilet and he was plotting it. So just[br]for those of you that came here by plane,
0:33:27.299,0:33:31.720
just a hint as a conversation starter next time,[br]when the guy next to you goes to the toilet and
0:33:31.720,0:33:36.570
he comes back, tell him exactly all of the[br]head to flush the toilet and ask him why.
0:33:36.570,0:33:41.950
Okay. And you would enjoy the rest of the[br]flight. Some other example that we
0:33:41.950,0:33:47.519
actually use is measuring the movement of[br]an elevator. So this is a lift in Aachen.
0:33:47.519,0:33:52.250
We have the accelometer which measures the[br]acceleration of this thing, gets the total
0:33:52.250,0:33:56.419
height difference of the elevator from the[br]again, from the pressure sensor, a
0:33:56.419,0:34:01.070
barometer. That's a pressure sensor. And[br]the velocity of the elevator as well from
0:34:01.070,0:34:07.470
the change in height. OK, so next time you[br]enter an elevator, I want to see you all
0:34:07.470,0:34:11.609
to take out your phones and measure the[br]distance that the elevator is traveling
0:34:11.609,0:34:17.320
and the velocity at which it does so. OK.[br]So these are, in my opinion, most
0:34:17.320,0:34:22.200
important sensors, some honorable[br]mentions. Almost all phones have a light
0:34:22.200,0:34:26.450
sensor as well, which controls the display[br]brightness depending on the ambient light.
0:34:26.450,0:34:32.060
Unfortunately, there is no API on IOS[br]to access this. So if there are apps
0:34:32.060,0:34:35.840
that seem to access a sensor like this,[br]they usually use the camera instead, which
0:34:35.840,0:34:39.310
is which also works quite well. But it's[br]slightly different since the difference
0:34:39.310,0:34:44.230
between illuminance and luminance, which I[br]do not want to go into detail here. And on
0:34:44.230,0:34:48.830
most Android phones, they are badly[br]calibrated or do this so much difference
0:34:48.830,0:34:52.590
in the quality of the sensors. We have to[br]check it on your own phone if it's worth
0:34:52.590,0:34:57.381
anything. But it's a bit difficult. This[br]proximity sensor, which is the one that
0:34:57.381,0:35:01.140
turns off the screen when you hold the[br]phone to your ear when you're
0:35:01.140,0:35:04.940
actually doing your call. Sounds[br]interesting, but unfortunately it only
0:35:04.940,0:35:09.130
distinguishes or has I know it[br]distinguishes between between the near and
0:35:09.130,0:35:13.910
far value, which is the difference between[br]five centimeters. So I do not have that
0:35:13.910,0:35:22.180
much use for it. There is the temperature sensor,[br]maybe if they are officially there, then
0:35:22.180,0:35:26.550
they usually come along with the humidity[br]sensor, but that's the sensors in your
0:35:26.550,0:35:30.880
phone. So you should be a little bit[br]skeptical about this. You're mostly
0:35:30.880,0:35:34.650
measuring the heat from your battery or[br]from your device. They tried to compensate
0:35:34.650,0:35:38.400
for this, but that's a difficult thing to[br]do. So if you actually, one, need a
0:35:38.400,0:35:44.070
thermometer, take a thermometer. They're[br]not that expensive. OK. You might see some
0:35:44.070,0:35:49.570
temperature sensors that are not official.[br]Which phyphhox can pick up. Those are usually
0:35:49.570,0:35:54.300
temperature sensors that are part of the[br]pressure sensor to compensate for
0:35:54.300,0:35:58.790
temperature effects. So they're not even[br]designed to get an outside temperature.
0:35:58.790,0:36:06.060
OK. So I wanted to mention this. While the[br]information about where we got the
0:36:06.060,0:36:10.310
information about the sensors from, so in our[br]App at the very bottom, does this entry
0:36:10.310,0:36:17.510
submit to a sensor database which tells[br]you to leave the phone resting on a table?
0:36:17.510,0:36:21.180
It also checks if you're actually doing[br]this, doesn't let you submit it before it
0:36:21.180,0:36:26.920
is happy about the error rate or the[br]standard deviation of the accelometer. And
0:36:26.920,0:36:31.380
if you submit it, we collect the data on[br]phyphox.org/sensordb and that's
0:36:31.380,0:36:35.720
where I got the statistics from so far. So[br]if you're interested in what a new phone
0:36:35.720,0:36:40.750
that you're about to buy can actually do.[br]Of course we don't give you any guarantee,
0:36:40.750,0:36:46.420
but you can check up or check out all the[br]data, all the phones. At least those that
0:36:46.420,0:36:49.500
are already in our database. And of[br]course, I'm happy if you contribute
0:36:49.500,0:36:54.320
statistics about the census in your phone[br]as well. So you might want to play with
0:36:54.320,0:37:02.090
this later. And then finally, the last[br]thing to finally conclude is some
0:37:02.090,0:37:05.730
information on how you can access the[br]sensors. Of course you can write your own
0:37:05.730,0:37:10.400
APP. I think here quite a few who can do[br]this. Just have a look if you can write an
0:37:10.400,0:37:14.130
App. Have a look at the API. They're not[br]too complicated. It's easy to access the
0:37:14.130,0:37:18.290
sensor data. If you're not interested in[br]designing your own app, but you want to
0:37:18.290,0:37:22.220
include sensor data in some other[br]projects, there are three ways you can use
0:37:22.220,0:37:27.130
Phyfox for this, which I want to[br]introduce, because that's something that's
0:37:27.130,0:37:32.280
one of the reasons I wanted to connect[br]here. Don't hesitate. Phyfox is free. You
0:37:32.280,0:37:36.210
can get for free on Google Play and on the[br]Appstore. And when I say it's free, I mean
0:37:36.210,0:37:41.850
it's really free. So it's open source. The[br]GPL and you can also get an afterwards we
0:37:41.850,0:37:48.280
assured of code running on your phone[br]is the code that you see. And we have
0:37:48.280,0:37:53.740
three versions how you can.. At least they[br]are categorized into three versions. How
0:37:53.740,0:37:57.410
you can access the sensor data. First[br]thing is you can implement something in
0:37:57.410,0:38:01.800
Phyfox yourself. So I've got this editor,[br]visual editor of all file format, which
0:38:01.800,0:38:06.490
allows you to take a sensor, place on[br]mathematics. So this is just adding stuff,
0:38:06.490,0:38:11.750
but you can apply a Fourier transform or[br]anything and then assign it to a graph.
0:38:11.750,0:38:16.810
Alternatively, and of course a bit more[br]powerful. You can have a look at our XML
0:38:16.810,0:38:21.370
format, which defines all the experiments.[br]So actually all experiments to see in
0:38:21.370,0:38:25.910
Phyfox are not hardcoded, but they are defined[br]in our own file format you can edit any of
0:38:25.910,0:38:32.640
them to your needs. And when you're done[br]you can transfer your data with the QR
0:38:32.640,0:38:36.740
code. Do not try to scan this QR code just[br]from your QR code app. You have to scan
0:38:36.740,0:38:42.380
it from within Phyfox and if you do,[br]you'll find a nice little experiment which
0:38:42.380,0:38:47.700
uses our file formats to implement a Turing[br]machine that's counting binary up to 256.
0:38:47.700,0:38:51.280
So this is the proof that all file format[br]actually is Turing complete. So you can do
0:38:51.280,0:38:55.620
a lot with it. Okay. I'm not suggesting[br]that you're trying to implement doom on it
0:38:55.620,0:38:59.980
or something like this because you won't[br]be able to. It's not efficient that way.
0:38:59.980,0:39:04.130
It's not designed to be Turing complete.[br]It just happens to be Turing complete. So
0:39:04.130,0:39:08.461
if you want to do something more, you can[br]connect to Phyfox via a network. You've
0:39:08.461,0:39:11.730
seen one example with the salad spinner.[br]When I said that there is a
0:39:11.730,0:39:17.180
a web server running on the App. You can use[br]this to access the data directly from your
0:39:17.180,0:39:21.570
preferred programing language. There's an[br]example where I'm using Python to read out
0:39:21.570,0:39:26.780
the sensor data and control a synthesizer.[br]So what's running on the web server is
0:39:26.780,0:39:31.151
basically a rest API. So yeah. Just visit[br]our website and learn how to do this. So
0:39:31.151,0:39:34.850
you can read out the sensor data of a[br]network and control your project with it.
0:39:34.850,0:39:38.820
An alternative to this is a new network[br]interface that we have, which is more on
0:39:38.820,0:39:45.400
this XML side or the design of our[br]experiment configurations, which is meant
0:39:45.400,0:39:51.450
to collect data from many users and not[br]life data. So we had this lecture. So this is
0:39:51.450,0:39:55.860
the new lecture hall, by the way. So we[br]had a lecture where every student got a
0:39:55.860,0:40:00.670
spring from us and there was supposed to[br]build a spring pendulum and we collected
0:40:00.670,0:40:05.760
the data from all students and the lecture[br]hall in realtime on the big screen to
0:40:05.760,0:40:13.750
determine the dependency of the frequency[br]from the mass of the pendulum. And another
0:40:13.750,0:40:17.400
example. Just a few days ago, we during[br]the winter solstice, we asked our
0:40:17.400,0:40:22.370
international users to point their phone[br]at the sun. So we get an angle for the
0:40:22.370,0:40:27.520
elevation of the sun and the azimuth from[br]the magnetometer with a compass. And this
0:40:27.520,0:40:31.120
way we could trace the path of the sun[br]across the earth from all the users. What
0:40:31.120,0:40:36.040
each black point with the line is a[br]contribution from a user. So, yeah, from
0:40:36.040,0:40:40.901
this we could, for example, determine the[br]tilted angle of the earth's axis. OK, so
0:40:40.901,0:40:43.810
just example, what you can do is this[br]network interface, as long as we're able
0:40:43.810,0:40:47.660
to set up some server to receive the data,[br]you can use this network interface. We're
0:40:47.660,0:40:52.131
still working on this network interface.[br]So far it can only do HTTP requests, get
0:40:52.131,0:40:58.240
or post. But we are also planning on[br]implementing Mqtt and other protocols like
0:40:58.240,0:41:02.980
this. And the third option is a Bluetooth[br]connection, which is mostly designed for
0:41:02.980,0:41:07.360
sensors. So if you want. If you have some[br]Bluetooth low energy sensor that you want
0:41:07.360,0:41:11.510
to read out, you can use Phyfox. So[br]there's an example of a Texas Instruments
0:41:11.510,0:41:15.390
sensor tech, which has a software which is[br]not designed for Phyfox. But our file
0:41:15.390,0:41:20.330
format is flexible enough to[br]simply tell Phyfox how to read all the
0:41:20.330,0:41:25.920
data and suddenly we've got the sensor[br]that can run independently from the phone.
0:41:25.920,0:41:30.329
And of course you can include your own[br]projects like this. So there is an example from
0:41:30.329,0:41:35.551
actually my institute, because originally I'm in[br]solid state physicist. So we're working a
0:41:35.551,0:41:39.690
lot with graphene and this is a[br]demonstrated we create that was an ESP 32.
0:41:39.690,0:41:46.000
So this is another version of an Arduino, or[br]Arduino compatibel. What we're doing here.
0:41:46.000,0:41:50.460
We're reading out a graphene Hallsensor[br]and so. It's all similar to the holecenter
0:41:50.460,0:41:55.590
of phone, but based on graphene and we can[br]get life measurements in Phyfox with this.
0:41:55.590,0:41:59.590
And so if you have an Arduino project with[br]which you want to.. from which you want
0:41:59.590,0:42:04.280
to send data that is plotted in Phyfox,[br]you can do it with a bluetooth low
0:42:04.280,0:42:08.840
energy interface. But if you have some[br]patients and maybe wait two more months,
0:42:08.840,0:42:12.890
we are working on Arduino library to make[br]this simpler. So this the entire code, you
0:42:12.890,0:42:17.870
would need to read out the analog input[br]from an Arduino and send it to Phyfox to
0:42:17.870,0:42:22.610
be plotted. OK, so this is working right[br]now. If you cannot wait, you can check it
0:42:22.610,0:42:25.310
out on our website. So this is already[br]available, although it's a work in
0:42:25.310,0:42:29.590
progress. The interface will change a bit[br]still. I would prefer if you want to
0:42:29.590,0:42:33.200
start right now, if you contact me so we[br]can get some feedback and maybe even
0:42:33.200,0:42:39.780
design the library also to your needs. So that[br]we get an idea. So with this, I'm about to
0:42:39.780,0:42:47.110
finish. So just a short summary what I'm[br]hoping I can trigger. Yeah. So if you were
0:42:47.110,0:42:52.020
mildly amused, mightily entertained by[br]this by this talk, check out our Web site
0:42:52.020,0:42:55.670
or check out our YouTube channel or[br]Twitter. We can get some more examples,
0:42:55.670,0:43:03.290
what we do with the sensors in the phone.[br]If you are a teacher, are teachers here?
0:43:03.290,0:43:09.130
Quite a few. That's great! And if you want[br]to use this in class or in a lecture,
0:43:09.130,0:43:12.120
check out our Web site phyfox.org. We've[br]got a database of experiments that you can
0:43:12.120,0:43:15.090
do: phyfox.org/experiments .That's then[br]actually about physics and less about the
0:43:15.090,0:43:19.600
hardware where we also demonstrate the[br]experiments and how they work. If you are
0:43:19.600,0:43:24.660
a teacher and has a specific project in[br]mind. Check out our editor to design your
0:43:24.660,0:43:31.610
own set up with which you can do something[br]specific for a very specific experiment.
0:43:31.610,0:43:36.150
phyfox.org/editor. Then if you are working[br]on arduino project and want to plot
0:43:36.150,0:43:40.080
something, you can visit Phyfox.org/arduino,[br]where you already can access
0:43:40.080,0:43:45.010
our library. Although it's not complete as[br]I said. So maybe wait a little bit or
0:43:45.010,0:43:50.290
contact me first. If you have a Bluetooth[br]low energy device that you want to use or
0:43:50.290,0:43:56.100
integrate. You can visit phyfox.org/ble.[br]If it's about a device that you did not
0:43:56.100,0:44:00.060
design yourself, you probably need some[br]background information about bluetooth low
0:44:00.060,0:44:04.870
energy. Should know what a GATT server is[br]and how characteristics and services, new
0:44:04.870,0:44:08.261
ideas and all this stuff and bluetooth[br]energy works. And it's good to get some
0:44:08.261,0:44:13.130
documentation or to be good as reverse[br]engineering, but in principle I haven't
0:44:13.130,0:44:19.980
seen many devices so far which could not[br]work with phyfox easily. Then if you want
0:44:19.980,0:44:26.460
to read the values for another project via[br]network, visit our website, the wiki on
0:44:26.460,0:44:30.830
our website. phyfox.org/wiki, where you[br]can get information about the rest API and
0:44:30.830,0:44:34.870
on your network interface. And finally,[br]something I would really love if you want
0:44:34.870,0:44:39.820
to contribute. If you can write some apps,[br]I mean you can use a lot of things. The iOS
0:44:39.820,0:44:45.510
app is written in swift. The Android[br]version is written in Java. Our webserver,
0:44:45.510,0:44:50.320
of course, has web development and Html in[br]JavaScript. So if you want to contribute
0:44:50.320,0:44:55.800
there. Visit our Web site at a[br]phyfox.org/source. And we would love to
0:44:55.800,0:45:01.800
see some help in development. With this I[br]finish my talk and I'm looking forward to
0:45:01.800,0:45:05.260
any exchange we will have later and any[br]questions. And I'm just thankful that it
0:45:05.260,0:45:09.630
was allowed to talk here and[br]get so much attention. Thank you.
0:45:09.630,0:45:21.310
Applause
0:45:21.310,0:45:27.030
Oh, by the way, since it is up there. One[br]bad news, unfortunately, I can only be
0:45:27.030,0:45:32.270
here today. So if you want to talk to me,[br]try to catch me today. You can also call
0:45:32.270,0:45:36.800
me. I actually brought a DECT phone,[br]but, uh, sorry, only today.
0:45:36.800,0:45:42.500
Herald: Oh, my God. So quickly, though, we[br]have questions now, 15 minutes, then 15
0:45:42.500,0:45:47.250
minutes, I think. And then afterwards, you[br]have to find him and catch him. Thank you,
0:45:47.250,0:45:56.410
Sebastian. Questions. Shoot. There is one.[br]Question: You mentioned aliasing affect
0:45:56.410,0:46:02.210
during.. Is it possible to change or modulate[br]the sampling frequency to actually find
0:46:02.210,0:46:08.580
out our frequency above the sampling frequency?[br]Sebastian: Yeah, that's that's a good
0:46:08.580,0:46:13.580
question. Not only because of the of the[br]alias affect, but also because some
0:46:13.580,0:46:17.180
projects also want to reduce the sampling[br]frequency. It's a little bit tricky
0:46:17.180,0:46:22.060
because on both APIs and both IOS and[br]Android, you cannot specify a target
0:46:22.060,0:46:26.190
frequency, you can only specify a[br]frequency that specific for certain use
0:46:26.190,0:46:31.810
case. So for example, you say I need the[br]accelerometer data, that's which at a rate
0:46:31.810,0:46:36.110
that's reasonable for UI changes or at a[br]rate that's reasonable for games. Right.
0:46:36.110,0:46:40.890
Right. That's as fast as possible. So if[br]you do it for UI, you get something like
0:46:40.890,0:46:44.450
let's say two three hertz. We heard something like[br]this or you doesn't waiting ages before
0:46:44.450,0:46:48.460
the screen rotates for games. It's 25 50[br]hertz something like this. So we can
0:46:48.460,0:46:53.270
control the game and fastest is the[br]data I've just plotted. And Phyfox always
0:46:53.270,0:46:57.470
request the fastest we can see and in[br]Phyfox we have a setting, we can limit the
0:46:57.470,0:47:03.020
frequency. Unfortunately, if your[br]frequency is not simply a multiple, no,
0:47:03.020,0:47:06.820
the other way around is. The frequency[br]given by the device, is not a multiple of the
0:47:06.820,0:47:10.541
frequency that you gave. It's not easy to[br]break it down to the target frequency. So
0:47:10.541,0:47:18.200
you usually see some odd cases where[br]Phyfox tells to group the sensor events
0:47:18.200,0:47:24.200
along this to get near this frequency. So[br]it might not work that well. And
0:47:24.200,0:47:27.540
especially if you're looking for the alias[br]effect. This might really mess up their
0:47:27.540,0:47:31.800
alias effect, so you might need to try a[br]little bit which frequency looks good to
0:47:31.800,0:47:35.500
do this. But of course in principle you[br]can average about multiple values in this
0:47:35.500,0:47:42.100
way or simply pick only every end value.[br]And this way we'd use the frequency. And
0:47:42.100,0:47:46.010
yeah, this can be done to our editor or to[br]the main screen. There's a plus button
0:47:46.010,0:47:49.950
with which you can simply expand which[br]already allows you to set this simple
0:47:49.950,0:47:53.530
frequency. Just keep in mind that you[br]cannot really always get to the
0:47:53.530,0:47:57.740
target frequency, right?[br]Herald: Right. There is another question.
0:47:57.740,0:48:01.550
No? Yes. Please.[br]Question: Hi. Thanks for the cool task.
0:48:01.550,0:48:05.930
It's a great app. I love using it in[br]school. I was wondering if those cool
0:48:05.930,0:48:09.790
animations how to sensor types of working[br]are available.
0:48:09.790,0:48:15.390
Sebastian: Sorry. The animation scene.[br]Yeah. I think I wonder how to do this
0:48:15.390,0:48:21.100
best. Before that, I was already thinking[br]about sharing the slides. Actually, my
0:48:21.100,0:48:27.350
talk is space it's just written in HTML in Javascript[br]it's not easy to control for everyone. That's
0:48:27.350,0:48:33.170
why I did not simply upload it. I would if[br]I would check later, if I can, upload the entire
0:48:33.170,0:48:37.260
talk in some way that makes sense either[br]on our website. I'm not sure if it makes
0:48:37.260,0:48:42.490
sense to upload it to the system of the[br]conference. Still, after the talk, I would
0:48:42.490,0:48:49.850
check it, but I am not... I want to share[br]the slides, but I probably need to add
0:48:49.850,0:48:53.750
some documentation on how to use them[br]because they are not Power point PDF or
0:48:53.750,0:48:58.450
Latex generated PDF.[br]It's handmade.
0:48:58.450,0:49:05.060
Herald: You can always cut them out of the[br]video getting streamed and La la la la la.
0:49:05.060,0:49:08.540
Yeah, right.[br]Question: Just a quick question of the the
0:49:08.540,0:49:12.690
axis of the phone. They're like like that[br]and that distorts us.
0:49:12.690,0:49:19.970
Sebastian: So it's not for most phones.[br]The X-axis is reading directlon. The
0:49:19.970,0:49:26.210
Y-axis is upwards along the screen and Z[br]access, Z-axis depending on your dialect is
0:49:26.210,0:49:32.460
perpendicular to the screen. I'd say in[br]most cases because officially the X-Axis
0:49:32.460,0:49:36.000
at least I think I've written this[br]documentation for Android is along the
0:49:36.000,0:49:40.151
natural reading direction of the device.[br]So if you've got a huge tablet which you
0:49:40.151,0:49:45.990
naturally would put in horizontal[br]alignment, not portrait mode, it might be
0:49:45.990,0:49:51.490
that the X-Axis is the long Axis. I have never[br]seen this myself, but I'm a little bit
0:49:51.490,0:49:55.460
careful to say that all these devices have[br]the same axis, but Z is definitely always
0:49:55.460,0:49:59.810
perpendicular to the screen and X and Y are[br]than the other ones and they are fixed and
0:49:59.810,0:50:05.010
usually the short side is the X-Axis.[br]Herald: Ok. There is one more question
0:50:05.010,0:50:10.830
there, please, sir. Take the microphone.[br]It's next to you. You got it off the
0:50:10.830,0:50:13.860
...[br]Question: Hi, you mentioned the necessity
0:50:13.860,0:50:20.760
of the magnetic sensor to to determine the[br]content orientation. Can you not use past
0:50:20.760,0:50:24.510
G.P.S. data and then integrate over the[br]gyroscope data to get the current
0:50:24.510,0:50:27.480
orientation?[br]Sebastian: Lauthing Mathematically, your
0:50:27.480,0:50:34.960
correct, problem is integrating sensor[br]data is not as simple. I'm often
0:50:34.960,0:50:42.080
surprised on what some software[br]can actually do. If you do it naively
0:50:42.080,0:50:45.740
right now I only have an example in mind[br]for the accelerometer cause it could also
0:50:45.740,0:50:49.471
say you can integrate the accelometer data[br]to get velocity. You can integrate the
0:50:49.471,0:50:54.550
velocity to get the displacement of the[br]phone of the location. If you do this,
0:50:54.550,0:50:58.040
we've got a very simple example in our[br]wiki. Very naiv even one without any
0:50:58.040,0:51:03.120
filtering, then just the noise means[br]that's if there's little arrow, you summit
0:51:03.120,0:51:08.270
up integrations, nothing else but[br]suming up in small steps. You get an
0:51:08.270,0:51:13.670
offset error in the velocity. If you[br]integrate this again, you get an error in
0:51:13.670,0:51:17.730
the location with which is growing with[br]the square of the time. So if you do this
0:51:17.730,0:51:22.420
for location and try it out with our naive[br]approach your phone is supposed to
0:51:22.420,0:51:27.420
be 100 meters upwards after about 10[br]seconds. If you do this for the gyroscope,
0:51:27.420,0:51:31.680
it's a little easier because you only[br]want integration. But still there will be
0:51:31.680,0:51:37.210
some drift. I'm not sure about all the[br]techniques the manufacturers imployed to
0:51:37.210,0:51:41.400
filter out any errors. I mean, obviously[br]the gyroscope is self calibrating
0:51:41.400,0:51:45.370
otherwise, it would be pointing in[br]different direction all the time. And on
0:51:45.370,0:51:50.320
some phones I've seen it jumping[br]when it recalibrates. But if you simply
0:51:50.320,0:51:54.900
integrate this, you will certainly get[br]drift, there's no way that you can get
0:51:54.900,0:51:59.130
a fixed position. What I think what they[br]probably do for most cases, they use the
0:51:59.130,0:52:06.290
gyroscope to immediate direct[br]rotation and then try to fuze it
0:52:06.290,0:52:10.180
in some way with the magnetometer[br]information to keep it fixed so that at
0:52:10.180,0:52:13.800
the end you're not pointing the wrong[br]direction. But the gyroscope itself, only
0:52:13.800,0:52:17.660
on its own, is unfortunately only giving[br]you the rotation rate, not the absolute
0:52:17.660,0:52:22.550
rotation in contrast to an actual[br]gyroscope. The big one that's rotating. So
0:52:22.550,0:52:27.530
it's at least not that easy.[br]That's all I can say.
0:52:27.530,0:52:32.760
Herald. Whow? What the bunch of[br]information, Sebastian? I really love the
0:52:32.760,0:52:35.960
.... There is someone else with a[br]question. I really love your replication.
0:52:35.960,0:52:39.250
Actually, it was really immediately fun[br]to, go.
0:52:39.250,0:52:44.010
Question: Thank you so much for a great[br]application. And my question is, just very
0:52:44.010,0:52:50.010
short. Can you also integrate external[br]sensors through Wi-Fi or is it only to be
0:52:50.010,0:52:52.830
early?[br]Sebastian: No. That's what I meant with
0:52:52.830,0:52:59.580
the network connection. Network usually[br]has Wi-Fi in this case, I'm not sure if it
0:52:59.580,0:53:05.230
would work on a conference like this into[br]the cable. So now you can get the data
0:53:05.230,0:53:12.680
through our REST API. Might not be the[br]fastest thing. Maybe we will add to our
0:53:12.680,0:53:19.810
network, our new network functionality,[br]something that will keep open apart and
0:53:19.810,0:53:24.640
push the data in there, so far the best[br]thing to go is with our rest API.
0:53:24.640,0:53:27.390
Question: I was just thinking about the[br]external sensor connection.
0:53:27.390,0:53:32.960
Sebastian: So external? Sorry, I was[br]thinking a different direction. Actually,
0:53:32.960,0:53:35.590
that's a good question. That reminds me of[br]that, that there's something I wanted to
0:53:35.590,0:53:41.700
add. You can use the REST API in theory to[br]push data in there, but that's only a
0:53:41.700,0:53:46.170
parameter in the Url. It's simple a Get/[br]push off a single value which doesn't get
0:53:46.170,0:53:51.690
get you far and which is quite[br]inefficient. However, within you network
0:53:51.690,0:53:57.050
interface you can do requests to other[br]devices so you can GET request and already
0:53:57.050,0:54:01.700
is able to respa Json packet as a[br]response us to interpret the adjacent
0:54:01.700,0:54:05.380
packet as a response. And that's where[br]adding Mqtt and stuff like this, this is
0:54:05.380,0:54:10.000
supposed to go in both directions. But[br]this is really new. So if you've got
0:54:10.000,0:54:14.491
something specific, try if it works or[br]contact me if it's not working, if you
0:54:14.491,0:54:19.770
need some help, if you find the bug. So but[br]it's supposed to work on your network
0:54:19.770,0:54:22.960
stuff. That's there in the configuration. So[br]the idea of the workflow of all this
0:54:22.960,0:54:27.780
connection with specific devices have[br]something set up like this. You create a
0:54:27.780,0:54:32.590
configuration for Phyfox, which in the end[br]is supplied to the QR code. For example,
0:54:32.590,0:54:36.440
the user scans the QR code. And this all[br]the information, how to communicate with
0:54:36.440,0:54:41.610
the device is already supplied. You can[br]also do this for Bluetooth. That the
0:54:41.610,0:54:45.050
device itself provides it to Phyphox.[br]But in the end it's these configurations
0:54:45.050,0:54:50.590
and for the new network interface, it can[br]also receive data from the network. But so
0:54:50.590,0:54:55.790
far only via HTTP.[br]Question: OK. Thank you.
0:54:55.790,0:55:01.960
Herald: I have maybe a last question if no[br]one else has. What's the next step? What
0:55:01.960,0:55:06.370
is your next goal? Because this is a[br]tremendous successful thing. And you see
0:55:06.370,0:55:12.240
the educational purposes. So that's[br]fantastic, actually, isn't it? It's not
0:55:12.240,0:55:17.600
only on university level if you're using[br]it, that's all around in Germany.
0:55:17.600,0:55:20.140
Sebastian: That's not in Germany. It's by[br]the way another thing you could
0:55:20.140,0:55:24.100
contribute. If you're speaking a language[br]that has been translated into Phyfox is
0:55:24.100,0:55:29.310
translated by volunteers and it's already[br]available, I think in 2010 and 2012, 2013,
0:55:29.310,0:55:34.310
14 languages, something around this. So[br]yeah, but next step I think will be using
0:55:34.310,0:55:38.420
the camera because that's another sensor,[br]broadly speaking, which we are not using
0:55:38.420,0:55:43.730
at all, which can do a lot, but we haven't[br]yet started on this. So lot to do in this
0:55:43.730,0:55:45.860
project.[br]Herald: Super. I'm looking forward to see
0:55:45.860,0:55:55.080
you next year then. Laughing, Applause[br]Sebastian Starks, thank you very much. An
0:55:55.080,0:55:57.930
honor and a pleasure to have you.
0:55:57.930,0:56:02.340
Postroll music
0:56:02.340,0:56:24.000
Subtitles created by c3subtitles.de[br]in the year 2020. Join, and help us!