DIY Rudder Pedals for Flight Simulator

Fully adjustable via sketch of Arduino NANO/UNO | Easy making from ready-made components | Non-mechanical unbreakable sensors | Strong frame

Oct 14, 2020

36982 views

16 respects

Components and supplies

4

SS49E Hall-effect linear sensor

3

Single/Dual Digital Potentiometer with SPI™ Interface MCP41050

1

Arduino Nano R3

1

Arduino Micro

1

Arduino UNO

Project description

Code

Analog output via digiPOTs

arduino

Downloadable files

DigiPOT circuit

DigiPOT circuit

For Arduino Joystick Library

For Arduino Joystick Library

TWCS circuit

TWCS circuit

For Arduino Joystick Library

For Arduino Joystick Library

TWCS circuit

TWCS circuit

DigiPOT circuit

DigiPOT circuit

Comments

Only logged in users can leave comments

aniaclug

2 years ago

Hi steve, your project is awesome and relative simple to build. Can you post sketch for Digital ouput as well as you did for analog output?

Anonymous user

2 years ago

Hi Gianluca, I got this to work over the weekend. Drop me an email if you want me to send you the sketch for the digital output. Bernd

Anonymous user

2 years ago

Have a ATMega2560 project for Cockpits and/or joysticks and pedals?? And the videos, be deleteds??

Anonymous user

2 years ago

wish you clear sky!

Anonymous user

2 years ago

Hello Steve, Were you able to get this to work using only the 'joystick library circuit'? If so, could you post the code? Thanks!

Anonymous user

2 years ago

Thank you so much! I now have a working throttle, and am going to get my rudder pedals working next!

Anonymous user

2 years ago

Thanks for posting! Which joystick library are you using? The joystick library I downloaded from the library manager does not seem to have everything.

Anonymous user

2 years ago

I am using this one https://github.com/MHeironimus/ArduinoJoystickLibrary Bernd

Anonymous user

2 years ago

Based on popular request, here is the code to use Steve's original idea in combination with the Joystick library to connect this directly into a Windows box via an Arduino Micro. The settings for the endpoint values require tuning based on your Hall sensors and magnet strength similar to Steve doing this in his video. You can test out the overall setup with the "USB Gamecontroller" settings directly in Windows 10 even w/o MSFS2020. Enjoy, Bernd ____________________________________ #include "Joystick.h" #define SENSOR_RUDDER_RIGHT A0 #define SENSOR_RUDDER_LEFT A1 // Variables int val_left, val_right, remap_left, remap_right, rudder; int tuning_rudder = 128; // Multi-axis Joystick with only rudder set to exist (true) Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID, JOYSTICK_TYPE_MULTI_AXIS, 0, 0, false, false, false, false, false, false, true, false, false, false, false); void setup() { Serial.begin(9600); pinMode(SENSOR_RUDDER_RIGHT, INPUT); pinMode(SENSOR_RUDDER_LEFT, INPUT); Joystick.setRudderRange(-128, 128); Joystick.setRudder(0); Joystick.begin(true); // initiate joystick with auto autoupdate set to true } void loop() { // -------------------------------------------------------- // RUDDER PEDALS -128 --- x --- 128 // -------------------------------------------------------- // Read and remap sensor RUDDER LEFT val_left = analogRead(SENSOR_RUDDER_LEFT); if (val_left <= 650) { remap_left = map(val_left, 500, 650, -128, 0); } else remap_left = 0; // Set limitations RUDDER LEFT if (remap_left > 0) remap_left = 0; if (remap_left <= -128) remap_left = -128; // Read and remap sensor RUDDER RIGHT val_right = analogRead(SENSOR_RUDDER_RIGHT); if (val_right <= 630) { remap_right = map(val_right, 500, 630, 128, 0); } else remap_right = 0; //Set limitations RUDDER RIGHT if (remap_right < 0) remap_right = 0; if (remap_right >= 127) remap_right = 127; rudder = remap_left + remap_right; Joystick.setRudder(rudder); delay(200); // Sluggish behavior in Windows w/o delay }

Anonymous user

2 years ago

Interesting adaption of a robust piece of hardware. Certainly thinking of following down the same path but with digital outputs using the Arduino joystick library. One question though - it appears that the library only offers one "brake" channel. Any thoughts on how to implement differential braking? I am brand new to Arduinos and have just ordered my first "Micro" to start to learn C/C++ programming. I did get the original code running on a "Nano", so I've taken the first few tentative steps, but there is a considerable mountain to climb!!

Anonymous user

2 years ago

Omg, you did what I'm looking for so long. Thank you!!! I already finished some switch panels (using AirManager, MSFS 2020). How did you solve the connection to your Flightsim?? Do you plan a yoke?? And by the way - the Cessna 208B - Grand Caravan Ex is my choice too ;-) Frank

Steve_Massikker

2 years ago

My favorite now Beechcraft King Air :) Landing on a short runway with a crosswind with reversing pitch of propellers is a real adrenaline rush. I'm connecting Thrustmaster direct, without interjacent setting software. By my meant, settings manager MSFS2020 is enough. My first idea was to buy a Logitech Yoke and remake it. I wanted to add feedback (dynamically changing the spring tension) and replace the potentiometers with Hall sensors. But now it is impossible to buy this joystick in Russia, it simply is not in stores. Maybe later...

Anonymous user

2 years ago

I'm a little confused about this can be done with OR without using the joystick.h library ! I think I somewhere saw that a UNO or NANO could be used and I think both of these are NOT compatible with the joystick.h library ! What do I get wrong here ... I would like to make it with HALL sensors and using a NANO

Anonymous user

2 years ago

IS this project completely dead or ... ?

Anonymous user

2 years ago

Hey, sorry for the late reply, hope it still helps tho. In the github repository of the library( https://github.com/MHeironimus/ArduinoJoystickLibrary/tree/version-2.0 ) it says that it'll only work with the at32u4, but the example that uses the nano doesn't go directly to the computer, it reads the sensors, interprets the data and sends it via spi to a digital potentiometer and it then goes to a throttle that allows the user to connect rudder pedals and brakes, it then sends the data to the computer. Basically the nano is there to interpret the hall effect sensors and convert that data to a signal that the throttle can understand. But you can search for some software that allows you to connect non 32u4 boards and connect them to flight simulator, it will only work with flight simulator, but as long as you don't need to use the device on other games where the interpreter software isn't available you won't need a 32u4 based board and you should be fine with the nano. If you have any more questions I'll be glad to try and answer them!

Anonymous user

3 years ago

Have a ATMega2560 project for Cockpits and/or joysticks and pedals?? And the videos, be deleteds??

ksor

3 years ago

I'm a little confused about this can be done with OR without using the joystick.h library ! I think I somewhere saw that a UNO or NANO could be used and I think both of these are NOT compatible with the joystick.h library ! What do I get wrong here ... I would like to make it with HALL sensors and using a NANO

ksor

2 years ago

IS this project completely dead or ... ?

Anonymous user

2 years ago

Hey, sorry for the late reply, hope it still helps tho. In the github repository of the library( https://github.com/MHeironimus/ArduinoJoystickLibrary/tree/version-2.0 ) it says that it'll only work with the at32u4, but the example that uses the nano doesn't go directly to the computer, it reads the sensors, interprets the data and sends it via spi to a digital potentiometer and it then goes to a throttle that allows the user to connect rudder pedals and brakes, it then sends the data to the computer. Basically the nano is there to interpret the hall effect sensors and convert that data to a signal that the throttle can understand. But you can search for some software that allows you to connect non 32u4 boards and connect them to flight simulator, it will only work with flight simulator, but as long as you don't need to use the device on other games where the interpreter software isn't available you won't need a 32u4 based board and you should be fine with the nano. If you have any more questions I'll be glad to try and answer them!

Anonymous user

4 years ago

Interesting adaption of a robust piece of hardware. Certainly thinking of following down the same path but with digital outputs using the Arduino joystick library. One question though - it appears that the library only offers one "brake" channel. Any thoughts on how to implement differential braking? I am brand new to Arduinos and have just ordered my first "Micro" to start to learn C/C++ programming. I did get the original code running on a "Nano", so I've taken the first few tentative steps, but there is a considerable mountain to climb!!

cheapskate

4 years ago

Hello Steve, Were you able to get this to work using only the 'joystick library circuit'? If so, could you post the code? Thanks!

Anonymous user

2 years ago

I am using this one https://github.com/MHeironimus/ArduinoJoystickLibrary Bernd

Anonymous user

2 years ago

Based on popular request, here is the code to use Steve's original idea in combination with the Joystick library to connect this directly into a Windows box via an Arduino Micro. The settings for the endpoint values require tuning based on your Hall sensors and magnet strength similar to Steve doing this in his video. You can test out the overall setup with the "USB Gamecontroller" settings directly in Windows 10 even w/o MSFS2020. Enjoy, Bernd ____________________________________ #include "Joystick.h" #define SENSOR_RUDDER_RIGHT A0 #define SENSOR_RUDDER_LEFT A1 // Variables int val_left, val_right, remap_left, remap_right, rudder; int tuning_rudder = 128; // Multi-axis Joystick with only rudder set to exist (true) Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID, JOYSTICK_TYPE_MULTI_AXIS, 0, 0, false, false, false, false, false, false, true, false, false, false, false); void setup() { Serial.begin(9600); pinMode(SENSOR_RUDDER_RIGHT, INPUT); pinMode(SENSOR_RUDDER_LEFT, INPUT); Joystick.setRudderRange(-128, 128); Joystick.setRudder(0); Joystick.begin(true); // initiate joystick with auto autoupdate set to true } void loop() { // -------------------------------------------------------- // RUDDER PEDALS -128 --- x --- 128 // -------------------------------------------------------- // Read and remap sensor RUDDER LEFT val_left = analogRead(SENSOR_RUDDER_LEFT); if (val_left <= 650) { remap_left = map(val_left, 500, 650, -128, 0); } else remap_left = 0; // Set limitations RUDDER LEFT if (remap_left > 0) remap_left = 0; if (remap_left <= -128) remap_left = -128; // Read and remap sensor RUDDER RIGHT val_right = analogRead(SENSOR_RUDDER_RIGHT); if (val_right <= 630) { remap_right = map(val_right, 500, 630, 128, 0); } else remap_right = 0; //Set limitations RUDDER RIGHT if (remap_right < 0) remap_right = 0; if (remap_right >= 127) remap_right = 127; rudder = remap_left + remap_right; Joystick.setRudder(rudder); delay(200); // Sluggish behavior in Windows w/o delay }

cheapskate

2 years ago

Thank you so much! I now have a working throttle, and am going to get my rudder pedals working next!

cheapskate

2 years ago

Thanks for posting! Which joystick library are you using? The joystick library I downloaded from the library manager does not seem to have everything.

aniaclug

4 years ago

Hi steve, your project is awesome and relative simple to build. Can you post sketch for Digital ouput as well as you did for analog output?

Anonymous user

2 years ago

Hi Gianluca, I got this to work over the weekend. Drop me an email if you want me to send you the sketch for the digital output. Bernd

Anonymous user

4 years ago

Thanks for sharing this great project. Nice work!

ghostfighter

4 years ago

Omg, you did what I'm looking for so long. Thank you!!! I already finished some switch panels (using AirManager, MSFS 2020). How did you solve the connection to your Flightsim?? Do you plan a yoke?? And by the way - the Cessna 208B - Grand Caravan Ex is my choice too ;-) Frank

Steve_Massikker

2 years ago

My favorite now Beechcraft King Air :) Landing on a short runway with a crosswind with reversing pitch of propellers is a real adrenaline rush. I'm connecting Thrustmaster direct, without interjacent setting software. By my meant, settings manager MSFS2020 is enough. My first idea was to buy a Logitech Yoke and remake it. I wanted to add feedback (dynamically changing the spring tension) and replace the potentiometers with Hall sensors. But now it is impossible to buy this joystick in Russia, it simply is not in stores. Maybe later...

GrandPete

4 years ago

wish you clear sky!