1 00:00:00,000 --> 00:00:14,760 Welcome to this talk. I'm David Melendez and I want to share with you several projects that I have been over the years. 2 00:00:17,980 --> 00:00:27,280 The title of this talk is Building Drones the Hard Way because we are talking about three robots. 3 00:00:30,000 --> 00:00:43,140 One each with their particularities. So I named this project Trust Robotic Router Platform at the beginning. 4 00:00:43,720 --> 00:00:50,940 And the leitmotif was low or nothing cost of embedded platforms. 5 00:00:51,400 --> 00:00:56,520 The Internet of Things and they use whatever is lying around. 6 00:00:58,060 --> 00:00:59,640 And I don't like that. 7 00:00:59,640 --> 00:00:59,980 I don't like that. 8 00:01:00,000 --> 00:01:04,020 I don't like to recycle. Don't recycle at all. Simply reuse. 9 00:01:07,860 --> 00:01:14,680 So for the first two robots, I decided to use a router. 10 00:01:16,180 --> 00:01:23,020 Some of you may know the Linksys. It's a very classic router. 11 00:01:23,660 --> 00:01:29,900 So like seven years ago, I decided to build my first robot. 12 00:01:31,140 --> 00:01:35,540 It's called Texas Ranger. So we are going to see why. 13 00:01:38,560 --> 00:01:41,640 The main reason is to use the Linksys. 14 00:01:42,180 --> 00:01:50,140 Seven years ago, there was no Raspberry Pi or maybe Arduino, but it was very new. 15 00:01:50,860 --> 00:01:58,240 So I decided to use a Linksys and a homemade PIC board. 16 00:01:58,700 --> 00:01:59,340 Homemade. 17 00:02:03,620 --> 00:02:12,980 So I loaded it to Linksys, the Linux open WRT, and we got everything. 18 00:02:14,420 --> 00:02:16,160 And the second one was a drone. 19 00:02:17,020 --> 00:02:20,380 We are talking about all of them. 20 00:02:20,980 --> 00:02:26,580 With the Lafonera 2201, a very old model indeed. 21 00:02:28,100 --> 00:02:29,860 So the wrong one is the... 22 00:02:29,860 --> 00:02:38,800 This is a rover, Texas Ranger. You can Google it and you will find a lot of stuff about this. 23 00:02:39,020 --> 00:02:42,380 But I would like to share with you this robot. 24 00:02:42,640 --> 00:02:46,480 But this was the first time with a robot. 25 00:02:46,760 --> 00:02:58,220 So this robot has a Linksys, two boards, an IP camera, and two guns. 26 00:02:58,920 --> 00:02:59,260 Okay? 27 00:02:59,860 --> 00:03:12,620 The two guns are made with plastic guns, turned backwards, and all the bullets fall into the camera. 28 00:03:13,260 --> 00:03:23,300 So I only need a transistor to make work the gun from the PIC. 29 00:03:23,420 --> 00:03:29,000 The PIC was connected directly to the Linksys. 30 00:03:29,000 --> 00:03:29,920 By serial port. 31 00:03:30,620 --> 00:03:32,800 And we have an interface. 32 00:03:34,420 --> 00:03:43,380 And the laser, this is the laser, was used to estimate the distance between the robot and, for example, the wall. 33 00:03:43,820 --> 00:03:55,480 By calculating the distance between the most bright light on the screen, the capture screen by IP camera. 34 00:03:56,680 --> 00:03:58,980 The router decompressed. 35 00:03:59,000 --> 00:04:00,000 they might damage. 36 00:04:00,380 --> 00:04:07,480 And then to calculate, estimates the distance between the robot and the wall. 37 00:04:10,760 --> 00:04:14,760 So the first one is the Texas Ranger. 38 00:04:14,940 --> 00:04:28,880 And the second one was the MIT the And it's little wind for on ARA as a router, like the Texas Ranger is the same. 39 00:04:28,900 --> 00:04:28,980 Aye aye. 40 00:04:28,980 --> 00:04:31,560 the same technology at the beginning 41 00:04:31,560 --> 00:04:33,600 because I still use 42 00:04:33,600 --> 00:04:35,620 the open WRT 43 00:04:35,620 --> 00:04:37,600 and I was 44 00:04:37,600 --> 00:04:39,060 to program the stabilization 45 00:04:39,060 --> 00:04:41,440 process inside 46 00:04:41,440 --> 00:04:43,120 the router because 47 00:04:43,120 --> 00:04:44,980 I decided to 48 00:04:44,980 --> 00:04:47,380 program my own stabilization 49 00:04:47,380 --> 00:04:48,700 program 50 00:04:49,280 --> 00:04:51,140 and avoid any kind of 51 00:04:51,140 --> 00:04:52,840 like Ardupilot or 52 00:04:53,130 --> 00:04:55,160 so on, just for fun 53 00:04:55,160 --> 00:04:56,740 and to learn 54 00:04:56,740 --> 00:04:59,020 how the stabilization process 55 00:04:59,020 --> 00:05:00,900 works and I would 56 00:05:00,900 --> 00:05:02,920 like to share with you 57 00:05:02,920 --> 00:05:04,000 my insights 58 00:05:05,200 --> 00:05:06,040 so 59 00:05:06,040 --> 00:05:08,880 the telemetry and control, the first 60 00:05:08,880 --> 00:05:09,940 attempt was 61 00:05:09,940 --> 00:05:11,600 a success 62 00:05:11,600 --> 00:05:13,260 it was 63 00:05:13,260 --> 00:05:14,940 by control 64 00:05:14,940 --> 00:05:17,640 by the web page of the router 65 00:05:17,640 --> 00:05:18,820 by 66 00:05:22,280 --> 00:05:23,340 case logs 67 00:05:23,340 --> 00:05:24,380 by javascript 68 00:05:24,380 --> 00:05:26,480 but I found 69 00:05:26,480 --> 00:05:26,660 that 70 00:05:26,660 --> 00:05:26,720 it was 71 00:05:26,740 --> 00:05:33,340 that was not very comfortable to pilot the drone, especially with the drone can kill you 72 00:05:33,340 --> 00:05:43,800 because it's too big. So we all know what's the ABC for quadcopters and drones. So we can 73 00:05:43,800 --> 00:05:53,880 skip this slide. I think that we all know we have four motors, two spinning clockwise and 74 00:05:53,880 --> 00:06:02,220 the other two spinning counterclockwise. So we have a complete control over all the axis. 75 00:06:04,220 --> 00:06:12,240 You want to turn to one side, we spin faster one motor and the other. 76 00:06:13,560 --> 00:06:22,640 Well, this is the architecture of the ATROPOS. This kind of slide is for troll you. 77 00:06:23,180 --> 00:06:23,860 So... 78 00:06:23,880 --> 00:06:26,740 So, don't be afraid. 79 00:06:29,160 --> 00:06:35,660 We have a lafonera in the front with a background process. 80 00:06:37,040 --> 00:06:47,360 But at the beginning, we have a client in web page with an iframe taking the camera. 81 00:06:47,680 --> 00:06:50,140 At the first time, it was an IP camera. 82 00:06:51,740 --> 00:06:57,060 And we have a control, a control for like this one. 83 00:06:57,520 --> 00:07:01,640 This is not an ERC, it's a USB trainer. 84 00:07:02,460 --> 00:07:08,220 So, it's like a remote control, like with PlayStation and so on. 85 00:07:09,800 --> 00:07:17,960 Lafonera takes the commands through our Wi-Fi and tells to the main process 86 00:07:19,040 --> 00:07:20,120 all the commands. 87 00:07:20,140 --> 00:07:20,840 All the commands from pilot. 88 00:07:21,860 --> 00:07:28,900 That flight control runs inside the Linux box, inside the Linux router. 89 00:07:29,760 --> 00:07:39,880 And it has to be some kind of special tweaks in order to achieve some kind of real-time execution. 90 00:07:42,280 --> 00:07:49,720 We know that Linux is not indeed, by default, a real-time operating system, so we have a special 91 00:07:55,060 --> 00:08:02,180 policy, a scheduling policy to achieve this, some sort of real-time response. 92 00:08:03,110 --> 00:08:12,620 So, we need to read sensors, make equations and send the commands to the motors in a fixed time. 93 00:08:13,690 --> 00:08:15,640 In a specific fixed time. 94 00:08:16,020 --> 00:08:19,480 So, we cannot make 100 calculations. 95 00:08:20,140 --> 00:08:27,020 in a second and 200 in another second because you have to be very time constrained. We are 96 00:08:27,020 --> 00:08:36,460 talking about that later. So the inter-process communication is made by shared memory for fast 97 00:08:36,460 --> 00:08:45,200 response. And the sensors are Wii motion, are the Wii motion plus and the Wii nunchaku. It was 98 00:08:45,200 --> 00:08:56,380 taken from the Nintendo Wii console because like six or seven years ago it was not so easy to buy 99 00:08:56,380 --> 00:09:07,400 a complete set of sensors and the best choice was to go to the supermarket, buy some Wii sensors, 100 00:09:07,740 --> 00:09:15,180 not having the Wii console and connect it to the Nintendo Wii console. So it was taken from the 101 00:09:15,200 --> 00:09:24,900 supermarket to the router lights. Okay? So the first step we need to identify in the router is 102 00:09:27,080 --> 00:09:35,880 where is, where are the lights? Because the lights are GPOs. Okay? So if we have enough GPOs 103 00:09:35,880 --> 00:09:45,180 identified, we could make a virtual I2C bus. Okay? By software. So the first step we need to 104 00:09:47,660 --> 00:09:50,060 do is connect the I2C bus to the Wii motion and the Wii nunchaku. I could identify four pins. 105 00:09:51,620 --> 00:09:58,820 For example, the network, the LED network activity or the Wi-Fi activity. We have several pins 106 00:09:58,820 --> 00:10:08,820 identified here. So I could make two I2C buses to connect the Wii motion and the Wii nunchaku. 107 00:10:09,700 --> 00:10:12,720 Well, this is some kind of professional soldering. 108 00:10:15,200 --> 00:10:27,540 I pretty, this is pretty awesome, I know. So we have the GPOs, LEDs attached to that, and the 109 00:10:27,540 --> 00:10:40,460 serial port. That is useful too, as you know. And this is, there are the steps to load the, 110 00:10:40,500 --> 00:10:45,180 to compile the model of the I2C. This is the I2C bus. This is the I2C bus. This is the I2C bus. 111 00:10:45,200 --> 00:10:52,860 So then, you, you would put theseà — this is the bus for I2C bus. Because this is not, you, you, you don't have a driver because you don't have the specific hardware with 112 00:10:52,860 --> 00:11:06,220 I2C. Simply you, you create an I2C bus but by software. Is not related to any specific hardware. So we have to load the modules and 113 00:11:06,220 --> 00:11:15,180 that's the commands. We, we tend to the, to to the, to the kernel me. What, which pins of this module we have called the I2C models? 114 00:11:15,200 --> 00:11:26,120 CPU are related to clock and the data, okay? So we will bus 0 and bus 1 with the GPOs 4, 7, 3, 115 00:11:26,180 --> 00:11:36,800 and 1, okay? So I leave this information. We load the module at the start, and we can throw 116 00:11:36,800 --> 00:11:48,140 the I2C detect command as normal. But this is the serial port of the Fonera. It's no real 117 00:11:48,140 --> 00:11:59,260 mystery here. And I would like to explain how it works a little and why I need Wiimotion Plus 118 00:11:59,910 --> 00:12:06,280 for the Atropos. Well, Wiimotion Plus is a gyroscope, so we have three axes. 119 00:12:07,620 --> 00:12:18,360 Pitch roll and jab. But it gives me angular velocity, okay? To take the real angle, we 120 00:12:18,360 --> 00:12:26,140 multiply angular velocity by time, okay? But there is a problem. It drifts, okay? If you 121 00:12:26,140 --> 00:12:35,720 multiply over and over time, it will drift, and it's the same problem that if you are too drunk, 122 00:12:36,900 --> 00:12:47,820 and you turn around enough times, you can go to the ground, okay? So we need an accelerometer to 123 00:12:47,820 --> 00:12:57,620 cancel that drift. And the accelerometer is taken from the wind and chuck. It's also an I2C 124 00:12:57,620 --> 00:13:06,780 port. And if acceleration. Well, we need this to cancel the drift, and the acceleration is 125 00:13:06,800 --> 00:13:17,580 taken only when the drift has to be cancelled. The other time is not necessary, okay? And the 126 00:13:17,580 --> 00:13:27,920 magnetometer, this is not mandatory, because this only cancels the course angle, so it's optional. 127 00:13:31,100 --> 00:13:36,780 Well, in order to read with the I2C with a Linux program, we need to have the I2C port, and we need to 128 00:13:36,800 --> 00:13:46,540 have the I2C port. One of the easiest ways to read it is including the I2C header of the Linux 129 00:13:46,540 --> 00:14:01,760 kernel, and we rate it like a regular file, okay? We can ask for the specific sensor that we want 130 00:14:01,760 --> 00:14:02,140 to read. 131 00:14:06,800 --> 00:14:18,400 We can also use the CTO command to read the gyroscope or the accelerometer, okay? So this is the funny 132 00:14:18,400 --> 00:14:36,780 part, because we have to mix these two sensors to obtain an attitude, where the real motion on the 133 00:14:36,780 --> 00:14:44,020 how the drones is moving, in order to react and send the proper commands to keep the drone 134 00:14:44,020 --> 00:14:50,960 stabilized. All this shit is managed by Arduino pilot easily. You can put the Arduino pilot, and 135 00:14:50,960 --> 00:15:02,620 everything works fine, okay? But if we want to make this by ourselves, we have to deal with this shit, okay? 136 00:15:03,580 --> 00:15:05,240 But this is a pretty fancy. 137 00:15:05,240 --> 00:15:17,360 fancy because, well, the first approach that I made was for, okay, we have the poor man 138 00:15:17,360 --> 00:15:30,840 Kalman filter, okay? Do you know Kalman filter, please? How many? One? Well, it's fine. You? 139 00:15:30,840 --> 00:15:40,280 Okay, two. It's pretty fun. So, this is like the paper, the original paper was the balancer 140 00:15:40,280 --> 00:15:50,160 filter of the MIT. You can see that. And you can stake in for that, okay? So, the first 141 00:15:50,160 --> 00:15:57,820 approximation, the first approach was to take the angle of the gyroscope, multiply for delta 142 00:15:57,820 --> 00:16:00,600 time. Delta time is the time between rifts. 143 00:16:00,840 --> 00:16:07,540 That is because it's important to keep rifts at the same time because the T is fixed. It's 144 00:16:07,540 --> 00:16:18,180 a constant. So, you can remove that from the equation if we have a fixed delta time. So, 145 00:16:18,880 --> 00:16:25,640 this is our first approximation. So, we have some kind of stabilization because I'm taking 146 00:16:25,640 --> 00:16:29,540 into account a very, very much the 147 00:16:30,840 --> 00:16:40,600 gyroscope, but too little the accelerometer. You have here the gains. And we have some 148 00:16:40,600 --> 00:16:52,880 kind of stabilization. But this is the funnest part because what happens if the drones, okay? 149 00:16:53,880 --> 00:17:00,760 This is the sensor, okay? And the sensor takes into account this 150 00:17:00,840 --> 00:17:10,800 turn, this turn, and this, pitch, roll, and IH. Okay? But each axis is related to each 151 00:17:10,800 --> 00:17:11,720 axis of the sensor. 152 00:17:12,060 --> 00:17:19,940 But what happens is I'm moving like this. The pitch is no longer the pitch. The gyro 153 00:17:19,940 --> 00:17:29,020 is no longer the gyro. The gyro is no the last movement. 154 00:17:30,220 --> 00:17:30,820 The last movement, this is the gyro. We will have to make videos later. And the gyro is 155 00:17:30,840 --> 00:17:33,400 Well, it's not the same movement. 156 00:17:34,280 --> 00:17:37,760 Well, again, we have a jowl, okay? 157 00:17:37,860 --> 00:17:39,260 And the jowl is like this. 158 00:17:40,520 --> 00:17:44,900 But the jowl now is not like this. 159 00:17:45,660 --> 00:17:46,700 It's like this. 160 00:17:48,520 --> 00:17:54,940 But the related axis of the sensor remains the same, okay? 161 00:17:55,390 --> 00:17:58,500 The jowl for the sensor still is that. 162 00:17:58,500 --> 00:18:01,760 But for the drone, no more, okay? 163 00:18:02,620 --> 00:18:07,100 That pretty stuff is blown mine from the first time 164 00:18:07,100 --> 00:18:14,440 because we need a 3 plus 3 matrix transformation 165 00:18:14,440 --> 00:18:20,660 in order to transform the coordinates of the hair 166 00:18:20,660 --> 00:18:23,280 or the sensor to the coordinates of the drone. 167 00:18:23,540 --> 00:18:27,080 So we have an I values. 168 00:18:28,820 --> 00:18:31,380 That is related to the X of the aircraft. 169 00:18:31,620 --> 00:18:33,040 It's related to the X. 170 00:18:33,440 --> 00:18:35,180 Well, you see that, okay? 171 00:18:38,780 --> 00:18:40,240 So we have to work. 172 00:18:40,540 --> 00:18:45,060 Once we have the conversion between the axis of the drone 173 00:18:45,060 --> 00:18:48,720 and the axis of the sensor, we have three things. 174 00:18:49,440 --> 00:18:53,620 Absolute angle, radiance, okay? 175 00:18:53,920 --> 00:18:56,960 We have angular velocity, radiance per second, 176 00:18:57,640 --> 00:18:58,420 from gyroscope. 177 00:18:58,500 --> 00:19:02,680 And the angular acceleration, radiance per second per seconds, okay? 178 00:19:05,120 --> 00:19:07,940 So don't go away, please. 179 00:19:12,940 --> 00:19:19,060 Once we have an attitude, we have to send a proper command to motor. 180 00:19:19,320 --> 00:19:20,520 But what command? 181 00:19:20,600 --> 00:19:21,660 What quantity? 182 00:19:21,920 --> 00:19:25,040 What fucking sheet of anything? 183 00:19:25,700 --> 00:19:28,480 So we have this algorithm. 184 00:19:28,500 --> 00:19:29,500 So we have this algorithm that you can... 185 00:19:29,500 --> 00:19:31,000 It's taken from the Wikipedia, okay? 186 00:19:31,080 --> 00:19:31,500 This image. 187 00:19:31,780 --> 00:19:36,680 You can search for that. 188 00:19:37,000 --> 00:19:39,100 And we have three terms, okay? 189 00:19:39,300 --> 00:19:40,900 We have the proportional term. 190 00:19:41,240 --> 00:19:44,160 That is, we have a zero... 191 00:19:44,960 --> 00:19:49,660 I have to stay at zero angle to stay stabilized, okay? 192 00:19:49,820 --> 00:19:51,460 My set point is zero. 193 00:19:51,940 --> 00:19:57,120 But I am at 10 degrees. 194 00:19:57,540 --> 00:19:58,400 My error? 195 00:19:58,500 --> 00:19:59,680 My error is minus 10 degrees. 196 00:19:59,920 --> 00:20:11,200 So I have to take into account the error that this is the difference between where I am and where I want to stay. 197 00:20:12,340 --> 00:20:15,280 So I multiply the error by a number. 198 00:20:15,760 --> 00:20:16,580 Which number? 199 00:20:16,820 --> 00:20:17,800 I have no idea. 200 00:20:18,140 --> 00:20:19,440 I have no fucking idea. 201 00:20:22,660 --> 00:20:28,220 The first approximation is, okay, let's test, okay? 202 00:20:28,220 --> 00:20:29,040 And you test. 203 00:20:30,080 --> 00:20:32,540 You put the drone like a segway. 204 00:20:33,720 --> 00:20:37,860 I fix it with only movement with one angle. 205 00:20:38,520 --> 00:20:41,860 And you test its behavior. 206 00:20:42,200 --> 00:20:43,180 But it's not enough. 207 00:20:43,380 --> 00:20:49,920 You can't control a drone with a proportional gain because it's not enough. 208 00:20:50,160 --> 00:20:52,580 You have to take into account the integral. 209 00:20:54,240 --> 00:20:56,220 Don't throw me things, please. 210 00:20:58,380 --> 00:21:07,060 The integral is to only take into account how much time I am with the error, okay? 211 00:21:08,000 --> 00:21:15,520 It's like you take the mouse and you naturally, your brain, are calculating the integral. 212 00:21:16,500 --> 00:21:25,140 Because if I can't lift the mouse, my brain without notice... 213 00:21:25,140 --> 00:21:27,040 I'm not noticing that. 214 00:21:27,120 --> 00:21:28,200 But my brain... 215 00:21:28,220 --> 00:21:35,420 Will send more power to my hand to lift the mouse. 216 00:21:35,720 --> 00:21:37,000 That is the integral. 217 00:21:37,700 --> 00:21:40,100 I'm alone time with the error. 218 00:21:40,360 --> 00:21:46,040 So I accumulate the error to correct. 219 00:21:46,420 --> 00:21:48,760 And the other one is the derivative, okay? 220 00:21:48,940 --> 00:21:56,900 The derivative thing takes into account how much speed I'm approaching or leaving my setpoint, 221 00:21:57,060 --> 00:21:57,460 okay? 222 00:21:58,480 --> 00:22:06,260 So I have to take into account that's free terms, and I have to tune it by trial and error, okay? 223 00:22:06,580 --> 00:22:17,940 It's the best way, although you have the real model of your drone, almost all the variables, 224 00:22:18,620 --> 00:22:26,440 and you can calculate Laplace transform and so on, okay? 225 00:22:26,740 --> 00:22:27,740 But the... 226 00:22:28,220 --> 00:22:33,240 For poor men, you can try to real an error. 227 00:22:33,760 --> 00:22:42,180 So this is a nested PID because we applied a PID to angular velocity, but over the roof, 228 00:22:42,340 --> 00:22:44,140 we apply a PID controller. 229 00:22:44,420 --> 00:22:45,940 This is just for the record. 230 00:22:47,740 --> 00:22:54,440 So this is the Atropos with a professional grade mounting with all the stuff. 231 00:22:56,160 --> 00:22:57,160 And we say... 232 00:22:57,160 --> 00:22:57,740 And we say... 233 00:22:57,740 --> 00:22:58,200 And we say... 234 00:22:58,220 --> 00:22:58,720 So we have to send... 235 00:22:59,400 --> 00:23:01,180 Once we have to send... 236 00:23:01,180 --> 00:23:07,840 We have calculated all the calculations, we have to send to the motors the signal. 237 00:23:08,120 --> 00:23:20,220 So the signal is a PWM, a pulse width modulation, but it cannot be made inside the router 238 00:23:20,220 --> 00:23:22,260 because it's not real time. 239 00:23:22,380 --> 00:23:23,660 We have specific hardware. 240 00:23:24,000 --> 00:23:26,820 So I use a PID, okay? 241 00:23:30,720 --> 00:23:38,080 scheduling from the process inside of the Linux box. This is 242 00:23:38,080 --> 00:23:43,180 only for if you want to investigate. I use the get 243 00:23:43,180 --> 00:23:52,320 priority, the library. So in a policy of first in, first out. 244 00:23:52,320 --> 00:24:00,600 Okay? So, there is some process by default in the Linux box 245 00:24:01,000 --> 00:24:05,860 that it's, that they are not, they are useless. Okay? Like the 246 00:24:05,860 --> 00:24:10,700 watch log. Because this is what happens if the router hangs with 247 00:24:10,700 --> 00:24:18,080 I'm flying my drone. Okay? It's no, it makes no sense. Well, we 248 00:24:18,080 --> 00:24:22,300 see the, the motors and so on. Okay? So, this is what happens. 249 00:24:25,740 --> 00:24:30,900 And this is how I control the drone throughout the web page. 250 00:24:32,600 --> 00:24:37,280 This is what's my first approximation with Ajax. But I 251 00:24:37,280 --> 00:24:44,460 had, I had to tweak the, the web server because too much, too 252 00:24:44,460 --> 00:24:52,300 fast Ajax petitions, queries. They are not, they are not 253 00:24:52,320 --> 00:24:55,440 too much for the, for the router. So I have to tune the, 254 00:24:56,680 --> 00:25:04,860 the web server. Okay? That's the, the remote. This is onlyhö 255 00:25:04,860 --> 00:25:11,520 ajostik. Okay? It's regular just stick. And, I would like 256 00:25:11,520 --> 00:25:19,460 to. Do you say something off Android? Because, I was thinking 257 00:25:19,460 --> 00:25:22,300 about to, to indicate a thing on that part. So, we have a then 258 00:25:22,320 --> 00:25:31,500 avoid a PC to control my drone, okay. I'm going to put all my stuff, my pilot stuff to a tablet. 259 00:25:31,720 --> 00:25:42,020 Okay? So, I have to recompile the whole image only for tiny and ridiculously module of 260 00:25:42,020 --> 00:25:52,300 JoyDev.ko. So, thank you. And the last one was in the last part of this 261 00:25:52,320 --> 00:26:04,280 talk, in Spain, a guy sent to me the authentication package to the Wi-Fi of the drone. It was not 262 00:26:04,280 --> 00:26:16,180 so funny. Okay? So, I decided to make my own protocol by Wi-Fi that I explained in the talk 263 00:26:16,180 --> 00:26:22,300 before this. You can find it with the... I don't know if you can see it. I don't know 264 00:26:22,320 --> 00:26:27,400 if you can see it. The project interceptor, you can find it in the DEF CON web page. This 265 00:26:27,400 --> 00:26:37,380 is my project interceptor. It's made with chopsticks because if I make with a 3D printer, 266 00:26:38,000 --> 00:26:46,620 nobody believes me that this is my drone. Okay? So, and I like this sheet. I like to 267 00:26:46,620 --> 00:26:48,560 make things with my hands. Okay? 268 00:26:52,320 --> 00:26:58,800 So, I decided to make a much smaller drone than the Atropos because Atropos can kill 269 00:26:58,800 --> 00:27:09,840 me. And especially when I travel with it, with the airport. So, I decided to make a 270 00:27:09,840 --> 00:27:21,580 hand-sized drone. This time with a regular sensors that you can buy in Chinese... 271 00:27:22,320 --> 00:27:30,300 dealers and so on. And... but there are some... there are some things that they have to take 272 00:27:30,300 --> 00:27:39,480 into account. First time... first one that Chinese sensors maybe... maybe they are not 273 00:27:39,480 --> 00:27:47,200 documented. Okay? Maybe you can tune the filters and maybe your drone has too much 274 00:27:47,200 --> 00:27:52,300 vibrations. If you... if you look close enough, you can see that it has a lot of vibrations. 275 00:27:58,580 --> 00:28:21,900 Look at this. Look at this. What do you think that... that could be? Well, there are... the English term, thermo... thermofusible? With the... this... this kind of... 276 00:28:22,680 --> 00:28:31,700 pipes you have... do... you take to... to protect wires with the solder. Okay? 277 00:28:33,380 --> 00:28:51,400 Shrink to it. Thank you. As a... as a dampening. Okay? To... to... to take into account the vibrations. So, it was not enough. And I attached a 20 euro cent coin. 278 00:28:52,320 --> 00:29:19,560 To make the sensor the... the... the perfect way to absorb the vibrations. Okay? I have to do this because I can't tweak the filters of the sensor. But it has... it has an advantage. That sensors make all the math stuff for me or not all but the first part. Okay? The... the real estimation. 279 00:29:22,320 --> 00:29:52,140 It's low budget. Forty dollars. No, seriously. And it has hacking capabilities. And it... the idea is have to minimum size and weight. So, it is based on the vCore 2 Linux board. I think it is the tiniest board on the market. I don't... I don't know if any other... but it's tiniest. 280 00:29:54,320 --> 00:30:09,680 But it's like a router. It's like a regular router. But you only have the board. Okay? The... I have no commission for this. But... you... you can see all the parts. 281 00:30:10,860 --> 00:30:22,300 Let's see the vCore. And the... the interesting part is it has four pools with modulation outputs. And that's because... 282 00:30:22,320 --> 00:30:33,700 I can't avoid an extra microcontroller for my setup. But there is a problem. When you 283 00:30:33,700 --> 00:30:45,340 build the vCore, only two modules of the pulse width modulation are enabled. The other two 284 00:30:45,340 --> 00:30:57,460 are for UART debugging. Good job. So we have to disable UART and enable the other one. But I 285 00:30:57,460 --> 00:31:07,460 went to the forum of the vCore and a random guy asked, how can I enable all four pulse width 286 00:31:07,460 --> 00:31:14,700 modulation pins? And the vCore creator said, this is a hard way. And I said, I don't know. 287 00:31:14,700 --> 00:31:15,320 This is a hard way. And the vCore creator said, this is a hard way. And the vCore creator said, 288 00:31:20,120 --> 00:31:29,240 this is a hard way. And the vCore creator said, this is a hard way. And the vCore creator said, 289 00:31:29,360 --> 00:31:29,920 this is a hard way. And the vCore creator said, this is a hard way. And the vCore creator said, 290 00:31:29,920 --> 00:31:30,140 this is a hard way. And the vCore creator said, this is a hard way. And the vCore creator said, 291 00:31:30,140 --> 00:31:34,560 this is a hard way. And the vCore creator said, this is a hard way. And the vCore creator said, 292 00:31:34,720 --> 00:31:38,240 this is a hard way. And the vCore creator said, this is a hard way. And the vCore creator said, 293 00:31:38,240 --> 00:31:45,300 this is a hard way. And the vCore creator said, this is a hard way. And the vCore creator said, 294 00:31:45,300 --> 00:31:52,240 control section and better take the so-called so then you can enable 295 00:31:52,240 --> 00:31:59,840 the this module and you will be a good Linux hacker good job man very 296 00:32:00,280 --> 00:32:09,940 helpful so the this is what you need to enable the the four pulse width 297 00:32:09,940 --> 00:32:16,060 modulation output and disable the debugging UART so we have to 298 00:32:16,060 --> 00:32:25,740 redefine the pins but we have a pin name but and a pin function this can be 299 00:32:25,740 --> 00:32:34,420 tricky because we have UART function and UART name if you can see that 300 00:32:41,260 --> 00:32:49,160 we have the UART pins but then we with the not the word a function but the 301 00:32:49,160 --> 00:32:57,920 pulse width modulation function okay we redefine the the muxer and we have this 302 00:32:58,120 --> 00:33:03,060 is only for the record the that's it that you can you have to take this 303 00:33:03,060 --> 00:33:09,620 information and the this is my impretending 304 00:33:09,620 --> 00:33:09,920 time 305 00:33:09,920 --> 00:33:17,660 I'm knowing that I'm doing my work the power stage of the interceptor drone is 306 00:33:17,660 --> 00:33:27,760 a is not performing with a electronic speed controller as usual because I 307 00:33:27,760 --> 00:33:34,500 choose a bruiser a bruised motors okay Bruce motors don't doesn't need an 308 00:33:34,500 --> 00:33:39,460 entire electronic speed controller it's only needed 309 00:33:39,460 --> 00:33:49,880 one mosfet a capacitor and a Scotty diode why we need some kind of stuff 310 00:33:49,880 --> 00:34:00,440 apart of the mosfet that is because the motors we when we power the motors we 311 00:34:00,440 --> 00:34:08,440 are putting power power on the circuit okay but we're not powering the motors 312 00:34:08,440 --> 00:34:08,660 are 313 00:34:09,440 --> 00:34:18,240 at maximum capacity okay we are modulating more or less the the the 314 00:34:18,240 --> 00:34:26,800 power so what happens we when we turn on and off the switch of the of the 315 00:34:26,800 --> 00:34:32,940 motor the motor gene generates electricity work because it is spinning 316 00:34:32,940 --> 00:34:37,460 it it acts as a generator so we have a 317 00:34:37,460 --> 00:34:38,640 a generator so we have a generator so we have a generator so we have a generator 318 00:34:41,140 --> 00:34:44,580 here not going to be 319 00:34:44,580 --> 00:34:47,740 you removed shoots some more motor later you got more now we dag 320 00:34:47,740 --> 00:34:52,880 all change the abrupt which is the first what came out of it and assume it 321 00:34:52,880 --> 00:34:59,080 all change the abrupt which is the first what came out of it and assume it 322 00:34:59,080 --> 00:35:00,340 relatively well and is supporting the motor and using the batteries we pulled 323 00:35:02,280 --> 00:35:07,100 less and less power this process I think very well is notых 324 00:35:07,100 --> 00:35:10,360 the capacitor and the scotty diode