Project tutorial
DIY Rudder Pedals for Flight Simulator

DIY Rudder Pedals for Flight Simulator © GPL3+

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

  • 13,696 views
  • 14 comments
  • 21 respects

Components and supplies

Ard nano
Arduino Nano R3
Or Arduino UNO for analog output
×1
Ph a000053 iso (1) pnkpri8a6q
Arduino Micro
If you need only DIGITAL OUTPUT for Windows 8-10
×1
Ph a000066 iso (1) ztbmubhmho
Arduino UNO
Or Arduino NANO for analog output
×1
Single/Dual Digital Potentiometer with SPI™ Interface MCP41050
×3
SS49E Hall-effect linear sensor
Or any similar sensors, like - AH3503 (not a switch or not a digital!!!)
×4

About this project

Update 2021

The new version of the pedals has a HID-interface and an improved design. The advanced Hall effect sensors module provides very precise control. Details on my website.

Hi, flight simmers! I invented and made pedals for an aircraft simulator, the main function of which is performed by Arduino. And I really want to share this development with you. It turned out that such pedals can be made in two days, but it takes two weeks to describe the process of creating them. Therefore, I made several videos showing this process in as much detail as possible.

Making pedals

Arduino can be connected to the flight simulator in two ways. Link to digital connection using ArduinoJoystickLibrary and Arduino Micro board here.

I connect my pedals with an analog connection. And the sketch given here refers to this connection method.

Both of these methods, creating a circuit and configuring sensors are shown in the following video.

Sensors and electronics

I am very interested in your opinion on this design, please leave your comments.

Code

Analog output via digiPOTsArduino
#include <SPI.h>  

#define CS_RUDDER 10 
#define CS_LEFT 8 
#define CS_RIGHT 9 
#define SENSOR_LEFT_PEDAL A6
#define SENSOR_RIGHT_PEDAL A5
#define SENSOR_RUDDER_LEFT A0
#define SENSOR_RUDDER_RIGHT A1

int val_left, val_right, remap_left, remap_right, rudder,
    val_brake_left, val_brake_right, remap_brake_left, remap_brake_right;

int tuning_rudder = 128;
// int tuning_left_brake = 255;
// int tuning_right_brake = 255;

void setup() {
  Serial.begin(9600);
  SPI.begin();    
  pinMode (CS_RUDDER, OUTPUT);   
  pinMode (CS_LEFT, OUTPUT);   
  pinMode (CS_RIGHT, OUTPUT);  
}

void loop() {
 
  // --------------------------------------------------------
  // RUDDER PEDALS          -128 --- x --- 128
  // --------------------------------------------------------

  // Read and remap sensor RUDDER LEFT 
  val_left = analogRead(SENSOR_RUDDER_LEFT);
  if (val_left <= 950) { 
    remap_left = map(val_left, 30, 870, -128, 0); // -40
  }
  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 <= 950) {
    remap_right = map(val_right, 0, 820, 132, 0); // -50
  }
  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;
  

   if (remap_left == 0) {
      tuning_rudder = tuning_rudder + 128;
   }
   else {
      tuning_rudder = abs(tuning_rudder - 128);
   }

  // --------------------------------------------------------
  // BRAKING
  // --------------------------------------------------------  

  val_brake_left = analogRead(SENSOR_LEFT_PEDAL);

  if (val_brake_left <= 328) {
    remap_brake_left = map(val_brake_left, 200, 328, 0, 255);
  }
  else remap_brake_left = 255; 
  if (remap_brake_left < 0) remap_brake_left = 0;

  val_brake_right = analogRead(SENSOR_RIGHT_PEDAL);  
  if (val_brake_right <= 328) {
    remap_brake_right = map(val_brake_right, 200, 328, 0, 255);
  }
  else remap_brake_right = 255; 
  if (remap_brake_right < 0) remap_brake_right = 0;  

/* 
  // ARDUINO SETUP

  // Neutral sensors setup
  Serial.print(val_left); 
  Serial.print(" | " );     
  Serial.println(val_right);
  delay(400);

  // Output setup
  Serial.print(remap_brake_left); 
  Serial.print(" | " ); 
  Serial.println(remap_brake_right); 
  Serial.print(" | " );   
  Serial.print(rudder); 
  Serial.print(" | " );     
  Serial.println(tuning_rudder);
  delay(400);
*/

  // --------------------------------------------------------
  // SEND DATA TO digiPOTs
  // -------------------------------------------------------- 

    digitalWrite(CS_RUDDER, LOW); 
    SPI.transfer(0b00010001);   
    SPI.transfer(tuning_rudder);          
    digitalWrite(CS_RUDDER, HIGH);
    delay(5); // Delay for data time smoothing
    
    digitalWrite(CS_LEFT, LOW); 
    SPI.transfer(0b00010001);   
    SPI.transfer(remap_brake_left);          
    digitalWrite(CS_LEFT, HIGH);
    delay(5);

    digitalWrite(CS_RIGHT, LOW); 
    SPI.transfer(0b00010001);   
    SPI.transfer(remap_brake_right);          
    digitalWrite(CS_RIGHT, HIGH);
    delay(5);
}

Schematics

TWCS circuit
Diy rudder pedals for twcs throttle mcp41050 final iykdfwy9ee
DigiPOT circuit
Digipot pcb2 iuafmfevex
For Arduino Joystick Library
Modercircuit1 xkfzx9cv3e

Comments

Similar projects you might like

DIY 2D Motion Racing Simulator

Project tutorial by Mirko Pavleski

  • 8,844 views
  • 9 comments
  • 17 respects

DIY Flight Instruments for Horizon and Compass

Project tutorial by Aritro Mukherjee

  • 52,611 views
  • 26 comments
  • 93 respects

DIY Pin Pointer Metal Detector

Project tutorial by Mirko Pavleski

  • 7,309 views
  • 3 comments
  • 9 respects

DIY Android+Arduino Controlled Labyrinth (Maze) Game

Project tutorial by Mirko Pavleski

  • 3,214 views
  • 0 comments
  • 17 respects

DIY Controller for Paragliding Games

Project tutorial by Andre Bandarra

  • 7,911 views
  • 6 comments
  • 36 respects
Add projectSign up / Login