Cockpitbuilders.com

Main => Builders Discussions => Topic started by: Tom_G_2010 on September 29, 2011, 05:03:26 AM

Title: Phidgets I/O and Rotary Encoders ?
Post by: Tom_G_2010 on September 29, 2011, 05:03:26 AM

I have some money already invested in, or budgeted for, some phidgets cards so I'm trying to see if I can leverage them for rotary encoders as well.  I'm using FS2Phidgets V5 (may switch to V4) to write scripts for several other switches or indicators and it's working great.

I've been reading a bunch of posts about various I/O cards that can read rotary encoders. I know Phidgets makes a single encoder, but it's a bit pricey and I don't believe it can talk to FS2P. While I did find a few references to encoders, phidgets and FS2P while Googling about the net none directly answered if it was possible to use a digital I/O phidget and configure FS2P 4 or 5 to read an encoder properly.

I already have a Leo Bodnar card and it can read the encoder but not if I spin it fast and the number or rotations needed to swing the OBS is a bit much. And, of course there aren't any scripting or coding options if I use Leo's card, that I know of.

Has anyone ever built a circuit in FS2P 4 or 5 that can correctly interpret an encoder?  If I can avoid having to purchase yet another brand of I/O card that would save me some much needed cash for other pieces of the project as I will have some inputs available to use for a couple encoders on the existing phidgets cards at so no added cost.
Title: Re: Phidgets I/O and Rotary Encoders ?
Post by: hexpope on September 29, 2011, 05:41:28 AM
Regarding leo,s card. He has a software app that lets you select the type of encoder you have.  You should check it out.
Title: Re: Phidgets I/O and Rotary Encoders ?
Post by: Tom_G_2010 on September 29, 2011, 06:36:31 AM
Quote from: hexpope on September 29, 2011, 05:41:28 AM
Regarding leo,s card. He has a software app that lets you select the type of encoder you have.  You should check it out.

I am aware of one utility app that he wrote to configure the card.  IT allows you to specify input pairs to use for an ecoder and set the ratio.  Is that the app you are referring to, or might there be another?

I've used the app and set my input pairs.  I experimented with the various ratios and for the encoders I'm using (ordered form Leo's site) the 1:2 setting is what works.  The problem I've run into it that the degrees of OBS movement per detent (1 degree) and the number of detents per full rotation (20 to ~ 30 depending on the encoder) translates to a very impractical number of rotations to swing the OBS around.  Additionally it would seems that the chip on the card can't sample as fast as I would typically turn the knob so if I exceed its sample rate it misses several pulses and in effect moves the heading bug even slower.

For dials that see far less movement like the altimeter adjustment this should be ok, but for OBS and other wide range adjustments it isn't very practical.  I'm hoping to be able to leverage my exiting hardware, the phidgets cards, to read the encoder if possible.
Title: Re: Phidgets I/O and Rotary Encoders ?
Post by: jackpilot on September 29, 2011, 08:21:38 AM
Just a side note.
Depending how many encoders you need and for what purpose you might consider this.
I used them in my previous Sim, they do not sell the kits anymore but the module can be easily opened and rearranged (just lengthening the wiring to distribute the encoders and buttons where needed) Flexible,bulletproof and no brainer.
Like their radios, could be a simple solution with no headaches.
http://www.goflightinc.com/store/rp48-tall-panel-module-p-78.html (http://www.goflightinc.com/store/rp48-tall-panel-module-p-78.html)
Title: Re: Phidgets I/O and Rotary Encoders ?
Post by: iwik on September 29, 2011, 09:21:20 AM
Hi Tom,
Take a look at this link. Pete has helped here with your problem.
Hope it helps
Les

http://forum.simflight.com/topic/68260-rotary-encoder-input-speed/ (http://forum.simflight.com/topic/68260-rotary-encoder-input-speed/)
Title: Re: Phidgets I/O and Rotary Encoders ?
Post by: Tom_G_2010 on September 29, 2011, 09:46:43 AM
Quote from: iwik on September 29, 2011, 09:21:20 AM
Hi Tom,
Take a look at this link. Pete has helped here with your problem.
Hope it helps
Les

http://forum.simflight.com/topic/68260-rotary-encoder-input-speed/ (http://forum.simflight.com/topic/68260-rotary-encoder-input-speed/)

Wow!  Thanks!!!  Pete is a priceless resource.  And the gentlemen who started the thread, Reid, is several steps ahead of me in what I believe is a similar pit build.  He's also been very helpful in many other aspects of my build.   I think that part of the appeal to pit building, is the folks willing to help like yourself, the others who've replied to this thread, Pete, Read, and countless others.

The sim flight thread is exactly what I am looking for.  It's a bit like drinking from a fire hose.  I don't at all mind coding stuff though.  At the moment time is on my side since the budget isn't and I'll be a while between hardware purchases for the next part of the build.  So, software is about all I can do at the moment.

And, if that doesn't work, I like Jacks approach of leveraging a product that has already solved the issue.  Just need to save more pennies in the jar.  But, it does eliminate any coding headaches.

THANKS ALL!!!
Title: Re: Phidgets I/O and Rotary Encoders ?
Post by: AK Mongo on September 29, 2011, 07:20:35 PM
Tom,

Glad you found the LUA link.  I just replied to your post at MC about it too.  Let me know how it goes with the LUA, as I may ask for your help getting mine to work better. 

Reid
Title: Re: Phidgets I/O and Rotary Encoders ?
Post by: Tom_G_2010 on September 29, 2011, 08:43:52 PM
Quote from: AK Mongo on September 29, 2011, 07:20:35 PM
Tom,

Glad you found the LUA link.  I just replied to your post at MC about it too.  Let me know how it goes with the LUA, as I may ask for your help getting mine to work better. 

Reid

Caught your reply there as well.  Thanks and glad to help.
Title: Phidgets I/O and Rotary Encoders ?
Post by: NeoMorph on September 30, 2011, 12:57:34 PM
I bought a bunch of encoders off eBay and they work fine with Leo's board plus FSUIPC. I seem to remember doing something in FSUIPC to accelerate the encoder some way and I can't find my darn notes. Mine were slow too originally but I know it was fixed by something i did in FSUIPC rather than Leo's utility.


Sent from my iPad using Tapatalk