New gadget testing

Along with load of keyer circuit board delivered today were some prototypes I had ordered.  I’m working on three different projects for the plane.

  1. Bluetooth stereo interface to the intercom.  This one is a little frustrating.  I have a BT stereo module, and the interface between the headset microphones and the mic input works fine.  I can make a call with my cell, and I sound fine on the other end.  However, the intercom music input is designed for speaker level outputs.  The BT module has line level outputs.  I have another one that will, like many others I see, drive speakers — but it has no mic input and the speaker drive is not suited for common ground.  I don’t want to add a separate stereo amplifier, but I may have to.
  2. The second board will allow switching between the Garmin GPS and a BT serial connection, so I can drive the autopilot from my tablet running Avare or Naviator.  This one needs a little tweaking but will be OK.  I had assumed since the BT serial module has a 3.3V output, that it is non-inverted serial.  Nope.  It’s inverted.  Tomorrow I’ll do some mods to turn the inverting level shifter in a non-inverting level shifter (it’s just a 2N7000 and a couple of resistors).
  3. Have not even assembled the third one yet, it’s a lower priority.  This one will let me add a canopy latch alarm to the Dynon D180 equipped RV-12.  I’ve gotten good about latching the canopy before the run-up, but I’d still like to get this board working.  It piggybacks the canopy latch on the spar pin line, and alarms if the spar pins don’t show as latched (kind of important), OR if the canopy is not fully latched AND the engine is above 3900 RPM.  That way you can start up and taxi with the canopy propped open, but it will alarm during the runup if it’s not latched.  To do that we have to monitor the serial data stream from the D180 to grab the engine RPM.

 

Weather station reporting

I recently put my AcuRite weather station back up after having it sitting in the garage for a year or so.  I have the Internet Bridge, which recently got a firmware update, and wanted to have it reporting to both AcuRite and Weather Underground.

AcuRite’s site will apparently update WU, but only at 15 minute intervals.  And, I wanted to also collect the data locally so I can feed it into Splunk or some other tool for my own use.

Problem is, the AcuRite gateway box only sends data (via HTTP GET) to one fixed hostname that’s hard coded, hubapi.myacurite.com.  SO…  first we intercept those DNS calls to send them where we want them.  In named.conf:

acl wxbridge-only {
        ip.of.wx.bridge/32;
};

view "wxbridge-view" {
        match-clients { wxbridge-only; };
        zone "hubapi.myacurite.com" {
                type master;
                file "hubapi.myacurite.com";
        };
};

And the zone file:

$TTL 14400
@               IN      SOA     localhost. dale.botkin.org. (
                                2016081803
                                3600
                                3600
                                604800
                                14400 )

@               IN      NS      localhost.

hubapi.myacurite.com.   IN      A       ip.of.local.server;

Now the weather bridge, and ONLY the weather bridge, gets your local machine’s IP address for hubapi.myacurite.com.  So next we create a PHP script and use Apache to point /weatherstation to it (ScriptAlias /weatherstation /var/www/cgi-bin/updateweatherstation.php in my case).  The script sends the original HTTP request to hubapi.myacurite.com, then reformats it and sends it to wunderground.com.  It’s also preserved in the Apache access log, so you can ingest it into Splunk.  You could also syslog it or write it to a file, whatever you want.  I started out using a script I found that Pat O’Brien had written, but ended up rewriting it almost entirely.  It’s been years since I wrote a PHP script.

<?php
 // First send it to AcuRite, no massaging needed...
 $acurite = file_get_contents("http://hubapi.myacurite.com/weatherstation/updateweatherstation?" . $_SERVER['QUERY_STRING']);
 echo $acurite;
 // Now re-format for wunderground.com. We don't always
 // get every parameter, so only send those we do get and
 // strip out those that wunderground won't accept.
 $msg = "";
 $winddir = (isset($_GET['winddir']) ? "&winddir=".$_GET['winddir'] : null);
 $windspeedmph = (isset($_GET['windspeedmph']) ? "&windspeedmph=".$_GET['windspeedmph'] : null);
 $humidity = (isset($_GET['humidity']) ? "&humidity=".$_GET['humidity'] : null);
 $tempf = (isset($_GET['tempf']) ? "&tempf=".$_GET['tempf'] : null);
 $rainin = (isset($_GET['rainin']) ? "&rainin=".$_GET['rainin'] : null);
 $dailyrainin = (isset($_GET['dailyrainin']) ? "&dailyrainin=".$_GET['dailyrainin'] : null);
 $baromin = (isset($_GET['baromin']) ? "&baromin=".$_GET['baromin'] : null);
 $dewptf = (isset($_GET['dewptf']) ? "&dewpointf=".$_GET['dewptf'] : null);
 $msg .= "dateutc=now";
 $msg .= "&action=updateraw";
 $msg .= "&ID=<your weather station ID here>";
 $msg .= "&PASSWORD=<your weather station password here>";
 $msg .= $winddir;
 $msg .= $windspeedmph;
 $msg .= $humidity;
 $msg .= $tempf;
 $msg .= $rainin;
 $msg .= $dailyrainin;
 $msg .= $baromin;
 $msg .= $dewptf;
 $msg .= PHP_EOL;
 $wunderground = file_get_contents("http://rtupdate.wunderground.com/weatherstation/updateweatherstation.php?".$msg);
 // Let's log any failures with the original message, what we sent,
 // and the response we got:
 if(trim($wunderground) !=  "success" ) {
 openlog('weatherupdate', LOG_NDELAY, LOG_USER);
 syslog(LOG_NOTICE, $_SERVER['QUERY_STRING']);
 syslog(LOG_NOTICE, $msg);
 syslog(LOG_NOTICE, $wunderground);
 }
?>

So far it’s been working fine for a couple of days. I have noticed that the AcuRite 5-in-one station will go for extended periods without sending some data – it seems like it only sends what has changed, or what has changed with seemingly random pieces of information.  For example, it may send the barometric pressure even if it hasn’t changed, but not the temperature or wind direction if they’re stable.  It’s weird.  Of course now I understand why they only send periodic updates to Weather Underground.  AcuRite’s own site seems to mask this behavior, but Weather Underground does not.  I’m thinking about keeping a persistent state file and sending every parameter with every update, or collecting updates and just sending WU a digest every minute or two.  But that’s a project for another day.

 

A new regulator for the Rotax 912

Depending on whom you listen to, the Ducati regulator supplied with the Rotax 912 ULS in the RV-12 is either a good, solid piece of equipment or a failure just waiting to happen.  I have not had mine fail, but I have noticed that the charging voltage is a little low.  I don’t think I have ever seen it above 13.7 V while in flight, and it’s lower on the ground.  Given that Odyssey recommends 14.2 to 14.7 V charge voltage, I’d like to see it a little higher to get as much life out of the battery as possible.

I’ve read quite a bit on VAF about replacing the original regulator with one designed for John Deere garden tractors.  The compatible John Deere part number is AM101406, and aftermarket replacements are readily available.  They’re everywhere, as a matter of fact.  As it turns out, it seems to be a pretty popular regulator for other applications as well.  At $30 a pop or so, delivered, they’re pretty inexpensive as well.  The only challenge is mounting it, since the hole spacing on the Ducati is wider than the JD item.  The Ducati regulator is about 3-5/8″ between the hole, while the JD replacement item is more like 2-3/8″.

There are several ways to skin this cat.  Some guys have installed an additional nut plate.  My plane is built and I really don’t want that hassle.  I wanted to use the hardware I had on hand, and be able to switch back to the original regulator if needed.  Since mine has not failed, it will be fine to use as a spare.

Below are pictures of a mounting plate that I fabricated from some .125″ stock I had on hand.  Actually it was part of a piece of AL angle stock, with one side cut off with a band saw.  I marked and drilled holes to match the Ducati regulator, then counterbored 1/2″ holes on the bottom to clear a pair of AN3 bolts I had on hand that just happened to be exactly the length I needed.  This mounting plate allows me to use the original pair of bolts to mount the assembly in the plane, and if it ever becomes necessary I can drop in the original regulator with the same bolts.

A brief ground run confirmed that the charge voltage holds steady at 14.2 V down to about 1700 RPM or so, where it drops off slightly.  I noticed none of the voltage fluctuation I have seen with the Ducati regulator.  I’ll throw the original in the plane for a while just in case, but so far it’s looking good.

USB charging for the RV-12

I decided that the only thing I would ever use the 12V power point in my RV-12 for would be to plug in USB power supplies.  So, I figured, why not bypass the middleman and just install a USB charging plug?

It’s trivially easy to find a dual-outlet USB charging jack with the same form factor as the Van’s supplied 12V outlet.  The only downside I could find was a constant 10-15 mA current draw.  The USB power point is a switching regulator and an LED.  Even after clipping one lead to the LED it still draws about 10 mA.  Now, normally the 12V power point is wired directly to the battery positive terminal with an in-line fuse holder.  It would probably take a long time for that 10-15 mA drain to make a real impact on the capacity of the PC680 battery in the RV-12.  It would only be a factor if the battery were weak anyway — precisely when you don’t want any excess drain.  Plus, the old repair guy in me just doesn’t like the idea of cheaply produced electronics left under power all the time, unattended in an airplane parked in a hangar.  Just to be sure I could shut everything off, I moved the supply lead from the positive battery terminal to the switched side (inboard side) of the master contactor.  Now I have USB power controlled by the master switch.

It may be that at some point I will want to plug in something that requires 12 V – like a tire inflator, for example.  I plan to put some leads and small battery clamps on the old power point and keep it around just in case.

ADS-B followup

Fun stuff…  so I’m playing around with several different aviation apps on my Android tablet, with a Stratux setup just sitting on the window sill of the spare bedroom where it can “see” enough GPS satellites to get a position fix.  I’ve got one SDR radio receiver on it, set up for 1090 MHz to catch transponders in passing aircraft.  I went in to plug the power in to charge the tablet — I’d left it in there overnight — and saw half a dozen targets displayed.  I zoomed in a little and there’s an American flight at 31,000… A Virgin flight headed for Newark…  Hey, wait a minute — one looks familiar!

Screenshot_2016-03-16-13-01-03

N151MH – a friend and fellow EAA Chapter 80 member, out in his ADS-B “out” equipped RV-12.  Absolutely beautiful day for it, too!  Have fun, Mike!

Adding ADS-B IN

I really wanted to add ADS-B to the RV-12, for some pretty obvious reasons.  Getting weather and traffic data for improved situational awareness seems like a really good idea.  I’m also not thrilled with the tiny buttons and small screen of the Garmin 496 currently mounted in the panel.  So, I started looking at various alternatives for ADS-B IN.  I figured I had several choices…

  1. Do nothing.  No weather, no traffic, no expense.  Punch flight plans into the Garmin 496 by hand, let that drive the autopilot.  It’s not the worst fate, but there are better ideas.  Cost: None.  Benefit: None.
  2. Pay a ridiculous amount monthly for XM WX, still get no traffic.  No freakin’ way.  Cost: High (several hundred per year).  Benefit: Very low.
  3. Replace the Garmin 496 with a 696 and GDL-39.  I was almost there.  I bought and repaired a used 696 and it’s very nice.  The GDL-39 is not cheap, but I’d have traffic and WX.  Flight planning is easier, but the maps need updating ($$).  Plus it would take MAJOR surgery on the panel — like rip everything out, rearrange it all and rebuild the entire panel with everything custom.  Cost: Mid-high, even after selling the 496 (it’s a little scuffed and gouged on the edges).  Benefit: Mid-high.
  4. Foreflight running on an iPad Mini, with Stratux.  It’s almost a perfect solution…  but it won’t drive the autopilot, which means I’d have to enter the flight plan twice (once in FF, once on the 496) and any enroute changes would need to be done in two places to keep the AP on course.  Foreflight would require an annual expense, though it’s not too bad.  And of course iPad Minis are not cheap.  Cost: High.  Benefit: High.
  5. Avare running on a Galaxy Tab S2 8″, with Stratux.  Avare is completely free including charts, maps, approach plated, A/FD, all of it.  It’s not QUITE as nice or as smooth as ForeFlight, but fairly close.  And it will drive the autopilot with a bluetooth-serial converter, which FF cannot do.  I can keep the 496 in the panel as a backup just in case.  Cost: Medium.  Benefit: High.

I seriously considered 3 through 5.  If I’d been able to figure out how to reduce the amount of panel rework for the 696, or if the cost of the GDL39 wasn’t so high ($400+ used) I’d have probably done that.  As it is, I picked up a used 696 cheap, repaired the battery connector, and will sell it — probably for enough profit to pay for the Galaxy Tab.  That would make my total ADS-B/EFB setup cost under $200, even after mounting good antennas on the plane.

 

Sorry, I don’t read Chinese…

For the past several weeks I’ve been getting a fairly large amount of Chinese language spam leaking through. Since nearly all of the data (From:, subject, etc) are Chinese characters, my regular Postfix spam filters have not been effective in eliminating it. I finally got tired enough of it to do a little Googling. It’s trivially simple to just reject any incoming email with Chinese characters in the subject line:


/^Subject:.*=\?GB2312\?/ REJECT Sorry, this looks like SPAM (C1).
/^Subject:.*=\?GBK\?/ REJECT Sorry, this looks like SPAM (C2).
/^Subject:.*=\?GB18030\?/ REJECT Sorry, this looks like SPAM (C3).
/^Subject:.*=\?utf-8\?B\?[456]/ REJECT Sorry, this looks like SPAM (C4).

I made the change last night, and this morning came in to find no Chinese spam and several rejects in the mail log… all from pretty obvious spam sources, like this one:

Jul 6 01:12:51 newman postfix/cleanup[30385]: 99EB31A6D3: reject: header Subject: =?utf-8?B?44CQ5Lqk6YCa6ZO26KGM5L+h55So5Y2h5Lit5b+D44CR5bCK6LS155qEZGFpbmlz?=??=?utf-8?B?6I635b6XMTAw5YWD57qi5YyF5aSn56S85rS75Yqo6LWE5qC877yM6aKG5Yiw5bCx5piv6LWa?=??=?utf-8?B?5Yiw?= from spamtitan2.hadara.ps[217.66.226.109]; from=<wkh@p-i-s.com> to=<dale@botkin.org> proto=ESMTP helo=<spamtitan2.hadara.ps>: 5.7.1 Sorry, this looks like SPAM (C4).

How much is your time worth?

Lord, I hear this question so often as justification for an overpriced widget or service.  Apparently some people think one should spend any amount of money to avoid doing a few hours’ worth of work.

The latest example is a neat little box for use on experimental aircraft.  It replaces the traditional master battery and starter contactors, as well as a current measuring shunt and maybe a fuse or two.  I think there may even be a diode or two thrown in for good measure.  It would simplify the wiring on the firewall side of an experimental plane, sure.  It might even shave one or two nights off of your build time.  Maybe.  You’ll still need to do some wiring, and of course there’s a nice canon plug on the back side, so you’ll still need a crimp tool and it’ll need to be connected to various switches and stuff on the panel.  All in all, I’d say it would be a nice little $200-$300 box.

The problem is, they’re apparently going to want about $1200 for  it.  Say what?  that’s about $1050 or $1100 more than I’d spend on the parts to do the job the old fashioned way.  On one of the very few online forums I use any more, there is a little bit of discussion about it.  And just as sure as Godwin’s Law it’s only a matter of time before someone chimes in with, “How much is your time worth?” – as if that justifies any expenditure, no matter how ridiculous.

Well, I’ll tell you.  For one thing, my “internal billing rate” — how much time I’m willing to expend to avoid an expense, or conversely how much money I’m willing to spend to avoid work — varies greatly with how much I enjoy or do not enjoy the work to be avoided.  Self-surgery?  Yeah, sure, I’ll pay a professional to avoid doing that work.  Mowing the lawn?  It better be cheap, I’m not shelling out $40 a pop for that.  Wiring work on an airplane I’m building?  Well, let’s just say $1200 will buy an awful lot of hours.  I figure it will probably take about 2 evenings of work — let’s be really generous and call it six hours — to do that wiring, of which maybe half would be saved using the new whiz-bang box.  So that works out to – oh, let’s see, carry the one…  roughly $350 an hour, and if the bloody thing ever breaks I have a plane out of commission for God only knows how long, versus a trip to Auto Zone for parts.  I don’t know how long they will be manufacturing and supporting these, but I’ll bet my airplane is flying for longer than that…  meaning that some day this thing is almost certainly going to cause a time consuming and expensive problem.  Hmm, there goes all that time we “saved” on the front end.

I’m sure they’ll get some customers, but I’m afraid I won’t be one of them.  And I won’t even feel like a tightwad.

 

Various stuff…

First of all, sue me…  I’m loving the iPhone.  I never thought I would.  There are a few little annoyances, but overall it’s a great little widget.

Went to the Ak ARC flea market Saturday.  I had a table to sell kits, but I don’t know why I bothered.  I did (just barely, maybe) cover my breakfast, the table and my gas to drive there and back, so I guess it was OK.  Honestly, I think most of the stuff for sale was the same crap I’d seen last year.  There was, however, a table set up by the Omaha Maker group, and separately a ham had a 3D printer running printing out something or other, I never did figure out what.  So why did I go?  It was good to see and talk to some of the hams I only see once in a while.  Jack WA0SAQ was there, Dave WJ0Z and some others I seem to only see once every year or five.

I did some CNC engraving on the end panels for a new flavor of PicoKeyer.  I think it turned out pretty well.  It will be a little extra work — OK, a lot of extra work, but I think it will be worth it.  This will also probably be the motivation I need to finally break down and make a better fixture for the end panels I use for the boxes.  Maybe something I don’t have to stand there and hold each one in place.  It would be a worth a lot to me to be able to not stand there the whole time the mill is running, holding parts and trying to avoid getting an end mill through a thumbnail.  McMaster, here comes an order!

And…  some days I miss not having something that looks like airplane parts in the garage.  In a couple of weeks, though, I should have a “canoe” going and by Spring it should be looking airplane-y again.

That is all.

Technical stupidity.

It baffles me how people let their stuff get so messed up, and how companies will go so far out of their way to NOT be there for customers.

I got a phishing scam email supposedly from First National, where we used to have accounts.  Being the nice guy that I am, I figured I’d let them know the specifics.  After all, some people are dumb enough to fall for stuff like this.  A fake “IRS agent” almost managed to convince my 88-year-old mother to wire a few thousand dollars to avoid going to jail — never mind that she doesn’t owe the IRS a penny, never has and has never tried to cheat on her taxes.

Well, of course the only way to contact FNBO or FNNI is via a web form.  So I spend several minutes sending detailed information to them — the target web link, the email header, etc.  Then I hit the “Submit” button…

And got an error message.

Screw ’em.