Skip to content

aztlek/ModularCockpit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modular Cockpit for Star Citizen

The Modular Cockpit is a system of physical controls for Star Citizen.

Star Citizen Modular Cockpit

It is composed of Modules that group several interrelated physical controls such as switches, potentiometers, encoders, etc. For example, the Power Module has several toggle switches to activate or deactivate power for weapons, shields, or others; it also has encoders to increase and decrease power, as well as buttons to quickly set maximum or minimum power.

Power Module

Real Power Module

These Modules can be connected directly to the computer's USB port and the operating system sees them as a joystick, which makes it easy to perform keybinding in Star Citizen.

You can also dock several Modules to a Control Panel, which in turn connects to a computer USB port. When multiple Modules are docked to a Control Panel, the computer sees them all as a single joystick. This is very convenient when having a large number of Modules connected, preventing the operating system from failing in recognition and operation of multiple joysticks.

The Modules are interchangeable, meaning they can be swapped between Control Panels or positions within it. This way, the player can easily configure their cockpit depending on their playstyle.

Also, and very importantly, the Modular Cockpit is a free hardware and free software project. This means that anyone can download the designs and firmware, and build their own cockpit. They can also use it for whatever they want. In addition, they are free to study how the Modular Cockpit is made and modify it for their needs. Finally, they are free to redistribute it with or without changes as long as they state where it came from and who the authors are.

Motivations

  1. Star Citizen is a game with highly enriched functionality and interactivity.
  2. Each ship in Star Citizen can perform one or more roles.
  3. Each player in Star Citizen can play one or more roles.
  4. Each role has a particular form of interactivity.
  5. Each player has a different way of playing.

Therefore, each player needs a unique cockpit adapted to their playstyle. A modular, open, and adaptable cockpit is needed for Star Citizen.

Definitions

Pilot:
The user of the Modular Cockpit, its very reason for existing.
Component:
The atoms that make up the Modular Cockpit. They can be electronic components, such as switches, potentiometers, cables, diodes, microcontrollers; or mechanical ones, such as acrylic sheets, makerbeams, etc.
Physical Control:
A type of electronic Component through which the Pilot interacts with Star Citizen. For example, switches, buttons, encoders, potentiometers, etc.
Module:
A grouping of physical controls and components with related functions.
Control Panel
A structure made with 10x10 mm Makerbeam (see Frame) where one or several Modules can be docked.
Frame:
This is a structure built with 10x10 mm Makerbeam. It has a height of 120 mm and the required width. For this, 100 mm vertical beams are used and joined to the horizontal beams with MakerBeam Corner Cubes. Several T-slot nuts are inserted into the horizontal beams, where the Modules are screwed in with M3 bolts. Any other compatible system can be used. For example, the following image shows a Frame 220 mm wide with its different parts.
Docking a Module
Physically placing a Module into a Control Panel so that it is fixed and connected.
Undocking a Module
Removing a Module from the Control Panel, leaving the slot free.

Frame with measurements

Design Requirements

Design Requirements for Modules

  1. Each Module must work independently: it should not require other modules or elements to function, except the computer.
  2. It must be interchangeable, meaning it can be placed in any ControlPanel and work.
  3. A module must have only one cable connected to it: the USB cable.
  4. A Module must be screwable to the Frame of a ControlPanel.
  5. A module groups several related functions. The grouping of these functions must follow the categorization given in the Keybinding of Star Citizen. For example, there is a Vehicles - Cockpit category, so there will be at least one module that covers that category.
  6. The aesthetics of the Modules must resemble those of military aircraft. See The Warthod Project as a reference.
  7. Particular functions, such as backlighting, must work within the Module. If there is no dedicated control for this function, it must be controllable from the computer or from a Control Panel independently.

Design Requirements for Control Panels

  1. The front part of a ControlPanel is a Frame as defined above.
  2. Each ControlPanel must have only two cables connected to it: the USB cable and the power cable.
  3. The Modules connected to the Control Panel must be seen by the computer as if they were a single joystick. This avoids errors and problems caused by connecting many joysticks simultaneously.
  4. A Control Panel can centralize particular functions of a Module, such as backlighting, to make global changes to these functions.
  5. A Control Panel controls the ventilation function, which the Modules do not handle.

Modules

  1. Salvage Module
  2. Missiles Module
  3. Docking and Landing Module
  4. Shields and Countermeasures Module
  5. Emotes Module
  6. Movement Module
  7. Weapons Module
  8. Target Cycling Module
  9. Camera Module
  10. Stopwatch Module
  11. Power Module
  12. Targeting Module
  13. Social Module
  14. Turret Module
  15. Mining Module
  16. Cockpit Module
  17. Radar and Scanning Module
  18. Hud Module

Input Devices

There are several types of input devices:

Mechanical keyboard keys:
Mechanical keyboard keys are used for most SC keybindings, since SC is designed around keys.
Encoder
For cases where there are two keys, one for increasing and another for decreasing the same value, such as increasing or decreasing shield energy.
Toggle Switch (ON/OFF)
These are used when there are two keys, one to turn on and another to turn off, for example, turning shields on and off.
Linear Potentiometer
These are used for cases where SC has associated axes, or absolute changes of a value.
Joystick
Apart from obvious cases where joysticks are used, there are keybindings that by their nature should be controlled with a joystick. A joystick is essentially (at least) two orthogonal potentiometers, allowing control of two orthogonal absolute variables, such as z/y displacement of the camera.
GlidePoint® Circle Trackpads (like the Steam Controller)
This trackpad works very similarly to an analog joystick, so it can be used for the same purposes.

Microcontroller

Teensy® is used for the following reasons:

  1. It can function as multiple HID devices simultaneously: it can be a keyboard, joystick, and mouse at the same time, in addition to working with serial. This last feature is necessary to implement a communication protocol with the modules, or in case Star Citizen implements something similar to DCS-BIOS. Being able to have both keyboard and joystick simultaneously is necessary, for example, for the CameraModule, since Star Citizen has no way to map joystick buttons to advanced camera functions and those can only be mapped to keyboard and mouse.
  2. It has many input pins. In the case of the Teensy 4.0, there are 40 digital pins and 14 analog ones. In the Teensy 4.1, there are 55 digital inputs and 18 analog ones. This is necessary since some modules require many inputs, such as the TargetCyclingModule with 24 digital inputs or the PowerModule with 30 digital inputs.
  3. Furthermore, all digital inputs have interrupt capability. This makes input reading much faster. For example, the TargetCyclingModule with many encoders is much faster thanks to interrupt capability.
  4. It also has many PWM outputs. In the case of the Teensy 4.0, there are 31. In the case of the Teensy 4.1, there are 35. This is very important for managing the backlighting of the modules.
  5. The Teensy 4.1 has a USB Host port used in Control Panels to unify the Modules so the operating system sees them as a single joystick.
  6. It has very good speed, making the Teensy 4.1 preferable for unifying the modules in the ControlPanel.
  7. It also has a good amount of memory, which makes this not a concern when coding.