PDA

View Full Version : Flight Simulator Rudder pedals



RobC
06-11-2020, 05:14 AM
This is another lockdown project I've started, first time making such for me so this is a rather big learning curve. If anyone has ever built or has any knowledge of the electronics side it would be much appreciated if you could give me some directions regards to the USB connection and potentiometers. I've started machining some small pieces already but fear the gas struts I've got for the brake feedback are too high pressure being 100N which is the lowest pressure ones I've been able to find.

29104
29105
29106

Rob

RobC
06-11-2020, 05:18 AM
Forgot to mention too, I'd like to use a rotary encoder or a normal potentiometer for the rudder left/right scale located within the black circular housing but for the brakes I'm not sure if a linear potentiometer would work better.

Doddy
06-11-2020, 09:02 AM
A lot depends on what you're trying to connect to. You mention USB - I'm guessing that you're then talking about some form of standard HID device (recognised as some form of input control under Windows)... in which case I can declare myself "out" from a knowledge point of view (it's an interesting area to research.. might have a play)... or you can use a simple serial interface and use the serial/USB interface inherent on just about all Arduino devices to stream encoded control/analogue data over serial/USB to dedicated software running on the PC (I do this a lot to talk to PIs, which then encapsulate data into an ethernet package for transmission on a network). This second option is certainly I can talk to you about.

RobC
06-11-2020, 11:21 AM
Well arduino would work too! I'd seen it used here and there but was venturing down the more expensive route of buying a USB interface for flight sims but arduino would be better as I've got quite a few around the place. Now I'm not sure how you get the arduino to be recognised by the flight sim but I know you can do it from other peoples builds, I can write a little code but far from being competent enough to do a whole program for this rudder setup.

Doddy
06-11-2020, 03:32 PM
If you've played with Arduino, then all you're talking about is using the serial interface provided for standard/debug I/O - to send the data that you want to encode, either in binary or ASCII format. On the PC-side you're talking of developing a simple utility to poll the serial interface (ie. COM port presented into Windows from the USB driver - as enumerated when you connect the Arduino), strip off the packet information (e.g. read the serial port whilst there's characters remaining on the interface), align and validate the buffer, then extract your rudder/sensor information. From there, I guess - depending on your flight-sim - that there'll be interfacing stubs to allow data to be passed into the simulator (think I've heard this done with some commercial flight-simulator software others, at work, have tinkered with).

m_c
07-11-2020, 12:19 AM
In all honesty, in terms of electronics, I'd be looking at some of the flight sim forums, and any relevant Facebook groups to see how other people are interfacing sensors to the computer. From my limited knowledge of MS Flight Sim, it'll accept anything recognised as a HID device, and I'd imagine other flight sims will be similar, although there are probably options to create custom plugins for input devices.

There are lots of microcontrollers with libraries for exactly that purpose. Having just done a quick search, there is a HID core library (https://www.arduino.cc/en/Reference/HID) for Arduino, but it needs a 32u4/Due/Zero board

As for encoder/potentiometer, potentiometer is usually a better option for controls with restricted movement, as you will always have a fixed reference/zero point/value, however you then need enough analogue inputs (although having checked even an Arduino Zero has 7 analogue inputs, while a Due has 12)
If you use a typical incremental encoder, you then need some method to zero/calibrate the encoder position every time you power on. There is the option of using an absolute encoder, but interfacing becomes a bit more involved, as you're then either dealing with a parallel connection with lots of pins, serial data streams, or some form of communication bus (I'm sure I've seen I2C and SPI mentioned in encoder specs)

A_Camera
07-11-2020, 07:36 PM
Very nice looking pedals. Congratulations.

I built my own over 25 years ago, but mine was of course not as nice as yours, even though they worked well. My flying days ended (for real and for simulator) about 10 years ago and I sold my pedals, only have the yoke and the USB Gamport adapter today, which I used. In fact, having read your thread, I connected it to my computer since I never used it with W10, and it seems that it still works, calibration and all buttons and controls are confirmed by W10.

29113

29114

I don't have the actual wiring, but I remember that it was pretty simple to connect it together with the yoke. The game port has enough analogue inputs to do it, but you have to google since I don't remember exactly. In any case, analogue potentiometer is the best. Those have normally enough motion, just center it so that it can freely turn left and right. and make sure you set the pedal stops so that you don't break the potentiometer in case you have too much motion. Afterwards, when you connect it to the PC you can calibrate, so don't worry for now. Also, use a second potentiometer in series to add the possibility of trimming the rudder, like in a real plane. The second advice is to add two micro switches, or two potentiometers, one to each pedal, to allow the breaks to be realistic. Remember that a plane is not a car, so you have two breaks, one for each main gear, those are normally not synchronized, so you can break the right wheel or the left wheel separately if you need to (which happens when you fly for real).

Anyway, I think easiest and best is to connect using a USB Geame port adapter. The advantage of that solution is that you can have almost any number of analogue inputs, while in the old days, we were limited to one or two game ports maximum, if I am not wrong.

...but this is far off topic for this forum, I believe you can ask for more detailed advice on a flight sim forum, or just simply google after information. Good luck and enjoy flying. The new MS flight sim is said to be fantastic, in fact, I may give it a go as well when I retire from real work in a year or two.

JAZZCNC
07-11-2020, 10:21 PM
What CAD program were they drawn/rendered in Rob.?

Washout
08-11-2020, 12:39 AM
Hi RobC

A fellow flight simmer I see and welcome to the rabbit hole (I've not found the bottom yet :) ).

For the electronic side of things I would look at hall sensors and if you want an easy time of interfacing to your PC I highly recommend a Leo Bodnar board, like the BU0836A 12-Bit Joystick Controller here: http://www.leobodnar.com/shop/index.php?main_page=product_info&cPath=94&products_id=204&zenid=5f8f0e2754adb9f1f22bc998a9631069

I've been using Leo's stuff for years and have one of his boards on my modded F16 TQS (Thrustmaster Cougar).

There are other alternatives like arduinos/teensie boards etc. but you will end up coding for that.

Also if you're not already on Discord here's a link to a group I'm involved with on there, which have guys who just buy off the shelf to one guy I've also known for years, who has the cockpit section of a crashed F15 in his workshop: https://discord.gg/szqaJE7 I go by the handle of Mr Teatime on there and you'll find me in the DIY section normally.

routercnc
09-11-2020, 08:46 PM
At first I thought you had machined those pedals ! Very nice and shiny.

In terms of simulators at home there was a TV programme a while ago where someone had turned a room into the starship enterprise bridge! So long as you are not upsetting anyone else then anything goes in my book.

A_Camera
10-11-2020, 08:45 AM
the gas struts I've got for the brake feedback are too high pressure being 100N which is the lowest pressure ones I've been able to find.

29104
29105
29106

Rob

I forgot to answer to this earlier and not sure you are interested to hear this, but my pedals were connected simply by using a bike brake cable like this:

29126

It was of course as short as necessary (about one meter) to avoid sharp bends, and in the middle, between the pedals I added a spiral sprint to provide tension and to pull the pedals back to the centre. This gave a very realistic feeling, similar to the PA28 and C172 I was flying for real most of the time. In a real plane the pressure on the pedals increase the more you push, just like when tension is increasing in the spiral sprints, but that's not the case for the gas struts you added. If you want, you could just replace the struts with appropriate springs, or if you just want to reduce the pressure you could remove one of them. The pedals are interconnected, so if one pedal is pushed, the other is pulled automatically, so you don't actually need two struts.

RobC
11-11-2020, 01:52 PM
A little extra progress achieved the past few days. Far too much time spent at the lathe but I've got all what I need I think now turned down albeit not in their polished state yet. Waiting on my 5082 plate to arrive and then I can start on the final bits and do away with the test pieces I've currently got cut out. The track rods I may change slightly to taper in towards the carbon fibre rod for a sleeker look but I'll wait till they are epoxied and pinned to do that stage. Electronics wise thankyou for all the comments, I'm still yet to properly go into it further but likely going to go with the leo board. I have joined the discord suggested and I will contact you Washout for a little more advice when I get to it. The gas struts I only envisaged to provide a positive feedback and no more but to return the pedal to its state prior to compression with the track rods providing the motion to both left and right side.

I fly 152's/150s (well did up until we all got grounded) so I am familiar with how a realistic toe break system should be but I'm trying to keep this one a little more simple and if possible easier to replicate as I've had some interest from other people for price of a built one but I did look at a sprung version with compression springs within a cylinder which I may do if these don't work too well.

Modelling/rendering wise it was all done within Fusion360, spent quite a little too much time faffing around with the settings :emmersed:

29127

RobC
10-05-2021, 05:11 PM
It's been a while since I last posted any updates on this project. I've practically very closely finished them and are currently in a working test position, there is still a few things such as the foot rests below the pedals and also to add the brake sensor and return to centre springs for the left/right motion. There has been some changes to the design such as printing the internal white section as I found the holes very uncomfortable while using them, also the addition of the huge wood base which is there for two purposes. It adds weight as these pedals are not bolted to a frame and also tidies the Ali base up, this still needs finishing as it's not been totally machined down. I had used springs for the brake feedback but after use I returned back to the gas struts and changed the linkages a little to add extra mechanical aid. The leo bodnar board works amazing, super simple and after numerous revisions on where and how to place the hall sensor I finally managed to get a great location which works, thank the lord!
29929
29930
29931

Washout
10-05-2021, 08:34 PM
Very nice work Rob.

Am I guessing from the embossing on the pedals, you'll be flying the up coming AH64D module in DCS when its released?

RobC
11-06-2021, 01:26 PM
I don't know yet, depends on the price! Mainly did that embossing because I'm a big fan of them and regularly work around the apaches at work. Cracking machines!