Fanatec Static Paddles (DIY)

Hello !

I build a complete static paddles for Fanatec wheelbases, including the electronics needed to connect the paddles to the SHIFTER2 port. The main advantage of this project is that you can design your own sequential shifter and plug it into the base directly, avoiding using a microcontroller (and a usb port). All the parts are 3D printed.

GitHub page (Fanashifter)


full_assembly.png
on_base.jpg
 
It's me again. I believe I am done with coding. I guess it should work if I have not mistaken something generally, double checked pinouts - think it is the correct ones. X/Y values are reverse to what somebody normally expect, but did not wanted to redraw everything.

Code is compiling well, I will have to learn tomorrow how to run it in MPLAB simulator to see if all is well.

Here is what I have for now, most probably this is it:
/*
* File: FanashifterH.c
* Author: Stuyo
*
* Created on September 15, 2022, 3:49 PM
*/


#include <xc.h>
#define _XTAL_FREQ 4000000

#pragma config FOSC=INTRCIO, WDTE=OFF, PWRTE=OFF, MCLRE=OFF, CP=OFF, \
CPD=OFF, BOREN=OFF, IESO=OFF, FCMEN=OFF

#define G1 PORTAbits.RA4 //1st Gear switch
#define G2 PORTAbits.RA3 //2nd Gear switch
#define G3 PORTCbits.RC5 //3rd Gear switch
#define G4 PORTCbits.RC4 //4th Gear switch
#define G5 PORTCbits.RC3 //5th Gear switch
#define G6 PORTCbits.RC6 //6th Gear switch
#define G7 PORTCbits.RC7 //7th Gear switch
#define GR PORTBbits.RB7 //Reverse Gear switch

#define X1 PORTAbits.RA0 //X-Axis LOW (900Ohm)
#define X2 PORTAbits.RA1 //X-Axis MED (4.8K)
#define X3 PORTAbits.RA2 //X-Axis HIGH (8.7K)
#define Y1 PORTCbits.RC1 //Y-Axis LOW (direct connection)
#define Y2 PORTCbits.RC2 //Y-Axis LOW-MED (2.8K)
#define Y3 PORTBbits.RB4 //Y-Axis MED (4.4K)
#define Y4 PORTBbits.RB5 //Y-Axis MED-HIGH (6K)
#define Y5 PORTBbits.RB6 //Y-Axis HIGH (10K)

int main()
{
ANSEL = 0x00;
ANSELH = 0x00;

TRISA = 0b00111000; //RA0,1,2 - Digital Outputs; RA3,4,5 - Digital Input; RA6,7 - N/A
TRISB = 0b10000000; //RB4,5,6 - Digital Outputs; RB7 - Digital Input; RB0,1,2,3 - N/A
TRISC = 0b11111000; //RC0,1,2 - Digital Outputs; Rc3,4,5,6,7 - Digital Input

//Define starting reference point for Neutral
X2 = 1; //Set X-Axis in Neutral Position
Y3 = 1; //Set Y-Axis in Neutral Position



while(1){

if(G1==1){ //While 1st Gear Button Active
X1 = 1; X2 = 0; X3 = 0; //X-LOW
Y1 = 0; Y2 = 1; Y3 = 0; Y4 = 0; Y5 = 0; //Y-LOW-MED
}

else if(G2==1){ //While 2nd Gear Button Active
X1 = 0; X2 = 0; X3 = 1; //X-HIGH
Y1 = 0; Y2 = 1; Y3 = 0; Y4 = 0; Y5 = 0; //Y-LOW-MED
}

else if(G3==1){ //While 3rd Gear Button Active
X1 = 1; X2 = 0; X3 = 0; //X-LOW
Y1 = 0; Y2 = 0; Y3 = 1; Y4 = 0; Y5 = 0; //Y-MED
}

else if(G4==1){ //While 4th Gear Button Active
X1 = 0; X2 = 0; X3 = 1; //X-HIGH
Y1 = 0; Y2 = 0; Y3 = 1; Y4 = 0; Y5 = 0; //Y-MED
}

else if(G5==1){ //While 5th Gear Button Active
X1 = 1; X2 = 0; X3 = 0; //X-LOW
Y1 = 0; Y2 = 0; Y3 = 0; Y4 = 1; Y5 = 0; //Y-MED-HIGH
}

else if(G6==1){ //While 6th Gear Button Active
X1 = 0; X2 = 0; X3 = 1; //X-HIGH
Y1 = 0; Y2 = 0; Y3 = 0; Y4 = 1; Y5 = 0; //Y-MED-HIGH
}

else if(G7==1){ //While 7th Gear Button Active
X1 = 1; X2 = 0; X3 = 0; //X-LOW
Y1 = 0; Y2 = 0; Y3 = 0; Y4 = 0; Y5 = 1; //Y-HIGH
}

else if(GR==1){ //While Reverse Gear Button Active
X1 = 1; X2 = 0; X3 = 0; //X-LOW
Y1 = 1; Y2 = 0; Y3 = 0; Y4 = 0; Y5 = 0; //Y-LOW
}

else{ //Return all switches in Neutral Position
X1 = 0; X2 = 1; X3 = 0; //X-MED
Y1 = 0; Y2 = 0; Y3 = 1; Y4 = 0; Y5 = 0; //Y-MED
}
}
return 0;
}

Edit: I really suck at writing code, had to redo most of it. Ran it on the MPLAB simulator, now seems to work fine.
 
Last edited:
Upvote 0
The H-pattern Fanatec shifter is completed and works like a charm! Pretty satisfied with it.

Here you can see domo of the adapter:

And complete documentation is here:

I saw on GitHub somebody is making progress on interfacing pedals - this would be something interesting to look into, handbrake compatibility is also quite tempting as well.
 
Upvote 0
Upvote 0
Back
Top