Jump to content

Sign in to follow this  
Guest JTWhite

Keyboard cards and microswitches

Recommended Posts

Guest JTWhite

Is anyone using the keybaord card and microswitches to create cockpit switches?Im gonna try it this weekend and wanted to talk with someone live who has done it.ThanksJohn wNewburgh, IN

Share this post


Link to post
Share on other sites
Guest MikePowell

JohnRobert Prather has written an extremely good article on hacking keyboards. It's a "must read". Find it on the flightsim.com site. Go to the "How To..." section and scroll down to "How to... Build a Flightsim Keyboard Interface"Mike Powellwww.mikesflightdeck.comInfo for simpit builders.

Share this post


Link to post
Share on other sites
Guest petdocvmd

The article is excellent and I just finished building one of these after reading it. I used a PS/2 keyboard and it coexists peacefully with a USB keyboard on the same PC. It was pretty rewarding to see the correct characters come up in notepad when I closed the appropriate contacts!One tip: Make a chart for your keyboard immediately. I listed every key and then filled in the chart as I traced the circuits. Now I have a handy reference for connecting switches.Scott>Is anyone using the keybaord card and microswitches to create>cockpit switches?>Im gonna try it this weekend and wanted to talk with someone>live who has done it.>Thanks>John w>Newburgh, IN

Share this post


Link to post
Share on other sites
Guest petdocvmd

Mike, have you seen any follow-up to Robert's indication that he and Peter Cos had a modification that would allow multiple key combinations e.g. -, etc?I tried e-mailing Robert but got no response. I'm trying to build my cockpit on a budget that would have to really stretch to use EPIC. Previous posts suggest that rotary encoders and toggles are doable but multikey combos would also be nice...Any ideas?Thanks!Scott>John>>Robert Prather has written an extremely good article on>hacking keyboards. It's a "must read". Find it on the>flightsim.com site. Go to the "How To..." section and scroll>down to "How to... Build a Flightsim Keyboard Interface">>Mike Powell>www.mikesflightdeck.com>Info for simpit builders.

Share this post


Link to post
Share on other sites
Guest MikePowell

Scott,I haven't seen any follow on comments specific to Robert's article.I do not see any reason why a hacked kbd cannot be used to generate multiple key combinations. After all, it did it before it was hacked. Cost might set a limit on how you approach it. If you only had a few key-combos to handle you might use small relays and a bit of circuitry to make sure one always closes first. Opto-isolators probably would work in place of relays with a bit of work.It doesn't take too many key-combos before it makes sense to climb up the micro controller learning curve. A $2 PIC can do magic. Actually, if you think about it, a PIC can become a keyboard encoder.Now here's an ugly thought... The keyboard port is a wired-or (open collector) port. You can put multiple (non-USB) kbds in parallel on the same port. There are some caveats, but with care you can get it to work. This suggests the possibility of putting a $2 PIC on each switch. (And they get cheaper in quantity!) Program the PIC to send whatever scan code sequence you want on closure and another on contact opening. Basically you would be building a one key keyboard. Then wire all the PICs to the same kbd port. You would have to limit yourself to clicking one switch at a time so they wouldn't send key codes at he same time.Another puff of hot air: Program the PIC to be a small kbd encoder that scans a small matrix of switches. Use each PIC to encode the switches of groups of related controls. That way the PIC can queue the key scan codes if you do hit multiple buttons at the same time.If you are interested in PICs, there are a number of free resources listed on my site's link page.Mikewww.mikesflightdeck.com

Share this post


Link to post
Share on other sites
Guest petdocvmd

Mike,Thanks for the great info!Can you recommend the best (translated: Intro) place to start? Nigel's site from your links page looked promising but unfortunately the link is dead.I'm reasonably bright (I'm a veterinarian), have a pretty strong background in programming (V Basic, Pascal) and have dabbled in electronics (I know my basic components and some theory but am rusty, especially when it comes to microprocessors). But "...program the PIC to be a small kbd encoder that scans a small matrix of switches..." sounds slightly frightening ...perhaps it will sound easier once I've read some source materials (I hope).Part of me wants to break down and just buy the EPIC system but when 95% of things can be handled by a simple kbd controller...makes one want to explore other (cheaper) solutions.It sounds like programming PICs could accomplish a lot of what I want to do. Do you think I can emulate most of the cockpit with FS2k2, FSUIPC, Project Magenta and custom PICs without using EPIC?Thanks again for your time and help!Scott>Scott,>>I haven't seen any follow on comments specific to Robert's>article.>>I do not see any reason why a hacked kbd cannot be used to>generate multiple key combinations. After all, it did it>before it was hacked. Cost might set a limit on how you>approach it. If you only had a few key-combos to handle you>might use small relays and a bit of circuitry to make sure one>always closes first. Opto-isolators probably would work in>place of relays with a bit of work.>>It doesn't take too many key-combos before it makes sense to>climb up the micro controller learning curve. A $2 PIC can do>magic. Actually, if you think about it, a PIC can become a>keyboard encoder.>>Now here's an ugly thought... The keyboard port is a wired-or>(open collector) port. You can put multiple (non-USB) kbds in>parallel on the same port. There are some caveats, but with>care you can get it to work. This suggests the possibility of>putting a $2 PIC on each switch. (And they get cheaper in>quantity!) Program the PIC to send whatever scan code sequence>you want on closure and another on contact opening. Basically>you would be building a one key keyboard. Then wire all the>PICs to the same kbd port. You would have to limit yourself to>clicking one switch at a time so they wouldn't send key codes>at he same time.>>Another puff of hot air: Program the PIC to be a small kbd>encoder that scans a small matrix of switches. Use each PIC to>encode the switches of groups of related controls. That way>the PIC can queue the key scan codes if you do hit multiple>buttons at the same time.>>If you are interested in PICs, there are a number of free>resources listed on my site's link page.>>>Mike>www.mikesflightdeck.com

Share this post


Link to post
Share on other sites
Guest MikePowell

Scott,Looks like Nigel moved his site. The link has been updated. This new link is not always responding to me, but that may be an artifact of my own ISP.Once you add FSUIPC and programming expertise to the mix you have really good opportunities to do all sorts of things. If you're like me there will always be something just out of reach, but I think you could likely do some amazing things.After Nigel's site (which is free), take a look at Myke Predko's book, Programming and Customizing PICmicro Microcontrollers, 2nd ed, (which unfortunately is not free). It covers PIC programming quite well, plus includes much additional material. In particular, page 349 starts the section of the keyboard and mouse ports. You could certainly use the keyboard port as an input channel. A big advantage being that you don't have to do any host programming. The downside is that if you blow up the port, your mobo is not real useful there after. Don't mean to scare you off, just want you to be aware of potential risks.If you are comfortable with programming you can also make use of the serial port. The PIC16F628 incorporates a USART and baud rate generator. All this additional hardware makes the chip more expensive, of course: $3. I couldn't find any quick reference to key scanning, but it's not hard. If you take a look at the PIC background material and want to pursue it, let me know and I can draw up some simple examples.Mikewww.mikesflightdeck.comInfo for simpit builders.

Share this post


Link to post
Share on other sites
Guest LeoL

When you're ready for the challenge, go to Microchip's site and look through the various PIC micros. They provide plenty of code samples.I can't specifically tell you where to look, there's so many of them. I'm currently developing USB devices based on the PIC micros and I have downloaded sample code for USB based keyboard / mouse which I found on their site. They must surely have sample code for conventional KB port somewhere...Good luck with your hunt.-Leo

Share this post


Link to post
Share on other sites
Guest

John, Multiple keypress activated by microswitch can be done, but it takes a little more electronics per switch. http://forums.avsim.com/user_files/4468.jpgYou need to delay the letter key action about 10 - 15msec compared to the shift , alt or ctl key action. Activating them simultaneously won't work well. The delay electronics could be anything like one-shot HEF4538 or RC delay with buffer. I don't have circuits handy right now, but if you need I could dig up some stuff. Roland

Share this post


Link to post
Share on other sites

Not knowing much about electronics, I came up with a mechanical answer to this problem. I've only made it as a test version so far, but it seems to work fine. I fixed two small pushbutton microswitches with soft silicon actuators to a bit of perf board, with one wired to the "Shift" and one wired as the letter I want to send as a shifted signal - say "g" as example. I then glued a short piece of springy copper across the two actuators. Finally, I fixed a short rod to that, much closer to the "Shift" switch than to the "g" switch, to act as an actuator. Since the rod is closer to the "Shift", when you press it it activates the "Shift", then the springy copper actuates the "g". There's a distinct "click-click" feel when you press the rod, and it sends the two signals in the right order.Richard(Brand new first time panel builder)

Share this post


Link to post
Share on other sites
Guest MikePowell

Richard,An elegant solution!! I LIKE it!Mikewww.mikesflightdeck.com

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...