Wireless Gimbal Control

Wireless Control with Computer:

The figure below shows the control schematic and illustrates the principle of wireless gimbal control, which will be discussed in this post. (Click on it for clearer picture)

The control schematic
The control schematic

Wi-Fi was chosen for this application since it has the furthest range and is an available technology on both the Glass and the Arduino. In each wireless technology there may be a range of protocols one can use to send data. The two predominant protocols in the Wi-Fi class are web-sockets and User Dene Protocol (UDP) packages. Web-sockets are generally used when package delivery is very important, a connection is made with handshakes and acknowledge packages are sent to and fro. This protocol is unnecessarily complicated to implement and it’s functionality will not be fully utilised. UDP packages are a lot simpler to implement: the package is sent on a specific port to a specific IP address. Whether or not the package arrives at its destination is unknown to the client, but packages can be sent at a high frequency to ensure delivery of data, although it might not be package-specic delivery. This functionality is good enough for gimbal control, considering the fact that the frequency at which packages are sent can be defined, and the frequency at which the Arduino microcontroller scans for packages on a specic port can also be defined.

In order to achieve wireless gimbal control, it was first necessary to test wireless control of the gimbal independent of the Google Glass. This was done using a program called SocketTest v.3.0.0 to send commands to the Arduino Mega, which then relayed those commands to the gimbal controller through its UART port. SocketTest can send or receive web-sockets or UDP strings which can be used to command the gimbal through the gimbal controller’s UART port, BasecamElectronics’ serial API library for Arduino was used for that purpose, which can be found here:

BasecamElectronics Serial API Library download: https://www.basecamelectronics.com/serialapi/

The video below shows how wireless gimbal control was tested using the SocketTest program and an Arduino with a Wi-Fi shield. Commands are sent to the Alexmos gimbal controller through its UART serial port.

Wireless Control with Google Glass:

Google Glass applications are fundamentally dierent to other Android applications because Glass has a dierent hardware structure and capabilities. Glass also has a completely dierent design philosophy, and therefore the style in which applications are written dier between Glass and a mobile phone or tablet. Glass has two dierent types of applications, immersion activities and live cards. Immersion activities are the more well-known type of applications where a user enters and exits the application, whereas live cards run in the background, for example a stop-watch. The gimbal control application written for this project is done in a immersion activity, since the user will only be using the Glass to control the gimbal and won’t be relying on multi-functionality or parallel task execution.

The primary IDE used in Android application development is Android Studio which uses Java code for the functionality and structured XML for the user interface or GUI of the application. XML code is used in dierent les to set up the menu ow of the program and denes the visual features and labels on each screen and menu item. The menu flow was based on the functional requirements of the Glass application, and is simple and intuitive to use. Each menu option in the XML code links to a functional Java code le that executes the relevant commands when selected. These commands implement the functionality on Glass to achieve the necessary results.

A screenshot of the view in the Google Glass HUD
A screenshot of the view in the Google Glass HUD

The video below shows how Google Glass controls the gimbal on its pitch and yaw axes. Unfortunately there is too much interference in the lab to use normal head movements (such as looking left and right) to control the gimbal on its yaw axis, since a sensitive magnetometer is used to get those sensor readings.

Below is a video demonstration of my wireless gimbal control project on both the yaw and pitch axes.

 

Code samples from Beginning Android Wearables by Andres Calvo were extracted and used as guidance for the development of the Glass’ user interface and functionality (Calvo, 2015).

To implement wireless control via Google Glass, code samples from Beginning Google Glass Development by Jeff Tang were extracted and used as guidance for the development of the Glass’ wireless functionality.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s