Jump to content

Recommended Posts

Posted

QLhXUjO.jpg

I bought a sidewinder a while ago and had some great fun with it flying the huey, the problem was that when I wanted to start learning the Ka50, I needed more buttons.

 

Originally this project started as an attempt to merge my sidewinder with my old X52pro that was made redundant by my warthog.

The problem was that all the information I could find was on wiring up the regular X52 which is wired differently to the pro. The pro I'm lead to believe uses shift registers, so a bit more research brings me to a thread where a guy has managed to mount an F16 FLCS to the sidewinder and connected it with a teensy 2.0.

I managed to get the X52pro mounted but new problem arose as I couldn't figure out what wires I needed to connect from the X52pro; after much frustration and a joystick now in bits needing a partial rewire, I gave up and just ordered an FLCS on ebay. I also used a teensy 3.1 instead due to the 2.0 being unavailable here in the UK from official suppliers and a I didn't want to risk it with a chinese knock off.

 

Mounting the stick it turned out was fairly easy, the shaft on the sidewinder is near enough bang on 14mm, so I ordered a 14mm bit online and bored out the FLCS shaft. It fits quite snugly and can be attached without glue (although you can still twist it out of alignment obviously), you can comfortably pick the whole thing up by the grip without the grip coming off.

Unlike the guy in the thread, I deliberately left the shaft long; partly because I didn't know how long I wanted it and obviously for the greater control of a longer shaft. I only had to cut off a small square block at the bottom. There is only a slight problem, due to having to drill by hand without a drill press, the inner bore is at a slight angle, not enough that you'd notice it if you didn't know about it (I only knew about it because I looked down the bore and saw an offset shelf).

 

Getting it all to work with the teensy was where I had most of the problems (or so I thought). I followed all the instructions in the thread, tried and modified several different sketches, found a different thread with more details about what settings to use, tried resoldering it to use 3V instead of 5V, tried contacting the guy who'd got it to work with the 3.1. Nothing worked.

 

After getting quite frustrated, I decided to take the grip apart to see if there was a loose connection (also I'd decide to turn the shaft around so that the slight angle tilted the stick towards me rather than away, not really necessary, but I had it apart anyway) and lo and behold, it turned out that when reassembling the grip back onto the shaft, I'd accidentally driven one of the screws through the ribbon cable. A quick rewire later and it works perfectly. At a later date I'll create a button box for the buttons and pot on the removed sidewinder grip. This should also allow me to wire in a switch for the FFB motors and solve a floating rudder axis problem. I may also add a couple of extra pots onto the teensy since the guy in the thread posted code for them. That'll come after I've finished making a stick and throttle stand from PVC piping though.

 

The code I ended up using:

#include <SPI.h>
const int ss = 10;

unsigned int buttonInputs1;   // data read from SPI
unsigned int buttonInputs2;
unsigned int buttonInputs3;

#define PINKY  !(buttonInputs1 & 0x80)    /* Pinky Switch */
#define TG1    !(buttonInputs1 & 0x40)    /* Trigger 1 */
#define TG2    !(buttonInputs1 & 0x20)    /* Trigger 2 */
#define S1     !(buttonInputs1 & 0x10)    /* Nose Wheel Steering */
#define PADDLE !(buttonInputs1 & 0x08)    /* Paddle Switch */
#define THUMB  !(buttonInputs1 & 0x04)    /* Pickle */

#define H1D  !(buttonInputs2 & 0x80)    /* HAT */
#define H1R  !(buttonInputs2 & 0x40)
#define H1U  !(buttonInputs2 & 0x20)
#define H1L  !(buttonInputs2 & 0x10)
#define H4U  !(buttonInputs2 & 0x08)    /* Castle */
#define H4L  !(buttonInputs2 & 0x04)
#define H4D  !(buttonInputs2 & 0x02)
#define H4R  !(buttonInputs2 & 0x01)
#define H3D  !(buttonInputs3 & 0x80)    /* Weap */
#define H3R  !(buttonInputs3 & 0x40)
#define H3U  !(buttonInputs3 & 0x20)
#define H3L  !(buttonInputs3 & 0x10)
#define H2D  !(buttonInputs3 & 0x08)    /* Target */
#define H2R  !(buttonInputs3 & 0x04)
#define H2U  !(buttonInputs3 & 0x02)
#define H2L  !(buttonInputs3 & 0x01)

void setup() {
 Serial.begin(9600);
 Serial.println("USB Joystick analyser");
 pinMode (ss, OUTPUT);
 SPI.begin();
 Joystick.useManualSend(true);
}


void loop() {
SPISettings settingsA(1000000, MSBFIRST, SPI_MODE0);

SPI.beginTransaction(settingsA);
digitalWrite(ss,LOW);
// reading only, so data sent does not matter
buttonInputs1 = SPI.transfer(0x00);
buttonInputs2 = SPI.transfer(0x00);
buttonInputs3 = SPI.transfer(0x00);
digitalWrite(ss,HIGH);
SPI.endTransaction();
 Joystick.button(1,  TG1);
 Joystick.button(2,  THUMB);
 Joystick.button(3,  PINKY);
 Joystick.button(4,  PADDLE);
 Joystick.button(5,  S1);
 Joystick.button(6,  TG2);
 Joystick.button(7,  H2U);
 Joystick.button(8,  H2R);
 Joystick.button(9,  H2D);
 Joystick.button(10, H2L);
 Joystick.button(11, H3U);
 Joystick.button(12, H3R);
 Joystick.button(13, H3D);
 Joystick.button(14, H3L);
 Joystick.button(15, H4U);
 Joystick.button(16, H4R);
 Joystick.button(17, H4D);
 Joystick.button(18, H4L);
 
 int angle = -1;

 if (H1U) {
   if (H1R) {
     angle = 45;
   } else if (H1L) {
     angle = 315;
   } else {
     angle = 0;
   }
 } else if (H1D) {
   if (H1R) {
     angle = 135;
   } else if (H1L) {
     angle = 225;
   } else {
     angle = 180;
   }
 } else if (H1R) {
   angle = 90;
 } else if (H1L) {
   angle = 270;
 }
 Joystick.hat(angle);
 Joystick.send_now();
}

Posted
Can you tell me what the spec are for your power supply...I had bought a second hand siderwinder with out a power supply.

Are you saying it's missing the built-in power supply section of the PCB, or are you just missing the cable?

 

If the latter, you can just buy any generic figure-eight cable and plug it directly into the mains(100-240V, 50 or 60Hz)

 

41QRBru9GBL.jpg

Posted

I use the original power supply. The sidewinder base uses all the original electronics (with the stick disconnected), the teensy only connects to the FLCS grip.

Posted

There should be a black box (power converter) that the cable in your last picture will plug into and then plugs into the sidewinder and that black box should have voltage specs on a label for output. That's the part I need and want to make sure I buy one with right output for sidewinder.

 

Thanks.

[sIGPIC][/sIGPIC]

Posted

As Pfeil says..you only need the cable. The power supply is built into the Sidewinder base. You feed mains power directly to the stick base.

Intel Core i7 6700K @ 4.5GHz. Asus-Z170-PRO MB

CORSAIR H105 HYDRO CPU COOLER.

EVGA GTX 1080Ti FTW3 Elite.

16GB DDR4 2666MHZ HYPERX SAVAGE.

SAMSUNG M.2 SSD 128GB SM951 Boot Drive.

SAMSUNG SSD 500GB EVO Working Drive.

Windows 10 Professional

Posted

My mistake, I have Side Winder Force Pro. I think this need a extrnial power adaptor to power up. I have search the forum but, haven't found any info on how much output voltage I need to bring this thing alive.

[sIGPIC][/sIGPIC]

Posted

Intel Core i7 6700K @ 4.5GHz. Asus-Z170-PRO MB

CORSAIR H105 HYDRO CPU COOLER.

EVGA GTX 1080Ti FTW3 Elite.

16GB DDR4 2666MHZ HYPERX SAVAGE.

SAMSUNG M.2 SSD 128GB SM951 Boot Drive.

SAMSUNG SSD 500GB EVO Working Drive.

Windows 10 Professional

Posted

Are you using one of the buttons on the base for trim? I believe the trim command has to come from the FFB stick for it to work, so you can't use one of the FLCS buttons. I'm not sure I'd get on with using the base button though, as it's more natural to click or hold a stick button for trim.

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

Posted
I believe the trim command has to come from the FFB stick for it to work, so you can't use one of the FLCS buttons.

 

 

I don't think that it matters where the trim command is coming from. I have the trim mapped on my Cougar trim switch and my MSFFB2 trims properly.

Posted
I don't think that it matters where the trim command is coming from. I have the trim mapped on my Cougar trim switch and my MSFFB2 trims properly.

Oh, that's good news then. Makes things a lot easier. Something must have changed or I was just misinformed before.

 

Was thinking of keeping my FLCS with Teensy intact and using some hall sensors I've bought for the axis but I've been told the FFB2 pots are as good as hall sensors, so it makes more sense to put my FLCS stick onto my FFB2, as the lack of buttons/hats really limits it.

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

Posted
Nice work. What did you decide to with the circuitry that detects hand on the grip (ir led and photo transistor)?

Nothing actually. With the sidewinder grip disconnected, the motors stay energized. When I get to creating the button box for the disconnected buttons, I'll have the LED and photosensor taped to each other inside the box and a switch to turn off the LED to energise the motors.

Posted
Nothing actually. With the sidewinder grip disconnected, the motors stay energized. When I get to creating the button box for the disconnected buttons, I'll have the LED and photosensor taped to each other inside the box and a switch to turn off the LED to energise the motors.

I imagine you can simplify that by discarding the LED and replacing the photosensor with a switch, as it's just a light-operated switch really.

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

Posted
I recall reading that someone tried that and couldn't get it to work.

 

yep...when I hacked mine, I kept the led and sensor intact and just broke the circuit to the led with a toggle switch. I had to make sure the sensor could still "see" the led.

Intel Core i7 6700K @ 4.5GHz. Asus-Z170-PRO MB

CORSAIR H105 HYDRO CPU COOLER.

EVGA GTX 1080Ti FTW3 Elite.

16GB DDR4 2666MHZ HYPERX SAVAGE.

SAMSUNG M.2 SSD 128GB SM951 Boot Drive.

SAMSUNG SSD 500GB EVO Working Drive.

Windows 10 Professional

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...