Nordintown Blog

Rubbish musings, projects and hackerings from Nordin

Quadcopter Drone Army - Update 3

Apr 072015

I am keen to complete this project, and so I am just about to purchase the following:

  • 15x N-channel MOSFET Transistor, 4.2 A, 20 V, 3-Pin Micro3 (IRLML2502PBF )
  • 2x Hot Swap Controller Bidirectional i2c level converter (LTC4301LCMS8)
  • 5x CD74AC04M, CMOS Hex Inverter 24mA 1.5 → 5.5 V 14-Pin SOIC
  • 10x HC-49 Crystal 25MHz, ±20ppm, 2-Pin

The FETS are to fix one of the quads that has blown it's cheap versions (a known problem, sadly [1])

The I2C level converter is to convert the wiimote logic level to something I can experiment with on an Ardunio Nano v3.

The Hex inverter is used around the crystal along with caps to stabilise the clock signal for the Pixart camera

The 25Mhz clock provides the clock needed to drive the pixart IR camera's onboard IC.

These are mostly SMD components, so I get to gain more experience over dealing with these guys.  I have used variboard with SMD in the past so theres is that, but I might take the opportunity to make a batch of useful 8pin/14pin/16pin smd breakout boards for the space [2].

[1] http://www.rcgroups.com/forums/showthread.php?t=2090915&page=98#post29124381 
[2] http://hackaday.com/2010/04/29/surface-mount-breakout-boards/ 

Quadcopter Drone Army - Update #1

Nov 112014

It is probably time for a progress report on this. 

My early goal here is to teach the tiny drone to take off and hover at the same relative height and position over a moving target; that is to say - to move as the target moves.

In the time passed since, I have been distracted with a great many things, however I have made progress on this.

undefinedLearning to pilot these bloody things

If I aim to teach the micro-quad to fly by itself, I at least should have some ability to take control in case it vears away to attack someones bobble hat (or lack of bobble hat).  To this end, I have been sneaking out of work at lunch to my local sports hall to better get to grips with the pilot controls. The hall is huge and these quads have great range and manoeuvrability. I'll film my own progress next time if I can remember.  I have also been dicking about with the PID settings using this beautifully succinct guide.

For context, I am using the multiwii firmware on my microquad and a 5 channel Spectrum DX5 TX.  Like most of the quad firmwares, MultiWii has a number of flight modes triggered from spare TX channels with the self-explanatory horizon and heading hold modes being the most useful for beginners. 

With the beginner modes on, the quad does a grand job of hanging in the air  *eventually*, however I am not able to take-off and land in a small space, and the small adjustments required do not yet come naturally. Generally I need room to get up and reach a stable position and prior to reaching that, it always vears close to room objects, whereby my wussie prop-protective nature takes the leash and forces me to kill all power. Fellow hackerspace members at 57north.co present while I've been trimming the wood from nearby table legs, will appreciate this sucks.

I cannot help but think that adding in some static positioning feedback would help here. Sadly, these quads are generally considered too small for GPS modules that are of any use here.  Like with all my DIY drone problems, a good (and undeniably lazy) first step is ask how does nature do it and can I rip it off?

Insect undefinedpositioning

Space members have suggested ultra sounders and/or base station openCV solutions, but I am keen to make the solution onboard (so light), cheap and if at all possible via a wiimote pixelart camera (REALLY want to use these things on project). A googling session brought me repeatably to the same paper from Current Biology Journal, namely Visual Control of Altitude in Flying Drosophila (PDF 1.6mb).

In it, researchers ask how a fly chooses a particular altitude at which to fly, and why it isn't flying at some other height. Their answer, complete with some interesting math (I presume it is, cannot understand much of it yet), suggests the cheeky critters cheat, and use horizontal landmarks rather than anything barametric or ranging based.

More to come.

Quadcopter Drone Army - Update #2

Dec 152014

Getting MultiWii to WiiMote Camera is not easy.

 Funnily enough, MultiWii was initially developed for use with the motion sensors of the WiiMote. Since my interests relate to using the WiiMote camera to stabilise instead, I am in ironic and uncharted territory as far as I can tell.

About the Camera

The Wiimote camera is manufactured by Pixart. It contains a 1024x768 infrared camera with built-in hardware blob tracking. Over the I2C bus, it outputs X/Y coordinates for up to four IR points, as well as approximate intensity/size.

Interfacing it

A lot of the interesting human interaction hacks done with wiimotes come from hero wiimote Hacker Johnny Chung Lee. If you saw a news piece about something cool done with a wiimote, chances are this chap made the video showing it. His site offers the background for interfacing to a Wiimote to a PIC BASIC Stamp as a USB HID device. To achieve either, you'll at least need to add a 20Mhz clock (ideally 25Mhz) and most likely a I2C logic level converter (click schematic to enlarge in new window).

undefined

Trawling over the net I came across the blog of one Stephen Hobley, another WiiMote Camera rockstar, who has written an Arduino library for the Pixart Camera. This was downloaded and added to an Ardunio Nano v3, which uses the same atmega328p AVR. I also stripped down a wiimote, removed the camera and solders/heat shrunk wire to it. The whole lot was shoved on to a breadboard and put on hold till the crystal, 74AC04 hex inverter and the LTC4301L Level shifter ICs arrived.

Dead at square one

Sadly, for some reason, I was not having any luck getting my breadboarded 25Mhz clock to work. I am using the parts shown above and a Buspirate to measure but nothing. I have probably done something very stupid. I don't want to spend too much time on this, but its dam strange why I am detecting nothing from the CLK line into the camera module. I have ordered another crystal as this is probably the cause - can you blow crystals? I have no idea.

More to come.

New Project - Quadcopter Drone Army

Aug 102014

undefined

So after campGND, I was given a Turnigy Micro-x Quadcoptor to play with. For some exciting context, below is the original project blog post dated Aug 2014 (ported from a previous blog):

After being kindly given a Turnigy micro-x quad to play with, Nordin is seeking other interested parties to build a drone quad army and is asking if others are interested in some r/c quad fun? The goal is to achieve an airborne version of those line-following robots using principles from stigmergy rather than a control structure based on complex representations etc.

The suggested quad is cheap, standards complaint and most hackable, having an Arduino 328p flight controller powered by MultWiii firmware (http://www.multiwii.com/software) and plenty of spare i/o solder points. Initial plans are to hook up a cheap DSM2 100mW transmitter circuit (on order) to a ground Arduino that generates the simple PPM control data via simple override pots (for now). Beyond that, two choices:

  1. Explore use of the WiiMote's pixelart i2c camera as computatively cheap beacon tracking like our moth colleagues.
    Case use: Dones, follow that lightbar!

  2. Explore use of i2c gas sensors that follow concentration gradients, like our puny but clever friends, the ants.
    Case 
    use: [Sniff sniff], Wheres that leak! - send the drone(s).

If you're interested, email the discussion list with ideas.