Canary Mining Drone

Project Overview

The purpose of the Canary Drone project was to create an autonomous drone to be able to map locations of gas concentrations within a mining environment. The project was inspired by the use of canary birds by miners in history to detect toxic gases, such that the bird would pass out or die before the miner alerting them of a problem and to evacuate the area.

The initial scope of the project was to create a drone capable of flying in a GPS deprived environment autonomously and capable of logging locations of gas concentrations as it went. Additionally, it would also be able to return to its location of takeoff. We realized these goals were very ambitious as building an autonomous drone from scratch in and of itself is a challenge. We reduced the scope from having the drone map the mine and return to home, to simply having a stable hovering platform that had basic obstacle avoidance and gas logging capability. This was a goal we were able to attain in the two semesters our team worked on this project and will create a solid foundation for years to come. We were able to accomplish this through the testing and use of several different hardware and software.

System Overview

Flight Control

We started the project using a BetaFlight flight controller, the board responsible for the main flight control of the aircraft and keeping it stable. BetaFlight works well for some uses, but for this project is was too focused on performance rather than a slow flying and stable craft. Part way through the project we switched to a DJI Naza M Lite flight controller for its simple use and effective control of the craft. It has far less flexibility then the BetaFlight controller, but is easy to use. By the end of the project we had realized that although the Naza works, it was still flawed by not being nearly as configurable or being as safe, lacking a dedicated arming channel. The solution we recommend to future years is to implement and learn the use of iNav, a BetaFlight fork designed for slow moving and stable aircraft flight, while still having a lot of flexibility for tuning and features that the Naza lacks.

Sensors

The sensors we started the project with were infrared time of flight sensors with a range of about 1.2m. We began working with these but early on changed to ultrasonic sensors after observing their usage on commercially available drones, affordable price, and ease of use. Ultrasonic sensors have a longer range and would have been a good option for localization, but we ran into trouble with them getting interference from the prop noise as well both not having a particularly fast update rate or poll rate for a real-time system. Because of this we moved back to the infrared time of flight sensors, however the usage of these is not well documented and we are trusting an available library for the Pi to use them. Infrared Time of Flight Distance Sensor For gas detection we selected the COZIR-5 CO2 sensor.

Computing Platform and Microcontroller

For our main computing platform, we selected the Raspberry Pi 3 running a Linux distribution. The Raspberry Pi offers multicore computing with easy access to general purpose input/output (GPIO) pins. Both flight controllers we tested use the proprietary SBUS protocol to communicate with a radio receiver. We selected a Cypress PSoC microcontroller to mimic the function of a radio receiver.

Software

All software for the Raspberry Pi was written in Python. We elected to use Python because it is a simple to run on the Raspberry Pi and there are a number of libraries available for the sensors we are using. All firmware for the Cypress was written in C.

Mass Budget

Maximizing total flight time is a critical requirement to be capable of mapping any mine of significant size. The motor and propeller combination we are using lists peak power efficiency at a total system mass of around one kilogram.

Safety

Safety is paramount when designing any autonomous vehicle. To avoid injury or property damage while testing and operating the drone, several precautions were implemented including:

  • Wireless remote to instantaneously kill all functions
  • Software to limit maximum throttle values
  • Current-limiting fuse to avoid runaway throttle due to software bugs
  • Propeller guards
  • Start up sequence

Safety protocols and personal protective equipment were used to help keep people and property safe during testing.

For proof-of-concept gas concentration monitoring we choose to detect CO2 because it is relatively safe to work with compared to the harmful gases this project is intended to detect.

Results

Altitude (top), Throttle (middle), C02 detected (bottom)
Distance from Object (top), Pitch (bottom)