PDA

View Full Version : A great base package for starting a cockpit



dc8flightdeck
02-13-2011, 03:30 PM
Hey guys,

Ive been working with the USBOutputs card for flightsim and Ive been able to do some very cool things with it. The programing takes time and is not particularly easy (for me), However it is worth the effort.

This USBOutputs card has 64 outputs that are designed to control indicator lights. Im also using it to control DC motors for a custom seat force feedback system. Im using 12vDC which is the voltage of the motors I use. For the indicator lights Im using 12v LEDs and some 12v light bulbs, though you have to make sure your light bulbs pull less than 500ma which is the card's amp limit per an output. To control some 28v functions (My F-4 Phantom landing gear and flaps indicators) I will use relays that are triggered by this card.

This card will also run 5 pots! For many of you this is all of the pots you will need. If you use the Hagstom KE-108 card for your toggle switches, the Hagstom KE-108 can control an additional four pots. Nine potentiometers are more than enough pots for any fighter sim. So if you are using these two cards there is no reason to purchase a separate pot controller card.

So with this combo you get,

USBOutputs card (These outputs are triggered by flightsim, so your indicator lights are controlled by computer data. There is also a program for it to read data from Falcon 4.0, but I have not tried it)
64 light light outputs (you can provide any voltage from 0 to 50 volts. Im using 12v for my system)
5 potentiometers
Price 55.00EUR (In the US this ends up being about $100.00 USD with shipping)
http://www.opencockpits.com/catalog/electronic-cards-iocards-outputs-lampsleds-c-21_44.html
You will also need a power supply, I use a computer power supply for 12vDC
You will also need FSUIPC to allow the USBOutputs card to communicate with flight simulator
http://www.schiratti.com/dowson.html


KE-108 keyboard emulator
108 toggle switch imputs (These can be programmed as either keyboard keystrokes or joystick buttons)
4 potentiometers
2 rotary encoder switch inputs
Trackball and Spinner ports to generate custom mouse action

KE-USB108 Price - $169.95 ea.
You will also want three IOX36 Breakout Boards for the KE-USB108 PRICE - $15.95 ea.
http://www.hagstromelectronics.com/products/ke_usb108.html


For approx $320.00 this combination provides a powerful and flexible interface for your cockpit.

Regards,
Justin

makoy
02-13-2011, 05:08 PM
Justin,
Can you tell more about how you have make force feedback seats, using USB-output card.
Sounds very interesting and i have that card.

Marco

dc8flightdeck
02-14-2011, 01:12 AM
I purchased a cheap automotive seat massage cusian from Walmart that has 5 motors. I opened it up to run each motor directly from the Outputs card. The motors are nice because they dont pull to many amps for the card. Low amp capacity is the one downside to the card. What good does it do to be able to run 5v lights when the card cannot handle many amps? It means in some situationd a relay is required even though the card can handle 50v. If the card could handle at least 10 amps that would be really nice. but I digress...

Im using it for for a fighter cockpit, so Im using it for effects such as afterburner. I have two parts of the code to still figure out, #1 how to write a timer function for deployment of spoilers, so that there is a temporary rumble as the spoilers deploy, #2 how to read a speed offset for a rumble when I taxi on the ground. The taxi code will use two offsets, the first is that the plane is on the ground, the second is that it is moving between 3 and 200 knots.

Tomorrow Ill post a copy of my code with the functions I am using so far.

Justin

dc8flightdeck
02-14-2011, 10:21 AM
The code is for a two engine F-4 Phantom

makoy
02-14-2011, 12:44 PM
Justin,
Am not expert of sioc, so i cant help you with that.
Do you have any pics how you have connect motors to seat?
So, motors really shakes the seat, right?
I have think butkickers, but maybe this is other way to do same job.
Thanks

dc8flightdeck
02-14-2011, 07:30 PM
Justin,
Am not expert of sioc, so i cant help you with that.
Do you have any pics how you have connect motors to seat?
So, motors really shakes the seat, right?
I have think butkickers, but maybe this is other way to do same job.
Thanks

Sorry no I have no pics. The motors are inside a plastic cover to protect the weight that spins on the end of the shaft. The seat cushion is filed with two foam pads and the motors are glued between the foam pads. That is why I purchased the autimotive massage cushion, all of the componants are fabricated for you, you just have to run wires from each motor to the USBOutputs card.

And yes, it shakes the seat very well.

FYI, the code above was my first attempt and I have now changed it. When Im finished testing it Ill post the finished product.

Justin

dc8flightdeck
02-15-2011, 12:17 AM
It will be over the ejection seat, but its not together yet, Right now Im working on SIOC code and testing it directly to the motors. At this time my system will use 20 motors. However, this is for a fighter sim so im going to use several of the motors to simulate g forces by placing them directly in the pilot's harness. So not only am I learning SIOC code, Im having to carefully think the motor placement through so that the function of the vibrations are obvious and enhace the simulation rather than feeling like a massage chair.

The concept is similar to how the TFS2 tactile feedback system is suppoessed to work http://ivibe.com/ only it will be better configured for my equipment and cost much less. I didnt have much luck getting the TFS2 to interface with Flight sim. I hear it works great with race car sims though.

makoy
08-02-2011, 01:23 PM
Is there some update to this seat project?

dc8flightdeck
08-02-2011, 04:12 PM
Is there some update to this seat project?

Ive not had the time to finish it. But it does work. Ill give you the code I have here at work, the script im using in the sim has been refined a bit. Its for a jet fighter sim.

// *****************************************************************************
// * Config_SIOC ver 3.7B1 - By Manolo Vélez - www.opencockpits.com
// *****************************************************************************
// * FileName : Seat cushion.txt
// * Date : 2/22/2011



Var 0001, name fs_eng_1_n2, Link FSUIPC_INOUT, Offset $0896, Length 2 // Afterburner seat motor one
{
IF &fs_eng_1_n2 >= 1
{
IF &fs_eng_1_n2 <= 14500
{
&motor_one = 0
}
IF &fs_eng_1_n2 >= 14501
{
IF &fs_eng_1_n2 <= 16484
{
&motor_one = 1
}
}
}
}

Var 0002, name motor_one, Link IOCARD_OUT, Output 0 // Afterburner - motor 1

Var 0003, name fs_eng_2_n2, Link FSUIPC_INOUT, Offset $092E, Length 2 // Afterburner seat motor two
{
IF &fs_eng_2_n2 >= 1
{
IF &fs_eng_2_n2 <= 14500
{
&motor_two = 0
}
IF &fs_eng_2_n2 >= 14501
{
IF &fs_eng_2_n2 <= 16484
{
&motor_two = 1
}
}
}
}

Var 0004, name motor_two, Link IOCARD_OUT, Output 1 // Afterburner - motor 2


// -----------------------------------------------LOWSPEED BURNER------------------------------------------------------------------

Var 0005, name Eng2, Link FSUIPC_IN, Offset $092E, Length 2 // (eng2 offset) lowspeed Afterburner Effec
{
CALL &Control
}

Var 0006, name ldgGear, Link FSUIPC_IN, Offset $0BEC, Length 4 // (nose gear offset) lowspeed Afterburner
{
CALL &Control
}

Var 0007, name Eng1, Link FSUIPC_IN, Offset $0896, Length 2 // (eng1 offset) lowspeed Afterburner Effec
{
CALL &Control
}

Var 0008, name Control, Link SUBRUTINE
{
C0 = &Eng1 >= 15001
C1 = &Eng2 >= 15001
IF C0 AND C1
{
IF &ldgGear = 16383
{
&burner_on = 1
}
ELSE
{
&burner_on = 0
}
}
}

Var 0009, name burner_on, Link IOCARD_OUT, Output 10 // Low speed afterburner effect - motor 22

// -----------------------------------STALL WARNING--------------------------------------------------------------------------

Var 0010, name stall, Link FSUIPC_INOUT, Offset $036C, Length 1 // Stall Warning
{
IF &stall = 0
{
&stall_a = 0
&stall_b = 0
}
IF &stall = 1
{
&stall_a = 1
&stall_b = 1
}
}

Var 0011, name stall_a, Link IOCARD_OUT, Output 2 // Motor 4 // Stall stick - motor 10

Var 0012, name stall_b, Link IOCARD_OUT, Output 3 // Motor 3 // Stall throttle - motor 11

//----------------------------------------Speed brake rumble---------------------------------------------------------------

Var 0013, name spoilers, Link FSUIPC_INOUT, Offset $0BD4, Length 4 // Speed brake rumble
{
CALL &Control2
}

Var 0014, name ldgGear2, Link FSUIPC_IN, Offset $0BEC, Length 4 // (nose gear offset) nose gear is down for
{
CALL &Control2
}

Var 0015, name Control2, Link SUBRUTINE
{
C0 = &spoilers = 16382
IF C0
{
IF &ldgGear2 = 0
{
&Speed_BrakeR = 1
&Speed_BrakeR = DELAY 0 ,600
&Speed_BrakeL = 1
&Speed_BrakeL = DELAY 0 ,600
}
ELSE
{
&Speed_BrakeR = 0
&Speed_BrakeL = 0
}
}
}

Var 0016, name Speed_BrakeR, Link IOCARD_OUT, Output 4 // Speed_Brake rumble motor 6

Var 0017, name Speed_BrakeL, Link IOCARD_OUT, Output 5 // Speed_Brake rumble motor 7

// -------------------------------------------G Forces----------------------------------------------------------------------------------

Var 0018, name Gforce, Link FSUIPC_INOUT, Offset $11BA, Length 2 // pilot harness G Force - 5000 is aprox 8
{
IF &Gforce >= 101
{
IF &Gforce <= 2000
{
&G1 = 0
&G2 = 0
}
IF &Gforce >= 0
{
IF &Gforce <= 5000
{
&G3 = 0
&G4 = 0
}
IF &Gforce >= 2001
{
IF &Gforce <= 7240
{
&G1 = 1
&G2 = 1
}
IF &Gforce >= 5001
{
IF &Gforce <= 7240
{
&G3 = 1
&G4 = 1
}
}
}
}
}
}

Var 0019, name G1, Link IOCARD_OUT, Output 6 // Harness low G Left, motor 8

Var 0020, name G2, Link IOCARD_OUT, Output 7 // Harness low G Right, motor 9

Var 0021, name G3, Link IOCARD_OUT, Output 12 // Harness high G Left, motor 13

Var 0022, name G4, Link IOCARD_OUT, Output 13 // Harness high G Right, motor 14

Var 0023, name G5, Link IOCARD_OUT, Output 14 // lower leg G Left, motor 15

Var 0024, name G6, Link IOCARD_OUT, Output 15 // Upper leg G Left motor 16

Var 0025, name G7, Link IOCARD_OUT, Output 16 // Lower G Right, motor 17

Var 0026, name G8, Link IOCARD_OUT, Output 17 // Upper G Right, motor 18

// -------------------------------------------NEG G FORCE--------------------------------------

Var 0027, name Neg_G, Link FSUIPC_INOUT, Offset $11BA, Length 2 // pilot harness Neg G Force
{
IF &Gforce >= 0
{
IF &Gforce <= 250
{
&G9 = 1
&G10 = 1
}
IF &Gforce >= 251
{
IF &Gforce <= 7240
{
&G9 = 0
&G10 = 0
}
}
}
}

Var 0028, name G9, Link IOCARD_OUT, Output 18 // Upper G Right, motor 19

Var 0029, name G10, Link IOCARD_OUT, Output 19 // Upper G Right, motor 20

// -------------------------------------------------------NOSE GEAR RUMBLE

Var 0030, name fs_ldg_nose, Link FSUIPC_INOUT, Offset $0BEC, Length 4 // nose gear rumble
{
IF &fs_ldg_nose = 0
{
&nose_a = 0
&nose_b = 0
&nose_c = 0
}
IF &fs_ldg_nose >= 1
{
IF &fs_ldg_nose <= 16382
{
&nose_a = 1
&nose_b = 1
&nose_c = 1
}
}
IF &fs_ldg_nose = 16383
{
&nose_a = 0
&nose_b = 0
&nose_c = 0
}
}

Var 0031, name nose_a, Link IOCARD_OUT, Output 8 // seat nose gear rumble - Motor 3

Var 0032, name nose_b, Link IOCARD_OUT, Output 9 // seat nose gear rumble - Motor 4

Var 0033, name nose_c, Link IOCARD_OUT, Output 11 // seat nose gear rumble - Motor 12

Var 0034, name Angle_of_attac, Link FSUIPC_INOUT, Offset $11BE, Length 2 // For buffeting motors (number run backwar
{
IF &Angle_of_attac >= 0
{
IF &Angle_of_attac <= 20000
{
&buffetting = 1
&buffetting2 = 1
}
IF &Angle_of_attac >= 0
{
IF &Angle_of_attac <= 15000
{
&buffetting3 = 1
&buffetting4 = 1
}
IF &Angle_of_attac >= 20001
{
IF &Angle_of_attac <= 65536
{
&buffetting = 0
&buffetting2 = 0
}
IF &Angle_of_attac >= 15001
{
IF &Angle_of_attac <= 65536
{
&buffetting3 = 0
&buffetting4 = 0
}
}
}
}
}
}

Var 0035, name buffetting, Link IOCARD_OUT, Output 8 // Buffetting output - Motor 3

Var 0036, name buffetting2, Link IOCARD_OUT, Output 9 // Buffetting output - Motor 4

Var 0037, name buffetting3, Link IOCARD_OUT, Output 4 // Buffetting output - Motor 6

Var 0038, name buffetting4, Link IOCARD_OUT, Output 5 // Buffetting output - Motor 7

Var 0039, name flapsmotor, Link FSUIPC_INOUT, Offset $0BE0, Length 4 // flaps motor
{
IF &flapsmotor >= 0
{
IF &flapsmotor <= 3
{
&flapeffect = 0
}
IF &flapsmotor >= 4
{
IF &flapsmotor <= 16381
{
&flapeffect = 1
}
IF &flapsmotor >= 16382
{
IF &flapsmotor <= 16383
{
&flapeffect = 0
}
}
}
}
}

Var 0040, name flapeffect, Link IOCARD_OUT, Output 11 // flap rumble - Motor 12

// -------------------------------------------START CART--------------------------------------------------------------------------------------------


Var 0041, name StartCart, Link FSUIPC_INOUT, Offset $3103, Length 1 // Battery offset for start cart electrical power

{
IF &StartCart = 0 // Start cart off (battery off)
{
&CartRelay = 0 // startcart off
}
IF &StartCart = 1 // Start cart on (battery on)
{
&CartRelay = 1 // Master relay is on
}
}
Var 0042, name CartRelay, Link IOCARD_OUT, Output 35 // Start cart Relay electrical controller



// ------------------------------------------------Generator ONE -------------------------------------------------------------------------------------

Var 0043, name gen1, Link FSUIPC_INOUT, Offset $3B7C, Length 4 // GENERATOR 1 STATUS
{
IF &gen1 = 0 // Generator one off
{
&GEN_1_lght = 1
&Gen_1_CAUTION = 1
&GEN_1_Relay = 0
}
IF &gen1 = 1 // Generator one on
{
&GEN_1_lght = 0
&Gen_1_CAUTION = 0
&GEN_1_Relay = 1
}
}

Var 0044, name GEN_1_lght, Link IOCARD_OUT, Output 45 // GEN 1 LIGHT ON

Var 0045, name Gen_1_CAUTION, Link IOCARD_OUT, Output 60 // GEN Causes MASTER CAUTION LIGHT ON

Var 0046, name GEN_1_Relay, Link IOCARD_OUT, Output 36 // GEN 1 Relay electrical controller



// ---------------------------------------------------------------------Generator two-----------------------------------------------

Var 0047, name gen2, Link FSUIPC_INOUT, Offset $3ABC, Length 4 // GENERATOR 2 Status
{
IF &gen2 = 0 // Generator two off
{
&GEN_2_lght = 1
&Gen_2_CAUTION = 1
&GEN_2_Relay = 0
}
IF &gen2 = 1 // Generator two on
{
&GEN_2_lght = 0
&Gen_2_CAUTION = 0
&GEN_2_Relay = 1
}
}

Var 0048, name GEN_2_lght, Link IOCARD_OUT, Output 44 // GEN 2 LIGHT ON

Var 0049, name Gen_2_CAUTION, Link IOCARD_OUT, Output 60 // GEN Causes MASTER CAUTION LIGHT ON

Var 0050, name GEN_2_Relay, Link IOCARD_OUT, Output 37 // GEN 2 Relay electrical controller

// -----------------------------------------------------BUS TIE Eng 1----------------------------------------------------------


Var 0051, name BusGen1, Link FSUIPC_INOUT, Offset $3B7C, Length 4 // GENERATOR 1 OFFSET
{
IF &BusGen1 = 0
{
&BusTie1 = 1
}
IF &BusGen1 = 1
{
&BusTie1 = 0
}
}
Var 0052, name BusTie1, Link IOCARD_OUT, Output 33 // Bus Tie Light on

// -----------------------------------------------------BUS TIE Eng 2----------------------------------------------------------


Var 0053, name BusGen2, Link FSUIPC_INOUT, Offset $3ABC, Length 4 // GENERATOR 2 OFFSET
{
IF &BusGen2 = 0
{
&BusTie2 = 1
}
IF &BusGen2 = 1
{
&BusTie2 = 0
}
}
Var 0054, name BusTie2, Link IOCARD_OUT, Output 34 // Bus Tie Light on

// -----------------------------------Avionics master--------------------------------------------------------------

Var 0055, name AvGen1, Link FSUIPC_INOUT, Offset $3B7C, Length 4 // GENERATOR 1 OFFSET
{
CALL &Control3
}

Var 0056, name AvGen2, Link FSUIPC_INOUT, Offset $3ABC, Length 4 // GENERATOR 2 OFFSET
{
CALL &Control3
}

Var 0057, name Control3, Link SUBRUTINE
{
C0 = &AvGen1 = 0
IF C0
{
IF &AvGen1 = 0
{
&AvMaster = 0
}
ELSE
{
&AvMaster = 1
}
}
}
Var 0058, name AvMaster, Link FSUIPC_INOUT, Offset $3103, Length 4 // Master AVIONICS offset


// --------------------------------------------TAILHOOK-------------------------------------------------------------------------
Var 0059 name tailhook, Link FSUIPC_INOUT, Offset $3BA0, Length 8, Numbers 0 // Tailhook position light
{
IF &tailhook = 0
{
&hook_lght = 0
}
IF &tailhook = 1
{
&hook_lght = 1
}
}

Var 0060, name hook_lght, Link IOCARD_OUT, Output 43 // Tailhook position light

// --------------------------------------------------------SPEEDBRAKE POSITION LIGHT--------------------------------------

Var 0061, name brake, Link FSUIPC_INOUT, Offset $0BD8, Length 4 // Speed brake position indicator
{
IF &brake >= 0
{
}
IF &brake <= 381
{
&BrakeLIGHT = 0
}
IF &brake >= 382
{
}
IF &brake >= 16382
{
&BrakeLIGHT = 1
}
}

Var 0062, name BrakeLIGHT, Link IOCARD_OUT, Output 61 // Speed_Brake LIGHT

dc8flightdeck
08-02-2011, 04:18 PM
Here are two photos when I was preparing the motors for placement in the cushion

makoy
08-02-2011, 05:36 PM
Thanks,

I try to get turbulence feeling to my seat.
I have Aura shaker, but theres no way to get that out.