Jump to content

Question about potentiometers for throttles.


Corvidae

Recommended Posts

This is probably a very basic question, but I'm new to all this and a bit lost.

So I got a potentiometer and got it working in DCS through DCS BIOs to turn the Harrier nozzle controller.

Problem is, I have to turn the potentiometer almost 360 degrees from it's start to it's end for the lever in game to go maybe 90 or 100 degrees.
I dunno if I've explained it properly, but not sure how I can make the physical lever I'll be making match the travel of the in game lever.

Link to comment
Share on other sites

4 hours ago, Corvidae said:

This is probably a very basic question, but I'm new to all this and a bit lost.

So I got a potentiometer and got it working in DCS through DCS BIOs to turn the Harrier nozzle controller.

Problem is, I have to turn the potentiometer almost 360 degrees from it's start to it's end for the lever in game to go maybe 90 or 100 degrees.
I dunno if I've explained it properly, but not sure how I can make the physical lever I'll be making match the travel of the in game lever.

Maybe this?
 

// A linear axis control where the physical or electrical range of the input does utilize the full 0 to 1023 range.
DcsBios::Potentiometer clippedPotentiometerExample("MSG_0", ANALOG_PIN_A, false, 256, 768);

I think the way this works is that the AtoD result 256 to 768 (the middle of the pot input range) is mapped to the whole range of the control in DCS.  You change the numbers to suit your control.
To get the numbers, you could write a program to read the pot and send out the A to D result to an LCD or the PC serial monitor.

Link to comment
Share on other sites

9 hours ago, No1sonuk said:

Maybe this?
 

// A linear axis control where the physical or electrical range of the input does utilize the full 0 to 1023 range.
DcsBios::Potentiometer clippedPotentiometerExample("MSG_0", ANALOG_PIN_A, false, 256, 768);

I think the way this works is that the AtoD result 256 to 768 (the middle of the pot input range) is mapped to the whole range of the control in DCS.  You change the numbers to suit your control.
To get the numbers, you could write a program to read the pot and send out the A to D result to an LCD or the PC serial monitor.

It seems to work somewhat, if I keep turning the potentiometer, the lever in the cockpit jumps back to the start and goes through the rotation again, but I assume that can be fixed with some physical stops when I build the lever 🙂

Link to comment
Share on other sites

Hmm. Might need a visual reference to figure out what you want. 

The code maps the given input range to the full 16-bit range for DCS.

If you want the in-game lever to move more than the physical one, the numbers need to have an upper limit less than 1024.

I _think_ making the upper limit number more than 1024 would make the in-game lever move more than the physical one.

Link to comment
Share on other sites

44 minutes ago, mitchelrobertson said:

Two days ago I replaced one of my 10k pots with a 5k because I didn't have anymore 10k, lol.  Didn't change a thing in game.  What would an "expert" like you think would happen?  That it wouldn't work?

You said this:

18 hours ago, mitchelrobertson said:

If you use a lot of Pots then you need a lower ohm pot. 

Your response to my question only said you CAN use a lower Ohm pot (which I'm not disputing), but your post I questioned said you NEED TO use lower. I was curious as to your justification.

Which you apparently don't have...

Because, if you ran the ohms law numbers yourself, you'd see that HIGHER resistance is better if you have a few pots because they run LESS CURRENT, putting less strain on the 5V supply or regulator.  10k runs at half the current of 5k (0.5mA vs 1mA @5v).

Link to comment
Share on other sites

You are right, the range of resistance is variable. But the 10 kOhm mostly is suggested in connection with an Arduino because of drawing lower current than using a 5 kOhm pot.

What I wanted to underline in the above post is ensuring a linear pot and not a logarithmic one.

Reading the failure description again I even suggest to test the hardware again.

Just simply code the pot to another input and look if the behaviour still is strange or replace the pot and see if the nozzle controller works better.

Regards, Vinc


Edited by Vinc_Vega
  • Like 1

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

  • Recently Browsing   0 members

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