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 7184 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
  • jw0752
    0 jw0752 over 11 years ago in reply to silviustro

    Hi Silviu,

     

    I am glad that it worked for you. I am sure it is possible to add LED position indicators. As I mentioned in the schematic point "1" is high when the switch is in one position and low when it is in the other. All we have to do is design a little circuit to detect this and turn on the corresponding LEDS. Are you going to use On-On switches or On-Off-On? I ask since with On-On we can always have one of the two LEDs on and just toggle between them. Keep in mind we have to keep the sensing of point "1" at high impedance or you will get a constant current through your pulse circuit. I haven't done any serious thinking on this but I would guess our best bet, to keep it simple, would be to use some FET transitor switches. One would turn on when its gate is pulled high and the other would turn on when its gate is pulled low. This would involve one N FET and one P FET as well as your 2 LEDS and a couple current limiting resistors. The use of FETs would keep the impedance high enough to not bother the pulse circuit. A word of caution is that if you are pulsing an inductive load we would want to be sure to put a protector diode accross the coil to protect the FETs.  If you wait a couple days and check back here one of the other guys who are almost all better designers than me might have an even better idea.

     

    John

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • jw0752
    0 jw0752 over 11 years ago in reply to silviustro


    Hi Silviu,

     

    I do not know if your quest for electronics know-how is just for this project or if you have a deeper interest. I am quite old fashioned and where more modern individuals might point you to u-tube videos I would point you towards a book. For example, Practical Electronics for Inventors by Paul Scherz and Simon Monk Edition III has, starting on page 449, a section on Junction field effect transistors of the type that would be usefull for turning your LEDs for switch position on and off. I have found this book very helpful with many of my projects. There is a second edition of the book also available but you would be happier with the third edition.

     

    John

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • silviustro
    0 silviustro over 11 years ago in reply to jw0752

    Hi John,

     

    Thank you once again for your answer, no worries about that, I am quite old fashion myself, and a good book will always be capable of storing immense amounts of knowledge in one convenient place. I will explore ways of achieving what i want testing many methods (regarding the LEDs), but i have to say, that your method of turning the LED for a brief amount of time using the capacitor was the best one i have ever seen.Thank you for your help,


    Silviu.

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

    I know this has been going around for the last 5 months or so but I thought I would throw my hat into the ring, as I have been working with Flight Simulators for a long, long time.... I have two basic questions:

    1. Which Flight Simulator is this for???
    2. Are you trying to simulate a keyboard?

    Most flight simulators use key mapping ie.. map a key to a function. I hope that is not what you are trying to do.. 

    Please see http://www.element14.com/community/people/phoenixcomm/blog/2013/05/30/nexgen-flight-simulator-hacking-the-navigation-computer-display

    Later ~~ Cris

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • D_Hersey
    0 D_Hersey over 11 years ago

    Do not try to make a non-polarized capacitor out of two back-to-front-shunt caps without adding the obvious two diodes, use your noodle, schnoodle!

     

    Can you use a SPDT momentary switch? Then you could use a pair of wire-or-ed OC comparators to achieve your function.

     

    Generally, if you are using a timing capacitor that is ground-returned, you can use an op-amp to fabricate a 'capacitance multiplier' circuit that will do just that.  This will allow one to generate arbitrary delays with ordinary parts.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • D_Hersey
    0 D_Hersey over 11 years ago in reply to shabaz

    Do not use this technique unless the logic family you are using publishes a minimum propagation delay!


    (NTBL)


    http://www.fairchildsemi.com/an/AN/AN-118.pdf

     

    RCA published an AN entitled 'CMOS multivibrators' or some-such which explains this.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to billpenner

    I need this type of circuit for a pipe organ, but the stop switch is magnetic reed spst.   We need to control the stop input of a sound module which uses pulse on and pulse off.  Any mods to this circuit?  

    Chaim

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • D_Hersey
    0 D_Hersey over 11 years ago in reply to Former Member

    Hi Chaim, can you provide a drawing?  I don't know much about organs.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to D_Hersey

    Hi

    The stop switch  is nothing more than a big slide switch which uses  an attached bar magnet  sliding in close proximity to a enclosed reed switch.  The switch does nothing more than to supply 12 or so volts dc to an input board which eventually will turn on the mechanics and electronics of a pipe chest.     My problem is we have a sound module where the stops are turned on and off by a momentary push button contact.  There were external terminals added to do the same function by remote wiring.   The late organs are control the stops or voices by this method even with these stop knobs.   But they are nothing more than momentary contact switchs which activate when the knob is pulled or deactivated when the knob is pushed, and is on a spring return with an indicator lamp inside.    We want to control this box with the original stop mechanisms on the organ console.  So far I cannot figure a circuit which would be able to give me 2 states--an on state and an off state.   The on state is easy, it is when the voltage is removed how does that get translated to a pulse to trigger the box to shut the stop off?  The pulse width can be 500ms

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • D_Hersey
    0 D_Hersey over 11 years ago in reply to Former Member

    Still not clear on this, could this be your ticket?

     

    http://www.fairchildsemi.com/ds/MM/MM74C221.pdf

    http://www.fairchildsemi.com/an/AN/AN-138.pdf

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
<>
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