Jump to content

Cockpit I/O survey - what do we need?


Alex_rcpilot

Recommended Posts

I figured a survey many help a lot of people including me get a general overview of how much work is involved in a pit building project. Moreover, it offers valuable information of how an ideal I/O card should be like.

 

This thread covers a wide range of hardware I/O devices, which include but aren't limited to those listed below.

  • Input devices - buttons, toggle switches, clickable knobs, dials, sliders...etc.
  • Output devices - discrete LED's, 7-segment displays, text LCD's, graphic(grayscale / TFT)LCD's, buzzers, speakers, motors...etc

The subject is NOT LIMITED TO KA-50 PIT BUILDING, even not limited to pit building. Other human-computer interaction(HCI) peripheral devices may also fit in this topic.

 

 

OK, here're two simple questions:

 

Which kind of I/O devics have you used or are you planning to use for your pit building / HCI project?

 

By categorizing these devices, could you give an estimation of the maximum quantities of each type of item being used?

 

 

Your feedback will be highly appreciated. :)

Link to comment
Share on other sites

Phhuh..! I did a quick count of inputs in the cockpit. Counting only switch positions and buttons. And I came to 538 inputs.

 

I did not count the adjustors for the instruments, or axis (potmeters).. But I'll get arround to that later..

"But (504)Brewber said they were'nt friendly.. So I took'em out.!"

[sIGPIC][/sIGPIC]

 

Link to comment
Share on other sites

Phhuh..! I did a quick count of inputs in the cockpit. Counting only switch positions and buttons. And I came to 538 inputs.

 

I did not count the adjustors for the instruments, or axis (potmeters).. But I'll get arround to that later..

 

Good work, dude. I'm still working on something.:thumbup:

Link to comment
Share on other sites

also keep in mind that many toggle switches have more than 2 resting positions, each of which should be mapped to either a DirectInput button or an emulated keyboard keystroke.

 

For two-way switches, you can map one action to the 'on' state, and another to the 'off' state.

This limits the number of connections needed on the controller significantly.

 

I'm using this approach in our Su-27 cockpit project, where I have four switches in my current test setup, connected to four inputs on my interface board, but mapped to eight functions in-game (left/right engine on/off, gear up/down, flaps up/down)

 

The board I'm testing with is the Velleman K8055, which will be replaced by the K8061 in the future.

Here are some specs of the K8061:

 

- 8 analogue 10 bit resolution inputs: 0…5 or 10VDC / 20kohm

- 8 analogue 8 bit resolution outputs: 0…5V or 10VDC / 47ohm

- 8 digital inputs: open collector compatible (connection to GND=0) with on board LED indication

- 8 digital open collector outputs (max. 50V/100mA) with on board LED indication

- one 10 bit PWM output: 0 to 100% open collector output (max 100mA / 40V) with on board LED indication.

- general response time: 4ms per command

- USB Port: 2.0 and 1.1 compatible (USB cable included)

- Up to 8 cards can be connected to one PC

 

Only drawback I noticed with the K8055 is that it conflicts with TrackIR.

Don't know if this is the case with the K8061 as well.

Dutch Flanker Display Team | LLTM 2010 Tiger Spirit Award
Link to comment
Share on other sites

For two-way switches, you can map one action to the 'on' state, and another to the 'off' state.

This limits the number of connections needed on the controller significantly.

 

Thanks for the supplementary.:thumbup: That's exactly what the wiring requires for a two-way switch. Since switches with more than N resting points(N>2) usually have N+1 contacts, a 2-way switch has only 2 contact, that's what makes it stand out.

 

Anyway, for an N-way switch, there's also means to save ports, and they require firmware support on the I/O card.

 

A. Among N resting positions, use only N-1 of them, when all of them appear disconnected, it must be resting on the spared contact.

 

B. Use diodes to encode multi-position switches. An 8-way switch requires 3 wires and 1 "common wire", with 12 diodes in the right combination.

Link to comment
Share on other sites

hello,

 

I've been doing some counting lately and I found I have to go without some lights and or LEDs to get the number down to 128. I'll do an exact count and edit the post.

 

I am seeing 30 possible 7-segment displays if I go digital on both radio dislays.

 

Will use all of my 16 analog slots, and then some encoders are still needed.

 

Remember that some rotary switches will require 3 or more databits each when counting switches.

 

 

doh! sorry.. just read Alex's post and he obviously knows about matrixed rotaries :)


Edited by JG14_Smil
Link to comment
Share on other sites

just did a quick count, the bare minumum you would need to make the game playable without a keyboard and missing some panels is around 100.

 

Im using the following.

 

4 x BU0836 USB cards - each of the cards is fullly matrixed up with 32 inputs.

 

2 for right hand panel 64 inputs and 4 axis used. These are for eng management, flares, hardpoints etc. (4 axis are not used for BS and are trim in FS)

 

1 for collective and target control panel. 36 inputs used and 5 axis used. axis are - pitch, throttle, (twist throttle not used in BS), and sckval x and y axis.

 

1 for cyclic and overhead functions. 32 inputs used (some control sim functions like trackir reset etc) 5 axis (cyclic x and y) landing light x and y and rudder.

[sIGPIC][/sIGPIC]

Is it a bird? Is it a plane? No - Its a Stinger - Damn.......

 

My Pit - http://forums.eagle.ru/showthread.php?t=42253

Link to comment
Share on other sites

doh! sorry.. just read Alex's post and he obviously knows about matrixed rotaries :)

 

lol, it's okay. Yes I do know about them. So far there's no much for me to worry about input.

 

But with outputs....I just can't stop wondering what the PCIP plug-in is gonna look like. Therefor I'm really curious with solutions that might "go around" it. Like how someone managed to export DCS weapon status to his customized weapons panel. People seem to have mentioned lua scripting. Never spent much time reading about lua though, I don't know whether or how well it supports USB.

Link to comment
Share on other sites

4 x BU0836 USB cards - each of the cards is fullly matrixed up with 32 inputs.

 

Thanks for your feedback.

 

I wonder how your DCS control options window look like with all the cards hooked up. The list must have been stretched real wide by up to 4 devices. Do you have to scroll left and right to browse all 4 devices? If you add more of them, say a total of 10 devices, would you consider it an inconvenient job mapping each of the individual functions?:)

Link to comment
Share on other sites

A. Among N resting positions, use only N-1 of them, when all of them appear disconnected, it must be resting on the spared contact.

 

I've found this can be a bit dicey. It's hard to tell if you're in the open position or just between positions. Works OK with 3-ways though, since between positions and the middle position are the same thing :-)

 

Cheers,

Colin

Link to comment
Share on other sites

Like how someone managed to export DCS weapon status to his customized weapons panel. People seem to have mentioned lua scripting. Never spent much time reading about lua though, I don't know whether or how well it supports USB.

 

That might have been me. Works real well. You have to use lua to export the data. Lua exports to a tcp port. I use a console app to move the data from the tcp port out to a serial port (usb to serial). I get the switch data in the same way.

 

Cheers,

Colin

Link to comment
Share on other sites

I've found this can be a bit dicey. It's hard to tell if you're in the open position or just between positions. Works OK with 3-ways though, since between positions and the middle position are the same thing :-)

 

Cheers,

Colin

 

oops! My bad, you got me. It's not a brilliant idea to save a port with this sortta compromise.:doh:

Link to comment
Share on other sites

That might have been me. Works real well. You have to use lua to export the data. Lua exports to a tcp port. I use a console app to move the data from the tcp port out to a serial port (usb to serial). I get the switch data in the same way.

 

Cheers,

Colin

 

Wow! Nice to have you here buddy. So does the console application run on a secondary TCP device, or does it run on the gaming PC and "intercept" TCP packets, then bridge it with the extended serial port? Is there anything in the cockpit that can't be accessed through this approach?

 

I'd presume you have a microcontroller behind your panel that interprets the incoming serial data into status information. And then the 7-segment displays and LED indicators work offline according to your inputs and patterns depicted in the firmware to synchronize with the virtual cockpit? Sounds like a huge project.

Link to comment
Share on other sites

Thanks for your feedback.

 

I wonder how your DCS control options window look like with all the cards hooked up. The list must have been stretched real wide by up to 4 devices. Do you have to scroll left and right to browse all 4 devices? If you add more of them, say a total of 10 devices, would you consider it an inconvenient job mapping each of the individual functions?:)

 

 

All of the cards have different names which makes it much easier. The answer though is that i dont use the options screen in DCS for anything other than the axis and the collective. Everything else uses SVmapper to send key strokes. It takes an age to install and configure but it works just fine now. DCS Max also opens that file for me.

[sIGPIC][/sIGPIC]

Is it a bird? Is it a plane? No - Its a Stinger - Damn.......

 

My Pit - http://forums.eagle.ru/showthread.php?t=42253

Link to comment
Share on other sites

All of the cards have different names which makes it much easier. The answer though is that i dont use the options screen in DCS for anything other than the axis and the collective. Everything else uses SVmapper to send key strokes. It takes an age to install and configure but it works just fine now. DCS Max also opens that file for me.

 

Thanks, does SVmapper program the BU0836 cards as keyboard emulators? I can imagine how painstaking it would be when you get started with it. But the good thing is you'd only have to do it once. Anyway, a file is opened? What is it? The SVmapper settings profile?

Link to comment
Share on other sites

Wow! Nice to have you here buddy. So does the console application run on a secondary TCP device, or does it run on the gaming PC and "intercept" TCP packets, then bridge it with the extended serial port? Is there anything in the cockpit that can't be accessed through this approach?

Hi,

 

In my case everything runs on the same PC.

 

 
function LuaExportStart()
dofile("./LuaSocket/Socket.lua")
socket = require("socket")
host = "127.0.0.1"
port = 13000
c = socket.try(socket.connect(host, port)) -- connect to the listener socket
c:setoption("tcp-nodelay",true) -- set immediate transmission mode

 

On the PC basically you open a TCP port and a serial port and read/write between them.

 

As far as getting data out, we're only limited by the lua functions provided.

For example, the WSC function is LoGetPayloadInfo(), so:

 

 
local loadout = LoGetPayloadInfo()

 

Then, after a bit of massaging, send some bytes out that the PIC on the panel can put on its output pins (here, "/W" is the name of the panel) :

 

 
local WSCdisplaystring = "/W"..ready..loaded..code..count..rounds
Socket.try(c:send(WSCdisplaystring))

 

And that's all there is to it :-)

Link to comment
Share on other sites

I'd presume you have a microcontroller behind your panel that interprets the incoming serial data into status information. And then the 7-segment displays and LED indicators work offline according to your inputs and patterns depicted in the firmware to synchronize with the virtual cockpit? Sounds like a huge project.

 

That's right, each panel has a PIC. Actually the WSC has two, one for the switches and one for the displays. I doesn't have to be broken up that way; that's just the way it worked out. For the landing gear panel I'll use one PIC for both the switches and the LEDs.

 

The displays are actually not that complicated. I try to send bytes that the PIC can just about put direcly on its output pins.

 

For the two-character russian weapon codes, here's how I set it up in lua:

 
-- Here we define how the 7 segments are wired to the port pins
sega = 0x01  
segb = 0x02
segc = 0x04
segd = 0x08
sege = 0x10
segf = 0x20
segg = 0x40  
leftbit1 = 0x80

-- Now we can build any character; 128 possibilities

char6 = string.char(leftbit1 + sega + segf + sege + segd + segc + segg)
charA = string.char(leftbit1 + sega + segb + segc + sege + segf + segg)
charC = string.char(leftbit1 + sega + segf + sege + segd)  
charH = string.char(leftbit1 + segb + segc + sege + segf + segg)
charN = string.char(leftbit1 + sega + segb + segc + sege + segf) 
charP = string.char(leftbit1 + sega + segb + sege + segf + segg)

-- Now we can build the 2-character weapon display codes

weaponNC = charN..charC
weaponHP = charH..charP
weaponNN = charN..charN
weaponA6 = charA..char6

Cheers,

Colin

Link to comment
Share on other sites

Thanks, does SVmapper program the BU0836 cards as keyboard emulators? I can imagine how painstaking it would be when you get started with it. But the good thing is you'd only have to do it once. Anyway, a file is opened? What is it? The SVmapper settings profile?
Alex rcpilot

 

Yes, SVMapper is a keyboard emulator, whit GUI interface:

 

svmapper.jpg

 

 

You only need select one button, click in box "mapped key on press (or release)" and hit the desired key.

Accepts left and right Ctrl, Shift, Alt, Win keys as modifiers.

You can set repeat, delay, and continuous press, if need. In picture button 111 is for Teamspeak, that open mic while press.

Button 112 is for control landing gear whit toggle switch, so have same key G in boot field (press and release).

Button 110 allow to change between 2 profiles (Profile On Press an Profile On Release).

 

Profiles are a .INI files, that you can edit in Notepad...

 

Is not powerful as Autohotkey, but easy to use.

 

Sokol1


Edited by Sokol1_br
Link to comment
Share on other sites

Hi,

On the PC basically you open a TCP port and a serial port and read/write between them.

 

Thanks dude, I see from the sample code that a TCP port is initialized, but how do you move data between TCP and serial ports?

 

each panel has a PIC. Actually the WSC has two, one for the switches and one for the displays. I doesn't have to be broken up that way; that's just the way it worked out. For the landing gear panel I'll use one PIC for both the switches and the LEDs.

 

The displays are actually not that complicated. I try to send bytes that the PIC can just about put direcly on its output pins.

 

Understood. It's way simpler in the firmware than I've thought.:thumbup:

Link to comment
Share on other sites

  • Recently Browsing   0 members

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