Home Forums Arduino Arduino 115 Toggle switch panel for flight simulator

Viewing 30 reply threads
  • Author
    Posts
    • #4804
      Flaviano  Jose
      Participant

      Hello there, hope you are all doing more than fantastic, there is a new challenge for those who like to work with Arduino, on how to connect round about 115 toggle switches in Arduino, to make them work as a cockpit panel… Lets get it into.
      Thank you

    • #4807
      Najad
      Keymaster

      so you mean you want to connect these 115 switches to Arduino and it has to work with your flight simulation software insted of using the keyboard, right?

      • #4813
        Flaviano  Jose
        Participant

        That is correct

      • #4815
        Najad
        Keymaster

        if so you will need to use Arduino Leonardo because it can act as an HID device like keyboard or mouse. so whenever you press a switch you will be able to send one or multiple keystrokes to your computer.

        Attachments:
        You must be logged in to view attached files.
      • #4819
        Najad
        Keymaster

        Arduino Leonardo is having only 20 i/o pins so for connecting these 115 switches we need to increase the i/o pins using shift register ICs

    • #4814
      Flaviano  Jose
      Participant

      And Im basically new in Arduino, I am still learning with some tutorial on youtube

      • #4817
        Najad
        Keymaster

        that is good you are in the right place for beginners to learn.

        Attachments:
        You must be logged in to view attached files.
    • #4820
      Flaviano  Jose
      Participant

      Okay I have got the Arduino Leonardo as well, so yah we get started

      • #4822
        Najad
        Keymaster

        that is great, so as a start you can add 2 buttons to your Arduino and assign any to keystrokes combination to it like first button is CTRL + C and the second button is CTRl + V

      • #4830
        Najad
        Keymaster

        what kind of switch you are having? upload and image pls

    • #4821
      Flaviano  Jose
      Participant

      Amazing

    • #4823
      Flaviano  Jose
      Participant

      Meaning?

      • #4826
        Najad
        Keymaster

        Click on the reply button and send the messages

    • #4824
      Najad
      Keymaster

      these are two of the projects which I have done with Arduino Leonardo

      Hand Gesture control using Arduino

      https://diyusthad.com/2018/04/hand-gesture-control-using-arduino.html

      Locking /Unlocking computer using RFID tag

      https://diyusthad.com/2018/07/locking-unlocking-computer-using-rfid.html

    • #4825
      Flaviano  Jose
      Participant

      Does it have to be done on the coding software?

      • #4829
        Najad
        Keymaster

        have you done any simple programming in Arduino ? like blinking the led.

        yes it has to be written in the Arduino sketch

      • #4831
        Flaviano  Jose
        Participant

        yes I did it

      • #4832
        Najad
        Keymaster

        then it’s not that much difficult to do.

    • #4827
      Flaviano  Jose
      Participant

      Will have a look at it now

    • #4828
      Flaviano  Jose
      Participant

      Thet look fabulous

    • #4834
      Flaviano  Jose
      Participant

      Sorry for the delay, I lost my network connection

      Attachments:
      You must be logged in to view attached files.
      • #4851
        Najad
        Keymaster

        ok, this will work but momentary switches (Momentary switches are switches which only remain in their on state as long as they’re being actuated (pressed, held, magnetized, etc.). Most often momentary switches are best used for intermittent user-input cases; stuff like reset or keypad buttons.) will be better for easy programming.

        watch this video for more details about momentary switches https://www.youtube.com/watch?v=pRah5XyphRM

        what is momentary switch?: https://learn.sparkfun.com/tutorials/switch-basics/momentary-switches

        Momentary toggle switch image is attached below.

        Attachments:
        You must be logged in to view attached files.
    • #4859
      Flaviano  Jose
      Participant

      Thank you very much for the replay, those panel of the video is what I am exactly doing, the thing is that my panel is way bigger with more than 100 switches, and most of his switches are similar to mine, although I have some different, but at the end they end up doing the same job

    • #4860
      Flaviano  Jose
      Participant

      There is the picture of the cockpit I am building, the panel are already set up in the cockpit, what I miss is now to make the connection with the Arduino, and make them work, if you look close down on the cockpit, to the switches you will see that They are quite a lot and my last steps are now with the Arduino

      • #4866
        Najad
        Keymaster

        the image must be below 400kb to upload, you can upload big images in https://postimages.org and post the link here

        • This reply was modified 1 week, 4 days ago by Najad.
    • #4870
      Flaviano  Jose
      Participant
      • #4884
        Najad
        Keymaster

        wow man this is awesome you have spend a lot of effort and money into it, don’t worry in sha Allah we will make it work.

    • #4883
      Highvoltages
      Participant

      I am afraid there are not enough pins on arduino board, one way is to use mcp series Ics which are i2c i/o extension. you can use 3 4 of them at different addresses to connect number of switches.

      • #4885
        Najad
        Keymaster

        @Flaviano Jose, Yes what @highvoltage said is right.

        i have attached a picture of what he is mentioned below, i2c i/o extension.

        Attachments:
        You must be logged in to view attached files.
    • #4887
      Krishnawa
      Participant

      Would probably go in the direction of charlieplexing (example: [http://www.thebox.myzen.co.uk/Hardware/Econo_Monome.html](http://www.thebox.myzen.co.uk/Hardware/Econo_Monome.html)) or use encoders/decoders. But mostly”parallel” instead of serial. You could also go serial.

      • #4891
        Najad
        Keymaster

        I think the i2c i/o expansion is IC is better right in the sense of easy to interface and program.

    • #4912
      Flaviano  Jose
      Participant

      @Najad Keymaster Thank you very much man, yeah I did spend all of those kkk

    • #4913
      Flaviano  Jose
      Participant

      Yeah I am actually planning to buy 4 of them for those connection

    • #4914
      Flaviano  Jose
      Participant

      @Naja and @Higvoltage, I got the picture and I went to look off, but the guy said that was out of stock, so now I will be waiting for him so that I can go and purchase them

    • #4915
      Flaviano  Jose
      Participant

      @Krishnawa, thanks for the link, looking out the content of it now

    • #4941
      Najad
      Keymaster

      @jose please send any two key or key combinations which is in the simulation software so I can write a sample program for you and also ill send you a circut to connect the switches to the Arduino Leonardo.

    • #4947
      Flaviano  Jose
      Participant

      @Najad Keymaster, thank you very much for your attention on helping me, for example the key combination of shift+3 and shift+4 <gives me spoilers arm and up>, or number upper 1 and 2 are flaps up and down, I hope those are the keys combination you have requested on knowing!!!

      • #4949
        Najad
        Keymaster

        so you mean shift + 3 will turn on the function spoilers arm on right? so what the the key to turn that off? is it the same?

        note: I don’t know what his spoilers arm means 😉

    • #4950
      Najad
      Keymaster

      connect the switch which you needed to work as spoilers arm as shown in the below image.
      connect to the pin no. 10 because in the program im going to use the same pin.

      https://i.postimg.cc/TY5FFd06/iu-12.jpg

      note: in the image its Arduino undo but you have to use Arduino Leonardo

    • #4958
      Flaviano  Jose
      Participant

      that is correct, for on is shift+3 for off is shift+4

    • #4959
      Flaviano  Jose
      Participant

      correction, only upper numeber 3 on and 4 off for spoiler, instead of shift, cutoff the shift and only 3 for on and 4 for off, I came now home and I have tested that to make sure of that. that is the example I have

      • #4963
        Najad
        Keymaster

        ok, so 3 will on spoiler and 4 will off spoiler, right?

    • #4960
      Flaviano  Jose
      Participant

      I have got the image, and I have done the connection as on the image

      • #4964
        Najad
        Keymaster

        because you are using toggle switches we need to make some changes in the connection. the toggle switch which you are using is having 2 terminal or 4 terminal?

    • #4965
      Najad
      Keymaster

      follow the bellow connection if you are using a 3 terminal toggle switch.

      https://i.postimg.cc/7h5vnhRj/Screen-Shot-2019-11-28-at-12-16-25-AM.png

    • #4967
      Flaviano  Jose
      Participant

      that is right 3 on 4 off

    • #4968
      Flaviano  Jose
      Participant

      they are mixed, some of them with 3 some of them with 4 terminals

      • #4974
        Najad
        Keymaster

        the one with 3 terminal is it ON OFF ON

    • #4969
      Flaviano  Jose
      Participant

      and I have some that are just 2 terminal, I have seen the image connection and its done

    • #4985
      Flaviano  Jose
      Participant

      yes is on off on

Viewing 30 reply threads
  • You must be logged in to reply to this topic.
×
×

Basket