Flight Trim

Cessna Trim-Wheel

My daughter is keen on flying simulators and wanted a Trim Wheel for her birthday. Unfortunately the main supplier of simulator trim wheels (Saitek) doesn’t seem to sell them in the UK anymore. So I decided to figure out how to make one.

Apparently a real trim wheel (or trim-tab) generally has a long cable attached to a pulley which is turned by the wheel. The cable causes the elevators to move very slightly so that it is possible to ensure that the plane stays in level flight at the current speed. So in order to make something similar I’d need to add a wheel onto Grace’s existing flight controls and try to make it not look too out of place.

Part from Ebay

My first thought was that the wheel in the Cessna Trim-Wheel photo looks clearly metallic and it would be hard to make something like this with my limited metalworking skills. So I looked online for real parts and found a nice wheel-only part on Ebay which wasn’t too expensive $20. I bought it a couple of weeks ago but unfortunately it didn’t arrive in time for her birthday (it was coming from the US) a couple of days ago – indeed it still isn’t here.

So I’ve ended up with a fully 3D printed version (design files here) and it doesn’t look too bad in fact.  I tried to get the curve of a cowl correct to blend in with the Saitek controls she already uses. I didn’t get it quite right but it does hide some of the workings and makes it look a little more professional.

Magnetic Rotation Sensor

Sensing the position of the wheel is done using a magnetic rotation sensor – AS5048A.  I actually had an evaluation board for this part and that made it very easy to use. It has four mounting holes and I ensured the centre of the sensor chip would be in-line with the axis of rotation of the wheel.

The only tricky part of the design was getting the magnet (which is simply magnetically stuck to the end of the bolt which forms the wheel axle) to stay put and centred on the sensor. It kept wanting to attach itself to the bearings that hold the axle or any metal tool that I happened to be using nearby. A tiny spot of superglue seems to have fixed that – for now at least.

The wheel is held in place by a nyloc nut which is sandwiched between the two bearings. This allowed me to make the whole assembly quite a bit thinner.

Teensy 3.2

Teensy 3.2

The people at PJRC are seem to be pretty interested in gaming uses for small microcontrollers and have made it possible to create a USB joystick emulator with minimal code. In fact in only around 10 lines you can have a working Joystick which reads its data from a potentiometer or similar.  The extra code to get readings from the AS5048A uses a library which was originally written for the Arduino and doesn’t seem to have any attribution – apologies if that’s not the case but the source code I have doesn’t explain its origin or licensing.

#include "AS5048A.h"

AS5048A angleSensor(10);

void setup()
{
  Serial.begin(19200);
  angleSensor.init();
}

void loop()
{
  delay(100);
  word val = angleSensor.getRawRotation();
  word joyVal = val/16;
  Joystick.X(joyVal);
}

The full source code is here.

Programming the Teensy is done using the Arduino IDE. A key part is to choose the correct settings for the USB Type and CPU speed in the Tools menu. I found that the highest speed didn’t work with the AS5048A.

Connections

The AS5048A can run off 3.3V directly and in this mode the 5V and 3V3 lines are both connected to 3V3 of the Teensy. The full list of connections is:

AS5048A Pin NameTeensy 3.2 Pin NameTeensy 3.2 Pin Num
GNDGND
3V33V3
5V3V3
MOSIDOUT11
MISODIN12
SCKSCK13
SDACS10
PWMN/C

Using in FSX

To use the trim wheel in FSX simply requires adding it in the settings. Plug the teesny into USB on flight simulator computer and then follow instructions for adding any trim wheel such as Saitek – e.g. Youtube video here

The trim wheel will appear in the settings as SerialKeyboardMouseJoystick or similar.

Outcome

The good news is that it works and my daughter seems pretty happy with it!

Additional Photos to Help with Construction

Comments 22

  1. Rob,

    I want to build this for my ten year old son and I. Where did you get your 3D files printed and what was the cost? It seems from other posts you have a 3D printer?

    In the US I can take these files to a professional mailing store like UPS or similar. I was going to submit your files for a quote.

    The other project I am debating tackling is to build a set of rudder pedals.

    Thanks
    Patrick

    1. Post
      Author

      Hi Patrick, sorry for the delay in responding. I did print the parts myself but it wouldn’t be difficult to get them done by a 3D printing service. Please let me know how you get on and if you need any advice on other aspects. I did think hard about making some rudder pedals and I found a design (not open source) that looked as though it wouldn’t be too difficult to work from. However, I was slightly put off by some comments that to “feel right” rudder pedals should have some kind of feedback which depends on speed and angle and I wasn’t sure I’d be able to achieve that. So my daughter is still waiting for pedals! Regards Rob

    1. Post
      Author

      Hi Park

      I used the evaluation kit described in the second link you sent. It combines the sensor AS5048A onto a small PCB so that it is easier to make connections to the chip. The list of connections between the Teensy and the evaluation kit PCB is listed in the table. Let me know if you have any more trouble.

      Best wishes

      Rob

  2. Hello, I was wondering what size bearings you used? Gonna build one for my sim.

    1. Post
      Author
  3. Rob,
    I’m also going to build this and have the parts printed, just received the AS5048, the Teensy 3.2 just shipped, and i now just ordered the bearings based on your response above. I do have a few questions if you could answer them
    1. Based on the picture above, you have the magnetic sensor on the top, and is that the teensy 3.2 on the bottom?
    2. How were the AS5048 and Teensy 3.2 mounted? Screws? if so what type/size?
    3. Based on the picture, you used an allen head bolt and you mention nyloc nut? do you recall what size bolt, nut and the length you used?
    4. What did you use for a magnet? Did you use one of the ones that comes in the AS5048a eval kit?
    5. Did you solder wires directly to the teensy 3.2 or did you use the pins that come with it?
    Would it be possible for you to explain how you assembled this? If not too much trouble, could you take a picture of the completed assembly that shows the parts, not mounted to the throttle controller?
    I know this is more than a few questions and i appreciate your time and effort to answer any of them.
    A real interesting project for sure. Thank you so much for sharing this with others. There are no affordable alternatives out there at the moment and all the old Saitek ones are getting top dollar on ebay.

    Thank you
    Pat

    1. Post
      Author

      Hi Pat

      I’ll add some more images to the bottom of the post to help with construction.

      1. The Teensy is mounted at the bottom as you say.
      2. The magnetic sensor board is screwed to the plastic – I think they look like M3 6mm bolts to me – see pictures. The Teensy is actually strapped in place using cable-ties – specifically it looks like I just have a single cable tie strapped over the USB connector area. This may not be sufficient if the cable is going to get tugged a lot.
      3. I should have made better notes but I think the bolt in question is a 20mm cap-head M3 machine screw. The nyloc nut will be a standard M3 one.
      4. The magnet is a cylindrical one. It is around 4mm diameter and 6mm in length. It came with a magnetic sensor (possibly the AS5048 but I don’t remember the source unfortunately). There is quite a bit of space between the end of the magnet and the sensor and I think any similarly sized cylindrical magnet should do.
      5. I soldered wires directly between the teensy and the AS5048. This just seemed the simplest way to do it as I was intending the unit to stay in one piece and not be dismantled.

      The key part of the assembly was to get the bearings and nyloc nut arrangement to sit nicely in the cupped slots that hold the bearings. Once this part is done and the assembly can turn freely the rest is relatively uncritical. As described above the magnet wanted to attach to many different things other than the end of the bolt and this required a little patience. I think fixing it to the end of the bolt using glue might be a good idea. Also, using nylon fixings for the AS5048 board could help as the two steel bolts I used to fix the AS5048 in place make a good target for the magnet to jump to.

      The only other thing I noticed is that we subsequently added some foam pads between the trim wheel and its mounting to add a bit of friction and reduce the tendency of the wheel to turn with the slightest nudge. You can also see this in one of the photos.

      Hope this helps, Rob

      1. Wow, thanks so much for the fast and detailed response, and the pictures!

        Pat

  4. Hi Rob

    I am a flight simmer from Denmark, who are missing a trim wheel for my Cessna cockpit setup.
    Thanks for sharing your fantastic trim wheel build. I have for some time been searching for a second hand Saitek trim wheel, but with no luck, or the price tag is way to high, so your DIY contribution is most welcome. I am going to build one. But i have a couple of questions?

    Can i connect it to my arduino mega board instead of the teensy 3.2? Will the code work here?
    Will it work on X-Plane 11?
    Can i use any kind of steel ball bearing at dimension 3/8/3?
    What kind of axle is used a 3 mm of course but how log must it be?
    What about the magnet with one is used and how is it mounted, with glue?
    Best regards, Jonas

      1. Post
        Author

        Hi Jonas

        Yes, that’s the one I used. I noticed there are a few other options around but that one worked for me.

        Rob

    1. Post
      Author

      Hi Jonas

      I think the Teensy is quite a bit different hardware than most standard Arduinos and I don’t think the USB emulation would work in the same way on other Arduinos. My daughter did get it working on X-Plane 11 I think but I’ll check. The length of the axle will depend on your trim wheel – I think the one I started with was around 40mm but I expect it will need some trimming to the right length so a hacksaw will come in useful. And the magnet might hold in place on its own but some glue couldn’t harm.

      Rob

  5. Hi Rob

    Finaly got the AS5048A board, has been out of stock for monts now, but got it all assambled and opluadet the code to the Teensy, and everything is working, but! It miss some resolution, eg. the if i spin the wheel 3/4 turn i have used all og the resolutions, this is no good fpr making fine trim adjustments, so i gues i can find the sulotion for this in the teensy code? But I cant write any code, and cant figure out where to cenge the code to get better resulution, eg. many complete turns to use the full resulotion? Sorry if i use any terms here incorrectly, but hope you can understand what i mean.

    1. Post
      Author

      Hi Jonas

      Great you have it working. The scale problem is odd as I didn’t have that issue. I just had a look at the file TrimWheelSWTeensy32.ino in the GitHub repository. It looks like you should be able to change line 19 of that file. The number you divide by (currently 16) should set the range and resolution. If you make this number bigger then the range should be bigger and resolution lower. You could try some different values like 32 and 64 to see if this helps and if it makes a change in the right direction. You could also make it smaller but I think that would make matters worse if I’ve understood the problem correctly.

      Let me know how you get on.

      Regards

      Rob

      1. Hi Rob
        Thanks for your reply. I am using Xplane 11 as my flight simulator, so i gues that explains the differense from the behavier you observe. Love the wheel but i need it to be more precise.
        I did try your suggelstion, and if i use the value og 16 the whell can turn one whole round to use all the resolution. If I use the value of 8 i can use halv a round, but if i increase the value, I still only can use one whole round, but as i increase the value to high values eg. 512 then the trim becommes jagged, so i gues something else has to be changed in the code to make it work?

        My goel is to be able turn the wheel multiple rounds to use all of the trim range, and not one just one round?

        Another issue is; when i have turned the trim wheel one round it will jump back to initail trim position, wich means if i overturn the wheen more then one round, then my plane elevator trim jumps back to intial polistion, this is very annoying (and my plane becomes uncontrollable)
        Hope yoy can help me out here?

        1. Post
          Author

          Hi Jonas

          As you say the encoder will move back to zero at some point as you turn the wheel through a full revolution. It would be straightforward to keep track of the rotations of the wheel and just keep adding to the value. So, for instance, the code would need to detect when it passes from the full-range value to a small value in one go and, in this case, add on the new value. The same thing in the opposite direction. One challenge though would be to reset the value back to zero in some way. This would be the case when you first turn on so I guess that may be ok. If that sounds ok to you I can take a look at the code and post an update.

          Best

          Rob

          1. Hi Rob
            Yes your suggestion sounds just right, I would appreciate very much if you could help with the coding, as i have no coding skill at all, thanks a lot for your help.

            Best Regards,
            Jonas

          2. It seems like a better solution would be to add 2:1 gearing. This would give 2 revolutions of the trim wheel (or whatever gearing you choose) for each “turn” of the AS5048.

  6. Came across your site looking for a trim wheel. This is beyond my capabilities but the business man in me said you could make a nice living making these to order. I am sure there are many people like me without the skills necessary to make this.

    The cost of the Saitek even if it was available is incredibly high compared with other products like Radio.

    So if you decide to do this I would definitely have one at the right price.

  7. hey, im newbie here and doing a project of designing trim wheel for flight simulation. the problem is can you give a right coding because i can’t use it (trimwheelino)

Leave a Reply

Your email address will not be published. Required fields are marked *