Jump to content

DCS-BIOS Discussion Thread


FSFIan

Recommended Posts

Hi Guys, need you input. As per the DCS-Bios user guide, I managed to sketch and hook up the inputs, 1 x Potentiometer and 1 x Rotary endcoder with push button for BS Abris.

 

Ran the first test with Potentiometer and its sketch, it worked lovely, but was turning in the opposite direction, so I swapped the GND with 5V, and ran the program again. This time the knob was turning, but wasnt moving smoothly, but instead it was jumping or lagging. I started to turn it very slowly, in the sim it very slowly started to keep up with my physical movement, after like 2- 3 mins, it became normal. Why is that?

 

 

Second, I attached the Rotary encoder, which too was in the opposite so i swapped the buttons in the sketch. it worked fine but needed a lot of physical turns, why is that?

The comparison of the physical movement and the sim movement is 1:3/4, as in when i was making a full physical turn, the knob in the sim was turning only 3/4th of that of what I was doing outside, why is that? and can this be synchronized?

I dont know if you guys are still using this thread or not, I have just started working on DCS Bios, and I know I am far far behind. Please bear with me and guide me.

Cheers


Edited by snipes

[sIGPIC][/sIGPIC]



























Link to comment
Share on other sites

Hi,

 

I can't explain why it worked in the first trial and not when you swapped +5V and GND. Are you absolutely sure that you didn't by mistake +5 or GND with the signal?

The reason it is un-smooth might be that your potentiometer is not making slight litters. The easiest way of checking this is to run SOCAT without DCS and notice if you communications all the time from the potentiometer position. If you do then that is probably the reason because the communication gets flooded with information.

 

I noticed similar here; https://forums.eagle.ru/showpost.php?p=3020643&postcount=127

 

IIRCC then Ian made the changes to the potentiometer.h file where you can adjust the filtering settings for potentiometer. I think I am still running my modified version and it works flawlessly for me.

 

I haven't tried the encoders at all but there was a post from Ian regarding this. The encoder gives a certain number of pulses per revolution and you should be able to set the same in DCD-BIOS as per this; https://forums.eagle.ru/showpost.php?p=3156074&postcount=7

 

Hope this helps a bit.

 

Cheers

Solo

Link to comment
Share on other sites

One thing I found with pots is that you need to solder the connections ... I was using the push on connectors and was getting all sorts of jitter. Quick bit of solder and it is super smooth.

Intel i7 13700K @ 5.3 GHz / ASUS TUF Gaming Z490-Plus / 64 Gb G.Skill DDR4-3600 / RTX 4090 / 2TB Kingston KC3000 NVME / Win 10 x64 Pro / Pimax Crystal / WINWING F/A-18 HOTAS

A-10C, AJS-37, AV-8B, F-4E, F-5E, F-14, F-15E, F-16, F/A-18C, F-86F, FC3, Christen Eagle 2, FW190D-9, Mosquito, P-47D, P-51D, Spitfire, AH-64D, KA-50, UH-1H

Combined Arms, WWII Asset Pack, China Assets Pack, Super Carrier, Falklands Assets

Nevada, Normandy, Persian Gulf, The Channel, Syria, Mariana Islands, South Atlantic, Sinai

Link to comment
Share on other sites

Quick question for the DCS-BIOS Gurus...

I am finding that my Nano on a USB which controls my Radio Selector Dial quits if I crash/getshotdown/change ship and it gives me a strange error if I try to restart it.

 

The specified options are not supported by this serial device. No serial port setting changed.

 

Is this normal, or is there some other issue, please?

 

In the new year I am moving forward with the Mega as master over several slaves, so hope this situation will improve/be eradicated.

 

Cheers,

 

Mole

SCAN Intel Core i9 10850K "Comet Lake", 32GB DDR4, 10GB NVIDIA RTX 3080, HP Reverb G2

Custom Mi-24 pit with magnetic braked cyclic and collective. See it here: Molevitch Mi-24 Pit.

 

[sIGPIC][/sIGPIC] www.blacksharkden.com

bsd sig 2021.jpg

Link to comment
Share on other sites

Hi Hansolo,

 

 

Thanks for your response, looks like you are spot on, but I will have a look at it and update.

 

 

 

By turning the poles from +5v to GND, it did start to work but much later, maybe that happened because whats coming in the next sentence. Yes! the SOCAT does get flooded with the POT even without attaching anything to the Arduino and running it. So should I use your setting to fix it? In the potentiometer.h file?

 

 

BTW, how do you find this Potentiometer.h file for the modification?

 

 

I have added Ian's modded for the encoder, will check it and update here.

 

 

 

Other Questions, related to Arduino IDE, When do we use the example files given in DCS Bios, e.g. Default serial, IRQ serial, RS485master and RS485slave?

 

 

 

 

 

 

 

 

Hi,

 

I can't explain why it worked in the first trial and not when you swapped +5V and GND. Are you absolutely sure that you didn't by mistake +5 or GND with the signal?

The reason it is un-smooth might be that your potentiometer is not making slight litters. The easiest way of checking this is to run SOCAT without DCS and notice if you communications all the time from the potentiometer position. If you do then that is probably the reason because the communication gets flooded with information.

 

I noticed similar here; https://forums.eagle.ru/showpost.php?p=3020643&postcount=127

 

IIRCC then Ian made the changes to the potentiometer.h file where you can adjust the filtering settings for potentiometer. I think I am still running my modified version and it works flawlessly for me.

 

I haven't tried the encoders at all but there was a post from Ian regarding this. The encoder gives a certain number of pulses per revolution and you should be able to set the same in DCD-BIOS as per this; https://forums.eagle.ru/showpost.php?p=3156074&postcount=7

 

Hope this helps a bit.

 

Cheers

Solo


Edited by snipes

[sIGPIC][/sIGPIC]



























Link to comment
Share on other sites

Hi Andrew,

 

 

My connections are solid and solded to the POT, I dont think anything to do with the connections, but thanks for responding, it really makes you feel that your are not alone and too late in building your simpit.

Cheers

 

 

 

One thing I found with pots is that you need to solder the connections ... I was using the push on connectors and was getting all sorts of jitter. Quick bit of solder and it is super smooth.

[sIGPIC][/sIGPIC]



























Link to comment
Share on other sites

...

Yes! the SOCAT does get flooded with the POT even without attaching

...

Hi Snipes.

As DCS-BIOS sends in general just updated data if there has changed sth. (eg. the value - resp. turning angle of your pot) I suppose the value of your pot is fluctuating. This is called jitter. There are inside the library already inbuilt filters to prevent this kind of "flooding" as described by you. If they (these filters) won't do their job (I mean) you'll won't become happy with your pot anyway.

If you look a the "flooded" data you'll see the range your pot is virtually moving.

 

I would replace the pot as a very first step in troubleshooting.

 

From all gained experiences I can tell, about a half (or more) of all strange behavior is blamed to bad (or even damaged) hardware.


Edited by Tekkx
additional delivery of some "t"s (have a faulty keypad here)

Manual for my version of RS485-Hardware, contact: tekkx@dresi.de

Please do not PM me with DCS-BIOS-related questions. If the answer might also be useful to someone else, it belongs in a public thread where it can be discovered by everyone using the search function. Thank You.

Link to comment
Share on other sites

Hi Snipes, Another thing to look at is the quality of your voltage rails. Do you have an oscilloscope you can check? Try inserting tantalum caps. With my POTs near minimum and maximum positions, GND and +5V rail noise would constantly alter the reading on the Arduino analog ins. All my digital switches were okay of course as they need to cross the ON/OFF voltage thresholds before the input state is changed. Just like you the input from the POTs would settle down after a few minutes.

 

Tantalums did fix my issue.

 

 

Hi Andrew,

 

 

My connections are solid and solded to the POT, I dont think anything to do with the connections, but thanks for responding, it really makes you feel that your are not alone and too late in building your simpit.

Cheers

Link to comment
Share on other sites

BTW, how do you find this Potentiometer.h file for the modification?

 

...

 

Other Questions, related to Arduino IDE, When do we use the example files given in DCS Bios, e.g. Default serial, IRQ serial, RS485master and RS485slave?

 

Hi snipes,

 

The Potentiometer.h files is located where your libraries for Arduino IDE is located, e.i.

...\Arduino\libraries\dcs-bios-arduino-library-0.2.11\src\internal

 

With regard the different examples this is how I see it;

 

IRQSerial - Use this as default for USB connected panels

 

DefaultSerial - Use this if IRQSerial doesn't work for you

 

RS485Master - shall only be used when you want to assign a master controller for the RS485 protocol. This panel has to be a Mega 2560 which will be connected to DCS via SOCAT over USB. From this panel the communications to all other panels will be via RS485. This panel can ONLY be loaded with the RS485Master sketch as it is default. Thus you cannot connect a switch or led or anything to the panel

 

RS485Slave - shall be used for the individual panels on the RS485 communication. These panels can be UNO/NANO/MEGA and possible also other Arduino or Arduino like boards.

 

Cheers

Solo

Link to comment
Share on other sites

There are inside the library already inbuilt filters to prevent this kind of "flooding" as described by you. If they (these filters) won't do their job (I mean) you'll won't become happy with your pot anyway.

 

 

 

Hi Thanks for the response,

 

 

 

I am totally new to Arduino, can you guide me where to find these "filters" in the library, and how to use them. Ill try that first and maybe bring another pot as well, to check the difference.

[sIGPIC][/sIGPIC]



























Link to comment
Share on other sites

Hi snipes,

 

The Potentiometer.h files is located where your libraries for Arduino IDE is located, e.i.

...\Arduino\libraries\dcs-bios-arduino-library-0.2.11\src\internal

 

 

Solo

 

 

I do have DCS Bios in my Arduino IDE, I wasnt able to find the dcs bios folder in Arduino Libraries. The Software is located in D drive, and not C, is there any other folder. (D:\Program Files (x86)\Arduino\libraries)

 

 

Also when I tried to insert potentiometer.h, it promted that your DCS Bios does not have this insert.

[sIGPIC][/sIGPIC]



























Link to comment
Share on other sites

You have to modify the file. The file is already used by DCS-BIOS so you just have to enable the filtrering.

Alright it looks like I only changed one value in my setup, from 128 to 500;

 

	template <unsigned int pollInterval = 5, unsigned int hysteresis = 500, unsigned int ewma_divisor = 5>

 

Cheers

Solo


Edited by Hansolo
Link to comment
Share on other sites

Hi

i try to make a DCS_BIOS File for the A4. so far so good.
my problem is i can read the state of the switches, kobs and gauges, but i cant send anything. 
means from the ref page i cant change a state of a switch. other moduel works well!

can any body help me?

Here are the files: [url]https://github.com/WarLord211/dcs-bios[/url]
ones it finished i merge these with jdahlblom (Flightpanel BIOS;see signature)

 

[Problem above solved. False IDs in Profile]

 

an Question has anybody a BIOS profile for the YAK?


Edited by BlackLibrary
Link to comment
Share on other sites

  • 3 weeks later...

Hello

 

I am another starting cockpit builder. I have had earlier Bodnar USB cards but i found DCS Bios and after testing few functionalities with Arduino Mega (few simple switches) and with help of very good documentation i just recently ordered bag of MAX487, 3x Nano cards, some wires and other necesary things to test out RS485 connection. And oh like many others I am building A10-C cockpit. I have been reading HanSolo's and Waghog and few other topics.

 

Documentation of DCSBios is good and there is also lot of information around in forums. I think challenge is just finding that even with correct keyword as searches brings lot of information :)

Link to comment
Share on other sites

I could make the led work ok mb339pam

 

DcsBios::LED vor(0x8200, 0x0004, PIN);

DcsBios::LED tacan(0x8200, 0x0002, PIN);

DcsBios::LED rnav(0x8200, 0x0008, PIN);

 

DcsBios :: LED fltDirAlt (0x8200, 0x0040, PIN);

DcsBios :: LED fltDirGs (0x8200, 0x0020, PIN);

DcsBios :: LED fltDirRadioNav (0x8200, 0x0010, PIN);

 

 

what does not work for me are the swich

 

MASTER ARMAMENT Switch

DcsBios :: Switch2Pos masterArm ("MASTER_ARM", PIN);

 

WARN TEST Button

DcsBios :: Switch2Pos warnLtTestButton ("WARN_LT_TEST_Button", PIN);

 

 

can help solve swich

Link to comment
Share on other sites

  • 1 month later...

Noob to DCS Bios

 

Hi all,

 

I've just started to play around with DCS Bios with the aim of building my own hybrid semi generic UFC based roughly on the Hornet/AV8B UFC. I've been working for a week or so getting the output for the ODUs to render out to a some OLED panels. It has been working brilliantly for the Hornet so far.

 

Having just discovered the other git repository for what looks like the maintained fork of DCS Bios, and discovered that someone has already created a profile for the AV8B I thought I'd have a go at adding the ODUs as outputs.

 

I've taken a lot of inspiration for how to get the export values from the existing Hornet profile, and have managed to get the correct lines in place for text and cueing of the ODUs sorted and was just about to ask "How to I get the memory address to reference in my Arduino sketch?" when I suddenly noticed that my control reference document had been updated and the addresses were "magically" shown in there. I don't understand half of what I'm doing yet, but in the space of a few hours have managed to get the ODU data out to my OLEDS!

 

Amazing! DCS Bios is an incredible bit of coding.

Link to comment
Share on other sites

Hey guys quick question about the functionality of dcs bios, as I am in the planning stages of building a UFC.

 

As someone who flies multiple games and multiple planes within dcs are the inputs able to be used in other games/modules not supported by dcs bios libraries??? Can it also be mapped as a regular controller?

 

If not I may build the UFC using a dsd or bodnar board and use dcs bios for the outputs.

 

Sent from my SM-G930W8 using Tapatalk

Link to comment
Share on other sites

 

As someone who flies multiple games and multiple planes within dcs are the inputs able to be used in other games/modules not supported by dcs bios libraries??? Can it also be mapped as a regular controller?

 

Nope, each plane will need its own DCS-BIOS sketch. It is possible with some coding skill to have a sketch that can tell what plane you are in.

 

As for other sims, you are out of luck, DCS-BIOS will only work with DCS planes.

Link to comment
Share on other sites

Yeah, it was suggested somewhere else to look into coding multiple sketches that could be swapped with a physical switch in my pit, dcs bios if switch is in position a, generic joystick sketch of switch is in position b.

 

Sent from my SM-G930W8 using Tapatalk

 

Blue73 has code in a single sketch that will detect the plane that is loaded. Unfortunately his skills are way above mine and I was not able to understand it to make it work for me. He is super helpful so maybe drop him a PM or something.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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