Jump to content

DCS Bios on a budget - Yngwie84


Recommended Posts

This will be my thread about me, my DCS experiences, setup and DCS Bios project.

Yngwie84 is the name I use online, I'll send a support ticket to see if ED can change my username on the forum.

 

Introduction below - My DCS BIOS project will be in the next post.

I started playing DCS a few months after Viggen was released in 2017.

I had zero flight sim experience before DCS but many hours in Elite Dangerous.

For Elite Dangerous I had bought a Saitek X55 Hotas.

The steep learning curve and the daily life made it so I never really got hooked.

I enjoyed it when I had the time for it but always relearning all the controls and procedures if you had not played for a week or two put me off. I never got the time in to just be able to jump in and get going. A mistake I made was to buy to many modules very early and try to play all of them. I multiplied my problem of trying to remembering controls buy wanting to fly Viggen, Huey, P-51 & Sabre.

 

My nr1 tips if you are new to DCS and flight sims:

Only buy one aircraft module at a time.

 

About a year ago when I again had an urge to play more DCS I decided to buy a Logitech switch panel & Logitech rudder pedals to try to make my life easier and standardize some of the controls to the switch panel. Working as a maintenance electrician I can program PLC so I started to look into DCS Bios, bought an Arduino starter kit and started to learn Arduino basics and involving it with DCS. Again I'm spending time with DCS but I'm not flying, I'm not becoming a pilot roaming the MP servers. I sit in the cockpit flipping switches.

I needed a box for all the arduino stuff and a good place to have easy access to it. Having it on a breadboard on the desktop is not a working solution.

Once again I stopped playing and things got put to the side.

 

All winter I've been on sick-leave unfortunately and spent most of my time in the sofa on Youtube or Twitch. Watching streamers play DCS I've found is a very good source of learning DCS when your stuck in the sofa. Starting to feel better I've got back to DCS, mainly trying to complete my panel with buttons.

I had been thinking that I have to build some side panel in wood or metal to put the panels on.

But then I got an idea. The Budget idea.

More on that in my next post in a few minutes.

Yngwie84: ingame & on Twitch

X55-Hotas - Logitech rudder pedals - DCS Bios box.

Link to post
Share on other sites

Sitting in my playseat challenge I had to use a cardboard box as a table for my mouse.

I got the Ide to make a switchbox out of a cardboard box, just to get started.

It's light, easy to move and stable.

Some pictures.

SRrAeMb.jpg

rX4QuNx.jpg

This gauge panel I made last year,

0MraxMZ.jpg

Found a proper place to put it.

Print is just a test, decided to have Vertical speed indicator, Slip indicator and fuel gauge.

x0Bzeqh.jpg

Easy to get in and out.

aAf2N0L.jpg

Trying things.

ldkssP7.jpg

 

The state of the box today.

rNb1A1f.jpg

 

Hardware:

1x Arduino Mega 2560.

4x ROTARY ENCODER 20P WITH SWITCH

8x 10KOHM POTENTIOMETER

4x ROTARY POS SWITCH

3x Adafruit AUTOMOTIVE GAUGE STEPPERMOTOR - x27.168

3x Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Board

 

I wish I could have the space to build a proper simpit, but how do you with an amazing A10 pit do when you jump in and fly the Viggen or the Huey?

 

I want to make my box as generic as possible. When I printed the control test for the panel I realize that I should have spread the buttons and rotarys more so I could have maybe two descriptions for each button and switch.

But I feel this box is a real step forward for me, I now have something simple, easy to move and store, something were I will not have keybindings get forgotten cus it will be written in plain text on the box.

For the future. I want to maybe engrave or 3dprint panels that I can just lay over with the correct labels for the correct aircraft I'm flying.


Edited by Yngwie84

Yngwie84: ingame & on Twitch

X55-Hotas - Logitech rudder pedals - DCS Bios box.

Link to post
Share on other sites

My current test code for the Huey if anyone is interested.

 

 

 

 

// ------------------------------------------------------------------

// HUEY HUEY HUEY HUEY

// ------------------------------------------------------------------

// Yngwie84 22 MARCH 2019

// Hardware:

// 1x Arduino Mega 2560.

// 4x ROTARY ENCODER 20P WITH SWITCH

// 8x 10KOHM POTENTIOMETER

// 4x ROTARY POS SWITCH

// 3x Adafruit AUTOMOTIVE GAUGE STEPPERMOTOR - x27.168

// 3x Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Board

// ------------------------------------------------------------------

// DCS BIOS DCS BIOS DCS BIOS DCS BIOS

// ------------------------------------------------------------------

#define DCSBIOS_IRQ_SERIAL

#include "DcsBios.h"

#include <Stepper.h>

#define STEPS 630 // steps per revolution (limited to 315°)

#define COIL01 2 // VVI GAUGE

#define COIL02 3 // VVI GAUGE

#define COIL03 4 // VVI GAUGE

#define COIL04 5 // VVI GAUGE

#define COIL05 6 // SLIP GAUGE

#define COIL06 7 // SLIP GAUGE

#define COIL07 8 // SLIP GAUGE

#define COIL08 9 // SLIP GAUGE

#define COIL09 10 // FUEL GAUGE

#define COIL10 11 // FUEL GAUGE

#define COIL11 12 // FUEL GAUGE

#define COIL12 13 // FUEL GAUGE

#define BUTTON_1 22

#define BUTTON_2 24

#define BUTTON_3 26

#define BUTTON_4 28

#define RADIO_1_VOLUME A0

#define RADIO_2_VOLUME A1

#define TONE_VOLUME A2

#define BRIGHTNESS A3

#define RWR_VOLUME A5

#define LIGHTS_1 A4

#define LIGHTS_2 A6

#define LIGHTS_3 A7

#define SW1_1 43

#define SW1_3 45

#define SW2_1 51

#define SW3_1 49

#define SW4_3 47

#define SW4_4 53

#define ROT1_1 35

#define ROT1_3 39

#define ROT2_1 23

#define ROT2_2 25

#define ROT2_3 27

#define ROT2_4 29

#define ROT2_5 31

#define ROT2_6 33

#define ROT3_1 37

#define ROT3_3 41

//#define ROT4_1

//#define ROT4_3

//#define ROT5_1

//#define ROT5_3

#define ROT6_1 38

#define ROT6_2 40

#define ROT6_3 42

#define ROT6_4 44

#define ROT6_5 46

#define ROT6_6 48

int pos1 = 0; //Position in steps(0-630)= (0°-300°)

int pos2 = 0; //Position in steps(0-630)= (0°-300°)

int pos3 = 0; //Position in steps(0-630)= (0°-300°)

#define PIN_0 90

#define PIN_1 91

#define PIN_2 92

#define PIN_3 93

#define PIN_4 94

#define PIN_5 95

#define PIN_6 96

// ------------------------------------------------------------------

// ROTARY SWITCHES ROTARY SWITCHES

// ------------------------------------------------------------------

// ROT1_1 ROT1_3

// ROT2_1 ROT2_2 ROT2_3 ROT2_4 ROT2_5 ROT2_6

// ROT3_1 ROT3_3

// ROT4_1 ROT4_3 // NOT CONNECTED

// ROT5_1 ROT5_3 // NOT CONNECTED

// ROT6_1 ROT6_2 ROT6_3 ROT6_4 ROT6_5 ROT6_6

const byte domeLightSwPins[3] = {ROT6_1, ROT6_2, ROT6_3};

DcsBios::SwitchMultiPos domeLightSw("DOME_LIGHT_SW", domeLightSwPins, 3);

const byte intModePins[6] = {ROT2_1, ROT2_2, ROT2_3, ROT2_4, ROT2_5, ROT2_6};

DcsBios::SwitchMultiPos intMode("INT_MODE", intModePins, 6);

// ------------------------------------------------------------------

// ROTARY ENCODERS ROTARY ENCODERS ROTARY ENCODERS

// ------------------------------------------------------------------

// ENCODER 1 = PINA/B 18, 30);

// ENCODER 2 = PINA/B 19, 32);

// ENCODER 3 = PINA/B 20, 34);

// ENCODER 4 = PINA/B 21, 36);

DcsBios::RotaryEncoder uhf10mhz("UHF_10MHZ", "INC", "DEC", 18, 30);

DcsBios::RotaryEncoder uhf1mhz("UHF_1MHZ", "INC", "DEC", 19, 32);

DcsBios::RotaryEncoder uhf50khz("UHF_50KHZ", "INC", "DEC", 20, 34);

DcsBios::RotaryEncoder uhfPreset("UHF_PRESET", "INC", "DEC", 21, 36);

// ------------------------------------------------------------------

// TWO/THREE WAY SWITCH TWO/THREE WAY SWITCH

// ------------------------------------------------------------------

// SW1_1 SW1_3

// SW2_1

// SW3_1

// SW4_3 SW4_4

DcsBios::Switch3Pos masterArmSw("MASTER_ARM_SW", SW1_1, SW1_3);

DcsBios::Switch2Pos cmArmSw("CM_ARM_SW", SW2_1);

DcsBios::Switch3Pos rocketSel("ROCKET_SEL", SW4_3, SW4_4);

// ------------------------------------------------------------------

// BUTTON_1 BUTTON_2 BUTTON_3

// ------------------------------------------------------------------

const byte uhfFunctionPins[4] = {PIN_0, BUTTON_1, PIN_2, PIN_3};

DcsBios::SwitchMultiPos uhfFunction("UHF_FUNCTION", uhfFunctionPins, 4);

const byte vhffmModePins[4] = {PIN_0, BUTTON_2, PIN_2, PIN_3};

DcsBios::SwitchMultiPos vhffmMode("VHFFM_MODE", vhffmModePins, 4);

// ------------------------------------------------------------------

// POTENTIOMETERS POTENTIOMETERS POTENTIOMETERS

// RWR_VOLUME LIGHTS_1 LIGHTS_2 LIGHTS_3

// RADIO_1_VOLUME RADIO_2_VOLUME TONE_VOLUME BRIGHTNESS

// ------------------------------------------------------------------

DcsBios::Potentiometer brtConsole("BRT_CONSOLE", RWR_VOLUME);

DcsBios::Potentiometer brtPilot("BRT_PILOT", LIGHTS_1);

DcsBios::Potentiometer brtEngine("BRT_ENGINE", LIGHTS_2);

DcsBios::Potentiometer brtPed("BRT_PED", LIGHTS_3);

DcsBios::Potentiometer uhfVol("UHF_VOL", RADIO_1_VOLUME);

DcsBios::Potentiometer vhffmVol("VHFFM_VOL", RADIO_2_VOLUME);

DcsBios::Potentiometer beaconVol("BEACON_VOL", TONE_VOLUME);

DcsBios::Potentiometer brtCopilot("BRT_COPILOT", BRIGHTNESS);

 

// ------------------------------------------------------------------

// VVI GAUGE VVI GAUGE VVI GAUGE

// ------------------------------------------------------------------

Stepper stepper1(STEPS, COIL01, COIL02, COIL03, COIL04);

void onVviPChange(unsigned int VVI) {

 

int val1= map(VVI,0,65535,0,630); // map pot range in the stepper range.

 

while(abs(val1 - pos1)> 2){ //if diference is greater than 2 steps.

if((val1 - pos1)> 0){

stepper1.step(-1); // move one step to the left.

pos1++;

}

if((val1 - pos1)< 0){

stepper1.step(1); // move one step to the right.

pos1--;

}

}

}

DcsBios::IntegerBuffer vviPBuffer(0x1482, 0xffff, 0, onVviPChange);

 

// ------------------------------------------------------------------

// SLIP GAUGE SLIP GAUGE SLIP GAUGE

// ------------------------------------------------------------------

Stepper stepper2(STEPS, COIL05, COIL06, COIL07, COIL08);

void onSideslipChange(unsigned int SLIP) {

 

int val2= map(SLIP,0,65535,0,630); // map pot range in the stepper range.

 

while(abs(val2 - pos2)> 2){ //if diference is greater than 2 steps.

if((val2 - pos2)> 0){

stepper2.step(-1); // move one step to the left.

pos2++;

}

if((val2 - pos2)< 0){

stepper2.step(1); // move one step to the right.

pos2--;

}

}

}

DcsBios::IntegerBuffer sideslipBuffer(0x1480, 0xffff, 0, onSideslipChange);

// ------------------------------------------------------------------

// FUEL GAUGE FUEL GAUGE FUEL GAUGE

// ------------------------------------------------------------------

Stepper stepper3(STEPS, COIL09, COIL10, COIL11, COIL12);

 

void onFuelQtyChange(unsigned int FUEL) {

 

int val3= map(FUEL,0,65535,0,630); // map pot range in the stepper range.

 

while(abs(val3 - pos3)> 2){ //if diference is greater than 2 steps.

if((val3 - pos3)> 0){

stepper3.step(-1); // move one step to the left.

pos3++;

}

if((val3 - pos3)< 0){

stepper3.step(1); // move one step to the right.

pos3--;

}

}

}

DcsBios::IntegerBuffer fuelQtyBuffer(0x1476, 0xffff, 0, onFuelQtyChange);

 

// ------------------------------------------------------------------

// SETUP SETUP SETUP SETUP SETUP

// ------------------------------------------------------------------

void setup() {

 

stepper1.setSpeed(70); // set the motor speed to 70 RPM (360 PPS aprox.).

stepper1.step(640); //Reset Position(640 steps counter-clockwise).

 

stepper2.setSpeed(70); // set the motor speed to 70 RPM (360 PPS aprox.).

stepper2.step(640); //Reset Position(640 steps counter-clockwise).

 

stepper3.setSpeed(70); // set the motor speed to 70 RPM (360 PPS aprox.).

stepper3.step(640); //Reset Position(640 steps counter-clockwise).

 

DcsBios::setup();

pinMode(23, INPUT_PULLUP);

pinMode(25, INPUT_PULLUP);

pinMode(27, INPUT_PULLUP);

pinMode(29, INPUT_PULLUP);

pinMode(31, INPUT_PULLUP);

pinMode(33, INPUT_PULLUP);

pinMode(35, INPUT_PULLUP);

pinMode(37, INPUT_PULLUP);

pinMode(38, INPUT_PULLUP);

pinMode(39, INPUT_PULLUP);

pinMode(40, INPUT_PULLUP);

pinMode(41, INPUT_PULLUP);

pinMode(42, INPUT_PULLUP);

pinMode(43, INPUT_PULLUP);

pinMode(44, INPUT_PULLUP);

pinMode(45, INPUT_PULLUP);

pinMode(46, INPUT_PULLUP);

pinMode(47, INPUT_PULLUP);

pinMode(48, INPUT_PULLUP);

pinMode(49, INPUT_PULLUP);

// pinMode(50, INPUT_PULLUP);

pinMode(51, INPUT_PULLUP);

// pinMode(52, INPUT_PULLUP);

pinMode(53, INPUT_PULLUP);

}

// ------------------------------------------------------------------

// LOOP LOOP LOOP LOOP

// ------------------------------------------------------------------

void loop() {

DcsBios::loop();

}

 

Yngwie84: ingame & on Twitch

X55-Hotas - Logitech rudder pedals - DCS Bios box.

Link to post
Share on other sites

This shows how even a basic button box can add allot more immersion than using a keyboard and mouse.

 

Maybe my multi-aircraft DCS-BIOS technique can be of some help with your generic controls?

 

https://forums.eagle.ru/showthread.php?t=231236

 

I wish I could have the space to build a proper simpit, but how do you with an amazing A10 pit do when you jump in and fly the Viggen or the Huey?

Link to post
Share on other sites
This shows how even a basic button box can add allot more immersion than using a keyboard and mouse.

 

Maybe my multi-aircraft DCS-BIOS technique can be of some help with your generic controls?

 

https://forums.eagle.ru/showthread.php?t=231236

 

I was looking in to that but quoting you, "Any output controls like LEDs or servos aren't supported."

I use three gauges.

I have no LED's yet, but I plan on making a warning panel in the future.

As it is now, if I change aircraft I download a new .ino to the board.

I've looked in the thread with a button for polling controls as well.

 

As it is now I have everything on just one Arduino mega.

I have a nano that I use for testing, plan on buying some MAX487 in the future and try Master/slave.

Yngwie84: ingame & on Twitch

X55-Hotas - Logitech rudder pedals - DCS Bios box.

Link to post
Share on other sites

Been starting to draw a AoA and Caution light panel for the F14 that I will mount on the logitech switchpanels left side.

 

Pz69Y9c.png

Will print using my Creality CR10S

A4u9z6G.jpg

Yngwie84: ingame & on Twitch

X55-Hotas - Logitech rudder pedals - DCS Bios box.

Link to post
Share on other sites
  • 1 year later...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...