The Beaglebone runs the Node.js server (quadServer.js) which handles setting up the web server and deals with the necessary requests. The client connects to the correct port (in our case 1337) on the Beaglebone, and is redirected to 192.168.x.x:1337/quadServer.html, which appears on the client's web server. This page is serviced by mpu.js, which communicates with quadServer.js via socket.io, a message passing protocol. The client connects to the server by sending a start message which the server responds to by sending back all six axes of data (X,Y,Z for both acceleration and rotation) in an array. Back on the client side, the client parses the data and packages it up correctly to display it using the [http://www.flotcharts.org/ flot] package.

The Beaglebone runs the Node.js server (quadServer.js) which handles setting up the web server and deals with the necessary requests. The client connects to the correct port (in our case 1337) on the Beaglebone, and is redirected to 192.168.x.x:1337/quadServer.html, which appears on the client's web server. This page is serviced by mpu.js, which communicates with quadServer.js via socket.io, a message passing protocol. The client connects to the server by sending a start message which the server responds to by sending back all six axes of data (X,Y,Z for both acceleration and rotation) in an array. Back on the client side, the client parses the data and packages it up correctly to display it using the [http://www.flotcharts.org/ flot] package.

Executive Summary

This project is designed to support the ongoing work of the ROBO 4XX quadcopter teams by creating and documenting a web service hosted on the BBB that allows for telemetry from the quadcopter over WiFi (USB Dongle). We have created a simple web server that pulls data from an Inertial Measurement Unit (IMU) and display it to the user controlling the quadcopter. Additionally, we plot the data in real time (since raw values and constantly changing acceleration and rotational velocity don't really have much meaning) for users to observe time varying changes in those values to get a more visceral sense of what is happening on the quadcopter.

Packaging

The hardware for this project consists of a WiFi USB dongle and an I2C IMU (MPU 6050). Additionally, we used a LiPo battery and a brushless motor ESC with 5V 1A BEC to provide complete wireless freedom, though this can be accomplished using any other choice of battery, or just through the 5V wall socket. Because of the simplicity of the wiring (a single I2C bus), we laid everything out on the provided breadboard.

Necessary Hardware

Necessary Software

Additional software (including instructions for installation) are located below.

Installation Instructions

In order to use the UWNx00 wifi dongle (one of the latter two), you can follow the instructions here. Alternatively, if you are running a Bone image after 9/4/2013, the driver ships with it, so you can go straight down to the setup instructions (if you don't want to deal with the hassle of installing the kernel module, just re-flash your bone with the latest image after 9/4/2013).

In order to use the MPU6050, the following packages must be installed:

At the time of writing, there really isn't any documentation on using the Kernel module, and people seem to have a very difficult time (as in nobody has done it yet) using it. We are also not using the kernel module.

User Instructions

User connects both the host and the beaglebone to the same wireless network. See wifi installation instructions for how to set this up on the Beaglebone.

User starts the server on the beaglebone. Alternatively, the user can use systemd to start the server on startup (see EBC systemd).

beaglebone$ node quadServer.js

User navigates to port 1337 at the IP address of the beaglebone in their browser of choice.

Highlights

Note: the beaglebone was connected to a cell phone's wireless connection which was then going out to the wider Internet. If both the client and beaglebone were connected to the same access point the response would be better.

Summary of Operation

The Beaglebone runs the Node.js server (quadServer.js) which handles setting up the web server and deals with the necessary requests. The client connects to the correct port (in our case 1337) on the Beaglebone, and is redirected to 192.168.x.x:1337/quadServer.html, which appears on the client's web server. This page is serviced by mpu.js, which communicates with quadServer.js via socket.io, a message passing protocol. The client connects to the server by sending a start message which the server responds to by sending back all six axes of data (X,Y,Z for both acceleration and rotation) in an array. Back on the client side, the client parses the data and packages it up correctly to display it using the flot package.

Work Breakdown

Major Tasks

Research, select, and purchase WiFi dongle. (Mike)

Interface with WiFi dongle. (Mike)

Research MPU6050 operation and registers. (Matt)

Test MPU6050. (Matt)

Build web server using node. (Mike)

Add real-time plotting using flot. (Matt)

Unfinished Business

None!

Conclusions

A few thoughts in conclusion. First off, we realized very quickly that outputting raw data would serve little purpose, and even outputting data with g scaled values would not provide users with the correct prospective. We then settled on plotting the data in real time, which turned out to be a huge success with actually fairly little overhead. I would also like to tackle the issue of connecting to Rose WiFi, since we used a cellular hotspot for our wireless connection (though it could use any "simple" wireless access point).

In terms of improvements, we see several areas. We would like to see us connecting to the Beaglebone over a cell phone and seeing how it appears (it may require some UI work in order to scale it properly). Additionally, the ability to have a 3D visualization of our object represented would give an even better "feel" (better than the plots) of how our quadcopter is moving in real time.