November 13, 200322 yr I had a simple idea:1) hack a keyboard controller from old keyboard: Done2) Buy some mechanical rotary encoders: Done3) Wire everything up: Done4) Frustration level after endless hours of trying to get it to work:PRICELESS!!!Is there a somewhat simple circuit that will let me use a rotary encoder to send a keystroke when turned clockwise and a different one when turned counter clockwise? Please help and thanks to all who have helped me with other topics.
November 13, 200322 yr That sounds like a good idea. I'll follow how this works out, but I can't think of how you can do it.
November 13, 200322 yr Hi...The mechanical rotary encoders out there consist of types.The 'Knitter type' which makes contact to a pair of pins on one direction and to another pair of pins on the other direction, and the 2Phase shifted rotary encoders which have 3 pins and send pulses.I assume you use the latter. In order for them to work properly you need to decode them first. They work as follows.The center pin needs a logic voltage (i.e. 5V). You read the output from the left and right pins as a sequence of pulses. The number of pulses per rotation depend on the rotary encoder type you have. Some have 30 detents and produce 15 pulses, others (better) have 20 detents and produce 20 pulses per rotation.Pin 1 will send a set of pulses depending how much you have turned the encoder (in nr of detents). BUT, the other out pin 2 will also send a set of pulses but a bit delayed by 90degrees of pin 1 phase. If you try to feed a keyboard or any other hardware directly from the encoder you will get (in best case) a conflicting up/dn signal which cancels each other.So you need a decoder to translate that sequence of pulses to clicks.You can do that by using the Redec09b design by Leo. Search this forum for redec09b and you will find the link to download the schematic. I've tested it and works great. I haven't tested it with beyboard but only with FSBUS. Maybe the rotary encoder is too fast for a keyboard, but you will have to check.Hope this helps.George DorkofikisAthens, Greece
November 13, 200322 yr Check if this works for you:http://forums.avsim.net/dcboard.php?az=sho...ing_type=searchTuomas
November 13, 200322 yr Dave,Florent Van Vlasselaer sent me a schematic for such a circuit. It has been used by a number of people in the FSCB (Flight Simulation Club Belgium). It's posted as a TIFF format download here: http://www.mikesflightdeck.com/keyboard_port_1.htm about half way down the page. There is also a board layout posted.Mikewww.mikesflightdeck.com
November 13, 200322 yr Roland Van Roy has a section in his "DIY Cockpit Controls" tutorial on his cockpit that deals with rotery encoders. I am sure you can find it on the web. If not, email me and I will send you a copy.John JohnMy first SIM was a Link Trainer. My last was a T-6 IIAMD Ryzen 7 7800 X3D@ 5.1 GHz, 32 GB DDR5 RAM - 3 M2 Drives. 1 TB Boot, 2 TB Sim drive, 2 TB Add-on Drive, 6TB Backup data hard driveRTX 3080 10GB VRAM, Meta Quest 3 VR Headset
November 14, 200322 yr How about doing what I did.Probably your rotary encoder will do this thing:ClockTurn: closeA, closeB, openA, openB, closeA, etc ...CounterClockTurn: closeB, closeA, openB, openA, closeB, etc ...If now you wire up SHIFT to A and "a" to B, then you get:SHIFT a >> results in "A"ora SHIFT >> results in "a"this way you can set up FS to increase when capital A and decrease when normal a.Maybe this helps. Worked perfect for me.In case you would want to use switches one day instead of push buttons, check out my website for LPT-switch. Very cheep + freeware software !! ;)
November 16, 200322 yr Author >How about doing what I did.>>Probably your rotary encoder will do this thing:>>ClockTurn: closeA, closeB, openA, openB, closeA, etc ...>CounterClockTurn: closeB, closeA, openB, openA, closeB, etc>...>>If now you wire up SHIFT to A and "a" to B, then you get:>>SHIFT a >> results in "A">or>a SHIFT >> results in "a">>this way you can set up FS to increase when capital A and>decrease when normal a.>>Maybe this helps. Worked perfect for me.>>In case you would want to use switches one day instead of push>buttons, check out my website for LPT-switch. Very cheep +>freeware software !! ;)>>Thanks for the reply, but I am a little confused. Will your example work for any key or is it only for keys that happen to be on one side of the "shift" matrix? If it works for any key, can you please explain it a litte more. Thanks again
November 16, 200322 yr >Thanks for the reply, but I am a little confused. Will your>example work for any key or is it only for keys that happen to>be on one side of the "shift" matrix? If it works for any>key, can you please explain it a litte more. Thanks againCheck out the thread I linked to above.Tuomas
November 16, 200322 yr it's quite siple really ..if you have a rotdec like mine, it has 2 switches built in it.if you turn left, the switches will close, one at a time while having a small interval where they are both closed. if you turn right they do the same thing but in reverse order.so if i turn left, .. one connector closes, then the other, then the first one opens, then the other.so at time 1 they are both openat time 2 only the A is closedat time 3 both are closedat time 4 only B is closedat time 5 they are both open again.now if you turn right the same thing happens, only in reverse order, so first B, then both, then A, then none, etc ..now if you wire up A to the shift button and B to any other key which can have a capital ..try this: press a, then shift. what do you get ? "a"(a down / shift down / a up / shift up)try this: press shift, then a. what do you get ? "A"(shift down / a down / shift up / a up)thats exactly what happens, so your pc doesn't have to know if you turn left or right, it only receives SHIFT+A or A+SHIFT which in fact makes a difference.this works for me .. it doesn't work 100% perfect because if you turn the rotary too fast in the "A+SHIFT" direction, the computer registers a SHIFT+A anyway, but if you take your time to rotate the knob, it works perfect.ok, slow & fast is relative. it sure isn't slow that i have to rotate but not super fast either.hope you understand now ;)
Create an account or sign in to comment