PDA

View Full Version : BU0836A - Modifying and programming a 1 pole/12 positions switch to act as an encoder



Beltfed
05-06-2013, 06:57 AM
Hello everyone, I have bought a BU0836A card from Leo Bodnar for the A320 FCU I plan to build. I’ve been reading all the tutorials generously put by Ian Sisson for everyone to read on his site (I PM him with no luck), and particularly the one about DIY encoders: http://www.737ng.co.uk/simple%20encoder.pdf (http://www.737ng.co.uk/simple%20encoder.pdf) What I would like to do is use the encoder to change Heading and Altitude displayed on on the FCU. Since encoders are hard to find where I live, after carefully reading his tutorial, I came up with the following scheme for converting a one pole/12 positions rotary switch into a free 360 degrees encoder:

7833

After connecting it to the BU card Pins(columns) 11-12 with their ground (Row 2), and before configuring it with Leo’s utility, I got a correct sequencing:
A off-B off, A off-B on, Both On, A on-B off, again Both Off etc. as would do a real 2 bit Gray encoder without prior settings (as in the post “Encoder wiring problems” at http://www.mycockpit.org/forums/opencockpits-general-discussion/25344-encoder-wiring-problems.html).

After running the utility and setting the different 1:1, 1:2, 1:4 I got different results that I don’t pretend to understand, also because I don’t really know what to expect:
- With 1:1, I get in Windows Joysticks properties a cyclic double impulse 11-11/12-12, both cw and counter cw. DIview sees it as button 10 (x2)/button 11 (x2) and always down/up/down/up
- With 1:2 and 1:4, it gets completely erratic, with no clear pattern (i.e. many impulses sometimes on 12 followed by one or two 11, sometimes an alternation of both, sometimes only 11s followed by 12s, etc. I don’t know if it’s because of a bounce problem.

Now, I know that a real encoder would probably work straight out of the box, but as I said they are hard/impossible to find here where I currently live, mailing system is not reliable enough to buy encoders on the net and special courier like UPS or DHL would cost more than the encoders.

So please, based on your expertise, do you think there is a way to make it work for my purpose? Cause if making push, toggle and rotary switches work is fairly simple (I gave it a try for the overhead), I confess I didn’t really understand how to program the encoders actions when it comes to Hdg and Alt, and I would be very grateful for any info about how to make it work through the BU0836A (SIOC, FSUIPC, Macros,…).
Thank you in advance for any helpful info you may provide.

Stephane K.A.Comneno

Beltfed
05-08-2013, 07:23 PM
Never mind, guys, I found a working solution.


In fact, I went back to Ian's first solution, i.e. the 2 poles/6 positions. I did solder pins 3 and 4 of group A (then routed to column 11 of the BU0836A), pins 1,4 and 5 of the group B (routed to column 11 of the BU0836A) and the two central poles together as ground (routed to row 2 of the BU0836A).
BUT, first I removed the internal stop lug and got a 360 free rotation, then I've set up the pair 11-12 on BU0836_Encoder.exe to 1:4 with 200 ms instead of 1:1 with 48ms, and voilà!!!!

I have button 10 presses on counterclockwise rotation, and button 11 on clockwise, and almost no bounce effect!!!

Cheap and working pseudo-encoders for the ALT select and HDG of my A320 FCU.

Next step, making it push/pull.

Cheers!

Edit: In fact, I don't need pin 1 on group B, it begins an uncomplete cycle and gives me bounces, so I removed it. Now it's pure 10 ccw and 11 cw. I get three empty detents, but no harm done, for the time being it suits me fine.

Here is a drawing:

7844

Stefano

Brodhaq
05-25-2013, 04:50 PM
Good job! If you wanted some encoders (with axial push buttons) just let me know I can send them to you by post for about 1-2 USD each, they are available in our local stores.

PB

Beltfed
05-25-2013, 06:46 PM
Thank you for the encouragemenent and for the offer, Brodhaq, but first let me quote myself:
" Now, I know that a real encoder would probably work straight out of the box, but as I said they are hard/impossible to find here where I currently live, mailing system is not reliable enough to buy encoders on the net and special courier like UPS or DHL would cost more than the encoders."
I'm currently in Beirut, Lebanon. The solution I resorted to presently allows me to continue with my building tests. As soon as I get back to Rome, I will search for real encoders...
Then, who knows, you might hear from me again... ;-)