Jump to content

Issue with Rotary Switches in F/A-18C Hornet Cockpit


Recommended Posts

Posted (edited)

  

I am having issues with my rotary switches. They are not acting as they should and would like help to get them working correctly.  I have attached two videos recorded with my iPad.  I have also included the Arduino script with pins 43 - 47 being hooked up to the Mega 2560.

I also have the same issue with my Radar switch in the F/A-18C hornet.

Any help to get these rotary switches working will be greatly appreciated.

 

Hrnet940  aka Wayne

 

  

image1.jpeg

Edited by hrnet940
Missing information

Wayne Wilson

AKA: hrnet940

Alienware Aurora R3, i7 3820 3.5GHz(4.2GHz setting) processor, EVGA Nvidia RTX 2070 8GB Graphics, 16GB Ram, 1TB SSD.

  • hrnet940 changed the title to Issue with Rotary Switches in F/A-18C Hornet Cockpit
Posted (edited)

 

 

Here is the other in-game video.  You can see that the switch starts in the SAFE position than is moved fully left, fully right and back to SAFE.  I am on the ground with the engines running.

 

Wayne

Video.MOV

 

Edited by hrnet940
Video not working.

Wayne Wilson

AKA: hrnet940

Alienware Aurora R3, i7 3820 3.5GHz(4.2GHz setting) processor, EVGA Nvidia RTX 2070 8GB Graphics, 16GB Ram, 1TB SSD.

Posted

Thanks, I will and see how that goes.  Would this be the same reason why my Radar switch misbehaves too?

 

Thanks,

Wayne

Wayne Wilson

AKA: hrnet940

Alienware Aurora R3, i7 3820 3.5GHz(4.2GHz setting) processor, EVGA Nvidia RTX 2070 8GB Graphics, 16GB Ram, 1TB SSD.

Posted (edited)

I can't see the radar switch related video.

But according your code the Radar_SW is connected to a rotary encoder and not to a rotary switch. Encoders act like increasing or decreasing a value as long as you turn it. Jumps between the steps mostly are caused by encoder bouncing. That means, there are voltage spikes in between two steps of the rotary encoder.

Do a search for debouncing a decoder. That can be done by hardware or software filters.

Regards, Vinc

Edited by Vinc_Vega

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Posted

Can you post a picture of the actual rotary switch? If they are like the ones I have, instead of being a 12 position switch they are just four pole three position switches. To explan, when you turn the switch in links position 1, then 2, then 3, then 1, then 2, 3, 1, 2, 3, 1, 2, 3

I modified mine so now they are proper 12 position switches

 

Les

Posted
On 10/31/2022 at 4:57 AM, Vinc_Vega said:

I can't see the radar switch related video.

But according your code the Radar_SW is connected to a rotary encoder and not to a rotary switch. Encoders act like increasing or decreasing a value as long as you turn it. Jumps between the steps mostly are caused by encoder bouncing. That means, there are voltage spikes in between two steps of the rotary encoder.

Do a search for debouncing a decoder. That can be done by hardware or software filters.

Regards, Vinc

 

Thanks.  You are correct that I currently have my Bleed Air, INS and Radar switches hooked up to rotary encoders.  I have this done for simplicity and ease of connection to my Arduino's/Mega 2560.  I am getting ready to order my panels from TekCreations and getting all of my switches wired up and placed in a container; ready to be installed when they arrive.

Wayne

 

Wayne Wilson

AKA: hrnet940

Alienware Aurora R3, i7 3820 3.5GHz(4.2GHz setting) processor, EVGA Nvidia RTX 2070 8GB Graphics, 16GB Ram, 1TB SSD.

Posted
On 10/30/2022 at 6:28 PM, Sting57 said:

In your Select Jett code, change the numbers 9 to 5.    9 is set there as a default,  but you are only using 5 pins

I have made that change and the switch still reacts different.  I found that if I slow my transition from one position to the next that it does do as it should. When I look at the switch in the cockpit it goes to the L FUS MSL position as a kinda reset before going to where I have moved the switch too.  Strange, but it does work.  Is this normal or is there something else that I need to do to get this to work as one would think it should?

Wayne Wilson

AKA: hrnet940

Alienware Aurora R3, i7 3820 3.5GHz(4.2GHz setting) processor, EVGA Nvidia RTX 2070 8GB Graphics, 16GB Ram, 1TB SSD.

  • 3 months later...
Posted

Hi Wayne,

Did you ever get a solution for this?

I also are using rotary switches (not encoders) and when turning them on a regular speed often a position is lost. Turning slowly it works most of the time. Working with a mega2560.

 

Thanks

Werner

  • 2 months later...
Posted

Make this change to your void loop section. Between the correct number of switch positions mentioned above and this debouncing code, it should fix your problems.

void loop() {

delay(10);
}

GD ViperWorks - YouTube

F-16CM Block 50 Replica Sim Pit Construction

  • Recently Browsing   0 members

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