So IoT is all about these challenging environments, and we have a lot of electromagnetic interference in these environments. I'm going to teach you another trick for dealing with EMI, and this idea of using peering of cables to protect against noise. So let's start off with an example. Suppose you have a source and a destination, and you want to send information from the source to the destination. Well, what we can do is we can connect them together with a wire, and then we can encode the data as a series of voltage changes over that wire. So we can do that. The problem with this is that if we have noise, if we have a changing magnetic field, that can interfere with the transmission, because it can cause voltage changes on that wire. So when the destination receives a signal, it's going to receive the addition of the pulses with the noise, which could turn into garbage, as we can't understand the signal. So how can we protect against this? Well, there's a trick that we can use. The trick is, instead of just using one wire to communicate, we're going to connect the source and the destination with two wires. What we're going to do is, we're going to transmit on these two wires. Instead of feeding the signals directly to the destination, we're going to have a subtractor. The reasoning behind that is, when we transmit, we're going to transmit positive pulses on one wire, and negative pulses on the other. These will go into the subtractor. If you think about it, if you have a positive pulse and a negative pulse and you subtract them off, then you get something even more positive. Because if you take a positive number and you subtract a negative number, it'll give you even more positive. So these pulses you send down the wire, if you send inverted pulses, they'll add together. They'll be constructive. So we could do this. The source could send these pulses down through the subtractor and hit the destination, and when the destination reads the signal, it will receive the correct pulse, because it will receive a constructive interference pattern between these pulses. So you might be thinking, "Well, why are we doing this? Why not just send a single pulse? Well, the reason why this helps is because if you have noise, noise ends up canceling. Because if you have two wires right next to each other, they're going to both be hit by the same noise because they're co-located. So the same patterns of interference are going to affect the two wires. Now, when you feed the same signal through a subtractor, they're going to subtract off, and the destinations that not going to receive any signal. So this is an amazing thing, if you send data through these wires, it'll be received, but if noise goes through these wires, if noise hits these wires externally, it'll be subtracted off. So this is almost a magic way to get rid of interference. This trick is used all over the place in systems. It's used in Ethernet when you're sending data across cables, its used in devices internally, it was even used in telegraph cables along time ago. Very powerful technique. This technique is known as differential signaling. The idea behind it is to transmit complimentary signals on two different wires. The reason why this works so well is that noise tends to affect both wires together. It doesn't change the relative difference between signals. So when the receiver reads information, it reads the information as a difference between the two wires using a subtractor. This is widely used as part of the Ethernet standard. So if you ever taken Ethernet cable and cut it, you'll see something like the figure I have on the right here. You'll see some wires going through it. Now, we don't typically send just pairs of wires through Ethernet cables, we have multiple wires, so we can send multiple signals at once. But we have them in pairs. You'll see there's two green wires, two blue wires and so on. In Ethernet, we twist them. We twist them for a few reasons, we twist them for strength and stability, we also twist them because of the right hand rule. If you have a signal going through a cable, then it'll be gone in a certain direction, and if you have the the complementary signal going through an adjacent cable, that's actually a problem because they'll cancel out. Because if you have a signal going through a cable, that will induce it an electromagnetic field. If you have the opposite going through the other wire, they're going to cancel each other out, because there's a difference, they're against each other, they're destructive. So in Ethernet, what we do is we don't send the wires directly next to each other, we twist them. So ones at a 90 degree angle to the other. Then the magnetic fields don't overlap because they're right-hand rule. So that's why wires are wrapped inside of Ethernet cables, it allows you to send complimentary signals without them cross interfering through crosstalk. The number of twists you have in the cable and so on is a parameter, is something you can change based on how much you're willing to spend on the cable, is a requires more wire, but it protects the cables against this crosstalk. Twist appearing in differential signaling has a lot of benefits. It has some costs as well, so you might not want to use it in all situations. One thing you have to be careful about is EMI protection depends on the peer twisting staying intact. So if you have cabling and you're running in it and it's getting stretched, it's getting twisted, that could be a problem. So there's stringent requirements on cables, especially Ethernet cables for things like maximum pulling tension. Because people go up and ceilings and they throw it in the ceiling and they wanted to get it down, so they pull on it and they yank it, and that stretches out these cables. So they untwist. So there is regulations, and if you study certification exams for wiring, you'll learn about these rules. There's also rules on minimum bend radius. So if you take an Ethernet cable, you can bend it some, but there's a a minimum radius, you don't want to bend it to bias because that will also undo these twists. You can imagine these twist coming apart when the bend radius is too much. You can buy cables that are bonded, so you can have bonded twisted pair with a glued together and that can help. So those cables cost more, but they can survive a heavier pulling tension, you can bend them more and so on. Another thing you have to be careful about is twisted pairs and cable due to manufacturing defects, people pulling on them and things like that. They can't have different numbers of twist per meter. Different manufacturers have this problem. So this can lead to loss data. If you're sending analog signals over these wires, it can lead to things like ghosting on video and so on. So what I've done here is I've talked about twisted peering and differential signaling. These are powerful approaches used in cable. There very common using Ethernet and all over the place. They're also used in devices to predict devices against EMI as well.