element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Toggle switch to push button switch conversion (Arduino or IC logic)
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 62 replies
  • Answers 13 answers
  • Subscribers 397 subscribers
  • Views 7169 views
  • Users 0 members are here
  • push
  • toggle
  • trigger
  • button
  • flight
  • switch
  • arduino
  • simulator
Related

Toggle switch to push button switch conversion (Arduino or IC logic)

silviustro
silviustro over 11 years ago

     I would like to build an interface for a flight simulator consisting on various toggle and trigger switches, unfortunately i can't just simply flip a switch to an ON state and leave the signal like that, i need to send a quick pulse every time you toggle the switch ON or OFF, as if you where to push a button on a keyboard to send that command.

 

     In simple words... i need a toggle switch that will produce one pulse when you flip the toggle switch ON. And a second pulse will be generated when the same toggle switch is flipped to OFF. Here is a GIF to better illustrate that... http://www.desktopaviator.com/Products/Model_2120/2120B.gif

 

     If there is a simpler way of doing this without using an Arduino, like an IC or a special toggle swich, I would like to know, otherwise, I plan on using an Arduino to do this.

 

 

Thank you for your time!

  • Sign in to reply
  • Cancel

Top Replies

  • shabaz
    shabaz over 11 years ago +3 suggested
    Hi Silviu, An easy method to produce pulses is to get a 'quad XOR gate' ic. Connecting one input of a gate to 0V makes a simple buffer which does nothing except delay a signal slightly. Do this with three…
  • shabaz
    shabaz over 11 years ago in reply to silviustro +2 suggested
    Hi Silviu, If you want to do it using an Arduino alone, you will need 80 pins for 40 switches and 40 outputs, so that may be unfeasible. Anyway, below is some pseudocode that will do it for (say) 4 switches…
  • jw0752
    jw0752 over 11 years ago in reply to silviustro +2 verified
    Hi Silviu; I have drawn a schematic and added some notes. . Don't worry about right answers as everyone contributes good ideas. If you have clarifying questions let me know. John
Parents
  • shabaz
    0 shabaz over 11 years ago

    Hi Silviu,

     

    An easy method to produce pulses is to get a 'quad XOR gate' ic.

     

    Connecting one input of a gate to 0V makes a simple buffer which does nothing except delay a signal slightly. Do this with three of the gates so that you have 3 buffers. Connect them up in series. Lets call them gates #1,2,3.

    Feed the final output from the third buffer (gate #3) into an input on the fourth gate. Connect your switch to 0V and (say) a 47k resistor to your supply rail. Connect the switch/resistor junction to the input of the fourth gate and the remaining input on gate#1.

     

    The end result is that you get a brief pulse (a few tens of nanosec) whenever the switch is opened or closed.

     

    But, I'm not sure this is what you really want. If (say) the power is off, and someone changes the toggle position and then powers on, then your software will have no idea what the initial toggle position is. Or, if the software is polling instead of using an interrupt, then it may skip some pulses (Maybe this is acceptable - depends on the actual application).

    For these reasons it would be best to try to design it so you can accept a normal toggle input, rather than a pulse if possible.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • smoot1
    0 smoot1 over 6 years ago in reply to shabaz

    I am in a technical rut maybe your method could help I need a sensor that when activated turns off a actuator and when released sends signal to reactivate actuator I'm not quite sure how I could make this possible sense I need sensor to be the size of a finger tip for instance

    senser is off actuator is fully extended locked sensor is activated by touch hold actuator releases and able to be pushed down manually and when sensor is released it activates sensor if you or anyone could shoot a response back to me be super appreciated and who ever helps me put with this hurdle and it works I will give royalties on my invention once patents are secured.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • phoenixcomm
    0 phoenixcomm over 6 years ago in reply to smoot1

    Shayne first let me figure out what you really need to do. I have been build sims for more than a few years. First, your two links are BUSTED. Second do have an interface spec of what you are trying to interface. (As most sim parts require levels) So I have some questions. what do you mean by "need a sensor that when activated turns off an actuator and when released sends a signal to reactivate actuator" and then you go on to say "I need a sensor to be the size of a fingertip for instance:

    • the sensor is off actuator is fully extended locked
    • the sensor is activated by touch hold actuator releases and able to be pushed down manually
    • and when the sensor is released it activates a sensor".

    You seem to be confused about what the components are or their names.

    This is what I think you want by taking the three lines apart

    1. the Switch is OFF when it is fully extended.
    2. When the Switch is pushed in and then releases (goes back to state 1) you send a signal (pulse) and the cycle starts again.

    To me, if I got this right it sounds like you are wanting to use some sort of keyboard.

    What function are you trying to turn off and on? which sim is this MS/X-plane/etc.

    If you referring to a switch like the one in your first post as the sensor? Then what is an actuator?? If you don't know I can't help (don't read minds). Are you trying to use (simulate) a keyboard??

    Have you looked at my blog posts?  just search for NexGen Blog index

    Cris.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • phoenixcomm
    0 phoenixcomm over 6 years ago in reply to smoot1

    Shayne first let me figure out what you really need to do. I have been build sims for more than a few years. First, your two links are BUSTED. Second do have an interface spec of what you are trying to interface. (As most sim parts require levels) So I have some questions. what do you mean by "need a sensor that when activated turns off an actuator and when released sends a signal to reactivate actuator" and then you go on to say "I need a sensor to be the size of a fingertip for instance:

    • the sensor is off actuator is fully extended locked
    • the sensor is activated by touch hold actuator releases and able to be pushed down manually
    • and when the sensor is released it activates a sensor".

    You seem to be confused about what the components are or their names.

    This is what I think you want by taking the three lines apart

    1. the Switch is OFF when it is fully extended.
    2. When the Switch is pushed in and then releases (goes back to state 1) you send a signal (pulse) and the cycle starts again.

    To me, if I got this right it sounds like you are wanting to use some sort of keyboard.

    What function are you trying to turn off and on? which sim is this MS/X-plane/etc.

    If you referring to a switch like the one in your first post as the sensor? Then what is an actuator?? If you don't know I can't help (don't read minds). Are you trying to use (simulate) a keyboard??

    Have you looked at my blog posts?  just search for NexGen Blog index

    Cris.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube