Saturday, December 28, 2013

An Anemometer for your model airport


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.


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.


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
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.


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


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.


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.