SlideShare a Scribd company logo
Using Commercial Off-The-Shelf (COTS) Radio Control
Products and Microcontrollers to Develop & Test Small
Unmanned Aerial Systems In an Indoor Flight Lab
1
Gabriel Staples, 1 Lt. United States Air Force
Aeronautical Research Engineer/SUAS Integration Engineer
Small Unmanned Aerial Systems Laboratory (SUASLab)
Air Force Research Laboratory, AFRL/RQVA
Wright-Patterson Air Force Base, OH
26 Feb. 2014
The views expressed in this presentation are those of the author and do not reflect the official policy
or position of the United States Air Force, Department of Defense, or the United States Government.
DISTRIBUTION STATEMENT A. Approved for public
release; distribution is unlimited.
These slides are from a briefing which was given
on 27 March 2014 to the Air Force Research
Laboratory’s Aerospace Systems Directorate
(AFRL/RQ) Junior Force Council (JFC), as part of a
“Lunch and Learn” “Present Your Project”
initiative.
2
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
Purpose
1. To educate and inspire you, my fellow officers
& engineers, to expand your skills and use
technical solutions, such as Arduino
microcontroller boards, to solve your
technical challenges.
2. To remind you that education doesn’t just
happen in school, and that learning &
research doesn’t just happen at work.
3. To share what gets me excited to come to
work everyday.
3
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
My Maxims
• “Every engineer a programmer”
• "It should be the end goal of any professional to reach
such a high level of skill at what you do that you are no
longer limited by your abilities; but rather, you are
limited only by your imagination.“
• “Be a thinker, and be a doer.”
References: first two quotes are my own
(see: http://electricrcaircraftguy.blogspot.com/2014/02/the-goal-of-a-lifetime.html),
the third one is from Destin from his "Smarter Every Day" series on YouTube.
4
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
What is an Arduino microcontroller
(mcu)?
Mcu’s In General:
• A chip with integrated
processor, peripherals,
UART, RAM, EEPROM, Flash
memory, etc.
Arduino specifically:
• An open source development board that uses
(usu.) an Atmel ATmega microcontroller
• Open source hardware
• Open source software
• Hundreds of open-source libraries
• Hundreds of thousands of users, including
professionals and hobbyists
• Fantastic documentation, support, & tutorials
• Designed for ease of programming, with the
non-engineer in mind
• Programs are called “sketches,” meant to be a
way to introduce artists to programming.
• Cost of only $3.50~$150 per board (~$30 avg.)
• This is a HUGE cost savings, as other systems
I’ve seen are not open source, and are
$75~$100 to get started.
5
See http://en.wikipedia.org/wiki/Arduino for more info.DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
Sample Code
6
-Based on C/C++, with a basic
Arduino core library meant to be
easy to understand and use.
-Yet you still have the ability to
use all of the AVR-libc functions
and access the basic, low-level
Atmel microcontroller registers,
variables, timers, functions,
input capture, output compares,
etc.
-Simple, one-click compile and
upload button—no additional
programmer required – Arduino
plugs straight into your
computer via a USB cable, and
communicates via serial.
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
The Arduino Models
(see arduino.cc  Products)
• MANY Arduino, or Arduino-compatible boards are available,
but here are just a few of the primary ones I use:
7
Uno
Ethernet
Nano
(my
personal
favorite)
Micro
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
The Ardupilot
• Open source, Arduino-compatible
• Basically is an Arduino Mega 2560 w/integrated sensors & IMU
(Inertial Measurement Unit), barometric pressure sensor/altimeter,
etc.
• VERY Low cost, ~$250, as compared to similar commercial UAS
autopilots which cost $5k~$15k.
• More info at ardupilot.com
• Purchase at 3drobotics.com or hobbyking.com
8
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
What Can Arduino Do?
What Can Arduino NOT Do?
• In short: IT CAN DO ANYTHING (almost).
• It is limited only by (in this order):
– #1 your imagination
– #2 your ingenuity and skill
– #3 its processing speed, memory, and hardware capabilities
• This is nearly always the least important of them all, but if you want to do
something more processor-intensive, such as visual image processing, look into
using something more powerful like the Raspberry Pi with the OpenCV (Open
Source Computer Vision) Library, Open TLD, or Predator, for instance.
9
Dr. Zdenek Kalal’s (from the Czech Republic) Open
TLD algorithm demonstrating facial Tracking,
Learning, & Detection.
Raspberry Pi with 512MB RAM, as shown on the sales page
at Adafruit.com – runs a light version of the Linux OS – can
do real-time vision processing, if required, on a UAV.
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
Where are microcontrollers used now?
-based on my understanding
• Digital microwaves, ovens, toasters
• Digital blenders
• Automobile fuel injection (this is your car’s “computer”)
• Radio Control Devices
– Tx/Rx, ESC
• Printers, phones
• Some watches
• “smart” clothing (GPS-guided backpacks, blinking ties,
shoes, shirts, etc.)
• TV remotes
• Satellites, robots, calculators, etc.
• Pretty much anything with a digital display…
10
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
Get Involved with Arduino--Use it In Your Research:
Lab Use Examples
• Read in analog and digital voltages
– Ex: all sorts of sensors, buttons, potentiometers (scroll wheels/knobs), etc.
• Write out analog and digital voltages (analog is done via PWM)
• Controls, interfaces, & displays, incl. touch screens
• Display information on LCD displays, Nokia cell phone TFT displays
• Commutate/control DC and AC motors, servos
• Transmit wireless information (such as for datalogging, telemetry, wireless
coms, etc)
• Communicate with MATLAB or FreeMat via a USB cable and serial
communication
• Talk over Ethernet cables or internet WiFi
• I2C (2-wire), Serial, & SPI communication protocols; IR-communication;
Dallas 1-Wire
• Act as a web server
– Display info. on your laptop in a browser
– Receive commands from your laptop via a web browser
11
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
Get Involved with Arduino--Use it In Your Research:
Lab Use Examples (continued)
• Detect/sense pressure, altitude, temperature, humidity, GPS coordinates,
capacitance, liquid levels, soil moisture levels, human touch, light, color,
whatever…just find the right sensor or use your own ingenuity to make a sensor!
• Datalogging and instrumentation (replace a $4500 LabVIEW License and DAQ with a
$35 Arduino, for instance)
– Log directly to a file on your PC, via a USB serial connection from Arduino to
MATLAB/FreeMat, Processing, MegunoLink, MakerPlot, Java, Python, etc.
• Commerical licenses for MegunoLink/MakerPlot are on the order of $40~$90 per computer
– Live data plotting using any of the above
• Controls/Run control & regulation algorithms
• Fly an airplane or SUAS (ex: Ardupilot)
– Read and Write Radio Control PWM and PPM signals
– Read brushless motor pulses to calculate motor RPMs
• Robotics: virtually all robots use microcontrollers somewhere, though some rely on
more powerful microprocessors
• Power control – turn AC or DC circuits on and off via transistors/relays
• Open & close programs on your computer, by directly emulating a mouse/keyboard
--very useful lab applications: remotely control computer processes & applications
12
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
More on datalogging w/Arduino
• Arduino has max analogRead of 10kHz. Max
digitalRead is much faster.
• If using serial to send the data to a PC, you are
limited to a baud-rate of 115200. In my Arduino
to MATLAB code, I can send 9x 4-byte floating
point values at a rate of ~310Hz in either
direction.
• If using an Arduino Ethernet and UDP packets,
rather than serial, this rate could be MUCH
higher.
13
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
What is a Small Unmanned Aerial
System (SUAS)?
• Includes:
– UAV (Unmanned Aerial Vehicle)
– GCS (Ground Control Station)
– Sensors, communication/telemetry, GNC
(Guidance, Navigation, & Control) algorithms, etc.
14
Vicon Flight Lab
Laptop, Arduino Nano,
& Turnigy 9XR Radio
Fearless Foamie FF5000
(left) & ARDrone (right)
Arducopter
Fearless Foamie, “FF5000”
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
Vicon Motion Capture System: like an indoor, sub-
millimeter*-precision GPS system & 10-DOF** IMU
(Inertial Measurement Unit) all in one!
15
*Vicon precision in our lab is <0.1mm
**Note: to get on-board a vehicle, what Vicon can provide off-board, you’d need a GPS and 10-Degree-
of-Freedom IMU, which would entail a 3-axis gyro, 3-axis accelerometer, 3-axis magnetometer,
barometric pressure sensor, & temp. sensor.
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
Key Interfaces – Arduino/MATLAB PPM
Reader (reading PPM signal from RC Radio)
16
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
Key Interfaces – ex: Arduino/MATLAB
PPM Reader from RC Radio
17
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
Arduino/MATLAB PPM
Reader Demo
18
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
Key Interfaces – PIC-brand microcontroller, creating PPM signal
to go to the trainer port on an RC Radio – allows autonomous control
of a standard RC vehicle, by means of a computer flight controller algorithm
which flies the airplane!
19
JR/Spektrum
trainer in (PPM
in) on Turnigy
9XR Radio
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
20
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
My MATLAB Flight Controller GUI
-for Arducopter; incomplete at this time;
at the moment, this is an altitude controller only
21
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
My MATLAB Flight Controller for
Arducopter
1. Already done:
1. Altitude Controller (PID Feedback only)
2. Still Need to be implemented for full flight controller:
1. Heading Controller (PID Feedback only)
2. Pitch/Roll Controller (Physics-based Feed-Forward [I command
angles directly, via Ardupilot autopilot], w/passive position feedback
only)
3. Additional improvements thereafter:
1. Alt. Feed-Forward (veh. tilt angle  throttle)
2. Pitch/Roll PID Feedback on angles, to remove angle bias directly, and
vehicle position error indirectly.
22
Note: All inner loops & vehicle stabilization is automatically handled by the
Arducopter autopilot on-board, thereby making point 2.2. above possible, as roll
and pitch angles can be commanded directly with no external feedback loops,
since that is taken care of on-board.
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
Physics-based Modeling & Simulation, to check path-following ability using
my navigation algorithm, given vehicle thrust constraints
– Optional: live simulation demo
23
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
Video Demonstrations
1. Dr. Mark Mears’s FF5000
Perching
2. Dr. Rich Roberts’s FF5000
flight controller
3. Dr. Rich Roberts’s RC truck
controller
24
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
• Note: the ARDrone, off-the-shelf, already has on-board
WiFi capability, and is controlled via a standard smart
phone or tablet---we are currently hacking their control
system.
• But what about standard off-the-shelf RC vehicles?
Possible Solutions for multi-vehicle control, and in-house telemetry:
• Wireless WiFi router on ground, w/Arduino WiFi boards on
vehicles; 1 router  many vehicles
• Flutter Wireless
• Spark Core (Arduino-compatible WiFi)
• Xbee/Zigbee radios
• RF24 transceivers (my preferred choice) w/Arduino
25
Problem: only one vehicle per RC Radio Tx
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
What Next? Telemetry, and multivehicle
control— we need coms: Inexpensive 2.4GHz Wireless
Transceiver - Nordic Semiconductor nRF24L01+
• Up to 2Mbps data transfer, broadcast out; Rx
from up to 6 other devices at once; 128
2.4GHz channels—can be made to be spread-
spectrum/frequency hopping if you write your
own custom algorithm
• Short range: 100m-range version is as little as
$1.50 OR LESS, w/FREE shipping, on Ebay,
brand-new
• Long range: 1km range, ~$18; (ex:
http://yourduino.com/sunshop2/index.php?l=product_detail&p=190)
26
More info:
http://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo
http://maniacbug.github.io/RF24/
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
Telemetry - Sensors
1) Collect the data using Arduino
2) Send the data to the ground using an nRF24L01+ connected to the Arduino
Sensor Data to Collect:
• Aircraft battery voltage – easy, use voltage divider and an analog input on the Arduino
• Current – a little harder, use low-ohm resistor (possibly with an op-amp), and an analog input
on the Arduino
• Motor RPMs – much harder, but I’ve already solved it – use voltage divider and digital inputs
on Arduino
27
Motor pulses (voltage across 1 motor lead & battery ground)
Low throttle setting Mid-throttle settingHigh-freq signal = throttle PWMing @ 8kHz,
low-freq signal = commutation pulses
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
28
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
You could even…
• Get rid of the off-board controller (MATLAB in our
case) altogether
– Have the Arduino nano process the flight path on-
board
– Just send the Truth Sever Data (vehicle state, as
determined by Vicon) to the vehicle, and the Arduino
does the rest
• Add on-board sensors, optical flow, computer
vision
– may require upgrade from 16 MHz Arduino Nano to
84 MHz Arduino Due, 400 MHz Arduino Galileo, or
700 MHz Raspberry Pi, etc.
29
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
Contacts & Resources
• Gabriel Staples, AFRL/RQVA – gabriel.staples.1@us.af.mil
• Learn More: http://electricrcaircraftguy.blogspot.com/2014/01/the-power-of-
arduino.html --lots of general info. & many great, additional links here
• Tutorials & Help:
– http://arduino.cc/
•  Reference
•  Products
•  Learning – Examples
•  Learning – Playground
•  Support – Forum
– http://learn.adafruit.com/category/learn-arduino - ADAFRUIT IS A TREMENDOUSLY VALUABLE
RESOURCE FOR THE BEGINNER TO ARDUINO….ESPECIALLY TO THOSE NOT WELL-VERSED IN
ELECTRONICS, PROGRAMMING, AND ELECTRICAL ENGINEERING.
– https://www.sparkfun.com/
• Where to Purchase:
– Personal:
• Amazon (fastest), Ebay (cheapest), Adafruit and SparkFun (best tutorials, code, & support), or the below sites
– Work/Other:
• http://www.adafruit.com/
• https://www.sparkfun.com/
• Amazon.com
• Digikey
• Mouser 30
DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.

More Related Content

PPSX
Blind stick module.
PPTX
Arduino Robotics workshop day2
PDF
Smart Blind Walking Stick Using Arduino
PPTX
Smart Blind stick by using arduino uno and sensor
PPTX
Getting started with arduino workshop
PPTX
Smart walking Stick for blinds
PPTX
Using arduino and raspberry pi for internet of things
PPTX
Arduino Blind Aid
Blind stick module.
Arduino Robotics workshop day2
Smart Blind Walking Stick Using Arduino
Smart Blind stick by using arduino uno and sensor
Getting started with arduino workshop
Smart walking Stick for blinds
Using arduino and raspberry pi for internet of things
Arduino Blind Aid

What's hot (17)

PDF
Physical Computing and IoT
PPTX
PPT ON Arduino
PDF
Instruction Manual | Flir Scout III Thermal Monoculars | Optics Trade
PDF
Computer mouse.pptx
DOC
High sensitive blind stick
PPTX
Arduino Information by Arpit Sharma
PPTX
Lets make robots
PPTX
Occupancy sensors
PDF
The-Digitalization-of-the-Walking-Stick-for-the-Blind
PPTX
Google Glass Breakdown
PPTX
Landslide Detection using Arduino
PPTX
PDF
Radar system using arduino
PPT
Mse%204001%20 Wireless%20 Optical%20 Mouse
PDF
Microcontrollers (Rex St. John)
PDF
Report on arduino
PDF
American Fibertek RT944C Data Sheet
Physical Computing and IoT
PPT ON Arduino
Instruction Manual | Flir Scout III Thermal Monoculars | Optics Trade
Computer mouse.pptx
High sensitive blind stick
Arduino Information by Arpit Sharma
Lets make robots
Occupancy sensors
The-Digitalization-of-the-Walking-Stick-for-the-Blind
Google Glass Breakdown
Landslide Detection using Arduino
Radar system using arduino
Mse%204001%20 Wireless%20 Optical%20 Mouse
Microcontrollers (Rex St. John)
Report on arduino
American Fibertek RT944C Data Sheet
Ad

Viewers also liked (6)

PPTX
My arduino presentation
PDF
Arduino presentation
PPT
Arduino presentation by_warishusain
ODP
Arduino Presentation
PPT
Intro to Arduino
PDF
Arduino Lecture 1 - Introducing the Arduino
My arduino presentation
Arduino presentation
Arduino presentation by_warishusain
Arduino Presentation
Intro to Arduino
Arduino Lecture 1 - Introducing the Arduino
Ad

Similar to SUAS & Arduino Presentation - Staples - 20140403 - CLEARED (20)

PPTX
embedded_in_Arduino_with_basic_embedded.pptx
PDF
Mindstorms Arduino En Phidgets
PDF
Mindstorms Arduino En Phidgets
PDF
Copy of Pratikraj Shinde Seminar Presentation on Enggnew.pptx_20240711_2236_2...
PDF
Copy of Pratikraj Shinde Seminar Presentation on Enggnew.pptx_20240711_2236_2...
PPT
Autonomous robotics based on simple sensor inputs.
PPTX
PIR sensing with arduino
PPTX
introduction of arduino and node mcu
PDF
slide_rftrack_22082015
PPTX
Arduino study and applications in IT.pptx
PPT
Introducttion to robotics and microcontrollers
PPTX
Robotics and microcontroller (Introduction to Arduino)
PDF
Introduction of Arduino Uno
PDF
Prototyping Embedded Devices_Internet of Things
PDF
SKAD Electronics Training Manual.pdf
PPTX
Anam rajkumar sarvesh k10779,k10626
PPTX
Anam rajkumar sarvesh
PPTX
Introduction to Arduino
PPTX
Introduction to basic Arduino Gr 12 Computer Engineering
PPTX
arduino introduction for vocational students
embedded_in_Arduino_with_basic_embedded.pptx
Mindstorms Arduino En Phidgets
Mindstorms Arduino En Phidgets
Copy of Pratikraj Shinde Seminar Presentation on Enggnew.pptx_20240711_2236_2...
Copy of Pratikraj Shinde Seminar Presentation on Enggnew.pptx_20240711_2236_2...
Autonomous robotics based on simple sensor inputs.
PIR sensing with arduino
introduction of arduino and node mcu
slide_rftrack_22082015
Arduino study and applications in IT.pptx
Introducttion to robotics and microcontrollers
Robotics and microcontroller (Introduction to Arduino)
Introduction of Arduino Uno
Prototyping Embedded Devices_Internet of Things
SKAD Electronics Training Manual.pdf
Anam rajkumar sarvesh k10779,k10626
Anam rajkumar sarvesh
Introduction to Arduino
Introduction to basic Arduino Gr 12 Computer Engineering
arduino introduction for vocational students

SUAS & Arduino Presentation - Staples - 20140403 - CLEARED

  • 1. Using Commercial Off-The-Shelf (COTS) Radio Control Products and Microcontrollers to Develop & Test Small Unmanned Aerial Systems In an Indoor Flight Lab 1 Gabriel Staples, 1 Lt. United States Air Force Aeronautical Research Engineer/SUAS Integration Engineer Small Unmanned Aerial Systems Laboratory (SUASLab) Air Force Research Laboratory, AFRL/RQVA Wright-Patterson Air Force Base, OH 26 Feb. 2014 The views expressed in this presentation are those of the author and do not reflect the official policy or position of the United States Air Force, Department of Defense, or the United States Government. DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 2. These slides are from a briefing which was given on 27 March 2014 to the Air Force Research Laboratory’s Aerospace Systems Directorate (AFRL/RQ) Junior Force Council (JFC), as part of a “Lunch and Learn” “Present Your Project” initiative. 2 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 3. Purpose 1. To educate and inspire you, my fellow officers & engineers, to expand your skills and use technical solutions, such as Arduino microcontroller boards, to solve your technical challenges. 2. To remind you that education doesn’t just happen in school, and that learning & research doesn’t just happen at work. 3. To share what gets me excited to come to work everyday. 3 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 4. My Maxims • “Every engineer a programmer” • "It should be the end goal of any professional to reach such a high level of skill at what you do that you are no longer limited by your abilities; but rather, you are limited only by your imagination.“ • “Be a thinker, and be a doer.” References: first two quotes are my own (see: http://electricrcaircraftguy.blogspot.com/2014/02/the-goal-of-a-lifetime.html), the third one is from Destin from his "Smarter Every Day" series on YouTube. 4 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 5. What is an Arduino microcontroller (mcu)? Mcu’s In General: • A chip with integrated processor, peripherals, UART, RAM, EEPROM, Flash memory, etc. Arduino specifically: • An open source development board that uses (usu.) an Atmel ATmega microcontroller • Open source hardware • Open source software • Hundreds of open-source libraries • Hundreds of thousands of users, including professionals and hobbyists • Fantastic documentation, support, & tutorials • Designed for ease of programming, with the non-engineer in mind • Programs are called “sketches,” meant to be a way to introduce artists to programming. • Cost of only $3.50~$150 per board (~$30 avg.) • This is a HUGE cost savings, as other systems I’ve seen are not open source, and are $75~$100 to get started. 5 See http://en.wikipedia.org/wiki/Arduino for more info.DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 6. Sample Code 6 -Based on C/C++, with a basic Arduino core library meant to be easy to understand and use. -Yet you still have the ability to use all of the AVR-libc functions and access the basic, low-level Atmel microcontroller registers, variables, timers, functions, input capture, output compares, etc. -Simple, one-click compile and upload button—no additional programmer required – Arduino plugs straight into your computer via a USB cable, and communicates via serial. DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 7. The Arduino Models (see arduino.cc  Products) • MANY Arduino, or Arduino-compatible boards are available, but here are just a few of the primary ones I use: 7 Uno Ethernet Nano (my personal favorite) Micro DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 8. The Ardupilot • Open source, Arduino-compatible • Basically is an Arduino Mega 2560 w/integrated sensors & IMU (Inertial Measurement Unit), barometric pressure sensor/altimeter, etc. • VERY Low cost, ~$250, as compared to similar commercial UAS autopilots which cost $5k~$15k. • More info at ardupilot.com • Purchase at 3drobotics.com or hobbyking.com 8 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 9. What Can Arduino Do? What Can Arduino NOT Do? • In short: IT CAN DO ANYTHING (almost). • It is limited only by (in this order): – #1 your imagination – #2 your ingenuity and skill – #3 its processing speed, memory, and hardware capabilities • This is nearly always the least important of them all, but if you want to do something more processor-intensive, such as visual image processing, look into using something more powerful like the Raspberry Pi with the OpenCV (Open Source Computer Vision) Library, Open TLD, or Predator, for instance. 9 Dr. Zdenek Kalal’s (from the Czech Republic) Open TLD algorithm demonstrating facial Tracking, Learning, & Detection. Raspberry Pi with 512MB RAM, as shown on the sales page at Adafruit.com – runs a light version of the Linux OS – can do real-time vision processing, if required, on a UAV. DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 10. Where are microcontrollers used now? -based on my understanding • Digital microwaves, ovens, toasters • Digital blenders • Automobile fuel injection (this is your car’s “computer”) • Radio Control Devices – Tx/Rx, ESC • Printers, phones • Some watches • “smart” clothing (GPS-guided backpacks, blinking ties, shoes, shirts, etc.) • TV remotes • Satellites, robots, calculators, etc. • Pretty much anything with a digital display… 10 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 11. Get Involved with Arduino--Use it In Your Research: Lab Use Examples • Read in analog and digital voltages – Ex: all sorts of sensors, buttons, potentiometers (scroll wheels/knobs), etc. • Write out analog and digital voltages (analog is done via PWM) • Controls, interfaces, & displays, incl. touch screens • Display information on LCD displays, Nokia cell phone TFT displays • Commutate/control DC and AC motors, servos • Transmit wireless information (such as for datalogging, telemetry, wireless coms, etc) • Communicate with MATLAB or FreeMat via a USB cable and serial communication • Talk over Ethernet cables or internet WiFi • I2C (2-wire), Serial, & SPI communication protocols; IR-communication; Dallas 1-Wire • Act as a web server – Display info. on your laptop in a browser – Receive commands from your laptop via a web browser 11 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 12. Get Involved with Arduino--Use it In Your Research: Lab Use Examples (continued) • Detect/sense pressure, altitude, temperature, humidity, GPS coordinates, capacitance, liquid levels, soil moisture levels, human touch, light, color, whatever…just find the right sensor or use your own ingenuity to make a sensor! • Datalogging and instrumentation (replace a $4500 LabVIEW License and DAQ with a $35 Arduino, for instance) – Log directly to a file on your PC, via a USB serial connection from Arduino to MATLAB/FreeMat, Processing, MegunoLink, MakerPlot, Java, Python, etc. • Commerical licenses for MegunoLink/MakerPlot are on the order of $40~$90 per computer – Live data plotting using any of the above • Controls/Run control & regulation algorithms • Fly an airplane or SUAS (ex: Ardupilot) – Read and Write Radio Control PWM and PPM signals – Read brushless motor pulses to calculate motor RPMs • Robotics: virtually all robots use microcontrollers somewhere, though some rely on more powerful microprocessors • Power control – turn AC or DC circuits on and off via transistors/relays • Open & close programs on your computer, by directly emulating a mouse/keyboard --very useful lab applications: remotely control computer processes & applications 12 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 13. More on datalogging w/Arduino • Arduino has max analogRead of 10kHz. Max digitalRead is much faster. • If using serial to send the data to a PC, you are limited to a baud-rate of 115200. In my Arduino to MATLAB code, I can send 9x 4-byte floating point values at a rate of ~310Hz in either direction. • If using an Arduino Ethernet and UDP packets, rather than serial, this rate could be MUCH higher. 13 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 14. What is a Small Unmanned Aerial System (SUAS)? • Includes: – UAV (Unmanned Aerial Vehicle) – GCS (Ground Control Station) – Sensors, communication/telemetry, GNC (Guidance, Navigation, & Control) algorithms, etc. 14 Vicon Flight Lab Laptop, Arduino Nano, & Turnigy 9XR Radio Fearless Foamie FF5000 (left) & ARDrone (right) Arducopter Fearless Foamie, “FF5000” DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 15. Vicon Motion Capture System: like an indoor, sub- millimeter*-precision GPS system & 10-DOF** IMU (Inertial Measurement Unit) all in one! 15 *Vicon precision in our lab is <0.1mm **Note: to get on-board a vehicle, what Vicon can provide off-board, you’d need a GPS and 10-Degree- of-Freedom IMU, which would entail a 3-axis gyro, 3-axis accelerometer, 3-axis magnetometer, barometric pressure sensor, & temp. sensor. DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 16. Key Interfaces – Arduino/MATLAB PPM Reader (reading PPM signal from RC Radio) 16 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 17. Key Interfaces – ex: Arduino/MATLAB PPM Reader from RC Radio 17 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 18. Arduino/MATLAB PPM Reader Demo 18 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 19. Key Interfaces – PIC-brand microcontroller, creating PPM signal to go to the trainer port on an RC Radio – allows autonomous control of a standard RC vehicle, by means of a computer flight controller algorithm which flies the airplane! 19 JR/Spektrum trainer in (PPM in) on Turnigy 9XR Radio DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 20. 20 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 21. My MATLAB Flight Controller GUI -for Arducopter; incomplete at this time; at the moment, this is an altitude controller only 21 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 22. My MATLAB Flight Controller for Arducopter 1. Already done: 1. Altitude Controller (PID Feedback only) 2. Still Need to be implemented for full flight controller: 1. Heading Controller (PID Feedback only) 2. Pitch/Roll Controller (Physics-based Feed-Forward [I command angles directly, via Ardupilot autopilot], w/passive position feedback only) 3. Additional improvements thereafter: 1. Alt. Feed-Forward (veh. tilt angle  throttle) 2. Pitch/Roll PID Feedback on angles, to remove angle bias directly, and vehicle position error indirectly. 22 Note: All inner loops & vehicle stabilization is automatically handled by the Arducopter autopilot on-board, thereby making point 2.2. above possible, as roll and pitch angles can be commanded directly with no external feedback loops, since that is taken care of on-board. DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 23. Physics-based Modeling & Simulation, to check path-following ability using my navigation algorithm, given vehicle thrust constraints – Optional: live simulation demo 23 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 24. Video Demonstrations 1. Dr. Mark Mears’s FF5000 Perching 2. Dr. Rich Roberts’s FF5000 flight controller 3. Dr. Rich Roberts’s RC truck controller 24 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 25. • Note: the ARDrone, off-the-shelf, already has on-board WiFi capability, and is controlled via a standard smart phone or tablet---we are currently hacking their control system. • But what about standard off-the-shelf RC vehicles? Possible Solutions for multi-vehicle control, and in-house telemetry: • Wireless WiFi router on ground, w/Arduino WiFi boards on vehicles; 1 router  many vehicles • Flutter Wireless • Spark Core (Arduino-compatible WiFi) • Xbee/Zigbee radios • RF24 transceivers (my preferred choice) w/Arduino 25 Problem: only one vehicle per RC Radio Tx DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 26. What Next? Telemetry, and multivehicle control— we need coms: Inexpensive 2.4GHz Wireless Transceiver - Nordic Semiconductor nRF24L01+ • Up to 2Mbps data transfer, broadcast out; Rx from up to 6 other devices at once; 128 2.4GHz channels—can be made to be spread- spectrum/frequency hopping if you write your own custom algorithm • Short range: 100m-range version is as little as $1.50 OR LESS, w/FREE shipping, on Ebay, brand-new • Long range: 1km range, ~$18; (ex: http://yourduino.com/sunshop2/index.php?l=product_detail&p=190) 26 More info: http://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo http://maniacbug.github.io/RF24/ DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 27. Telemetry - Sensors 1) Collect the data using Arduino 2) Send the data to the ground using an nRF24L01+ connected to the Arduino Sensor Data to Collect: • Aircraft battery voltage – easy, use voltage divider and an analog input on the Arduino • Current – a little harder, use low-ohm resistor (possibly with an op-amp), and an analog input on the Arduino • Motor RPMs – much harder, but I’ve already solved it – use voltage divider and digital inputs on Arduino 27 Motor pulses (voltage across 1 motor lead & battery ground) Low throttle setting Mid-throttle settingHigh-freq signal = throttle PWMing @ 8kHz, low-freq signal = commutation pulses DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 28. 28 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 29. You could even… • Get rid of the off-board controller (MATLAB in our case) altogether – Have the Arduino nano process the flight path on- board – Just send the Truth Sever Data (vehicle state, as determined by Vicon) to the vehicle, and the Arduino does the rest • Add on-board sensors, optical flow, computer vision – may require upgrade from 16 MHz Arduino Nano to 84 MHz Arduino Due, 400 MHz Arduino Galileo, or 700 MHz Raspberry Pi, etc. 29 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.
  • 30. Contacts & Resources • Gabriel Staples, AFRL/RQVA – gabriel.staples.1@us.af.mil • Learn More: http://electricrcaircraftguy.blogspot.com/2014/01/the-power-of- arduino.html --lots of general info. & many great, additional links here • Tutorials & Help: – http://arduino.cc/ •  Reference •  Products •  Learning – Examples •  Learning – Playground •  Support – Forum – http://learn.adafruit.com/category/learn-arduino - ADAFRUIT IS A TREMENDOUSLY VALUABLE RESOURCE FOR THE BEGINNER TO ARDUINO….ESPECIALLY TO THOSE NOT WELL-VERSED IN ELECTRONICS, PROGRAMMING, AND ELECTRICAL ENGINEERING. – https://www.sparkfun.com/ • Where to Purchase: – Personal: • Amazon (fastest), Ebay (cheapest), Adafruit and SparkFun (best tutorials, code, & support), or the below sites – Work/Other: • http://www.adafruit.com/ • https://www.sparkfun.com/ • Amazon.com • Digikey • Mouser 30 DISTRIBUTION STATEMENT A. Approved for public release; distribution is unlimited.