The post-truth era

Here is a truth bomb about the post-truth era.  Decode this if you can.  As you straddle this problem, remember that sometimes people are playing chess when they really should be playing checkers.
85385 97713 47482 62190 34907 20718 28780 25474 90275 51999 08575 87906 82090 85090 54906 90803 12972 82832 75900 82694 90529 31907 00716 83109 03739 07907 90191 90825 71756 82729 07268 57754 19073 82679 07290 27509 07134 71080 29023 90086 80786 54908 57587 90383 82907 08265 41906 82090 13907 98371 75907 86827 40829 02756 49082 08183 58207 29073 38290 18382 84584 67890 64729 08208 08237 28371 25349 19075 09082 06134 07290 38382 90795 47219 07568 40900 84378 84072 90275 09067 05785 28790 23907 53129 07907 90192 90700 75684 53821 90382 90572 06190 27562 90716 49070 09071 38050 72907 38237 99080 08213 49023 90800 82134 91907 90790 19068 20901 83707 60712 90239 07964 87903 73902 75090 16790 90728 74679 57119 03739 07404 02571 90084 37883 25349 06472 90850 90756 84090 71397 08437 88407 29085 52759 02750 79919 03838 29082 07862 53417 55809 08552 75902 75079 90126 82207 29038 32907 98328 36787 88790 70040 73571 56789 29078 57709 02750 90177 57878 90373 90796 77547 49069 01800 68292 90382 90126 82254 74906 90735 82091 90902 75090 75312 90853 83787 29018 08206 72902 75090 79079 09023 90327 50829 07531 21929 06472 90275 09079 07909 07507 88007 29027 50907 53129 07378 38382 51759 19027 50907 93820 90790 79019 02750 90753 12907 13837 87290 12382 09290 27509 07938 20907 00407 35219 05290 71383 78729 08206 80902 75831 90780 67254 74902 39038 38290 84082 87907 86827 40907 08265 41919 03840 82902 57909 29027 55190 71397 08437 88325 34906 78783 85072 90831 90239 07007 13790 90275 09084 61278 87908 03850 82738 37892 90207 17543 78374 57167 89071 58457 85886 25349 08509 06820 90237 26879 19090 15471 09027 50907 20840 78380 79042 90373 90796 11907 90725 69064 72901 37156 78907 90725 69290 27508 20907 56190 70004 90690 73834 72679 04267 89017 55732 90549 02750 90706 78647 10903 73908 03850 82907 00285 00490 83190 64729 02750 90790 79019 19090 54906 49004 84582 34790 42908 57508 20907 90790 19071 64908 18357 17778 87901 80820 67292 90275 08209 05190 78011 90107 80712 58409 08082 01183 82090 23907 00907 00407 35715 67890 23902 75090 75312 90382 90084 04907 00902 82830 91909 05290 76831 29075 68409 01379 09013 82290 37390 68080 06789 02756 29067 87838 51905 29023 90180 82067 29073 82379 90753 12902 39075 31291 90901 54710 90275 51901 75573 29290 79079 01904 38590 83109 08319 07338 29027 50582 90700 40735 29067 83409 29071 37980 02547 49085 52759 03275 08290 79079 01907 33829 01806 71090 54903 83829 07082 65419 06472 90041 78684 54749 03838 29067 12534 19190 90275 83190 85090 68209 04385 90549 06908 03129 72828 32759 00826 92908 25730 90855 27590 72584 51534 90647 29071 34737 85712 91908 50906 82090 27509 01378 72508 21903 73902 75058 29085 68219 29070 09052 90275 82383 74759 03478 54090 28237 87854 74903 82907 85208 26787 88790 72875 47490 34902 75090 70622 78073 50787 29190 90084 04907 13828 03826 25341 92907 43840 82479 04219 06472 90820 78574 53419 06820 90690 73382 79903 73907 90790 92904 38590 73007 25474 90373 73903 73908 31919 02750 10905 41252 83253 41907 16490 70090 70040 73571 56789 29067 87890 85090 79831 29072 39051 90239 08347 20821 26472 90275 01090 79079 01906 47290 12008 29027 50799 02385 68272 19069 07938 20907 98328 36787 88790 70040 73571 56789 08207 86253 41755 80919 08562 71759 07264 90720 44022 93190 20729 02678 77907 26474 08238 31907 90790 191

Suncom Tactical Flight Controller USB Conversion

Note:  If you are seeing this note, then you are looking at an incomplete draft.  Keep checking back as I complete these series of blog posts over the next week or two.

 

I am starting my own flight simulator cabinet build.  I want it to resemble the F15/16/18s I would see growing up on various Airforce bases and also be a good fit for some of the early 90s arcade flight simulators I played back in the day like Steel Talons.   I figured the best place to start would be the controls.  I went looking around for a nice HOTAS setup.  I really liked Thrustmaster’s Warthog, but I didn’t want to spend $500.  I turned to looking on eBay, finding an old school Suncom SFS Throttle/F-15 Tactical Flight Controller for $50- just in time for Christmas.  Christmas day, I ripped open my present and absolutely loved the look and feel of these controls!

They are amazing controllers, but go cheap because they require an obsolete gameport to connect.  I wanted so badly to try them out, so I hooked them up to a USB gameport adapter I had on hand.  Sadly, it didn’t work for any of the flight simulators I tried.  Even though the gameport adapter works, it appears the controls need special drivers to work.  I found the FUSBA from a cursory Google search on conversion kits, but it costs $100.

The case for a full on USB HID Joystick conversion was mounting- no need for an expensive USB converter or special drivers.  I ended up purchasing two $10  P-Star 25K50 Micro boards from Pololu and converted both controllers to USB myself.  The conversion wasn’t that difficult.  I converted the joystick to use a scanning matrix with some 1N4148 diodes, slightly modified the throttle’s scanning matrix and adapted Microchips USB HID Joystick demo.

I took apart the joystick grip to see what I am working with.

It appears to have some kind of encoding circuitry already, which I promptly desoldered, so I could replace it with a simpler 2 x 4 diode scanning matrix.  I modified the PCB so that I could put the hat switch on one row and the Guns, Missile, Thumb and Pinky switches on another.

Confused about matrix scanning and why there are diodes in the circuit? Check out my blog post on matrix scanning <read more tag here>.

Gameports typically used slope conversion, which measures the time it takes to charge and discharge a capacitor through an input resistance.  So the potentiometers are wired as variable resistors using two wires, which the successive approximation ADC on the P-Star can’t read directly.  To produce the voltage signal the ADC needs, I simply added a connection to the potentiometer that would let it be used as a voltage divider as shown:

If you can maneuver your soldering iron around the small space, I can tell you from experience it might be preferable to dismantling the joystick gimbal and spending the next hour trying to reassemble it.  Later, I will revisit the gimbal with some improvements that address the large amount of backlash present.

Another issue that surfaced was the fact that these potentiometers were 100K, way higher than the maximum 10K source impedance the PIC18F25K50’s ADC on the P-Star can accommodate.  This resulted in inaccurate readings during tests, until I upped the acquisition time (TACQ) to 64 TAD.  In this case TAD was set to 1.3 microseconds (FOSC/64 at 48Mhz.)  It might have been possible to add a small capacitor across the input terminals, but I wanted to keep the component count as low as possible.

Lastly, there’s a beautiful jumbo red LED right next to the hat switch.   Maybe I can have it flash during a missile warning or serve as some kind of master caution.  I wanted to make it accessible to flight simulators and MAME, so I wired it to the P-Star’s RB5 output for around 5 mA of drive current.  Of course I would have to incorporate an additional USB driver to tie into the simulator’s output subsystem, but at least the functionality is enabled for when the time comes.

You can find the software here, how it works <here> and how to modify it <here>.

Almost done with the joystick!  I finished up by organizing the wires, adding strain relief for the USB cable, soldering the headers and P-Star into a breadboard and mounting it as shown:

The throttle is considerably more complicated, probably to implement the keyboard interface and mapping.

I removed the circuit boards, disconnected the headers and reversed engineered the scan matrix.

I modified the matrix to have 3 rows and 8 columns by connecting the blue wire from the right throttle grip to the green wire on the left throttle grip.  Then, I connected the orange, brown, yellow and red lines on the left grip to the brown, purple, black and gray lines on the right grip respectively.

As with the joystick, I had to add a third wire to the potentiometers so that they can be read by the ADC.  I was able to avoid dismantling the throttle assembly by careful maneuvering during soldering.

The throttle’s potentiometers suffered from the same bad readings as those on the joystick and it was easily resolved by increasing the acquisition time to 64 TAD.  I’m not satisfied with the response curve from the linear pot arrangement, so I will be revisiting this soon and replacing them with rotary ones.

Finally, I organized the wires, added strain relief for the USB cable, soldered the headers and P-Star into a breadboard and mounted it as shown:

Of course, the software for the throttle was a pretty straightforward modification of the one I created for the joystick.  I had no problems getting these controls to work (even with Linux) on X-Plane, Warthunder and various MAME arcade games like Steel Talons, Wing war, F-15 Strike Eagle, Air Combat and Starblade.

Not only do I have a nice Joystick and Throttle, but a template for converting other controls, like a rudder or interfacing to things like landing gear, flaps, etc.  In the end, I spent around $75 on this project, so things are off to a good start.  Stay tuned for the rest of the flight simulator cabinet build, more to come soon!