[00:01.260 --> 00:04.320] So, I'm Nick, the Exploding Lemur. [00:05.340 --> 00:10.060] I'm going to zarg you about RF, and how it kind of works. [00:10.900 --> 00:14.680] So, I'm, you know, like pretty much everyone else here, a geek. [00:14.680 --> 00:16.660] I've been playing with computers forever. [00:16.660 --> 00:23.100] I've been a ham radio guy for mumble mumble years, because I'm old. [00:24.160 --> 00:25.660] Playing with RF. [00:25.660 --> 00:28.440] I've been coming to DEF CON since DEF CON 7. [00:28.780 --> 00:30.160] That's a great time. [00:30.540 --> 00:31.680] Whee! [00:31.680 --> 00:33.340] Welcome to DEF CON. [00:33.980 --> 00:38.100] And the lack of speakers, it just sort of a, you know, whatever. [00:38.100 --> 00:39.340] It happens. [00:40.660 --> 00:44.860] So, what is radio? [00:44.860 --> 00:47.960] When we're receiving radio, what are we seeing? [00:48.240 --> 00:55.880] This is the chunk of the electromagnetic spectrum that is usually referred to as radio. [00:56.600 --> 01:07.320] So, everything here is measured in cycles, or hertz, which is the number of wiggles per second that an electron makes. [01:07.720 --> 01:12.640] Goes all the way from, as we sometimes say, DC to daylight. [01:12.640 --> 01:17.680] So, zero hertz all the way up to literal visible light and beyond. [01:17.680 --> 01:20.460] Those are all electromagnetic waves. [01:21.260 --> 01:22.220] Error. [01:23.240 --> 01:33.840] Usually, we don't deal with the visible light or infrared or UV, but all of this is just kind of, you know, in the radio milieu. [01:35.820 --> 01:40.940] So, we can zoom in and... Okay, there we go. [01:40.980 --> 01:43.380] So, we can see there's kind of this chunk of radio spectrum. [01:43.380 --> 01:46.240] Above it, you have all of the higher energy stuff. [01:46.240 --> 01:56.040] So, infrared, visible light, UV, x-rays, and all of the fun stuff beyond that is very spicy and you don't want. [01:56.500 --> 01:59.080] Something to note about RF. [01:59.080 --> 02:07.800] Whenever you see something that says, RF radiation or radio radiation, it is non-ionizing radiation. [02:07.800 --> 02:13.140] All RF can do is heat things, and not very well. [02:13.520 --> 02:18.580] So, don't worry about 5G altering your DNA or some bullshit like that. [02:18.740 --> 02:20.440] It's all a bunch of crap. [02:22.640 --> 02:34.520] So, usually, the electromagnetic spectrum is split up by whatever your regional authority is into different bands for different specific use cases. [02:34.640 --> 02:45.400] So, you know, land mobile for general commercial use, there's some public safety stuff, maritime, satellite, it's all split up into different frequencies. [02:50.180 --> 02:54.760] Basically, what this is, think of a slinky. [02:55.180 --> 02:57.720] That's an electromagnetic wave. [02:57.720 --> 03:07.720] You wiggling it is basically you oscillating a charge on some sort of tuned object. [03:07.720 --> 03:09.500] We call them antennas. [03:10.360 --> 03:14.960] And that object is resonant at some wiggling rate. [03:15.040 --> 03:27.620] And so, as you do this wiggling of electrons at, you know, 100 megahertz, say 100 million times a second, then that produces an electromagnetic wave that propagates through the universe. [03:29.460 --> 03:32.360] You end up with two components of this wave. [03:32.480 --> 03:37.560] There's an electric field and perpendicular to that is a magnetic field. [03:37.940 --> 04:00.680] You can actually set up antennas that are specifically designed to pick up what is called the H field or magnetic field, which is kind of cool for some frequencies that tend to be very noisy as the magnetic portion of it tends to have less local noise generated. [04:00.900 --> 04:07.980] So if you have like an HF listening station, then and set up a magnetic antenna and it doesn't sound quite as terrible. [04:09.180 --> 04:14.600] Anyway, oh, this is going to be fun. [04:16.740 --> 04:19.220] I am going to go into a little bit of math here. [04:19.440 --> 04:22.300] It's not too bad, so stay with me. [04:23.720 --> 04:33.000] So the speed of light is 299,792,458 meters per second. [04:33.000 --> 04:37.300] For simplicity purposes, we're going to round that up to 300 million. [04:37.300 --> 04:39.220] I'll show you why in a moment. [04:39.720 --> 04:43.600] Speed of light is constant ish. [04:44.680 --> 04:48.020] This is the speed of light in a vacuum. [04:48.400 --> 04:55.600] I'm going to talk about velocity factor later because physics is fun. [04:57.240 --> 05:08.260] We have the decibel, which is a logarithmic unit of measurement. [05:09.720 --> 05:14.560] Every 10 decibels is an increase of 10 times. [05:14.700 --> 05:23.380] So 10 dB is 10 times, 20 dB is 100 times, 30 dB is 1000 times, and so on. [05:23.540 --> 05:26.780] Also a handy one is that 3 dB is double. [05:27.020 --> 05:38.240] So 3 dB 2 times, 6 dB 4 times, 9 dB 8 times, and then the little bit more gets you to 10 dB of 10 times. [05:41.280 --> 05:44.780] And then we have dBm, which is the unit of measurement. [05:44.780 --> 05:47.660] It's decibels in relation to milliwatts. [05:47.660 --> 05:50.100] So a decibel is unitless. [05:50.520 --> 05:58.020] In order for it to make sense, you can just say decibel and have it as a relative change, or you can have it in relation to something. [05:58.380 --> 06:05.140] So 0 dBm is 1 milliwatt, 10 dBm, 10 dBm, 10 milliwatts, etc. [06:05.260 --> 06:07.700] And that's what we measure RF power. [06:09.920 --> 06:13.000] Oh, come on. [06:14.470 --> 06:15.870] No, there we go. [06:15.870 --> 06:24.750] Okay, so another measure of an RF signal is its wavelength. [06:24.750 --> 06:30.150] The wavelength and the frequency are inversely proportional. [06:30.150 --> 06:37.630] As you go up in frequency, you go down in wavelength. [06:38.330 --> 06:51.410] It's basically the the wavelength is the amount of space a single wave propagates over at the speed of light in a vacuum. [06:51.410 --> 06:57.910] And the frequency is the number of times you're really wiggling it per second. [06:57.910 --> 07:06.810] So think as you wiggle something once per second, that one wave as it propagating out is very long. [07:06.810 --> 07:12.490] To wiggling something 100 times a second, it's producing these really short waves. [07:15.050 --> 07:25.810] We have 100 megahertz signal, 300 million meters per second as the rounded up value, divided by 100 million cycles per second. [07:26.150 --> 07:32.150] The second values cancel out, and so we end up with 3 meters per cycle. [07:32.150 --> 07:34.550] So 100 megahertz, the wavelength is 3 meters. [07:36.050 --> 07:38.490] Come on, here we go. [07:38.490 --> 07:44.210] 10 megahertz, same calculation, except now we see it's 30 meters. [07:44.210 --> 07:48.710] So lower frequency, larger wavelength. [07:53.380 --> 07:57.900] Let's talk a little bit about kind of the history of radio. [07:57.900 --> 08:07.160] Early transmitters were called spark gap transmitters, and it was literally just two electrodes and you zap energy between them. [08:07.160 --> 08:12.340] It produces a spark that produces just a huge amount of broadband RF noise. [08:12.820 --> 08:15.580] These were basically used for vorse coats. [08:15.580 --> 08:17.400] It's called CW, continuous wave. [08:17.400 --> 08:20.500] So it's basically, it's on or it's off. [08:21.200 --> 08:22.440] And they would do that. [08:22.740 --> 08:29.680] It's really inefficient, uses up a whole lot of spectrum, really noisy. [08:29.680 --> 08:31.380] So it wasn't that great. [08:32.820 --> 08:39.420] Crystal radios made use of a tuned circuit. [08:39.420 --> 08:48.580] You have an inductor or some sort of coil and some type of capacitor. [08:48.840 --> 08:56.300] So you can actually have an actual capacitor, or you could use parasitic capacitance of the antenna, which I'll talk about a little bit more later. [08:56.300 --> 09:01.280] And then you have a diode or what they called the crystal. [09:01.280 --> 09:07.300] It's just like a germanium diode, or sorry, germanium crystal, which is one of the early diodes. [09:07.300 --> 09:13.580] And that would actually directify the signal to produce an audio wave. [09:14.260 --> 09:18.620] And I'll talk about the modulation of that a little bit later. [09:18.620 --> 09:23.820] That was used for AM reception, amplitude modulation. [09:24.740 --> 09:37.080] Vacuum tubes, we had basically diode type tubes that produce the rectification and triodes, which are used to provide the amplification. [09:37.480 --> 09:47.760] And then of course, transistor radios, where we had little solid state devices to produce the amplification as well as do the rectification of the signal. [09:48.680 --> 10:00.180] And then software defined radios, where you digitize the RF spectrum as close to the antenna as you can, and then do everything else in software. [10:00.180 --> 10:10.260] Just run a whole bunch of map on it in an FPGA or computer, and then get your signal or your resulting stuff out of that. [10:13.250 --> 10:17.780] So receiving the wave, we use an antenna. [10:17.920 --> 10:22.700] This is a dipole antenna, so-called, because it has two holes. [10:24.000 --> 10:25.770] Let's see if my mouse can... [10:29.220 --> 10:46.560] Okay, so as the signal propagates through, it basically resonates these elements of the dipole and produces a wiggling charge on those, which you detect, and that's what you receive with your radio signal. [10:50.300 --> 10:55.300] Antennas are tuned to radiate for a particular frequency and bandwidth. [10:55.300 --> 10:59.040] So bandwidth is literally the width of the band. [10:59.040 --> 11:12.700] You have a chunk of radio spectrum that you receive there, and an antenna is typically tuned to live within some chunk of bandwidth of some frequency. [11:12.700 --> 11:32.080] So you can have a single band like FM broadcast antenna that's usually tuned to receive okay-ish between 88 and 108 megahertz, or you can have a dual band ham radio antenna that's tuned for 146 and 440 megahertz. [11:32.600 --> 11:35.120] So an antenna... [11:45.910 --> 11:46.790] So [11:55.740 --> 12:02.520] when you want to talk about antenna performance, antenna gain is also measured in decibels. [12:04.380 --> 12:14.660] It's decibels isotropic, so in relation to an antenna that radiates perfectly in all dimensions, which does not exist. [12:14.800 --> 12:17.520] So that would be a zero dbi antenna. [12:17.520 --> 12:30.580] Typically what you get is a basic dipole is going to be a 3 dbi antenna, and that's going to radiate mostly all around, kind of in a donut-shaped radiation pattern. [12:31.260 --> 12:41.120] As you increase the gain, it increases the signal strength, but reduces the area in which it sends it. [12:41.120 --> 12:48.640] So think of a dipole, 3 dbi, sends out a broad swath everywhere. [12:48.640 --> 13:02.920] Go to a 9 dbi dipole, and your radiation pattern is much more flattened, so it's putting a lot more signal out in a smaller vertical chunk around the antenna. [13:03.580 --> 13:08.420] As you increase gain, you get more signal, but in a more focused direction. [13:08.420 --> 13:12.460] You don't get something for free, so that's what it basically is. [13:12.460 --> 13:24.940] Kind of like, take a light bulb, light it up, it kind of lights up the room, put a reflector behind it, and it lights up a big spot, but the [13:29.190 --> 13:31.390] Thank you, village neighbors! [13:31.390 --> 13:32.670] What village is this from? [13:34.830 --> 13:39.670] Thank you, adversary village, for your speaker! [13:43.650 --> 13:45.070] All right. [13:50.540 --> 13:53.780] Okay, let me finish this slide and see if this comes on. [13:53.780 --> 13:58.520] So, here we have a radiation chart of a directional antenna. [13:58.980 --> 14:01.820] It shows the... oh, hot damn. [14:11.760 --> 14:13.520] Okay, that's much better. [14:14.900 --> 14:17.040] Okay, can everyone hear me still? [14:17.040 --> 14:17.900] Excellent. [14:18.000 --> 14:20.200] Can those who did not hear me now hear me? [14:20.200 --> 14:21.760] Okay, you want to start over? [14:21.940 --> 14:23.220] No, we're not starting. [14:23.600 --> 14:42.760] All right, so we have the polar radiation chart shows the radiation pattern of the antenna in the E and H fields, or the kind of the vertical and horizontal components of this antenna's radiation. [14:45.580 --> 14:48.470] You can see it's got sort of this big kind of... [14:49.920 --> 14:52.140] getting most of my house... there we go! [14:52.340 --> 14:53.370] So, you've got this big little... [14:54.620 --> 14:56.200] big little... what am I talking about? [14:56.200 --> 14:59.900] So, a big section of the radiation pattern is this way. [14:59.900 --> 15:02.320] This is where the signal is the strongest. [15:02.780 --> 15:04.700] And then you have these weird little things. [15:04.700 --> 15:11.220] These are called side lobes, and that's just the thing that happens with directional antennas sometimes. [15:11.220 --> 15:13.720] You get some weird little stuff off the back. [15:13.720 --> 15:17.940] You also don't have a perfect radiation in one direction. [15:18.060 --> 15:22.640] You can see there's still a little bit of signal kind of leaking out the back. [15:22.800 --> 15:24.640] It just happens. [15:25.740 --> 15:28.700] There are lots of different types of antennas. [15:28.720 --> 15:35.280] The dish antenna, where you've got the reflector and the actual receive portion is here. [15:35.820 --> 15:43.350] This is a kind of double double discone type. [15:44.970 --> 15:47.610] Slotted waveguide. [15:48.210 --> 15:49.270] This is a... [15:51.430 --> 15:53.230] Okay, brain fart. [15:53.310 --> 15:56.790] Logarithmic antenna or log periodic. [15:56.790 --> 16:01.570] It basically is good for a whole lot of frequencies. [16:01.570 --> 16:05.550] It's a very wideband antenna, and it's a little bit directional. [16:08.870 --> 16:17.690] Cell phone sector antennas, bi-quad antennas with reflectors. [16:17.910 --> 16:19.450] Yeah, all kinds of stuff. [16:19.470 --> 16:26.090] And then we want to get the signal from the antenna to your radio, and so we need some sort of feed line. [16:26.210 --> 16:29.850] So the common type that you'll see is coaxial cable. [16:29.930 --> 16:35.390] It's got an outer jacket, a shield, a dielectric, and a center conductor. [16:35.390 --> 16:41.990] Usually what happens is the signal that you're feeding goes along the center conductor, and the shield, well, shields it. [16:43.530 --> 16:46.410] And then we also have a stuff called twin lead. [16:46.410 --> 16:49.370] There's something similar that's called a ladder line. [16:51.090 --> 16:53.950] And now let's talk about velocity factors. [16:53.950 --> 16:55.910] So I talked about the speed of light earlier. [16:56.250 --> 17:01.650] The speed of light through materials is not always the speed of light in a vacuum. [17:01.870 --> 17:09.370] So when you look at coax cable, that can be 66% speed of light or 80% speed of light, depending on the construction of the cable. [17:09.750 --> 17:18.990] If you're doing anything where the wavelengths and cable length need to match up in some way, you need to keep that in mind. [17:20.290 --> 17:30.210] Twin lead, I think, has a much higher... the velocity factor is, I don't know if you would say higher or lower, it's closer to the speed of light. [17:31.150 --> 17:34.290] And yeah, of course, physics, yay. [17:35.110 --> 17:37.490] Why do we have these different types of feed lines? [17:38.350 --> 17:43.310] There's a thing, basically you have balanced versus unbalanced signals. [17:43.970 --> 17:46.650] And, nope, thought I had something else there. [17:46.790 --> 17:55.430] Think of it as, if you're familiar with HDMI, HDMI is a balanced differential signal. [17:55.750 --> 18:03.630] If you have old school composite video, that is an unbalanced signal, single-ended. [18:05.610 --> 18:13.010] Unbalanced signals, or unbalanced, I'm sorry, feed lines, you have a different return path to ground. [18:13.010 --> 18:17.170] So your signal goes up the center conductor, your ground return path is on the outer conductor. [18:17.750 --> 18:29.630] If you have mismatch issues when you're transmitting a lot of power, you can actually get some signal coming back on that shield, that's called common mode current. [18:30.150 --> 18:32.970] That's bad, because then you get RF where you don't want to. [18:32.970 --> 18:35.630] There are things you can do that, you put a choke on it, it's happy. [18:36.110 --> 18:38.010] Because it's, you know, it's like that. [18:38.350 --> 18:47.030] If you want to know more about the common mode current and common mode chokes and things like that, Ham Radio Village, they can tell you all about those fun things. [18:48.350 --> 19:10.650] And yeah, if anybody remembers what those things are on the picture there that are old like me, that's from an old analog television with a sort of a dipole antenna that uses a balanced feed line and then goes to what's called a ballon, which is balanced to unbalanced, [19:10.650 --> 19:13.530] or I guess they call it a balancing unit now, I don't know. [19:13.610 --> 19:18.050] But that just converts one type to the other using some transformers. [19:21.300 --> 19:31.960] Other fun things in RF that are necessary, let's say you have a chunk of spectrum and you only want to see a little bit of it, you can use a filter. [19:32.340 --> 19:36.460] The most common ones are the ones on the top there. [19:37.100 --> 19:45.080] So a low pass cuts off everything above a certain frequency, high pass cuts off everything below a certain frequency. [19:45.720 --> 19:51.020] A band pass just gives you a chunk of frequency and a notch filter cuts out a portion of a frequency. [19:53.060 --> 19:56.600] These can be constructed in all kinds of interesting ways. [19:58.160 --> 20:03.640] We've got just standard LC filters, which are inductors and capacitors. [20:03.760 --> 20:10.120] A capacitor is something that will block low frequencies and pass high frequencies. [20:11.460 --> 20:31.480] An inductor blocks high frequencies and passes low frequencies, so in order to make a low pass, high pass, or band pass, you just have an arrangement of different value inductors and capacitors, either in series or to ground, and that will do the job of passing some portion of the signal and shunting the rest of it to ground, [20:31.480 --> 20:33.820] so you get only what you want. [20:35.320 --> 20:42.820] Crystal filters, just like a little crystal oscillator type thing, gets a little piece of that vibrates at a particular frequency. [20:42.820 --> 20:46.760] You can use that as a filter because it doesn't resonate at other frequencies. [20:47.480 --> 20:49.580] Saw filters are kind of cool. [20:49.840 --> 21:01.380] They convert the RF signal to an actual acoustic wave that goes across a device that is only resonant at that frequency and then converts it back to an electrical signal. [21:04.480 --> 21:14.440] Cavity filters are just resonant cans, basically, that are tuned to resonate at a precise frequency, so anything that is not resonant kind of gets blocked. [21:14.980 --> 21:23.020] And then distributed element filters, which are evil magic that should not exist, and I'm going to show you why. [21:24.680 --> 21:25.640] Seriously? [21:26.600 --> 21:37.400] Like, okay, so we get this stub and we shunt it to ground and it does one thing, or if we don't shunt it to ground it does another thing, but it's just like a little trace on the circuit board. [21:38.000 --> 21:44.700] And then if we cut a hole in it, it does one thing, or if we cut a slot in it, it does another. [21:44.960 --> 21:47.900] Like, there is no god. [21:48.500 --> 21:50.740] And what in the shit are these? [21:50.740 --> 21:51.560] Really? [21:51.660 --> 21:53.140] This is madness. [21:54.180 --> 21:55.320] I hate these. [21:57.990 --> 22:06.190] Okay, let's talk about software-defined radio a little bit and sort of what it looks like. [22:06.190 --> 22:17.290] So an SDR is effectively an antenna that goes into an analog-to-digital converter that goes into some sort of signal processing device. [22:19.250 --> 22:23.650] In order to reject signals that we don't want, we'll add a filter. [22:23.790 --> 22:32.950] For example, there are some HF SDRs that are what are called direct sampling, where the antenna literally is just run into the ADD converter. [22:33.430 --> 22:45.010] And we don't want to get signals that are too high frequency, because we end up with what's called aliasing, which I will describe in a little bit. [22:45.350 --> 22:55.850] So we have a low-pass filter set up so that only the frequencies, you know, up to like 30 megahertz go in and everything else gets cut off. [22:57.630 --> 23:02.750] We're going to add a little amplifier to increase the strength of the signals received. [23:02.750 --> 23:09.870] This is a low noise amplifier, so-called, because it is an amplifier that does not introduce much noise. [23:10.030 --> 23:19.870] Whenever you amplify a radio signal, you aren't just amplifying this like one little bit of whatever you want, you're amplifying everything. [23:19.870 --> 23:31.070] And that includes all of the background noise and the some of the characteristics of these devices is that they introduce additional noise, which can actually overwhelm your signal. [23:31.070 --> 23:38.890] So you want a specifically designed amplifier that does not introduce that extra noise, so that you actually see what you want to see. [23:40.650 --> 23:50.610] Then we're going to accidentally flip where our filter and LNA are, and we're going to add a mixer and an oscillator. [23:50.710 --> 24:08.310] A mixer is a neat device that you put in two RF signals, and you end up with the original signal, the oscillator's input signal, the sum of the two signals, and the difference between the two signals. [24:08.430 --> 24:27.930] So if you have a, let's say, a 200 megahertz signal that's coming in, you have a 100 megahertz local oscillator, you mix those together, you end up with the output of the 200 megahertz input signal, the 100 megahertz local oscillator, and then you end up with 100... [24:27.930 --> 24:30.550] okay, that's a bad example because the math doesn't work out. [24:31.070 --> 24:32.130] Let's pretend this is... [24:32.670 --> 24:34.070] okay, I'm just going to keep going. [24:34.070 --> 24:40.790] A 100 megahertz difference between the two signals, and a 300 megahertz sum of the two signals. [24:41.050 --> 24:49.930] So this is really handy if you have a device that is only set up for a certain chunk of frequency range. [24:50.150 --> 25:00.890] For example, an analog to digital converter, which they can only receive from DC to 30 megahertz, but you want to shove a 600 megahertz signal into it. [25:00.890 --> 25:16.170] You mix that with a... hang on... a 580 megahertz signal, and you end up with the output of 20 megahertz, which is within the 30 megahertz bandwidth of your analog to digital converter. [25:18.570 --> 25:21.310] Does that... who have I lost so far? [25:22.730 --> 25:24.550] Nope, okay, okay. [25:25.610 --> 25:28.770] Keep that in mind, we'll hit questions at the end. [25:30.150 --> 25:31.890] Hang on, I need to know what time it is. [25:32.290 --> 25:34.230] Okay, I got 20 minutes. [25:35.830 --> 25:53.890] Cool, so that's how you end up tuning your radio, is you use that local oscillator to feed in to the mixer to get the output that you want that will actually match up with your analog to digital converter. [25:57.950 --> 26:17.830] Let's see, okay, so something that you need to do when doing the analog to digital conversion is you have to sample your signal at least twice the frequency of what the signal is, called the Nyquist rate. [26:18.770 --> 26:22.610] If you don't, you end up with something called aliasing. [26:22.790 --> 26:27.730] I have a slide for that in a couple secs, and it's bad. [26:27.730 --> 26:30.430] You end up with ghost signals that aren't there. [26:30.890 --> 26:47.810] So if you want to sample a really wide bandwidth signal, you either need one really fast analog to digital converter that is twice the speed, or twice the sample rate of the bandwidth of the signal you want to capture. [26:47.810 --> 26:57.610] So the signal you want to capture is 60 megahertz wide, you need an ADC that samples 120 million times per second, or 120 megahertz. [26:57.610 --> 26:59.470] Those are really expensive. [26:59.650 --> 27:16.470] What's a lot cheaper is getting two ADCs that are running at the sample rate, or at the at the rate of the bandwidth of the signal you want to grab. [27:16.470 --> 27:22.870] And then you have them 90 degrees out of phase with each other. [27:22.870 --> 27:26.770] This is called in-phase and quadrature sampling, or IQ sampling. [27:26.890 --> 27:31.290] If you have one of those little RTL-SDR dongles, that's what they do. [27:31.290 --> 27:46.070] They have two ADCs in them that are running at 2.2 mega samples per second, and together with one of them running 90 degrees out of phase, you can capture 2.2 megahertz of signal. [27:46.170 --> 27:54.270] Whereas if it was just a single ADC sampling directly, you would need to run it at 4.4 mega samples per second. [27:58.370 --> 28:06.430] The cool thing about this is you don't see this in old analog radios because it's kind of a pain in the butt to deal with there. [28:06.630 --> 28:12.910] But once you digitize this, it's all just math, and you can reconstruct the signal however you want. [28:15.350 --> 28:23.390] So here's the kind of what happens when you're oversampling, or I'm sorry, not oversampling, aliasing. [28:23.390 --> 28:31.270] So the Nyquist rate, like I said, is going to be... you have to sample at twice the sample rate of the signal that you're capturing. [28:33.030 --> 28:45.990] On this graph, we can see we've got... okay, so there's this signal here in the kind of light blue or teal, and then we have a much lower sample rate than what that signal is. [28:46.250 --> 28:55.070] And when you sample at those points, it looks like you have this yellow signal instead, which is not actually there. [28:55.530 --> 29:09.710] So what you need to do again is capture it at twice the cycle rate of the signal so that you can actually see what it's doing, the high points and low points. [29:11.470 --> 29:23.050] Then when you're digitizing it, you have a sample depth, or the number of bits that you'd use to represent each sample. [29:23.150 --> 29:32.030] As your signal goes up and down, you can say, okay, this is a one bit sample. [29:33.890 --> 29:36.630] No, I guess it would be two bits, or one bit signed. [29:37.270 --> 29:44.430] So the sample is either on, or plus one, or negative one. [29:44.590 --> 29:48.750] But you don't have a lot of fidelity in between to really see what's going on. [29:48.750 --> 29:53.450] And if you have a weaker signal in there, it's just going to get lost completely. [29:54.250 --> 30:03.330] So as you increase the number of bits, you can more accurately reconstruct this. [30:04.270 --> 30:10.110] And you'll be able to capture any other weaker signals that are mixed in there as well. [30:10.110 --> 30:12.170] It gives you what's called dynamic range. [30:13.810 --> 30:16.310] So more sample depth, better. [30:21.210 --> 30:27.550] And okay, so you've got all these wiggling electrons, how do we make them make sense of something? [30:27.730 --> 30:29.270] This is called modulation. [30:29.510 --> 30:33.030] And that is how you encode data in a carrier signal. [30:34.430 --> 30:38.090] So we have... let me get the other charts on. [30:38.090 --> 30:39.650] There we go. [30:40.010 --> 30:43.890] All right. [30:44.450 --> 30:48.130] So here, you can see here's our signal. [30:48.130 --> 30:56.230] Think of this as just like an audio signal, where you're trying to get that encoded into the radio, like somebody's voice. [30:56.840 --> 31:09.290] We have AM, amplitude modulation, where you adjust the strength of the signal, or how much power you're putting out, based on the input signal. [31:09.290 --> 31:15.290] So if somebody is whispering, then it's going to wiggle very, very little. [31:15.290 --> 31:19.910] If somebody's shouting, it's going to wiggle a whole lot in terms of the amount of power output. [31:20.570 --> 31:30.310] And the frequency at which the amplitude changes is going to be related to the frequency of the sound that you put into it. [31:31.130 --> 31:42.070] Then FM is a frequency modulation, where the output power stays the same, but the frequency of the carrier shifts up or down. [31:42.390 --> 31:48.810] The amount that it shifts up or down is related to the loudness of your sound that you input. [31:48.830 --> 31:55.090] The rate at which it shifts up and down is related to the frequency of the sound that you put into it. [31:56.830 --> 32:11.270] We have just kind of an on-off keying sort of thing here, which is common in key fobs, remote controls, where your signal is literally either there or not. [32:12.010 --> 32:24.070] Or you can have some frequency shift keying, where this frequency encodes a 1, this frequency encodes a 0, goes on up in there. [32:25.510 --> 32:50.890] Something cool with the in-phase and quadrature stuff that I mentioned before, the in-phase and quadrature elements are real and imaginary number components of the signal, and you can plot them as the x and y coordinates on a graph, and you can end up with a sort of constellation of points on this graph, [32:50.890 --> 32:56.890] and each of those points can be encoded with a different bitmask. [32:56.890 --> 33:05.470] So let's say this is quadrature amplitude modulation 16. [33:05.630 --> 33:26.970] So we have 16 points, and yeah, the encoding of each of these is based on a different inq xy coordinate, and it just kind of lets you pack a lot more bits into your signal that you wouldn't have been able to before. [33:26.970 --> 33:35.430] The downside is you need a much quieter channel in order to get this to a point where you can decode it. [33:35.590 --> 33:37.650] Otherwise it all just looks like noise. [33:39.930 --> 34:03.130] There's also another thing called polar modulation, where instead of just the xy coordinates, you encode it as sort of a radius or amplitude value and theta or phase angle, and so you can then also get the same sort of thing by saying, okay, I'm going to go with, [34:03.130 --> 34:09.810] you know, 270 degrees and whatever radius pops you up here. [34:10.310 --> 34:15.690] And it's just similar output, but just a different way of mathing it. [34:18.200 --> 34:43.100] As far as how much data we can send, like with that quadrature amplitude modulation thing where we need a less noisy channel, so Claude Shannon and someone partly, first name I forget because I'm a terrible person, came up with this kind of channel capacity theorem within the field of information theory. [34:43.740 --> 34:44.720] And basically you have [34:48.160 --> 35:01.620] a constant times the width of the band that you're transmitting in, so say a 10 megahertz wide chunk of spectrum times 10 log 10 of the signal to noise ratio in decibels. [35:01.860 --> 35:08.520] And the decibels cancel out because that's what math does. [35:08.520 --> 35:21.740] So let's say we have a 20 megahertz bandwidth signal, the signal strength is received at negative dBm, the noise is at negative 90 dBm. [35:23.420 --> 35:30.620] If I did the math right, that means we get a maximum theoretical capacity of that channel of 86 megabits per second. [35:31.380 --> 35:43.100] If we improve the signal noise ratio, we can get it to let's say negative 60 dB signal, negative 110 dB noise, 112 megabits per second. [35:43.200 --> 35:50.840] If we double the of that, we get 225 megabits per second. [35:51.040 --> 35:59.860] So you'd see with this, changes in the signal to noise ratio have a logarithmic effect on your bandwidth. [35:59.880 --> 36:06.240] And then changes in, I'm sorry, bandwidth is an overloaded term. [36:06.240 --> 36:09.620] So let me restart that. [36:10.880 --> 36:17.680] Changes in your signal noise ratio have a logarithmic effect on your channel data capacity. [36:18.100 --> 36:26.280] Changes in the bandwidth in use have a linear effect on your channel data capacity. [36:26.560 --> 36:33.200] So the more bandwidth you have, that has an absolute linear progression on how much data you can pack in there. [36:33.200 --> 36:37.840] Changing the signal noise gives you a logarithmic change. [36:37.840 --> 36:46.340] So a little bit of signal noise ratio improvement doesn't have too much effect, but the more you can do that, the more and more and more that improves. [36:47.660 --> 36:59.840] MIMO, multiple in, multiple out, also increases this, but there's a relationship that I'm not quite sure about when they are in like the same frequency band. [36:59.840 --> 37:02.060] So that you would have to look up. [37:02.060 --> 37:02.720] Sorry. [37:02.720 --> 37:03.200] Okay . [37:04.900 --> 37:18.220] So that is me spewing a whole bunch of stuff out that hopefully kind of helped a little bit with understanding what the hell all this radio stuff is. [37:19.520 --> 37:21.480] There are lots of talks here. [37:21.480 --> 37:24.480] There, oh my god, that blue did not turn out well. [37:24.780 --> 37:25.720] I'm sorry. [37:25.840 --> 37:32.700] Let me see if I can, [37:36.140 --> 37:39.640] oh , that, nope, that did not work at all. [37:39.640 --> 37:40.280] All right. [37:40.360 --> 37:46.840] Well, I'll leave this up on my laptop for a second. [37:46.840 --> 37:50.860] If you want to come up after take a screenshot of my laptop, that's fine. [37:51.320 --> 37:54.020] Basically, we've got the RF village here. [37:54.020 --> 37:58.480] Lots of good talks about signal decoding, all kinds of cool stuff like that. [37:58.800 --> 38:09.460] There's the ham radio village, where you can go get your ham radio license that will allow you to transmit on a lot of these frequencies and do more playing and experimenting. [38:09.460 --> 38:11.560] They're doing testing all throughout the weekend. [38:12.000 --> 38:17.860] They've also got a bunch of talks over there, kind of on more of the amateur radio side of things. [38:19.040 --> 38:29.940] There are, yeah , some other videos and documents there that you can't see because there's no contrast. [38:30.620 --> 38:31.500] Yeah. [38:32.660 --> 38:35.980] And then I'm on Mastodon and so forth. [38:36.280 --> 38:38.140] So, all right. [38:38.820 --> 38:43.420] Now, for all the people that I confused, what questions do we have? [38:47.880 --> 38:53.260] I've either confused you so much, you don't know what to ask, or somehow I managed to explain everything. [38:53.520 --> 38:54.740] And I don't think it's the latter. [38:54.740 --> 38:55.400] Yes. [38:57.240 --> 38:58.640] I'm sorry? [38:59.760 --> 39:02.120] Oh, the right-hand rule. [39:02.220 --> 39:19.840] So, when you have an electromagnetic field on a conductor, you have the right-hand rule, which is, what is it, the electron flow, the magnetic field goes this way. [39:19.840 --> 39:22.820] And yeah, there is a right-hand rule. [39:22.820 --> 39:28.100] I don't remember exactly what it is because it's been, I don't know how many years since I took physics. [39:33.440 --> 39:35.720] Anyone else, please, questions? [39:37.160 --> 39:37.900] No? [39:38.080 --> 39:39.320] Oh, yes. [39:41.990 --> 39:43.570] Oh, I'm sorry. [39:43.570 --> 39:44.370] I can't. [39:53.690 --> 39:54.670] Oh, yes. [39:54.670 --> 39:55.910] Bit depth. [39:56.350 --> 40:11.630] So, um, let's take CD audio is a 44 kilohertz 16-bit kind of file or rate. [40:11.630 --> 40:37.050] Those 16 bits mean that you have for every sample point, you have 65,536 potential values to represent where the wave is at that point in that signal. [40:37.710 --> 40:50.110] As you increase those number of bits, you end up with, let's say you go to a 24-bit sample, you have 16.7 million ways to represent the signal at that point. [40:51.030 --> 40:59.210] As you end up with a, let's say you have a very, in terms of CD audio again, let's say you have [41:02.310 --> 41:04.270] Tchaikovsky blasting a cannon. [41:04.890 --> 41:09.310] And then there's also somebody just kind of snapping their fingers in the side. [41:09.970 --> 41:16.950] As you increase that bit depth, you're able to pick up more subtle variations in that signal at every point. [41:16.990 --> 41:25.930] And so you're able to basically pull out much quieter things when there is a very loud source present. [41:25.930 --> 41:27.530] Does that make sense? [41:30.430 --> 41:31.670] Yes. [41:33.410 --> 41:34.430] Ah, aliasing. [41:34.430 --> 41:35.250] Yes. [41:35.670 --> 41:36.250] Okay. [41:36.250 --> 41:37.490] Let me get back to my graph. [41:37.490 --> 41:38.170] Okay. [41:38.250 --> 41:48.590] So yeah, this teal signal is the one that we want to capture, but our sample rate is too low. [41:48.590 --> 41:59.690] And so as this teal signal is going along, you know, we, we capture a sample here and then a sample here and a sample here and a sample here. [41:59.890 --> 42:14.670] And when we reconstruct that, assuming it is some form of sine wave, we end up with this, what looks like a much lower frequency signal. [42:14.790 --> 42:21.390] And that is the kind of aliased signal of this higher frequency signal that's there. [42:21.390 --> 42:24.670] So this yellow line doesn't exist. [42:24.670 --> 42:31.990] It's an artifact of us having sampled this original signal at too low a rate. [42:32.030 --> 42:52.350] So if we to capture it properly, you know, if we captured it here and here and here and here and here and here, then we would be able to reconstruct this signal properly. [42:56.520 --> 42:58.260] Anyone else? [43:00.420 --> 43:01.100] Nope. [43:01.100 --> 43:01.900] Okay. [43:01.900 --> 43:03.160] All right. [43:03.160 --> 43:14.260] I'm gonna apparently lose my mouse again, and I will sit here for a minute with my laptop on that where to find more things slide. [43:15.740 --> 43:18.080] You can come and take pictures of. [43:18.080 --> 43:20.700] So thank you everyone.