Archive | January 2014

Arduino Pro Micro 3.3v Based HID Flight Controller Box

From time to time me and my closest friends like to have a good bout in IL-2 Sturmovik  . Despite being released in 2001 this game still seems to be the go to sim for online fighter battles. The one thing that always irritates me is keeping track of my key mappings while preoccupied with trying to fly a plane. There’s nothing worse than lowering your gear in the middle of a turn or worse, accidentally dropping the only bomb you have in the wrong place because you hit G instead of B…especially if the wrong place is 20ft above your own runway, where you’d normally be raising gear. Anyhow, to solve this problem I built this.


It may not be pretty but it should do the job. It gives me 5 way selector switches for flaps, potentiometer sliders for mixture and pitch control, missile still switches for…missiles I guess :), and a few switches for things like gear and ignition.

The guts are fairly simple, it’s all straightforward IO wiring into a Sparkfun Arudino Pro Micro. I made a poor choice here though,  I bought the 3.3v version, which happens to run at 8Mhz instead of the 16Mhz that the 5v version does. This shouldn’t really have been a problem but I was making use of the Leojoy package to get this working and, despite being an excellent package, it came with a couple of snags.

If you’ve got a 3.3v pro micro (or potentially any 3.3v/8Mhz leonardo based board) you’ll need to take a couple of steps to get it working. 

1. Install the leojoy package following the instructions included with it. Once its installed you should be able to build, compile, and upload your sketch to the board using the “LeoJoy!” board type, however when it resets after loading you’ll get a “Unrecognized USB Device” error, and the device will show up as a disabled “Unknown Device” in your device manager. To fix this:

2. Add the entry below to your .\arduino\hardware\leojoy\boards.txt

############################################################## Pro Micro 3.3V/8MHz Leojoy!

This will add a “SparkFun Pro Micro 3.3V/8MHz Leojoy!” entry to your list of boards in the arduino IDE. This entry is a copy of the one that comes with the sparkfun addons for their versions of the pro micro but with the “name”, “vid”, “pid”, “core”, and “variant” fields changed to line up with the LeoJoy board configuration. The VID and PID change is what allows the device to be identified as a HID device on connection. The “core” option is what points the compiler to the LeoJoy set of code files on compilation. 

3. Open up  .\arduino\hardware\leojoy\cores\leojoy\USBCore.cpp and replace this line:

PLLCSR = 0x12; // Need 16 MHz xtal

with this

#if F_CPU == 16000000UL
 PLLCSR = 0x12; // Need 16 MHz xtal
 #elif F_CPU == 8000000UL
 PLLCSR = 0x02; // Need 8 MHz xtal

It seems that in the version of the core that leojoy was compiled with there still wasn’t the support for the 8Mhz crystal option.

After making these two changes you should be able to upload the sketch to your board and have it show up as a game controller. 


Hopefully this helps anyone else out there hung up with the 8Mhz version of these nifty boards.

Raspberry Pi WSPR Bucket Beacon

It was a snowy lousy day here which was a good excuse to stay in and play with the Pi I had kicking around. I used the software and instructions from the package located here . Whipped together a lowpass filter that could be plugged in easily for the 20m band. Powered the package with the battery from my old IC-02AT and a LM2577 based module to get the voltage right for the Pi.

Here’s all that junk together before it went in the bucket.


The guts of the bucket beacon

This was all tossed in an kitty litter bucket to keep the snow out and taken out in the backyard. A quick and dirty 20m dipole was strung up between a couple of trees a few feet off the ground. In the picture you can just make out the bit of red signal wire strung to the the 1:1 balun that the bucket ties into.


I really wasn’t expecting much from this 2 hour cobble, but the result was actually quite decent. From my QTH in Waterloo I reached out to as far as Edmonton, Dallas, and the west shore of Florida.


A pretty neat little project for a Friday afternoon.