Saturday, December 28, 2013

An Anemometer for your model airport

Motivation

As noted before, I fly mostly small - mini and micro - copters of various kinds. A lot of time, this means flying indoors. But flying outdoors is a lot more fun - having a sky to play in instead of a living room provides a lot more room for tricks, mistakes, and recovering from them.
However, the wind outdoors is really important. I can go outside and look, but that doesn't tell me how the wind has been behaving, so I might be looking at either calm or gust and draw the wrong impression. I can check the weather reports on a variety of devices, but that's not local, and a bit of a pain.
I thought about putting up a wind sock, but that's just a cooler version of going outside to look. So I decided I wanted an anemometer of some sort.

Hardware

First step - what kind of off the shelf choices are there?

Handheld devices

There were lots of small handheld devices were common and either cheap or with nifty features, but if I had to go outside to check them, or stay outside so the nifty features could do their thing, I'd already know the wind conditions.
Smartphone apps (that either used the builtin-microphone to check wind sound, or had a sensor that plugged into the audio port) were both cheap and had nifty features, but still required going outside. Not what I wanted.

Complete stations

Then there are home weather stations of various sorts. Getting one that actually had the wind speed information I wanted were very expensive, because they invariable included a nice, complete weather station. And none had a display that really worked for what I wanted to do.
Wind Sensor mounted on fence corner
Wind Sensor

A solution

One of the interesting things that turned up in the was an Inspeed pole mount anemometer. It had great reviews from meteorologists at the local university. The problem with it is that it came with a bicycle speedometer as a display. Not really an improvement over a wind sock, but at least I didn't have to go outside. However, it was available without a display and documentation on what was put on the wire - which could easily be dealt with by an arduino.


Display

Given that I get to design the display, there's now lots to choose from. I eventually settled on a 16x2 RGB display from Adafruit, because they made a nice, simple display case for it.

Back of display, showing LCD control & Arduino
Back of Anemometer showing cirtuitry.

The blue PCB that dominates the image is the LCD control circuit. The bit of electricians tape on it covers the power LED. The Arduino is the green PCB on the right with the power connector coming off of it. It's stuck to the side of the display stand with a bit of double-sided tape.
With a 16x2 display, the top line becomes labels, and the bottom line values, displaying current, average, max and a trending indicator. While this was more readable from across the room than a bicycle speedometer, it was still a bit small.
Anemometer in cyan
Anemometer next to a center speaker with a temperature/humidity readout behind it.


One solution would have been to use a poorly documented double-height character set for the display, which would have lost the labels. Given that I was displaying current, average and max wind speeds, I'd rather keep the labels.
Since I could get an RGB display, I could use the display color to indicate the nature of the wind conditions. The conditions of interest are the recent average wind speed, and the maximum wind speed for that period. A high average speed means flying against the wind will be difficult, if not impossible, so there's no point in trying if the aircraft has too little power. High gust speeds will lead to erratic flight, which means I want an aircraft that's naturally stable. The color of the display is used to indicate how high those are:

Average↓ Gust→LowMediumHigh
LowGreenCyanYellow
MediumNPBlueMagenta
HighNPNPRed
The slots marked NP aren't possible, because the average wind speed can't be higher than the max wind speed. Since the color is pretty much obvious from anywhere I can see the display, I can tell what kind of models I might consider flying at a glance.

Software

A more complete discussion of the software is available on my software blog.

Conclusions

I use this on a regular basis. While I still tend to check the weather stations for wind speed forecasts, I'll check this when grabbing a CP copter to decide if I want to fly indoors or out.
The one downside is that I chose the wrong wind sensor. Oh, it works great, and I don't have any complaints about it's performance or accuracy. However, the local meteorologists who raved about it all worked for the National Severe Storms Lab. They use it for chasing tornadoes and dealing with speeds at and above 100 mph. But it lacks accuracy at the lower wind speeds of interest to me. Since I built it, Inspeed has come out with a more suitable version, and has been receptive to the idea of a variant of this one whose accuracy is between those two. If I can get one that doesn't replacing the underground wiring I'll probably try upgrading, but this one does the job I got it for.

Tuesday, December 24, 2013

RC'ers take the best selfies!

 A selfie of me, my house & garage, and a couple of my uncles places.

Wishing all my friends and readers the best this holiday season.

Wednesday, December 18, 2013

Working with scale effects

What are scale effects?

If you've been in modelling very long, you've seen scale effects at work. If you're a fan of bad science fiction or horror movies, you've probably seen scale effects being ignored.
A scale effect is a physical effect that changes with the scale of the model - specifically those that change other than in proportion to the scale. The best known scale effect is probably the one described by the square-cube law: the weight a structure can hold goes up with the square of its size, but its weight goes up with the cube. So if you double the size of a model (or an ant), it will weigh eight times as much as the standard version, but its legs will only be able to hold up four times as much weight. Which fact is conveniently ignored in movies about giant ants, robots and similar things.

Computing scale effect numbers

The scale factor is the change in size: a 1/48th scale model has a scale factor of 1/48. The scale effect number is the exponent to raise the scale factor to to figure out how much the given measurement will change with that scale factor.
All physical quantities can be expressed as the product of measurements of length, mass and time. That's why scientists talk about the cgs (centimeter/gram/second), mks (meter/kilogram/second) and fps (foot/pound/second) systems. If we can express some measurement of interest in those terms - it doesn't really matter which units we use - we can calculate a scale effect number for it. So we'll use the l*ength-*m*ass-t*ime system.
Given the expression of a measurement as a product of lmt terms, computing it's scale effect number is straightforward. Multiply the exponent of each of l, m and t by their scale effect number, then sum the products. A result of 0 means this quantity doesn't scale. A result of 1 means it changes proportionally to the scale. A result of -1 means it changes in inverse proportion to the scale. Results of 2, 3, ... mean it changes proportionally to the square, cube, etc. of the scale.

Length/Mass/Time scaling

The scale effect number for length is just the scale factor itself, since length changes in direct proportion to the scale.
Time's scale effect number requires a little physics knowledge to find. A pendulum's period is proportional to the square root of it's length. So if you make a pendulum at ¼th scale, its period is ½ that of the full scale model. So a scale second for a ¼th-scale model should be ½ a second. The power you have to raise ¼th to to get ½ is .5, meaning the scale effect number is .5, or the square root.
Mass is a bit harder. However, density provides us a clue. It doesn't change with scale. Density is mass divided by the volume. Volume is the cube of length, but in the denominator, so it's exponent is -3. The exponent for mass is 1. So for density to correctly scale, mass must have a scale effect number of 3.

A table of scale effect numbers

With those numbers and the scale effect formula in hand, we can calculate the scale effect number for a variety of measurements. We'll include the length, mass and time scale effect numbers for convenience.
Measurement Dimensions Scale effect number
Length l 1
Mass m 3
Time t .5
Area 2
Volume 3
Density l⁻³m 0
Speed lt⁻¹ .5
Acceleration lt⁻² 0
Force mlt⁻² 3

Automating the calculation

If you don't want to do these calculations, and keeping the table handy is a bit much for you, the author of the tool/programming language/app Frink has added a feature so it can do them for you. If you're doing physical calculations with a tool that doesn't keep track of units for you, you should check out Frink. It's amazing, and so is the author.

If you have the latest version of Frink, you can write a function to calculate the scale effect number:

getScaleEffect[x] := getExponent[x, "length"] + 3 * getExponent[x, "mass"] + getExponent[x, "time"] /2

This will compute the scale effect number for the quantity x. You could now write a two-argument function that takes a quantity and a scale, and computes the scale value by multiplying it by the scale raised to the power of the above sum:


getScaleValue[x, scale] := x * scale ^ getScaleEffect[x]

Scale effect numbers examples

Let's walk through one or two calculations for some measurements to see how this is done. If the measurement you want to know the scale effect for isn't in the table above, you can calculate it yourself. You'll need the appropriate lmt formula. This can probably be found in a good engineering or physics text, or on wikipedia or Wolfram Alpha. That will probably be in cgs or mks, but that doesn't really matter.

Supported weight

The weight[^1] that a vertical object can support is proportional to the area of its cross section. The area of the cross section is proportional to the square of the length, so the scale factor for weight support is 2 × 1+ 0 × 3 + 0 × .5, or simply 2, which agrees with the table. So the amount those ants legs can support will go up by the square of their size.

Scale speed

People talk about scale speed for model cars. We can now see what that means. Speed has a scale effect number of .5. For a 1/16th scale model car, we take the square root of 1/16th to get ¼th. To translate from real speed to scale speed, we multiply by 4, since we're scaling up. So if the car is moving at a real speed of 20 mph, it's scale speed would be 80 mph. To work it out the long way, each mile represents 16 miles at scale, and each hour represents 4 hours at scale (because the scale effect number for time is .5). That's 20 × 16 or 320 miles in 4 hours, or 80 mph.

A practical example

So, let's see if we can figure out how a model's scale will affect how much wind we can fly it in.

Force of the wind

So, what's the scale effect number for the force of the wind on your model aircraft? Checking wikipedia, we find that the force of the wind is the product of the density of the air, the surface area of the craft, and the wind speed squared. Working that out the long way, that's (l-³m¹)l²(lt⁻¹)², or l⁷m⁻¹t⁻², making the scale effect number -3 × 1 + 1 × 3  + 1 * 2 + 1 * 2 + -2 × .5 = 3. Using the table entries for density, area and speed , it's 0 + 2 + 2 × .5 = 3. Or, we could just use the Force entry in the table, which is 3.
While that was an illuminating exercise, this is scale force, meaning it uses the wind's scale speed. It tells you how the force will change with scale, assuming the wind speed will do the same.

Force of the wind, take two

What we really want to know is how much more difficult the model will be to fly as we scale it down. This is a much more difficult question to answer, because difficulty is a subjective measure.
We can deal with that by picking a measurable point and declaring that more difficult than that as difficult, and less difficult as not difficult. For instance, we can pick the wind speed at which a model can no longer fly against the wind, because the wind force is greater than the force the copter can provide to fly. This point isn't fixed by scale, as the model's capabilities can vary quite a bit at the same scale. Where a 100-size 3-channel coax helicopter you picked up in the mall can't fly in anything but a dead calm, a 100 size collective pitch model tuned for fast forward flight can quite easily handle a stiff breeze.
But setting that aside, this one is easy to figure out. We're comparing a non-scale speed to a scale speed, so the scale effect number is .5.
This seems about right. The Blade Nano QX flies nicely in 5 mph winds, and can handle 10 mph winds, but not well - at least not in my hands. The Blade 350QX - at roughly 4 times the size - should behave similarly at 10 * √4 ≅ 20 mph. And sure enough, in 20 mph winds - with a GoPro 3 in the waterproof case attached - and my hands on the controls is about as manageable as the Nano QX in 10 mph winds.

Summary

Ok, we've covered how you calculate scale effect numbers, explained the ever-popular scale speed concept, shown some examples of calculating scale effect numbers, and how to use this to get some practical information. If you run into something that you can't handle with that base, drop me a note about it.

Tuesday, November 12, 2013

First look at the Blade 350QX

Introduction

My Blade 350QX arrived yesterday. I'm impressed. Ok, it's my first large (as in not micro or smaller) 'copter, but still. Here's my impressions after a couple of batteries, including one night flight.

But first, a warning

Note that Horizon has issued recall on the rotor blades on the early releases. They are fragile, tend to crack and then fall apart in flight - just search youtube for 350 qx prop fail. If you get one, check the blades to make sure they have a B on the hub. You'll be able to see it on the mounted blades. Mine showed up with the B blades on it, so it ought to be ok.

Size

After flying mostly micros, this thing just seems big. I feel like I could land a Nano QX on top of it.

It uses a 3S battery. While it's no bigger than the 2S batteries I've used before, it's still the first 3S battery I've run into. Unfortunately, I need more of them.

Quality

Meh. Not bad, but it still feels like cheap plastic. The GoPro camera mount strikes a low point, though.

In particular, the landing skids worry me. That hard plastic doesn't seem like it'll stand up to many rough landings. Possibly I should just punt, and always land with Return To Home or Smart mode.

It does have nice, bright LEDs. LEDs are always good, and these make it reasonable to fly the 350QX at night.

Flight

Stability & Agility modes

It flies very nicely. Stability mode is like flying most six-axis stabilized quads, but much more stable than I'm used to. I suspect that's just the size.

Agility mode gets you somewhere between an FP heli and an entry level CP heli. Very responsive, and you get the entire flight envelope to play with. It'll do acrobatics - flips, rolls and loops - but not 3D flight. Still a lot of fun.

Return To Home

One of the interesting features made possible by having a GPS system and a smart quad is the Return To Home switch. Flip it on, and the quad will take over and fly itself back to home. At least, it will if it's had a good GPS lock since taking off. If it's low to the ground, it'll ascend to above tree-top height, then fly back to over where it took off from, and land itself. Gently, even. Useful if you ever get confused about orientation or lose sight of the quad. I tried this a number of times, just to see what it did. It works quite well, and is kind of cool to watch.

Smart mode

Smart mode is just weird. The manual warns you that going from Smart to Stability mode will take some adjustment. However, going the other way also takes some adjustment.

The throttle stick doesn't controls lift, but altitude - from ground level with the throttle full down, to a claimed 45 meters with the throttle full up. The rudder control is pretty much normal.

The right stick - it's not cyclic controls, and it doesn't control pitch & roll like it does on a heli or the other modes on this quad - is motion relative to you. Pushing it up will make the quad move away from you - no matter which direction it is facing, and no matter where it is in relation to you. Down is back to you, left and right are - well, you know. This is confusing enough that I bailed and hit Return To Home while getting used to it.

If you aren't moving the right stick, the quad will use GPS to lock itself into position. Not like a six-axis system, as those will move a little with the wind and the like - but pretty much rock solid. This works in winds much higher than I'd even think about flying anything else I own.

That said - I can see a real use for this. I've had camera-carrying quads before, and have to agree with a comment on an early blog: they are novelty items, and not really all that interesting on most quads. Flying the things is difficult enough that you can't really pay attention to the camera to get a good shot or video, so all you can really do is run video to record a flight.

Smart mode changes that. Well, the position lock with GPS does. You can position the quad where you want it, and it really will stay put well enough that you can pay attention to the camera, and get a good shot. I didn't order a camera with the 350 QX because I thought they wouldn't be interesting. Now I'm not so sure1, and will probably order a Hero 3 soon.

Oddities

You have to manually initialize things after the quad initializes itself and binds to the radio. Among other things, this establishes the home position for the Return To Home feature, and what ground level is for Smart mode.

The initialization starts the rotors spinning, and they do not stop even with no throttle input. You have to shut the quad down to do that, and then initialize it again. This makes a throttle hold pretty much useless. I might use the shutdown procedure to replace it, but for now what's normally Hold on my controller is Return To Home.

The normal initialization sequence is to throw the rudder to the two extremes with no changes in elevator, aileron or throttle with the throttle at zero. Since I'm using deviationTx - see my blog on open source controller firmware - I can configure it so one switch initializes things when thrown on, and then shuts the throttles down when thrown off. Much more convenient, if you ask me.

Minuses

The balancing charger they shipped with it requires a 12 volt input, and comes with alligator clips. Seriously. I can understand why they did it, but ugh.


  1. While charging people money to take videos & pictures of things for them from a quad is tempting, it's a violation of FAA regulations unless you have a commercial pilots license. Hopefully that will change in 2014, but for now it's a nono. 

Friday, November 8, 2013

Devo 6s vs. Devo 7E

Introduction

The Devo 7E and 6S controllers are unique - at least to my knowledge - in being fully computerized rc controllers in a toy controller form factor. As such, a comparison of them seems to be worthwhile.

I got a 7E about a year ago to check out deviationTx, and have been using it regularly for all my Blade & Walkera copters. While I expected to be pleased with deviation, what I didn't expect was how much I'd like that form factor. It's great for flying micro helis indoors.

I got a 6S earlier this week, and have converted and flown everything I was flying with the 7E. I thought I'd go over the pluses and minuses for those who are contemplating this.

First and foremost, I'm not going to disagree with the assertion that the 10 - at the same price point as the 6S - is the better buy. Unless you want the small form factor (hence the comparison with the 7E) or a color screen (save a bit extra and get the 8S!), go with the 10.

Pluses

Better hardware

The 6S has noticeably better hardware. My first reaction on picking up a 7E was "yuch", because of those black plastic sticks. In fact, that's my only mod to the 7E - replacing those things. The gimbals in the 6S are also smoother than the 7E, making it easier to fly with.

The microcontroller in the 7E is cheaper than the rest of the line, that it has less memory being the crucial point here. This means installation is a little harder to deal with code that is loaded on demand, that there is at least one missing feature in the current (3.0.0) release of deviation, and more in the current nightly builds. The things that have been removed were excellent choices, and really amount to no more than inconveniences, not even being annoying. This could get better, as I don't know how much effort has been spent on refactoring the code to make it smaller. However, I'd expect it to get worse first.

Switches

The 6S has two extra three-position switches. There is a mod for the 7E that can add either one 3-position switch, or two 2-position switches, neither of which bring it up to the 6S. All the craft where I had sacrificed controls I'd like, or deformed things in some way to fit on the 7E, work much better on the 6S. Just adding one 3-position switch would do it, so a modded 7E would be up to what I'm doing now. However, I'm also considering moving some craft that I couldn't fly at all on the 7E over to it.

The nightly builds on the 7E or 6S will let you use the navigation buttons as control switches, which adds a lot of capabilities to the 7E. However, even this works better on the 6S. It has the touch screen for navigation, and a way to enabled and disable the navigation buttons for navigation. Presumably, that will also toggle those buttons as switches, but even if it doesn't, you still get to use them all until you toggle it.

Display

Ok, the display isn't that big a deal when flying. After all, you're paying attention to what you're flying, not the transmitter! So, except to sneak an occasional glance at whatever I'm measuring to determine the end of the flight, I ignore it. Even the deviation toggles I've so carefully configured never really get looked at.

But the 6S display is twice the size of the 7E. On the 7E, I could never get everything I wanted to look at during the configuration process on the display, even for the 4-channel craft. The 6S I can get everything of interest on the display, even for the 6-channel CP helis! This makes the configuration process a lot more convenient.

That it's a color screen also means it's prettier, but again, I don't look at it when flying. Maybe it's a little easier on the eyes during the config, but who really cares?

Range

The 6S doesn't have the range-limiting diode in it. Easily removed from the 7E, but you still have to do it.

Undecided

I'm not sold on the touch-screen UI yet. While you can use the navigation buttons, you have to enable that every time you want to use it, and it's not quite as smooth as it is on the 7E. The touch screen should be easier to use, but the elements are a bit small for my big fingers. Maybe it just takes some getting used to, or a stylus.

Minuses

Not clear how readable the color display will be in bright sunlight.

The 6S costs twice as much. Sort of hard to ignore.

Conclusion

So the question is, is it worth the cost? I think for my uses - flying mini 'copters indoors, the answer is yes. The 7E modded with a three-position switch plus the new momentary buttons would be enough for everything I plan to fly with the 6S, but just barely. All the benefits together - not having to mod it, fewer steps in updating and configuring deviation, the better gimbals, and room to grow add up to that yes, but just barely. If I were planning on flying outdoors a lot and that screen were hard to read, it might not make the cut.

Sunday, November 3, 2013

Open Source Servo Tester

Inspiration

I was watching a Radio Control (RC) review podcast, where they showed off a neat little servo tester. You could plug in power, then plug a servo into it, and switch between three modes: go to neutral (so you can adjust your servo so whatever it controlled was at neutral), sweep back and forth (for testing to make sure it's not going to die an early death), and follow the knob on the the tester. Add a button to change modes and a couple of LEDs to indicate mode, and you're done.

My first thought was "Cool. And handy. I should buy one of those." The one being reviewed was about $9, but you can get similar items on Amazon (and presumably eBay) shipped to you for as little as $3. Options include multiple outputs and some ESC test modes if you want to spend more money.

While contemplating which one to order, I looked down at the stack of Arduino hardware on my desk, and realized that 1) I had all the hardware I needed to make a servo tester, 2) the hardware and code would be an evening's worth of work and 3) it would be mildly interesting. Furthermore, since I had the source, I could add more options and have as many as six servo outputs as needed.

The hardware

The hardware for the tester side is pretty straightforward: A potentiometer of some sort, a button, and a couple of LEDs. Since my protoshields have a spare button, a pair of LEDs, and a breadboard to hold the potentiometer, dropping one of those on a spare Uno and plugging in the potentionmeter was most of the hardware setup.

Potentiometer

As always, the potentiometer is wired to power and ground on two sides. The signal goes to analog pin 0, which is defined as POT in the source code.

Button

The button on a protoshield just shorts to ground, so all that's required for it is to plug into pin 8, defined in the source as BUTTON.

LEDs

The two LEDs on the protoshield are connected to pins 12 and 13, defined as LED1 and LED2 in the source. Since there's already an LED on pin 13 on most Arduinos, that might save you an LED if you decide not to use a protoshield.

The Servo

The servo must also be connected to both power and ground. The signal line is tied to pin 9, defined as SERVO in the source. Any PWM-capable digital pin can be used.

Connect the servo signals up to three adjacent rows on the breadboard, then connect the male header pins on the same three rows. You then just plug your servo into the header pins. You can even plug in more than one set of header pins to drive multiple servos.

The software

I think there are only three things of note in the software:

  1. The BUTTON pin mode is INPUT_PULLUP, as required by the protoshield button shorting to ground.
  2. The funcs array is a list of pointers to int func(void), and is how the operating mode is selected. To add a new operating mode, write an int func(void) that returns the appropriate value, and add it to the funcs array. THe LED display will be odd, though.
  3. setLeds is called to set the display mode of the LEDs. The value it's passed starts at one, and should have at least one LED on if the device is getting power.
#include <Servo.h> 

#define POT 0
#define BUTTON  8

#define SERVO   9
#define LED1    12
#define LED2    13

#define DELAY   50

Servo myservo; 

void setup() { 
  myservo.attach(SERVO) ;
  pinMode(BUTTON, INPUT_PULLUP) ;
  pinMode(LED1, OUTPUT) ;
  pinMode(LED2, OUTPUT) ;
} 

int neutral() {
  return 90 ;
}

int readPot() {
  return map(analogRead(POT), 0, 1023, 0, 180) ;
}

int sweep() {
  static int pos = 0 ;
  static int dir = 1 ;

  pos = pos + dir ;
  if (dir == 1 && pos > 180) {
    pos = 179 ;
    dir = -1 ;
  } else if (dir == -1 && pos < 0) {
    pos = 1 ;
    dir = 1 ;
  }
  return pos ;
}

int (*funcs[])(void) = { neutral, readPot, sweep } ;


void
setLeds(int value) {
  value += 1 ;
  digitalWrite(LED1, value & 1) ;
  digitalWrite(LED2, value & 2) ;
}

void loop() {
  static int buttonValue = 0 ;
  static int oldState = HIGH ;
  static int state ;

  if ((state = digitalRead(BUTTON)) == LOW && oldState != LOW) {
    buttonValue = (buttonValue + 1) % (sizeof funcs / sizeof *funcs) ;
    setLeds(buttonValue) ;
  }
  oldState = state ;

  myservo.write(funcs[buttonValue]()) ;
  delay(DELAY) ;
}

Usage

Apply power to the Arduino, and it resets, turns on the first LED, and sets the servo to neutral.

Click the button once, and the second LED goes on and the first one off, and the servo will now follow the potentiometer.

Click the button a second time, both LEDs go on, and the Arduino will start sweeping the servo from 0 to 180 and back.

Click a third time, you go back to neutral and only the first LED on.

Conclusion

To be fair, this is probably only useful to people at the extremes of the hobby. Even the least expensive Arduino board costs more than a cheap tester, and it's probably harder to use an inexpensive home-built tester than a proprietary one. If you don't need a servo tester very often - which puts you at one extreme - and tend to have spare Arduino boards around so throwing a servo tester together occasionally isn't a problem, this could be a win. If you are a heavy-duty user of servos, and can really use the ability to test six (or more, with a larger Arduino) servo outputs and create custom test modes - which to me puts you at the other extreme - then this could also be a win. Being at the first extreme, I'll count this as a win since I've already used it to test a couple of servos.

Friday, August 2, 2013

Adventures in trans-pacific purchasing

Character is what you are in the dark.
-- attributed to Dwight L. Moody
One of the truths - I consider it sad, you might not - of the RC hobby is that a lot of things you want to use for it are only available from, or available at a steep discount from, various vendors in Asia. While this isn't a bad thing in and of itself, it does carry certain risks and problems - not the least of which is that they almost invariable only accept payment through PayPal.

Quality of products

Many of the merchants manage to have lower prices by doing little or no quality control. My experience has been that infant mortality rates are very high - 50% or more. In particular, Banggood, Tmart and Good Luck Buy are on the wrong side of that 50% failure rate for one or more items in my orders from them.
Some merchants do some quality testing before shipping. I recommend using those if possible, but that doesn't avoid all the problems.

Being on the other side of the world

Being on the other side of the world makes everything else so much more painful. For instance, if you're really lucky, you'll get shipments in slightly more than a week. Four weeks is closer to normal. Returns aren't any faster. One thing I have noticed: shipping from Hong Kong is usually faster than shipping from mainland China. Keep that in mind when placing an order.
Once you've gotten a defective item, them being on the other side of the makes the issue especially frustrating. Sending a reply and getting a response in less than 24 hours is a rarity, just because of the time difference. Of course, this is exacerbated by the people on the other end being - like almost all customer support staff - underpaid script monkeys. In this case, they're underpaid script monkeys who don't speak the same language as you, so it's not unusual to need several of those day-long iterations to clarify things.
I will admit that - for the most part - once I got them to understand what was broken and sent them the photographic or video evidence they inevitably require - something I've never had to do with either my LHS (better known as your Local Hobby Shop) or Amazon - they tend to deal with items that cost less than the cost of shipping reasonably. But you're now stuck with the waiting for that trans-pacific shipping again, possibly being unable to enjoy or properly test other items in your shipment.
As with the quality control issue, some of these vendors have warehouses in the US. That does shorten shipping times. And the only problem it solves are the shipping ones, as their support is still on the other side of the world.

Cost of shipping

The vendors I've found who have a reputation for reliability also tend not to provide free shipping. This can make a lot of difference. I regularly find that, once I've added in the cost of shipping, things I get from them cost at best a few percent less than they do from Amazon. In return for that, I'm getting a longer wait for shipping, and PayPal's customer support instead of Amazon's.
For instance, I was once asked for a better place to buy a Walkera products in the US, as the most popular US sellers were charging several hundred dollars more for a 700-class helicopter than Walkera's Asia-based web store, taking the price from five hundred some-odd dollars to seven hundred some-odd dollars. I went to both sites, added the helicopter to my cart, and checked the shipping costs to my home address. The store in the US charged $40 or so shipping. The Walkera web store charged $230. The end result was that this purchase - nearly $800 by the time it was all added up - was actually about $5 cheaper to buy from the US.
If you have to return something - which is all to likely with the cheaper vendors - you may well have to pay for the return shipping. Even if they offer to pay you for shipping, they have asked me to pay the shipping first, and they'd refund it when they got the item. So - for that Walkera helicopter - I would have been out of pocket another $230 with a two month wait before I'd have a flyable helicopter. I might have gotten that $230 back, but I never intend to need to find out for sure.

The problem with PayPal

As mentioned, these vendors almost all use Paypal as their payment processors. While this may not sound like a bad thing, it's nowhere as good as a credit card company or Amazon.
The first thing to understand is that, unlike Amazon or a credit card company, you are not Paypal's customer. The company selling you things is the customer. You're the product. Paypal makes money by selling merchants the ability to sell to you, so their priority is to keep the merchants happy. So where Amazon covers return shipping when they or the merchants they represent screw up, Paypal's default policy is that you have to pay return shipping for the merchants mistake. So you may well get to cover those high trans-pacific shipping costs twice: once when you buy something, and again when you return it.
Paypal originally made money by earning interest on your money while they were holding it. This was so baked into their business that they paid over 9 million dollars to settle a class action lawsuit filed against them for being unwilling to let it go. It's still baked in, and there have been multiple lawsuits since. PayPal put a stop to that. They changed their user agreement so you give up your right to sue them (see Section 12.4).
On the other hand, you are your credit card companies customer, and they make money on you in a variety of ways. If you have a dispute with them, they (at least, every one I've ever dealt with) credit your card when you open the dispute. Paypal won't issue a credit until - well, they put it off as long as they can. Before the class action lawsuit, the only way to get them to cough up money was to have my bank reverse a charge - usually multiple times. Since then, I've gotten them to do so. But never with fewer than three calls to their so-called customer support, several emails from them that never arrive, and a representative of my bank on the line listening in when it finally happens.
Amazon isn't as good as a credit card company, but they're a lot better than Paypal. They provide a prepaid shipping label, and will refund your money when they get notification that it's been used, which at least happens automatically.

A warning about Amazon

Yes, I'm a fan of Amazon. However, they aren't without flaws. In particular, merchants can attach anything they want to a listing. So whereas someone can honestly list an item as authentic and original, someone else can attach their product to the listing even though they're selling an unlicensed clone or an out-and-out forgery. Arduino boards in particular are susceptible to this. In this case, you can safely use Amazon's return policy. I have no idea whether Paypal will behave similarly, and even if they do agree that it's Significantly Not As Described, you're still stuck with their return policy.
Similarly, it's not unusual to see one or more merchants selling a product whose listing says US ship whatever who are shipping from Asia. If you're an Amazon Prime member, buying Prime eligible items avoids this problem. Otherwise, always check the seller's shipping information.

Who to buy from

Hobby King has usually been reliable for me. They have a US warehouse. I'm not sure if they test beforehand, though. The downside is that they tend to only carry the most popular items of anything that's not a house brand. myrcmart tests before they ship, but doesnt have a US warehouse. I've become particularly fond of miracle-mart, since they accept credit cards directly as well as PayPal, and have free shipping on orders of US$50.

Sunday, July 21, 2013

Configuring deviationTx on a Devo 10 for Phoenix

Goal

There are actually two different ways to configure an rc aircraft controller for use with a simulator. If you're fine-tuning maneuvers, or learning the advanced maneuvers, then you want the simulation to be as close to the craft you fly as possible. To get there, you tweak the sim to make the model act more like yours. You also use your controller configured the way you normally configure it to fly the aircraft. This is great for advanced flyers, and most - if not all - of the guides on the net have you do things this way.
However, if you're practicing basic skills - flying in different orientations, for instance - and want to experiment with different kinds of aircraft, there is an alternative approach. Since the simulator isn't an aircraft, but a computer, it can do a lot more for you than just pretend to be an aircraft - it can take over some of the functionality of the controller. For instance, it can provide helicopter pitch curves for inverted flight, which most helicopters can't do. They won't be exact, but they'll be good enough for practicing flying inverted while you learn the orientation. And it frees up a channel between the sim and the controller for other things. This is the way the manuals I've seen have you do things. Which may well explain why there is so much confusion about such things.
This isn't so much a guide on setting up a controller for use with a sim, but a demonstration of the capabilities of open source controller software. It takes the latter approach because that lets you get more functionality out of the sim/controller system. If you're looking for instructions on making your sim/controller combination as much like your aircraft as possible - this isn't for you. You're probably well beyond this in any case, so thank you for taking the time to read my blog.
If, on the other hand, you're still working on those basic skills, and interested in trying out various different aircraft without having to re-arrange your controller every time - this is for you. I'll show you how to set up deviationTx on the Devo 10 so you can fly a heli inverted with the same configuration you use for fine control of flaps on an aircraft, while still having the ability to raise the gear and control the engine angle on tilt-rotor craft.

What you're going to find here

The deviationTx software makes the models available as a USB file system, each model being in a file formatted like a DOS .ini file. That means it has sections that each line takes the form variable=value, with sections for different things marked by lines with the section name enclosed in square brackets. I'm going to show you the relevant sections, then describe what they mean. The section names will be in blue, and the subsections - if any - in green.
Finally, I'll tell you where you can download a copy of my model file, so you can just use it directly if you're using deviationTx software.

Getting started - radio and simple channels

Radio config

For completeness sake - as in you'll need this if you're trying to copy the config without using my .ini file - the radio setup looks like this:

name=Phoenix
mixermode=Advanced
[radio]
protocol=PPM
num_channels=8
That is, the name for this model is Phoenix (yes, I'm using the Phoenix flight sim), I'm using the Advanced mixer mode, with the PPM protocol with eight channels. If you haven't aren't familiar with open source controller software, the existence of a protocol setting might surprise you. The software implements multiple protocols in the same controller, sometimes with the same transmitter.

The Simple channels

There are three simple channels - literally. They use the simple mixer type in deviationTx. The first is for AUX4, one of the extra input knobs. You won't find a simpler mixer in a deviationTx config:

[channel7]
template=simple
[mixer]
src=AUX4
dest=Ch7
This doesn't specify a curve type, so it's 1-1. No scaling, no offset, so those default to 100 and 0. I.e. - it copies the input AUX4 direct to the output Ch7.
It does have one twist. In the trims section, I've set up the trim switches in the upper left - near that knob - to tweak it's output:

[trim5]
src=AUX4
pos=TRIM_L-
neg=TRIM_L+
Two of the switches near that knob are nearly as simple:

[channel5]
template=simple
[mixer]
src=GEAR1
dest=Ch5
curvetype=min/max

[channel6]
template=simple
[mixer]
src=ELE DR1
dest=Ch6
curvetype=min/max
These add the curevetype of min/max, meaning they go from -100 to 100 as they turn on, giving a good sharp edge should you have an edge-triggered control. The two are identical except for the channel number, src and dest (all italicized).

Elevator, Aileron and Rudder

These are all set the same, and are the a bit more complicated. The model file entry for them looks like this:

[channel1]
template=expo_dr
[mixer]
src=ELE
dest=Ch1
curvetype=expo
points=35,35
[mixer]
src=ELE
dest=Ch1
switch=FMODE0
scalar=70
The bits in italic are what vary between the three channels - the channel number, source and output channel.
To translate, this is the settings for channel1. I'm going to use an expo_dr template - meaning three mixers, the last two controlled by switches. I only use two mixes, the reason to be revealed later. The first mixer uses a curve from the ELE stick to Ch1 with an expo of 35 on both sides of 0. The second mixer just copies the ELE stick setting to Ch1 with a 70% rate (the scalar value). Obviously, these should be adjusted to taste, I use them on my real helis because they give the same feel near center, but the low rate mode keeps me from getting into trouble with a new craft. The switch setting in the second mixer (aka low rate) controls when it is used. If the FMODE switch is in position 0 this mixer is used, otherwise the first one is.

Pitch (or is it flaps?)

Now we're going to see the first bit of the magic this software can do. Channel 8 has a complex template, meaning an arbitrary number of mixers, each which has the full mixer facilities available:

[channel8]
template=complex
[mixer]
src=AUX5
dest=Ch8
switch=MIX0
scalar=-100
curvetype=fixed
[mixer]
src=AUX5
dest=Ch8
switch=MIX1
[mixer]
src=AUX5
dest=Ch8
switch=MIX2
curvetype=fixed
[mixer]
src=Virt3
dest=Ch8
switch=AIL DR0
usetrim=0
These all have a switch setting which controls how each mixer is used. The last one whose switch is on will be the mixer that actually gets used. The first three:

[mixer]
src=AUX5
dest=Ch8
switch=MIX0
scalar=-100
curvetype=fixed
[mixer]
src=AUX5
dest=Ch8
switch=MIX1
[mixer]
src=AUX5
dest=Ch8
switch=MIX2
curvetype=fixed
are selected by the MIX switch as it moves through it's three positions. The middle one is a straight copy of the other knob - AUX5 - to Ch8. The ones above and below this one have a fixed curvetype, meaning they always output their values when selected. The first one has a scaler of -100, so that's the value it outputs. The last one doesn't have a scaler, so it outputs the default of 100.
This one mixer also has a trim set up in the trim config:

[trim6]
src=AUX5
pos=TRIM_R-
neg=TRIM_R+
These three mixers let you toggle the output to Ch8 from -100, through the knob setting, to 100. I use it for flaps when flying airplanes.
Finally, the last mixer in that template is:

[mixer]
src=Virt3
dest=Ch8
switch=AIL DR0
usetrim=0
This is a straight copy of Virt3 to Ch8 when the AIL DR0 switch is on. Since this is the last mixer, it will always have priority if enabled, meaning that the AIL DR switch switches between the previous behavior (when down) and Virt3 - whatever that is - when up.
So what is Virt3? A virtual channel. It's not output to anything by itself, but can be used in other mixers, as it is here. It looks like:

[virtchan3]
template=complex
[mixer]
src=THR
dest=Virt3
scalar=55
offset=45
usetrim=0
[mixer]
src=THR
dest=Virt3
switch=FMODE2
usetrim=0
A channel whose template is complex, but with only two mixes. The second one is a straight copy of the THR to Virt3 when FMODE2 is on. The first one is a tweaked copy, scaled back to a factor of 55 and having 45 added to it, meaning it runs from -10 to 100. This could be pair of collective pitch curves, one for idle-up mode, and one for inverted flight. Given that the latter is on FMODE2, and I use FMODE0 for a low rate mode, that would be logical.
I could have used two virtual channels here, one for the MIX settings, and virtchan3, and switched between them in the channel8 template. That would have been a bit cleaner, but this model - putting one virtual channel in the real channel, then a switch to turn the other one on - works equally well with one less virtual channel.

Throttle

At this point, I've only got one channel left - the throttle. We are about to go through the looking glass.

[channel3]
safetysw=Virt2
safetyval=-100
template=expo_dr
[mixer]
src=THR
dest=Ch3
[mixer]
src=THR
dest=Ch3
switch=FMODE2
curvetype=fixed
[mixer]
src=THR
dest=Ch3
switch=AIL DR1
channel3 uses another expo_dr template, though it doesn't actually use an expo. Or dual rates, for that matter, though it has DR switch. The first and third mixers are direct copies from THR to Ch3, with the last one being enabled by AIL DR1. The middle one is enabled by FMODE2, and sets the throttle output to the default value of 100, or full on.
So, if FMODE2 is on, giving us the full range pitch curve on channel 8, I get a throttle fixed at full on, which is what I want (well, close to it) for 3d flight. If you prefer a V-curve here, you can either use a 3 point curve, or a scaled and offset absolute value curve to get it.
However, if AIL DR1 is on, you don't get the fixed throttle - you get normal behavior. If you recall, Channel 8 is set up to only use the pitch curve virtual channel if AIL DR0 is on. So AIL DR will switch between CP heli mode (up) and airplane or 4 channel 'copter mode (down).
The real magic is in the setup for channel3, though. It has a safetysw of Virt2, using a virtual channel as a switch. When that switch is on, the value output to channel3 will be -100, creating a throttle hold.
So lets look at that virtual channel. Well, channels:

[virtchan1]
template=complex
[mixer]
src=THR
dest=Virt1
scalar=-50
offset=-49
usetrim=0
[mixer]
src=!FMODE2
dest=Virt1
switch=AIL DR0
usetrim=0
muxtype=min
curvetype=min/max
I start with virtchan1. This translates the combination of THR, FMODE2 and AIL DR0 into an on/off value. It uses a complex template.
The first mixer uses the throttle stick - still THR - as input. It maps the value directly to the output, with a scaler of -50 - meaning it will slope down from left to right. Further, we subtract 49 from it before outputting it, so the value goes from 1 (when the throttle is at the bottom of it's travel) to -49. This will cause the Virt1 switch to be on when the throttle is all the way down, and off otherwise.
But we're not done yet! The second mixer is controlled by the AIL DR switch, being used if it is up. The input is !FMODE2, so it will be -100 if the FMODE switch is in position 2, and 100 otherwise. The curvetype is min/max, because I like those for switches. The result of all this is that this mixer is only on if the controller is either in airplane mode (AIL_DR0 is off) or in heli mode and FMODE is not inverted (2).
This mixer also has the first (and only) appearance of the muxtype value. It is min, meaning that the value from this mixer - if it is enabled - will be the minimum of the value from the last enabled mixer and it's value. All the other mixers use the default muxtype of replace, meaning their value is used if they are enabled, replacing the previous value.
Because of this, virtchan2 will be on if both the first mixer is on - meaning the throttle stick is full off - and the second one is on. In other words, virtchan2 is on if and only if the controller is set so that the propellers aren't getting power.
The second virtual channel is even more complex:

[virtchan2]
template=complex
[mixer]
src=Virt2
dest=Virt2
usetrim=0
curvetype=min/max
[mixer]
src=AIL
dest=Virt2
switch=Virt1
scalar=-100
usetrim=0
curvetype=fixed
[mixer]
src=AIL
dest=Virt2
switch=RUD DR1
usetrim=0
curvetype=fixed
Another complex template. The first mixer copies Virt2 to itself. The curve is min/max, meaning we force the channel to 100% or -100%. That's not really necessary, but we want this channel to be clearly on or off. The source is also Virt2, meaning the default behavior is to continue outputting the old value.
The second mixer is another fixed curve, with a value of -100. It is controlled by the Virt1 switch - which means that it's going to be on only if we're not going to spin the props. If it goes on, Virt2 will go off.
The third and final mixer is controlled by the RUD DR1 switch, or rudder dual rate when it's spelled out. If that switch is on, we get fixed output default value of 100. So when we switch the rudder dual rate switch down, Virt2 will go on.
Ok, let's put this all together to see it in action. During normal flying, rudder dual rate is off, flight mode is either 0 or 1, and the throttle output tracks the stick. Virt2 is also off. I throw the rudder dual rate switch, the third mixer for Virt2 goes on, so the safetysw entry for the throttle sets the output to -100. If I turn off the rudder dual rate, the first mixer will keep Virt2 off! I.e. - the throttle output will stay at -100. It will stay that way until Virt1 goes on - meaning things are set so the props won't spin.
I was introduced to this for just the throttle stick as a sticky throttle hold. The first time I tried it with a CP heli, I managed to turn throttle hold off in an inverted flight mode. Fortunately, I was using a sim, so no damage was done, but I quickly fixed it. I call this a safe throttle hold. When using it, your good habits of making sure the throttle is down and you're not in an inverted flight mode will still work - but should you accidental skip a step, it will help you avoid a nasty accident.

A little lagniape

You can also control the display with this software. I have it set this way:

[gui-qvga]
trim=6
barsize=half
box1=Ch1
box2=Ch2
box3=Ch3
box4=Ch4
box5=Ch5
box6=Ch6
box7=Ch7
box8=Ch8
bar1=Ch1
bar2=Ch2
bar3=Ch3
bar4=Ch4
toggle1=FMODE
tglico1=5,6,19
toggle2=Virt2
tglico2=0,13,19
toggle3=AIL DR
tglico3=0,3,0
toggle4=GEAR
tglico4=0,23,0
This displays the values of all 6 trims as bars, and provides the value of all 8 output channels as numeric output. It provides four toggles, from left to right underneath the model name. toggle1 shows the flight mode, switching to white-on-black when in FMODE2. toggle2 turns on a throttle hold icon when Virt2 is on. toggle3 turns on an A-down icon when in airplane mode. toggle4 turns on a G-down icon when you put the gear down.

Summary

This setup allows me to use one model on my Devo 10 to fly both CP helicopters and everything else. With 30 models, I could certainly spare more than one, but that could be problematical as Phoenix doesn't deal well with multiple transmitters.

Review

Let's go over the controls we have.
The elevator, aileron and rudder sticks are sent to channels 1, 2 and 4 respectively. They all have a low rate mode enabled by FMODE being 0.
The GEAR and ELE DR switches are sent to channels 5 and 6, respectively. GEAR being on brings up a G-down icon on the display. The AUX4 knob goes to channel 7, with trim adjustment.
The AIL DR switch switches between CP heli and other modes. When it's on, channel 8 is a mix of the MIX switch and AUX5 and trims, the throttle stick goes to channel 4, and an A-down icon shows on the display. When AIL DR is off you are in CP mode, and channel 8 is pitch, controlled by the throttle. In CP mode, when FMODE is 2 the throttle is full on and you have the full range of pitch available, so you can fly inverted. Otherwise CP mode has the throttle stick with full range and pitch limited to the top 60% of the range. FMODE also has an icon on the display.
Finally, RUD DR functions a safe throttle hold, that re-enables the throttle only when it shouldn't spin the props, adjusted depending on the setting of AIL DR. Whenever the throttle is held, there's a TH icon on the display.

Download

You can download this model.ini file from the deviationTx forums.

Conclusion

While setting up a sim this way is useful, it really doesn't help you become a better flier. What it does do is provide an example of how flexible this firmware really is - and those features come in useful as your aircraft gets more complex. If there is a controller using proprietary firmware that can duplicate this functionality, I'd be interested in hearing about it. Maybe a pointer to the manual?

Postscript

This setup was done with version 3.0.0 of the deviationTx firmware. The next release will have more functionality, adding the ability to use trim switches (which can include the UP/DN/EXT/R/L/ENT buttons) as momentary switches, toggles, and paired switches. I'll probably use some of those on the current switched channels. It also drastically improves the control of the display. Watch this space if you're interested in how that plays out.

Sunday, July 7, 2013

Open Source Controllers

A rundown of the controllers for which open source firmware is available.

Spektrum DX6i

I can hear people scratching their heads from here: The DX6i can run open source software? Cool! Hook me up! Unfortunately, that's not the case (otherwise, I might still have one). However, it's a very popular entry-level controller. It's capable enough that you may never need a new controller, and if you do, it's probably for more channels rather than missing functionality in the controller. You can probably find one at your local club or hobby shop. Reviews range from good value for the money to garbage, so I suspect it's middle of the road. I'm using it as a baseline that I expect you might be familiar with, if you haven't seen any of the others.

Walkera Devo

These are very capable controllers. All the ones you're liable to find come with the latest features the DX6i doesn't have - a backlight, a real speaker instead of a buzzer, vibration warnings, and telemetry. They run the deviationTx Open Source firmware, but without manufacturers support.
These controllers do not have a module system for exchanging transmitters to use different protocols. However, the CPU in the controller actually controls most of the protocol outside the transmitter itself, which means the authors can add protocols - if the radio transmissions are correct - just by adding software. deviationTx supports numerous Walkera protocols, Spektrum's DSM2 and DSMX protocols as well as the Nine Eagles J6Pro controller protocols without further hardware modifications.
You can add a transmitter by soldering it into the controller. deviationTx has support for FlySky (used by some WLToys ultra-micro copters, among others) and Hubsan X4's protocol by adding a module. The next release should have support for FrSky and SkyArtec protocols with an additional transmitter, and support for yet more transmitters and protocols - including the one used by newer WLToys V2x2 quads - is in the works. At the present time, you can only have two extra transmitters in a controller.
This level of control also allows the controller to emulate behaviors that are done at a very low level in transmitter, such as the WLToys extra functions.

Devo 7E

Street price is around $80 at this time. This is an unusual controller, in that it's not much bigger or heaver than the cheap controllers included with most RTF craft. However, it's a fully computerized controller capable of running deviationTx. It's not quite up to the feel of the DX6i - the gimbals don't seem quite as good. Replacing the cheap plastic sticks (it takes Futaba style sticks) goes a long way towards making up for that. It does have two issues:
  1. Lack of controls. It comes with two two-position switches. There are mods to add either two more such switches, or a three-position switch if you're running deviationTx. That firmware also allows you to use the six configuration buttons as three pairs of trims for extra analog inputs, and the next release will allow them to be used as momentary buttons, toggle buttons, or even on/off pairs of buttons, which will help a lot.
  2. The radiated signal is low power. There is a published mod that increases the output power, but it's probably illegal in most jurisdictions.
In spite of those two problems, I think the Devo 7E with deviationTx is the best buy for a first controller, but you will outgrow it if you stay in the hobby any length of time.

Devo 10

The Devo 10 is a full-features, full-size controller. It costs about twice as much as the Devo 7E, but - well, it's more than twice the radio. Better quality, smoother gimbals, and like the DX6i this is a controller you might not outgrow. It's more capable than the DX6i, and generally better quality.

Devo 6s

This is another small form factor controller, like the 7E. Not only does it sport a color touch-screen, but it doesn't suffer from the low power transmitter of the 7E, and has more available controls. Not as many as a full-size controller, but you have to give up something to keep the size down. With the additional controls the next release of deviationTx will make available, it'll have more controls than the DX6i. It's build quality and gimbals are similar to the Devo 10.
The downside is that it costs as much as the Devo 10. Unless the small size or the color touch screen are must-have features for you, the Devo 10 is a better buy.

Devo 8s

Similar to the Devo 10, but with a color touch screen interface at an extra cost. I'm not convinced color touch screens are a good idea for RC controllers: hard to read in direct sunlight, and possibly a bit fragile for something that's going to be dragged to and from flight fields on a regular basis.

Devo 12s

The top of the line. Better build quality, more functionality, better screen - though it is a color touch screen. It still manages to weigh less than the Devo 10. The downside is that it costs about twice as much as the next most costly Devo, the 8s.

Other variants

Some older Devo controllers you may run into.

Devo 6, Devo 8, Devo 12

These are identical to their similarly numbered brethren, except they have no telemetry support. You may be able to add a module to get that, but those are even harder to find than the controllers.

Devo 7

This is not in any way like the Devo 7E. It's more like an early version of the Devo 10. Most importantly, the architecture is sufficiently different that deviationTx hasn't been ported to it. So unless you're looking to do the port, don't get suckered into buying this thinking you're getting the Devo 7E.

TH9X et al

This is a much more complicated set of controllers, because they are made by more than one company, and have numerous aftermarket modifications available.
They are all full-size controllers using full-strength transmitters and have a fairly complete selection of controls. They have a bay that accepts - possibly with some work - JR-compatible transmitters, which allows them to work with receivers for any protocol for which you can find an appropriate transmitter.

TH9X and clones

The original controller was the FrSky TH9X. A number of companies licensed the right to manufacture and sell it under their own brand, most notably Hobby King, under their Turnigy brand. That's the least expensive of the bunch, generally called the T9X, and the one most people think of when they think of 9X controllers. That's the one I'll describe here.
The Turnigy 9X has lower quality than the Devo 7E, much less the DX6i. The gimbals are about the same as the Devo 7E. Other manufacturers could well have used better parts, though their controllers will cost more.
It comes from Hobby King in one of two forms, either with or without a transmitter and receiver. Either retails for about $50. However, Hobby King charges shipping, and has a number of warehouses around the world, which will have a different (usually higher) price and shipping cost. The provided transmitter is also Turnigy-branded, and speaks the FlySky protocol used by FlySky receivers and the older WLToys aircraft (V911, V912, V9x9 quads; not V922 or V2x2 quads). However, the radios can't manage the extra functions of those quads with the shipped CPU. The transmitter is hardwired into the controller, and needs to be disconnected before you can use a transmitter for a different protocol in the module bay.
There are also published mods for taking the transmitter out of a MLP4DSM controller - the controller shipped with smaller RTF E-flite airplanes and Blade 4-channel copters - or similar and soldering it into the controller, allowing it to use the DSM2 protocol.
As shipped, this controllers firmware cannot be updated. That requires a hardware mod. Likewise, it's a fairly primitive controller - no backlight, a simple buzzer the only form of alert, no telemetry. There are mods to fix all of that, as well as upgrade the CPU for more performance, which might enable the WLToys extra functions, or add an SD card for extra storage. Given the appropriate set of mods, you can playback audio files from the SD card for specific warnings, meaning instead of beeping when you turn it on with dangerous switch or stick settings, it tells you about them.
If you buy a controller without a transmitter, you'll have to add one - which will push the retail price out to close to the cost of a Devo 7E, before you factor in shipping. If you buy one with a transmitter, and do an inexpensive version of the firmware upgrade mod, you might be able to get one put together for slightly less than the street cost of the Devo 7E. But adding a backlight is cheap and simple, and real sound playback and vibrations are likewise. Nothing fancy like telemetry, or a better CPU or voice playback, but you've still got fewer features (if more functionality) than the Devo 7E, and have probably paid more for it.
Fully tricked out with all the upgrades, this controller has functionality if not quality comparable to the better Walkera controllers - but you will have spent more on it than they cost you to begin with. Not to mention having to build it yourself.
The likely lower cost and more functionality with a lot less work is why the Devo 7E beats this out as a recommended entry level controller. This is the controller to buy if you enjoy modding electronics.

Turnigy 9XR

This is Hobby Kings upgraded version of the controller. It is also about $50, but is only available without a transmitter. It does have a backlight and a port for upgrading the firmware, but you'll have to buy the programmer and a transmitter before you can use it.
Quality is, if anything, worse than the original. Very few of the parts have changed, and there have been reports of problems with some of the changes that the original didn't have.
It's also the first controller that shipped with open source firmware from the manufacturer. They've released the source, as required by the license. It was dated software before they released it, and most people purchasing this controller upgrade to something newer fairly quickly. However, the community was not involved in the design of this controller, and the response has been fairly poor in spite of the excitement the announcement generated.
This can be a cost effective controller if the size or limitations of the Devo 7E bother you, and you don't want do the soldering required for the TH9X clones.

FrSky Taranis

This is a new controller, and is just starting to get into the hands of hobbyists. It was designed to run the openTx branch of the th9x software, and ships with that installed. It also ships with all the bells and whistles you can add to the TH9X - backlight, vibration, upgraded CPU, SD card, voice playback, telemtery, etc.
This controller has the same module bay for transmitters as the TH9X, so it can fly anything they can. However, it also has a built-in transmitter. You can use them both at once, meaning you could have one transmitter for controlling your aircraft, and a second for controlling an FPV camera, or whatever else you'd like, using just the one controller.
Unlike the 9XR, this controller was designed with involvement from the open source community. The initial response has mostly been positive. It's not perfect, but the problems are minor, and easily correctable if you're so inclined. Reportedly good build quality, high-quality gimbals, and a very solid feel.
It's to early to say for sure, but could well be the controller to buy if you're looking for something that's not at the bottom of the price scale. It's less expensive than the Devo 8s, or than what you'd spend on upgrading a TH9X clone or the 9XR to anywhere near it's capabilities.

Next time

Configuring a Devo 10 running deviationTx to get the most out of your flight simulator, to show how flexible this software is.

Wednesday, July 3, 2013

Open Source RC controller firmware

What's special about Open Source?

I expect most of you have heard of it, but open source software means you can get a copy of the sources and modify them to meet your own needs. An open source version of a firmware controller means - well, you can change it to add functionality to your controller. Adding a backlight to a controller is easy. Making it time out and shut off after a period of inactivity is also easy - with access to the firmware source. Without it, not so much.

What are the choices?

There are a number of choices:
th9x and descendants
th9x was one of the first open source controller firmware options. A number of other options have been branched from it for a variety of reasons. They aren't identical, but moving between them is relatively straightforward
RadioClone
RadioClone runs on the same hardware as the th9x variants, but was independently developed, and is radically different from them.
DeviationTx
An open source firmware for the Welkera Devo line of controllers.
OSRC
The Open Source RC project is not merely an open source firmware project. It includes a modular open source hardware design that the open source firmware runs on. No complete release is available yet.
XPS-3216
This controller is rumored to have open source software, but nothing has been released yet.
The only ones actually available at this point are th9x and variants, RadioClone and deviationTx.

th9x and variants

These generally run on a variety of similar radios, and include support for a fair number of hardware ugprades - most notably custom CPUs and motherboards. That's one of the reasons for some of the variants - they were created to support some specific motherboard. OpenTx seems to be the most popular now, in part because it was designed to be configurable for different hardware variants at compile time, so some of the hardware-specific variants have been abandoned in it's favor. It's what I'm most familiar with.
The variants are generally harder to configure than proprietary radios, because they don't have specific settings for popular aircraft configurations. Instead, you have to know how to configuring things for a specific type of craft. This is alleviated in part by a template system, and in part by desktop software that can read and write the model configurations, and incorporates the requisite knowledge.
On the plus side, the tools for configuring the controller - generally called mixers - are much more powerful than those found in proprietary firmware. Proprietary systems generally only allow a few custom mixes with one or two extra inputs, controlled by a small set of switches. The th9x versions let you have mixes on every output channel, have virtual channels, have input counts limited only by memory, and can be configured to be controlled by any switch on the device, including things that aren't normally switches, and virtual switches that are the result of evaluating boolean expressions involving the same set of switches - including themselves.

RadioClone

This runs on the same basic radio as the th9x software, but takes a different approach to providing flexibility. I'm not really familiar with it. If you're interested in an in-depth look, leave a comment asking for it.

deviationTx

deviationTx runs on the Walkera Devo line of controllers. These have a generally more powerful CPU than the controllers used by the th9x software. It does have a standard mode for helicopters that resembles proprietary firmware controllers, as well as an advanced mode that resembles the th9x software, but doesn't seem quite as powerful. The software is newer than the th9x software, so I'm still investigating how powerful it is, and it's adding new capabilities quite rapidly. The UI - at least on the more expensive radio with color touch screens - is much better than the th9x software.

Next time

I'll look at the hardware available to run this firmware.