HARDWARE HACKING VILLAGE - Building drones, the hard way

Video thumbnail (Frame 0) Video thumbnail (Frame 857) Video thumbnail (Frame 1650) Video thumbnail (Frame 3684) Video thumbnail (Frame 6265) Video thumbnail (Frame 8426) Video thumbnail (Frame 9319) Video thumbnail (Frame 13966) Video thumbnail (Frame 15233) Video thumbnail (Frame 17517) Video thumbnail (Frame 19146) Video thumbnail (Frame 19902) Video thumbnail (Frame 21391) Video thumbnail (Frame 25067) Video thumbnail (Frame 27925) Video thumbnail (Frame 28615) Video thumbnail (Frame 29479) Video thumbnail (Frame 31260) Video thumbnail (Frame 32667) Video thumbnail (Frame 33820) Video thumbnail (Frame 35186) Video thumbnail (Frame 35887) Video thumbnail (Frame 36596) Video thumbnail (Frame 37447) Video thumbnail (Frame 38659) Video thumbnail (Frame 39682) Video thumbnail (Frame 44019) Video thumbnail (Frame 45258) Video thumbnail (Frame 46390) Video thumbnail (Frame 48045) Video thumbnail (Frame 48763) Video thumbnail (Frame 49624) Video thumbnail (Frame 50616)
Video in TIB AV-Portal: HARDWARE HACKING VILLAGE - Building drones, the hard way

Formal Metadata

Title
HARDWARE HACKING VILLAGE - Building drones, the hard way
Title of Series
Author
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
2018
Language
English

Content Metadata

Subject Area
Frequency Robotics Projective plane Student's t-test Social class
Robot Texture mapping Radon transform Chemical equation Open set Mathematics Pi Internetworking Robotics Robotics Computing platform Internet der Dinge Endliche Modelltheorie Routing Computing platform Router (computing)
Medical imaging Touchscreen Serial port Robotics Multiplication sign Interface (computing) Motion capture Distance Data compression
Web page Rounding Game controller Texture mapping Radon transform Quadrilateral Control flow Group action Cartesian coordinate system Computer programming Process (computing) Ring (mathematics) Root Quadrilateral Hydraulic motor Process (computing) Stability theory
Axiom of choice Web page Slide rule Server (computing) Scheduling (computing) Game controller Multiplication sign Set (mathematics) Real-time operating system Client (computing) 2 (number) Sign (mathematics) Latent heat Semiconductor memory Befehlsprozessor Bus (computing) Cuboid Nichtlineares Gleichungssystem Gamma function Router (computing) UDP <Protokoll> Computer architecture Nintendo Co. Ltd. Personal identification number Default (computer science) Dependent and independent variables Remote administration Client (computing) Interprozesskommunikation Wave packet Process (computing) Ring (mathematics) Software System on a chip Calculation Order (biology) Hydraulic motor Video game console Quicksort Window Reading (process) Router (computing)
Personal identification number Module (mathematics) Serial port Module (mathematics) Serial port Table (information) Information Code Device driver Befehlsprozessor Kernel (computing) Software Computer hardware Bus (computing) Modul <Datentyp> Endliche Modelltheorie Router (computing)
Serial port Serial port Velocity Real number Multiplication sign Computing platform Angle Router (computing) Cartesian coordinate system
Angle Multiplication sign GAUSS (software) Compass (drafting) Computing platform Force Cartesian coordinate system Router (computing)
Digital filter Email Computer file Euler angles Kalman-Filter Chemical equation Multiplication sign Real number Mereology Approximation Kernel (computing) Angle Order (biology) Linear programming Computing platform output Game theory Nichtlineares Gleichungssystem Router (computing) Stability theory Data buffer
Multiplication sign Darstellungsmatrix Angle Mereology Cartesian coordinate system Discrete element method 2 (number) Data mining Process (computing) Velocity Angle Term (mathematics) Oval Order (biology) Data conversion Absolute value Matrix (mathematics)
Point (geometry) Information management Euler angles Set (mathematics) Approximation Number Degree (graph theory) Medical imaging Angle Dedekind cut Term (mathematics) Software testing Error message
Point (geometry) Intel INTEGRAL Transformation (genetics) Multiplication sign Set (mathematics) Variable (mathematics) Power (physics) Derivation (linguistics) Error message Sample (statistics) Term (mathematics) Endliche Modelltheorie Error message
Game controller Game controller Principal ideal domain Real-time operating system Staff (military) Angle Digital signal Velocity Whiteboard Calculation Computer hardware Computing platform Hydraulic motor Router (computing) Router (computing) Row (database)
Default (computer science) Execution unit Scheduling (computing) Broadcast programming Real number Inertialsystem Measurement Process (computing) Befehlsprozessor Kernel (computing) Computing platform Cuboid Process (computing) Gastropod shell Scheduling (computing) Physical system Router (computing) Library (computing)
Web page Game controller Server (computing) Computer Control flow Approximation Web 2.0 Transmitter Event horizon Computer hardware Query language Hydraulic motor Process (computing) Router (computing) UDP <Protokoll> Router (computing)
Module (mathematics) Android (robot) Suite (music) Medical imaging Joystick Control flow
Web page Filter <Stochastik> Frequency Estimator Term (mathematics) Weight Multiplication sign Intercept theorem Mereology Vibration
Weight Weight Core dump Maxima and minima Software-defined radio Maxima and minima Hacker (term) Control flow Regular graph Mereology Rule of inference
Module (mathematics) Latent heat Game controller Process (computing) Clique-width Network topology Function (mathematics) Multiplication sign Function (mathematics) Control flow Mereology
Personal identification number Mobile Web Random number Game controller Functional (mathematics) Mobile app Radon transform Sheaf (mathematics) Route of administration Function (mathematics) Internet forum Circle Endliche Modelltheorie Table (information)
Personal identification number Functional (mathematics) Word Information Local area network Row (database)
Digital electronics Observational study Channel capacity State of matter Hydraulic motor Endliche Modelltheorie Mereology Computer Power (physics) Entire function Power (physics)
hello welcome to the student out I'm David Melendez well I will to share with you several projects that I have been over the years so well I tell this talk is building drones the hard way because we are we are talking about three three robots one it with their particularities so I named this this period class
robotic Rooter platform I'd be on the beginning and the lay motive was a low or Nothing cost of embedded platforms the Internet of Things and use whatever is lying around and I don't like I don't like the recycle don't recycle at all simply reuse so for the for the first
two robots I decide to deduce our route every some of you may may may know the balances it's a very classic Rooter so like seven years ago I decided to build my first robot it's called a texture Ranger so we are going to see why the main reason is to use the the Linksys the seven years ago there was no raspberry pie or maybe Arduino but was very new so I decided to use a Linksys and a homemade pick more homemade so I alerted to the Linksys the Linux open wrt and we got everything and the second one was a drone we are we're talking about all of them with the phone era to 201 and very old model indeed so
the wrong one is the robotics terrain here you can found it on you can google it you will found a lot of a lot of stuff about this but I would like to share with you this the robot but this was the first time I will Road so the
robot has a lean seeks to aboard an IP camera and two guns okay the two guns are made with the plastic guns so turn backwards and all the ballots fall into the into the camera so I only need a transistor to make work the gun from the epic the big was connected to directly to to the Linksys by serial port and we have an interface and the Lasser is the last year was used to estimate the distance between the robot and for example the wall by calculating the distance between the the most bright light on the on the screen the capture screen by IP camera the rotor decompress they might the image and then well the calculates estimates the distance between the robot on the other wall so the first one is the Texas Ranger and
the second one was the they meet the it's really with Panera as a rooted like the texture ring here is the same the same technology at the beginning because I still use open wrt and I was to the stabilization program promise process inside the rotor because I decide to to program my own stabilization program and avoid any kind of bore like autopilot on or so on just for fun for to learn how how the establishing process works and I would like to share with you my insights so the telemetry and control that has attempt was unsuccessful as a bike control by the webpage of the root L by K strokes bike are scary but I found out what that was not very comfortable to pilot the drone especially with the drone can kill you because is too big so
we all know worse the ABC for quad copters on drones so we can skip this is like I I think that we all know we have four motors to spinning clockwise and that there were two spinning counterclockwise so we have a complete control over all the axis you want to turn to one side we spin faster one motor and on the other well this is the
architecture of the atropos the this kind of slide is for told you so don't be afraid we have a la verneda in the in the front without with a background process but at the beginning we have a client in in web page when a nice ring taking the camera at the first sign is our IP camera and we have a a control control for like this one this is not an RC is an USB trainer so it's like a remote control like that with Playstation and so on lafawn era takes the taste the comments throughout Wi-Fi and tells to the main process all the commands from pilot that flight control runs inside the Linux box inside the lineage router and it has to be some kind of special tweaks in order to achieve some kind of real-time execution we know that Linux is not indeed by default a real-time operating system so we have a special policy scheduling policy to achieve this some sort or real-time response so we need to exceed we need to read sensors make equations and send the command to the motors in a fixed set time in a specific specific fixed time so we we cannot make 100 calculation in a second and 200 another second because you have to be very time constrain you who are talking about that later so the inter process communication is made by server memory for for fast response and the sensors are we motion are the Wii MotionPlus and the windows taboo it was taken from the from the Nintendo Wii console because like six or seven years ago in what is what not so easy to buy a completely set of sensors and the best choice was to go to the supermarket buy some sensors not having the white console and connected to the Rooter light okay so the first the first step
we need to to identify in the router is where is where are the lights because the lights are gpo's okay so if we have enough DPS identified we will make a beautiful eye to see bus okay by software so I couldn't the five four pins for example the network the LED network activity or the Wi-Fi activity will have several pins identify here so I could make two I to see buses to connect the buoy motion and the window otaku well this is some kind of
professional soldering I pretty it's pretty also I know so we have the apos let's attach to that and the serial port that is useful to as you know and this
is there are the steps to load to compile the module or the i2c but it's not you you don't have a driver because you don't have the specific hardware we'd like to see simply you do create an i2c bus but my software is not related to any specific hardware so we have to load this models and but the commands we we tell to the code to the kernel meal Y which pins of the CPU are related to clock and the data okay so we we will pass 0 pass one with the DPOs for seven three and one okay so I lift the this information we we load the model at the start and we and we can throw the i2c detect common as as normal
but this is the serial port of the Panera is no real mystery here I would
like to splain hope works a little and why I need Wii Motion Plus for the atropos well we Motion Plus is a gyroscope so we have a three axis its role and yeah but it gives me angular velocity okay to to take the real Lango we multiply angular velocity by time okay but there is a problem it drifts okay if you multiply over over and over the over time it will drift and if the same is this important that is you are too drunk and you turn around in at times you can you can go to the ground okay so we need an accelerometer to concern
that drift and the accelerometer is taking from the freeway nunchuck it's also I to support and if actual acceleration well we need this to cancel the drift and take only when the when the drift has to win cancel the other all that time is not necessary okay II and the magnetometer this is not
mandatory because this only cancels the the course angle so it's optional well
in order to read in with the i2c with a linear program one of the easiest ways to read it is including the i2c the header of the Linux kernel and we angulated like a regular file okay we can we can ask for for for the specific sensor that we want to read sending an iOS 8 and ioctl common to to read the reader stop or they a seller matter okay
so this is the funny part because we have to to meet best to two sensors to obtain an attitude where I'm at the real motion on ho the drones is moving in order to react and send the preparer comments to keep the drone stabilized all this seat is managed by ardupilot easily you can put the autopilot and everything were fine okay but if you want to to make to make this by ourselves we can bill we have to deal with this shit okay but it's a pretty petite fancy because well the fish approach approach that I I made was okay we'll have a the poor main Kalman filter okay do you know come on fetal please Oh many one what is it far you okay - it's pretty fun so we this is like the paper the original paper was the balancer filter of the MIT you can see that and you can stake him for that okay so the first approximation the first approach for was to take the angle of the gyroscope multiply before Delta time.deltatime is the time between reads that is because is important to keep reads at the same time because DT is fit Civ is a constant so you can you can remove that from the equation if we have a fictional Delta time so this is a first approximation so we have some kind of a stabilization well because I ain't thinking into account upper body much they act the the gyroscope but too little the accelerometer you have the here the the games and we have a some kind of stabilization but this is the funnest
part because what happens if the drones okay this is this this is the sensor okay and the sensor takes into account this turn this term and this fits role and yeah okay but and it says its axis is related to exactly of the sensor but what happens is I move in like this the pitch is no longer the pitch the Dow is no longer the Dow the Dow is no they say the last movement well it's not it's not the same movement well again we have a yahoo okay and the Dow is like this but the Yahoo now is no like this is like this but the related axis of the sensor remains the same okay the job for the sensor still is that but for the drone no more okay that pretty stuff is so it's blown mine from the first time because we need three plus three matrix transformation in order to transform the the coordinates of the hair or the sensor to the coordinates of the drone so we have a enables that is related the X of the aircraft it really related to the eggs well you see that okay so we have to
work once we have at the the conversion between the axis of the drone at the axis of the sensor we have three things absolute angle radians okay we have angular velocity radians per second from gyroscopes and the angular acceleration radians per second per seconds okay so
don't go away please once we have an attitude we have to send a proper comment to motor but what common what quantity what fucking shit of anything so we have a DeSalvo rim that you can is taken from the Wikipedia okay this image you can you can search for for that and we have three terms okay
we have the proportional term that this we have a zero and I have to say at zero angle to stay SW sighs okay my my set point is zero but I am at ten ten degrees my error is minutes ten degrees so we had to I have to take into account the error that this is the difference between between I am and where I am - I want to stay so I multiplied the error by a number which number I have no idea I forget India the first approximation is okay let's let's test okay and you test you put the drone like a segue fix it with only movement with our one angle and you test how it its behavior but it's not enough you can you can't control a drone with a proportional gain because it's not enough you have to
think into account the integral don't throw me things please the interval is so it's only in take into account how much time I'm with error okay it's like you you take the mouse I do naturally your brain are calculating the integral because if I can't lift the mouse my brain without notice I'm not it's not but my brain will send more power to my to my hand to lift the mouse that is the integral in a long time with the with the error so I accumulate there or da to correct and the other one is the derivative okay but
the relative thing takes into account how much speed I'm approaching or living my set point okay so I have to take into account that three terms and I have to tune it by trial and error okay it's the best way although you have the real model of the of the of your drone or almost all the variables and you can calculate Laplace transform and so on okay but for provements you can try to real an error so this is a
nested peel because we apply the payee to angular velocity but over the roof we have apply a P controller this is just for the record so this is the atropos
with a professional-grade mounting with all the staff and we say which we have to send all once we have to send we have calculated all the all the calculations we have to send to the motors the the signal so the signal is PWM pulse width modulation that it cannot be made inside the router because it's not real time we have an a specific hardware so I use a peak okay
this is the real-time scheduling from the prophets inside of the Linux box this is only for if you want to to investigate I use the basket get priority let's get library so in a policy of first inning fifth increase out okay so
there is own process by default in the lineage box that it's that they are not they are useless okay lads the Watts rogue because this is what happens if the Reuter Hanks with I'm flying my drone okay this no it makes no sense
well we see the the motors and so on and
this is how I control the drone throughout the webpage this is what my first approximation with a yacht but I I had to tweak the the way server because too much too fast idea petitions queries they are too much for the for the router so I had to tune the the web server okay
that's the remote and this is only a joystick okay it's a regular justic and I would like
to suit to say some things about Android because I was thinking about to to avoid a PC to control my drone I okay I got to put my all my stuff my pilot a stuff to a tablet okay so I have to recompile the on the wall image only for tiny and ridiculously a module of joy de puntos que oh so fuck you
and the last one was a in in a talc in Spain a guy son sent to me a Delta dedication packets to the Wi-Fi of the drone it was it was snow so funny okay so I decided to make my own protocol by Wi-Fi but I explained in the the talk before this you could do cool find it with the the period intercept or you can find in the DEF CON webpage this is the
my brave interceptor is made with chopsticks because if I if I make with a 3d printer nobody believes me that is my drone ok so and I like this seat mmm I like I like to make things with my hands ok so I decided to make a much smaller drone but the atropos because atropos can can't kill me especially when I travel with with it with the airport so I decided to to make a hand side drone this time with with our regular sensors but you can buy in Chinese dealers and so on and but there are some there are some things that they have to take into account first time it has first one that Chinese censors maybe maybe they are not documented okay maybe you can tune the filters and maybe do drone has too much vibrations if you if you look close enough look at this what do you think that that could be well there are the English term term Oh term elusively with a this this kind of pipes you can do you take - to protect wires with the solver shrink to it thank you as a as a dampening okay - absolutely - to take into account the vibrations so it was not enough and I attached 20 euro cent coin to make the sensor they were the perfect weight to absorb the vibrations okay I have to do this because I can't tweak the filters of the sensor but you can it has an advantage but sensors make all the mad stuff for me or not all but the first part okay the real estimation it's slow
but yet 40 no seriously and just hugging capabilities and the ideas start to minimum size and weight so it is based
on the big core to Linux ball I think there is the thinnest ball on the market I don't I don't know if any other this tiniest but it's like a rotor it's like a regular rule rotor but you only have the ball okay the I have no Commission for this but you you can see all the parts that's the
V Corps and the the interesting part is has four pulse width modulation output that's because I can't avoid microphone next time I go control it for my for my setup but there is a problem when you
both the debbik or only two modules or the width modulation pulse width modulation are enabled the other the other two are for what debugging okay good job so we have to disable Ewart and enable push with the other one
but I went to the forum of the beak or an Arab and rendang I asked how can a table all for pulse width modulation pins and the bigger creator as well huh this is a hard way you don't know the open wrt do you find the circle or the DDS the DTS is the deficit the pin definition of the beak or okay bTW DTS your mobile haha BTS the Raspberry Pi has a DDS it defines all the the pins are defined okay so you have to understand the beam control section and better take the so called so then you can another enable the this model and you will be a good little girl would you have mine very helpful so they this is what you need to enable
the the for people pulse width modulation output and disabled they do the d'bari in you art so we have to refine the pins but we have a pin name but an app in function this can be tricky because we have you our function and you are named
it you can see that we have the UART pins but they we with the not very word a function but the pulse width modulation function okay we really find the democracy and we have this is only
for the record the data said that you can you have to take this information and the this is mine pretending the
annoying that I'm doing and my work the power states of the interceptor drone is a it's not performing with a electronic speed controller as do so because I choose a brush a brush set motors okay Bruce motors don't doesn't need an entire electronic speed controller it's only needed one MOSFET a capacitor and a study diode why we need some kind of
stuff a part of the MOSFET that is because the motors we wing when we power the motors we are putting power power on the circuit okay but we are not powering the motors have at maximum capacity okay we are modulating more or less they kappa the the power so what happens with when we turn on and off the switch of day of the model the motor gain a generates electricity work because it spinning it it acts as a generator so we have a standard electricity flowing not as normal but we turn off the motor we have a counter electro-motive force okay that this generates put current in the secret not from from not from the battery but from from the motors it could harm the circuit so we have to suppress it with the capacitor and the Scotty diode
Feedback