31 Jan 2013

2012 WWW Fuller Symposium, Washington DC



Dr. Lian Pin Koh from ETH Zürich speaks about the application of drones (small, autonomous Aircrafts) for biologic conservation:


A ResearchDrone's MAJA is featured at 16:31.

28 Jan 2013

/dev/null

i just figured where all the stuff that is piped to /dev/null goes to.


16 Jan 2013

APM Camara control print

The first prototype, lets put this into a drone.


15 Jan 2013

APM Camera power control & CHDK intervalometer

Finally I made some progress on the r/c camera control. A fairly simple and cheap solution is to solder cables to the power button of a cannon camera. Hook these up to an ATtiny85 (45 would probably do as well). The ATtiny reads a PPM signal from an r/c receiver and switches the camera on or off accordingly.

ATtiny  pin layout:


Schema:


Demo:





ATTiny Code (C++ Arduino):

/**
 * Read PPM signal
 * 
 * Decode r/c receiver PPM servo signal and turn lights on 
 * according to stick position.
 *
 * $Id$
 */

// pin setup
#define PIN_PPM  0
#define PIN_POS1 4

unsigned long duration, lastgood = 0;
int position = 0;

void setup() {
  pinMode(PIN_PPM, INPUT);
  pinMode(PIN_POS1, OUTPUT);
  digitalWrite(PIN_POS1, LOW);
}

void loop() {
  // the length of the pulse (in microseconds) or 0 if no pulse 
  // started before the timeout (unsigned long)
  duration = pulseIn(PIN_PPM, HIGH, 20000); 
  if (duration == 0)
    duration = lastgood;
  else
    lastgood = duration;
  
  position = map(lastgood, 1000, 2000, 0, 1);
  
  if (position > 0)
    digitalWrite(PIN_POS1, HIGH);
  else
    digitalWrite(PIN_POS1, LOW);
}



Intervalometer Code (lua):

--[[
rem 2013-01-13 by Simon Wunderlin, ResearchDrones LLC
@title ResearchDrones Fast Interval
@param a = interval (sec/10)
@default a 10
--]]

function camera_close()
 click "display"
 sleep(1000)
 click "display"
 sleep(1000)
 shut_down()
 sleep(5000)
end

--[[
f = get_usb_power(1)
if f == 1 then camera_close() end 
]]--
--shoot()

repeat
 start = get_tick_count()
 
 press("shoot_half")
 repeat
  sleep(50)
  until get_shooting() == true
 click("shoot_full")
 release("shoot_half")
 
 sleep(a*100 - (get_tick_count() - start))
until ( false )

12 Jan 2013

ResearchDrones Deployments



View Deployments in a larger map

ResearchDrones in Congo

In December 2012 Remo and I were invited to do a technology demonstration in the National Park Odzala, in the Republic of Congo (not DRC).

It was an interesting field trip, the first time for us being out there with researchers.

Out of this 9 day trip, only 2 days could be spent on flying, testing and training. The rest of the time we spent on airplanes, hotels and most of it in a Jeep driving roughly 1600km from the airport to the national park on more or less something we would call roads.


View Odzala National Park, Congo in a larger map

The 3 nights in the field we spent in a camp of the Forrestry Administration in Mbomo (1.5h away from our flying site).

Here a short video of the test flights we were conducting in the Savannah in the middle of the national park.

5 Jan 2013

ResearchDrones test flights with thermal imaging cameras

On the 3rd January we have been conducting test flights with 2 different thermal imaging cameras in Switzerland.

We have been using an FLIR (forward looking) and a NEC F30 (downward looking) on the current UAV platform connected to a long range video transmission system.

The FLIR HS-324 produced quiet good results




At 0:30 and 1:38 there can people and cars be seen standing on the runway. This footage was taken from around 100m above the ground.

Some cars and people standing on the runway can be seen at 0:50, 1:12 and 1:30.

10 Oct 2012

Analyzing mavlink packages

I am currently on the search for a simple way to graph and analyze ArduPilot Mega telemetry logs. APM uses mavlink as protocol.

Andrew Tridgel has written a nice python library for the mavlink protocol which is called (who would have guessed?) pymalink.

pymavlink comes with a couple of examples which are quiet usefull (check the pymavlink/examples folder).

mavlogdump.py will generate an ASCII representation of the binary data structs. This outpu can be easily converted with sed, grep, awk, etc. for analysis in other programs.

mavplot.py can be used to graph data from the file.

I am currently analyzing a crash of a fixed wing drone. It's far away and all I have is a telemetry log file. mavplot.py could nicely display, that the drone stalled shortly after the takeoff, still unsure why.

mavplot.py example usage:

$ pymavlink/examples/mavgraph.py --planner --mav10 sander.tlog \
  VFR_HUD.airspeed 'VFR_HUD.groundspeed' '(SERVO_OUTPUT_RAW.servo1_raw-1000)/100' \
  '(SERVO_OUTPUT_RAW.servo2_raw-1000)/100' '(SERVO_OUTPUT_RAW.servo3_raw-1000)/100' \ 
  '(SERVO_OUTPUT_RAW.servo4_raw-1000)/100' ATTITUDE.roll ATTITUDE.pitch ATTITUDE.yaw \
  'VFR_HUD.alt/10'
 

The nice thing about these tools is, that parameters can contain python expressions which means, all the values can be adjusted to a specific need.


25 Sept 2012

Magick numbers

yay, one of my posts just hit 2600 views ;)

13 Sept 2012

Flying the ResearchDrones UAV in Holland

Last weekend we have been visiting the Netherlands to train Sander, a brave young biology scientist. Sander is planning to monitor Chimpanzees in Gabon with our Drone.

This time we got everything right. The autopilot was working perfectly, performing automatic take-offs and landings. The cameras shot quiet sharp images.

The current solution is able to carry quiet some payload, approx. 1kg. The planned endurance on this airframe is 1h. It is fully autonomous and the flight can be planned with a laptop through a map and then be uploaded to the drone.


Here are some impressions from the flight training and testing in Holland:









22 Aug 2012

Maja Drone Airframe is a very stable platform

The Maja Drone platform from Bormatec is a very stable, easy to handle and rugged platform for UAV's with a small payload (~300g in our case).

Due to the superb slow speed behavior of this platform it is also operable by inexperienced pilots.

  • 0:30 takeoff
  • 1:20 landing
on a gusty day.


12 Aug 2012

Universal r/c camera shutter control

This is a first proof of concept for a universal camera shutter control. The goal is to turn a camera on/off as well as controlling its shutter. Both functions are controlled with one radio channel (3 position switch) from an r/c receiver. The green LED signals that the camera has been turned on and the red LED that the shutter is operated with a predefined interval.

Parts for this hack cost approx. U$ 5 so far.

11 Aug 2012

Reading PPM Signal with arduino

I want to trigger additional logic in an UAV when I flip a 3 position switch on my R/C transmitter. This sketch will decode a PPM signal from an R/C receiver and will turn on two LEDs depending on switch position.

The code compiles for a Sparkfun Pro Micro 16MHz and also on an ATtiny85:


/**
 * Read PPM signal
 * 
 * Decode r/c receiver PPM servo signal and turn lights on 
 * according to servo position.
 *
 * $Id$
 */

// from which pin to read.
#define PIN_PPM   9
#define PIN_POS1 10
#define PIN_POS2 16

unsigned long duration, lastgood = 0;
int position = 0;

void setup() {
  pinMode(PIN_PPM, INPUT);
  pinMode(PIN_POS1, OUTPUT);
  pinMode(PIN_POS2, OUTPUT);
  digitalWrite(PIN_POS1, LOW);
  digitalWrite(PIN_POS2, LOW);
}

void loop() {
  // the length of the pulse (in microseconds) or 0 if no pulse 
  // started before the timeout (unsigned long)
  duration = pulseIn(PIN_PPM, HIGH, 20000); 
  if (duration == 0) {
    duration = lastgood;
  } else {
    lastgood = duration;
  }
  // map ppm values to 0, 1 and 2
  position = map(lastgood, 1000, 2000, 0, 2);
  // 0 == both off, 1 == LED1 on, LED2 off, 2 = both on 
  if (position > 0) {
    digitalWrite(PIN_POS1, HIGH);
  } else {
    digitalWrite(PIN_POS1, LOW);
  }
  if (position > 1) {
    digitalWrite(PIN_POS2, HIGH);
  } else {
    digitalWrite(PIN_POS2, LOW);
  }
}

5 Jul 2012

Arduino Pro Micro as USB Adapter for BlueSMiRF

/**
 * Pro Micro 5V / BlueSMiRF Test
 *
 * Pro Micro has 2 Serial adapters. One on the USB port (Serial), another on 
 * pin 11 (RX) and 12 (TX) (known as Serial1).
 *
 * This program will transmit data received on Serial to Serial1 and Serial1 
 * to Serial. This can be useful when a bluetooth adapter must be hooked up to 
 * an usb port.
 *
 * Pins
 *    VCC to VCC (3.3-6V)
 *    GND to GND 
 *    TX-O to RX-I 
 *    RX-I to TX-O 
 * 
 * LEDs
 *    Orange: USB receive, Bluetooth transmit
 *    Green:  Bluetooth receive, USB transmit
 *
 * $Id$
 */

void setup() {
  Serial.begin(115200); //  USB
  Serial1.begin(115200); // BlueSMiRF
}

void loop() {
  if (Serial.available())
    Serial1.write(Serial.read());
  
  if (Serial1.available())
    Serial.write(Serial1.read());
}