Trash Drone Router Platform has two robots at this moment. 

********************SEE PAPER LINK FOR PICS (To fix)

Rover “Texas Ranger”

I will present firstly the rover “Texas Ranger” as a first proof of concept of the platform, in order to understand all the knowledge to bring all to the next level, and present the quadcopter.





Texas ranger is a differential traction vehicle made from wood pieces and plastic toy wheels.
It has a 2-degree-of-freedom turret mounted on top, that holds an ip camera, a laser pointer and, two PVC automatic cannons, made with two cheap gun toys mounted backwards and drived by two MOSFET. Turrent is 1-degree-of-freedom self-compensated inclination, measured by Wii nunchuck.






The vehicle is operated with a Linksys WRT54G, OpenWRT loaded. The router is connected via ethernet to the IP Camera and via serie to a home made board with two 16F876 PICs. The board controls motors for differential traction, Wii nunchuck reading and turret self-compensation is calculated on PIC and notified to router via RS232.




Laser ponter is used to project the dot in landscape, in order to estimate the distance to targeted object, via triangulation. A C program, executed in the router, downloads every frame from ip camera, decompress the JPEG stream using libjpeg, and finds the most brighness dot inside a pre-defined region of the image.
Assuming that this is the laser dot, and calculating the amount of pixels from the dot to the image border, estimating the real distance to target, and showing it in the web page.



Remote control works as an another URL of the router web configuration. User send commands as the same way as he would play Quake or CS, by 'w', 'a', 's', 'd' keystrokes, and mouse movements and click for turrent movement, canon shooting and distance measurement.



Every user command is sent via AJAX request, that calls a CGI, that sends a command via serial, that is interpreted by PIC, and activate servos, motors, laser, cannons as requested. Status of entire system is returned by the same way, and represented via another request. This request is a COMET (SERVER PUSH) request in order to make faster and smoother user interface. To make graphics I used HTML5 CANVAS object.



Demo includes a short movement, turret shooting, laser measurement, and self-compensation demo.






Quadrocopter “ATROPOS”

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.



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.






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.



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



On the 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.