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