homepage

More inputs by matrixing BU0386X

Posted By: jimbop

More inputs by matrixing BU0386X - 07/17/11 12:28 PM

I couldn’t find a description of this anywhere so thought it could be worth posting. Not difficult anyway but could help someone out I guess.

Leo Bodnar’s BU0836X is a great piece of kit and very simple to use. But if you’re going to bother building a control box then you want to do it right and obviously that means you want more than 32 digital inputs (i.e. buttons and switches). Well, I did anyway… So your options are either to buy another card or to matrix the card to allow double-inputs as described here. A matrix on 23 of the BU0836X’s 32 inputs (allowing 9 of the 32 inputs for 3 additional rotary encoders EDIT: 8 of the 32 inputs for 4 additional rotary encoders) allows 276 inputs consisting of the 23 single inputs (Input_1, Input_2, Input_3 etc) and 253 unique dual inputs (Input_1 + Input_2, Input_1 + Input_3, Input_1 + Input_4 etc). You could think of Input_1, for instance, as Control and Input_2 as any other key. You can either map the inputs in the sim manually or you can assign them to keyboard inputs using Autohotkey, SVMapper, JoyToKey, Xpader etc.

The PCB is logically simple so I didn’t bother drawing a diagram and went straight to the circuits. Below is an extract showing the first input set of Input_1 combined with the other 22 inputs. Note that each double-input requires two diodes (I used 1N4148) to avoid other circuits being completed. Luckily diodes are about the cheapest bit of electronic gear you can buy at just a few cents each. This set repeats 22 times reducing by one each repeat. I used a 300 x 150 mm PCB with 0.8 mm holes – works great. Click for full size:



Full two-sided board (grey is bottom, red is top):


Top only:


Bottom only:


If you can't manage a double-sided PCB then you can do the top layer only and link up the array using hookup wire. Pretty tedious though.
Posted By: - Ice

Re: More inputs by matrixing BU0386X - 07/17/11 09:02 PM

Would love to see this in action... do you have actual pics?
Posted By: Valisk_61

Re: More inputs by matrixing BU0386X - 07/22/11 10:36 AM

Mind = Blown

I know I need that, but can I make my brain understand it...
Posted By: jimbop

Re: More inputs by matrixing BU0386X - 07/22/11 11:37 AM

Here are some pics of my trial build where I have used hookup wiring (black wires) to link each set to the BU0836X digital inputs rather than using a two-sided PCB which I tend to avoid when possible since they are fiddly. The first picture shows the circuit side of the first set of crossover inputs (refer to OP), second is the other side showing the diodes. The holes between the diodes go to switches or buttons.

The last picture shows a test setup using an SPDT switch (but whatever switch/button etc will do). Note that the photo is deceptive since the red and brown (ground) are not on the same lug. Note that multiple switches can share any digital ground on the BU0836X.

I don't have screenshots for this section but trust me, I'm a scientist! Where the red wire sits on the first hole = output #23 only since there is no crossover with any other inputs (refer to circuit diagram). This output therefore needs no diode. Move the wire to the next hole and the output will be 23 + 22, next = 23 + 21, next = 23 + 20 etc. This set = 23 outputs in total which are 1 single + 22 dual. Move to the next set to the right of the photo and the first hole is #22. Next is then 22 + 21, then 22 + 20 etc.





Let me know if this isn't clear.
Posted By: Valisk_61

Re: More inputs by matrixing BU0386X - 07/22/11 11:49 AM

Wow - thanks very much for the clarification jimbop!

If I can get the front-to-back registration good enough, I might try to machine those traces on my CNC.
Posted By: jimbop

Re: More inputs by matrixing BU0386X - 07/22/11 11:51 AM

No problem. Double-sided is definitely the way to go if you can manage it, a much cleaner solution than hookups.
Posted By: - Ice

Re: More inputs by matrixing BU0386X - 07/23/11 09:53 PM

Sorry guys, but my "electrics" knowledge is limited to closed loops and battery-powered stuff. Is there a newbie-version or a crash course on this?

I assume the purpose of this is to make the standard BU0386X have "more buttons," is that correct? From the OP, one BU0386X can have a max of 276 inputs, yes?
Posted By: jimbop

Re: More inputs by matrixing BU0386X - 07/23/11 11:11 PM

I'll try again, maybe I should have been clearer initially but I thought this was conceptually straightforward. Maybe I've just been thinking about it longer... smile Actually, the number of unique combinations (with order unimportant) for all 32 digital inputs is 528! I've 'wasted' 9 of the BU0836X inputs on rotary switches which require three digital inputs each and so am left with a measly 276 unique combinations.

Suppose that Ctrl = Command_1, X = Command_2 and Ctrl+X (pressed simultaneously) = Command_3. These commands are sim controls like fire, open canopy, wheels down etc.

BU0836X has 32 digital inputs. Out of the box this lets you program 32 buttons or switches to whatever command you like in the sim of your choice. If your sim allows combination keyboard inputs (i.e. not only Ctrl and X inidividually but also Ctrl+X) then you could theoretically activate an additional sim command by simultaneously pressing Button_1 (think of this as Ctrl) and Button_2 (think of this as X).

The difficulty is that you could not achieve the same effect just by hooking up a third button (Button_3_ to connect both +V terminals from Button_1 and Button_2. In this scenario Button_3 would activate Input_1 and Input_2 but so would Button_1 and Button_2 since the circuit would be identical for all three buttons. That's why you need the diodes. If you added a couple of diodes to interrupt the circuit around Button_3 then this setup will work.

Whilst this would work for just a few buttons if you tried to manually link up numerous combination inputs you would end up with an enormous tangle of wire. Hence the matrix board with the diodes and crossovers neatly contained and only the 276 (or 528) wire leaving the board to the buttons and 23 (or 32) wires leaving the board to the BU0386X.

So in summary, no, this does not increase the number of inputs from BU0836X. It simply allows you to use BU0386X with numerous double-inputs. This is useful for sims where you can trigger three different commands by (for instance) Ctrl, X and Ctrl+X.
Posted By: jimbop

Re: More inputs by matrixing BU0386X - 07/23/11 11:14 PM

An addition to above the only thing you need to understand is what a diode does, i.e. circuit one way but not the other.
Posted By: HitchHikingFlatlander

Re: More inputs by matrixing BU0386X - 07/24/11 08:06 PM

My brain is melting here but no different than if you had explained it in kindergarten language lol! This really cool stuff. I'm looking at this board mainly to repair my saitek pedals who's electronics were fried for reasons unknown. This is very useful to know that I can get more out of it!
Posted By: - Ice

Re: More inputs by matrixing BU0386X - 07/24/11 09:57 PM

Okay, let me see if I can get this right:

Off the box, the bodnar board can do 32 inputs. That'll be 26 letters (a-z) and 6 extra (ctrl, shift, alt maybe?). So far so good. Matrix-ing the board allows you to combine those letters with any of the extra to create modified inputs (ctrl + a, shift + a, alt + a, and so on).

Is that correct?
Posted By: jimbop

Re: More inputs by matrixing BU0386X - 07/24/11 11:05 PM

Originally Posted By: - Ice
Okay, let me see if I can get this right:

Off the box, the bodnar board can do 32 inputs. That'll be 26 letters (a-z) and 6 extra (ctrl, shift, alt maybe?). So far so good. Matrix-ing the board allows you to combine those letters with any of the extra to create modified inputs (ctrl + a, shift + a, alt + a, and so on).

Is that correct?


Yes but also a+b, a+c, a+d etc in addition to alt, shift or ctrl+a, ctrl+b etc. Remember that unless you map the BU0836X inputs to a specific keystroke you are not actually talking about keyboard commands but rather BU0836X inputs.
Posted By: tityus

Re: More inputs by matrixing BU0386X - 07/25/11 12:28 AM

Nice idea, Jimbop.

Although it's a well known board, I'm not familiar with the BU0836X and since I don't know how it sets its inputs (raise, fall, state or else), the first thing that comes to mind is "ghosting" when using SPST switches (any non-momentary, in fact), specially because your project deals with single and combined inputs.

for example, if one has mapped:
But_1 - A
But_2 - B
But_3 - C
But_1+But_2 - 9

When I close But_1 with a SPST switch, mapper sends only one A and But_1 stays up, right?
Next, when I close But_2, won't the mapper understand that it should send a 9 (But_1+But_2) instead of a B because But_1 is already closed?
Also, if I close But_3 and then open it again, won't the mapper understand that it should send the C and then a 9 again?

Also another question that pops to mind is about current limitation. Are there limits that one should consider?

I like the concept, if there's no ghosting, it will be a very cost effective solution.

té mais
tityus
Posted By: jimbop

Re: More inputs by matrixing BU0386X - 07/25/11 07:57 AM

I'll check when I get an opportunity and report back. Thanks for pointing out this rather glaring omission from the OP - my implementation uses only momentary switches.
Posted By: MudPuppy

Re: More inputs by matrixing BU0386X - 07/25/11 09:21 AM

This is a very educational post....thanks! I'm looking forward to how this progresses.
Derek
Posted By: jimbop

Re: More inputs by matrixing BU0386X - 08/13/11 08:46 AM

The control box is now finished (more or less) and the setup you can see here, including the partially finished rudder pedals, is controlled by a single BU0836X. This includes:
- 8 analogue inputs (Hall sensors for joystick X, Y and rudder pedals and five sliders on the box (one on the side, not visible in the photo).
- 4 rotary encoders (note that these use two BU0836X inputs each).
- Numerous buttons.
- Numerous switches (note that these are all momentary two-way with centre = OFF).

Works beautifully... Probably not ideal for a simulated cockpit since the switches are momentary but for someone like me who just wants a control box for numerous sim titles it's pretty good. A bit rough (especially the slider slots for which I used the wrong jigsaw blade!) but just great for my use:



A description of the joystick is here for those interested: http://simhq.com/forum/ubbthreads.php/topics/3326335/Custom_u_joint_stick_with_magn.html
Posted By: Boandlgramer

Re: More inputs by matrixing BU0386X - 08/13/11 11:11 AM

Hi Jim
I am impressed, not just for the fact that it looks very nice, but especially that obviously you remember "what button/ switch does what burnout
Awesome.
Posted By: jimbop

Re: More inputs by matrixing BU0386X - 08/13/11 11:53 AM

Yes, I surprise even myself! smile I started filling in the labels this evening. Actually, the groupings make it easier to remember. Truth be told I suspect I will only ever use a fraction of them anyway! Still, it was a fun exercise building it.
Posted By: AndyB

Re: More inputs by matrixing BU0386X - 08/13/11 03:27 PM

Hi Jimbop,

I wouldn't worry about the momentary switches, that's all I have in my cockpit. If they're biased centre off just label one side OFF and the other side ON. Then wire the switch connections to both sides of the switch. The switch then toggles the action. Harder to explain than do, honestly. If you want to try it, let me know and I'll draw up a wee diagram.

If the slider slots bother you, you can buy self adhesive decals that fit around the slot for audio mixing desks. Can't remember where I got them though.

Anyway, very nice piece of work. Keep up the good work.

Cheers,

AndyB
Posted By: - Ice

Re: More inputs by matrixing BU0386X - 08/13/11 08:05 PM

So, how many buttons/switches did you use up?
Posted By: jimbop

Re: More inputs by matrixing BU0386X - 08/13/11 08:39 PM

Originally Posted By: AndyB
Hi Jimbop,

I wouldn't worry about the momentary switches, that's all I have in my cockpit. If they're biased centre off just label one side OFF and the other side ON. Then wire the switch connections to both sides of the switch. The switch then toggles the action. Harder to explain than do, honestly. If you want to try it, let me know and I'll draw up a wee diagram.

If the slider slots bother you, you can buy self adhesive decals that fit around the slot for audio mixing desks. Can't remember where I got them though.

Anyway, very nice piece of work. Keep up the good work.

Cheers,

AndyB


Thanks for the tip on the slider slots. The momentary switches are either SPDT or DPDT (I had some lying around but only use one pole for these connections). I use them, for instance, as one direction = flaps up and the other direction = flaps down but on/off is a good idea for many other systems, thanks.
Posted By: jimbop

Re: More inputs by matrixing BU0386X - 08/13/11 08:45 PM

Originally Posted By: - Ice
So, how many buttons/switches did you use up?


Ha, don't know but you can count them if you want! Remember that the switches are two inputs each. I know that there are about 75-100 inputs spare, though.

Worth noting that the ground for every single button and switch are shared. I just ran a thin tin-coated copper wire through all the grounds (soldered on) and then a single hookup to the card.
Posted By: CyBerkut

Re: More inputs by matrixing BU0386X - 08/15/11 12:05 PM

[quote=jimbop
Worth noting that the ground for every single button and switch are shared. I just ran a thin tin-coated copper wire through all the grounds (soldered on) and then a single hookup to the card. [/quote]

Nice bit of engineering / creativity in getting so much more out of Leo's board!

The next time you're working under the hood on that, if you want to increase the reliability a bit, you could connect up the other end of the ground chain to the card as well. That way, a single break in the ground chain doesn't take out a bunch of your switches/controls. [and no, that's not what a ground loop is... biggrin ]

(You know it will happen at the worst possible time...)
Posted By: jimbop

Re: More inputs by matrixing BU0386X - 08/15/11 02:11 PM

Good one, thanks for the tip. Can't believe I didn't think of it!
Posted By: servet

Re: More inputs by matrixing BU0386X - 06/26/13 10:03 PM

This is an amazing and ingenious technique. And with the clean and polished circuitry, it does look a little like magic. 276 inputs being converted to 32 without any tangles of wires of huge wire looms. One questions though, right now, you’re using 2 inputs to formulate a combination, any chance we can use 3 or more inputs or will we need to use the regular input range extending ICs with that.

pcb assemblies
Posted By: recoilfx

Re: More inputs by matrixing BU0386X - 06/27/13 11:34 AM

Sorry if I sound stupid, but doesn't Windows' HID driver have a hard limit of 32 buttons per joystick? How are you able to utilize all the extra inputs?
Posted By: jimbop

Re: More inputs by matrixing BU0386X - 06/27/13 11:45 AM

Originally Posted By: recoilfx
Sorry if I sound stupid, but doesn't Windows' HID driver have a hard limit of 32 buttons per joystick? How are you able to utilize all the extra inputs?


Yes, the hard limit applies. This is merely a hack that trigger two inputs simultaneously by a single button or other input. Basically just joining wires between two normal inputs.

Your application needs to accept multiple input commands for this to work. I.e. Input 1 + input 15 = in game effect.

Regarding the question about triple input I don't see why this would be a problem theoretically as long as your application can accept more than two simultaneous inputs for a single command. But your circuits will be cumbersome to say the least!
Posted By: E69_Jack_Aubrey

Re: More inputs by matrixing BU0386X - 06/14/14 10:09 AM

.... one question, why you dont use the 4 inputs from the 8 way "point of view" hat switch???
© 2024 SimHQ Forums