Close
0%
0%

ATROPOS: Router quadcopter

WiFi and HTML/AJAX/COMET built from scratch quadcopter.
Has it's own WiFi layer 2 protocol based on Beacon Frames against deauth. attacks.

Similar projects worth following
Atropos is based on OpenWRT La Fonera 2201 router (it also has a TP-Link router to capture commands). It is auto-stabilized by a entirely home made Inertial Measurement Unit, using Wii console sensors.
They are connected directly to the router using the LED lines. LED Lines are used as software emulated I2C ports.
Flight control is 100% from scrach and it runs on WiFi router. Motor PWM is generated with PIC16F taking the commands from router with rs232.
Atropos can be controlled via Fonera web browser. Also a custom protocol is implemented by injecting forged 802.11 Beacon Frames from pilot control. In Beacon Fram payload, all the control commands travel protected by a pre-shared key with AES128 and a sequence number.
Control hardware is also custom. A dumb usb trainer holds a tplink router inside, that translates ADC readings from joysticks, to fake beacon frames to be captured by the secondary router of the drone.

Quadcopter Atropos is the concept evolution of the rover texas Ranger. It has all the tweaks of the rover but also many other features, required to make it work. Also made with wood and paper, the only bought parts are the motors, controllers, battery and blades.


Atropos is based on OpenWRT La Fonera 2201 router. It is auto-stabilized by a entirely home made Inertial Measurement Unit, using Wii console controls.

In order to mantain minimum hardware components, attitude sensors (Wii motion plus -gyroscope- and Wii nunchuck -accelerometer-) are connected directly to the router using the LED lines. LED Lines are used as software emulated I2C ports.


Illustration 7: LEDs lines attached to I2C Wii sensors on La Fonera 2201 router

Wii nunchuck analog joystick is unmounted. This leaves available two 8-bit Analog to Digital conversors. Currently one of these is used to measure battery voltage.

Once the router has the sensors readings, it fusions them via a Director Cosine Matrix, to translate all movements, relative to aircraft, to relative to the Earth, and compensates gyroscope drift. This give us three angular velocities (one for each plane -pitch -roll -yaw ) and three absolute angles.

To command the four motors, a nested Porportional+Proportional-Integral-Derivative (P+PID) controller (connected with these values) is implemented and tuned to calculate the correct motor attitude for each moment.

To send this information to the motors, La Fonera is connected via rs232 to a PIC16F876. This micro receives the final commands and generates Pulse Width Modulation pulses, readable by Motor Electronic Speed Controllers.

-> ESC are the trifasic motor controllers

All spendable processes are uninstalled/killed on the Fonera in order to obtain maximum performance. Linux watchdog is disabled, DHCP, etc.

The whole process is performed inside the router except PIC stuff. To make the stabilization process as smooth as possible, an especial kernel-level, real-time schedule policy is issued once the program starts (SCHED_FIFO kernel policy). A SIGUSR1 is issued every 13ms to launch the whole loop process. This is to make all readings as time-sliced as possible, and make gyro integration more stable.

magnetometer is also used in order to cancel gyro drift on the yaw axis.

On t user interface side, the first attempt was to control the quadcopter entirely by key strokes and mouse movemets, via Javascript events and AJAX requests. It is theoretically possible, but it is not comfortable nor secure.

A tiny C program on a Linux Box is used to read USB joypad analog controls and send it via http requests to the router httpd server. This makes the server too busy, because requets take too much process on the server, and also could disturb main control process. To mitigate this, httpd is modified. When a control request arrives at server, it puts the GET data on a shared memory allocation and inmediatelly exits to make room for the next request.

User interface is javascript AJAX+Server PUSH based and shows several telemetry and attitude data. No plugin, program, or applet is needed for this. All controller tuning has been performed using CANVAS graphs on the same web interface.isassoc Aireplay attack mitigation

Although on the event of a wifi signal loss, Atropos autodetects it and enters in a neutral self-balanced state, this is a dangerous situation, specially if somebody is sending deauthentication packets to the legitimate control client to make a DOS attack. All of the wifi based drones are vulnerable to this attack.

To mitigate this, a redundant wifi device has been installed on the quadcopter and connected via ethernet to the Fonera (a small TPLink WR703) that it doesn't act as an Access Point nor Wifi client.

Instead of that it is in Monitor Mode, and reads all packets destinated to this device via libpcap. From the client control side, an additional Wifi adapter is used, in monitor mode too, this time injecting raw custom forged packets with the same C program...

Read more »

  • La Fonera 2201

    @TaiksonTexas08/17/2015 at 21:11 0 comments

    Fonera is gpio bitbanged with led cpu outputs. Sensors are powered with 3.3V serial rail.

  • PID is tricky...

    @TaiksonTexas08/17/2015 at 21:08 0 comments

    you can read a lot of pid tutorials but the best way to tune pitch and roll pid once you have the basic idea is to block the drone in pitch or roll plane and sense with your hand how drone acts when yu change pid params

  • Scheduling

    @TaiksonTexas08/17/2015 at 21:06 0 comments

    Reading data and calculate pid is a time dependet task. when time is removed to improve calculations you mus read in a time fixed way. in linux you can achieve this by setting signal and alert time fixed and a kernel special schedule to allow to make the process enter in cpu. this is the best way to make uniform process. faster reads can be done without this but it will not time fixed and stabilizations will be lacking

  • Some PICs from first version

    @TaiksonTexas07/08/2015 at 11:47 0 comments

    This copter is absolutely from scratch. Those pics are from campus party Spain 2012

    .

View all 4 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates