Jump to content

Leo Bodnar Rotary Switches On Arduino


No1sonuk

Recommended Posts

Leo Bodnar sell 12-way rotary switches for use with their USB interface boards.  I have some tested information for those wondering about how to use them with DCS-BIOS (or any other similar situation).

Most questions are asked about the 2-pad BBI-12 switches, but few people realise they make one far easier to use - the SLI-12.

The BBI-12 is made for the BBI-32 interface, and is connected between GND and one of the specific inputs on that device.
8 of the inputs have external pull-up resistors so that they can operate as a potential divider in conjunction with the 2-pad switch.

The SLI-12 is made for the SLI-Pro interface, and has 3 wires connected like a potentiometer - +5v, GND, and signal.

Both are currently priced at GBP5.50 + shipping.

Here's a comparison of the two PCBs - the rotary switches themselves are identical.

p9PcoVY.jpg

As you can see, the SLI-12 is easy to connect to an Arduino as though it's a potentiometer.  The BBI-12 needs a different approach.
Rather than use the two pads provided, the BBI-12 can be wired as a potentiometer like this:

b8rn85j.jpg

You can then use the DCS-BIOS analogue multi-way switch code as though it's a potentiometer.

e.g. DcsBios::AnalogMultiPos analogMultiPosExample("MSG_0", ANALOG_PIN_A, 12);

DCS will ignore the extra positions if, for example, you select position 11 or 12 on a 10-way in-game switch

So my advice is this:
If you already have a BBI-12, wire it the way shown above.
If you don't already have the switch, buy the SLI-12 if you want to use it on an Arduino.


Edited by No1sonuk
  • Like 5
  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...

Oh this could really help me out a lot.

Can you tell me if it's possible to remove the stopper pin/tab (like you can on other rotary switches) so the switch can turn left and right infinitely?


Edited by Savvy
Link to comment
Share on other sites

10 hours ago, Savvy said:

Oh this could really help me out a lot.

Can you tell me if it's possible to remove the stopper pin/tab (like you can on other rotary switches) so the switch can turn left and right infinitely?

 

It's an ordinary rotary switch on a PCB.

I'll confirm when I get home from work. 

  • Thanks 1
Link to comment
Share on other sites

17 hours ago, Savvy said:

Oh this could really help me out a lot.

Can you tell me if it's possible to remove the stopper pin/tab (like you can on other rotary switches) so the switch can turn left and right infinitely?

 

I just checked - they DO NOT continuously rotate.
 

  • Thanks 1
Link to comment
Share on other sites

10 hours ago, No1sonuk said:

It's an ordinary rotary switch on a PCB.

I'll confirm when I get home from work. 

Perfect, thank you. I've just ordered 6 of them. If they are standard rotary switches I should be able to pull them apart to remove/cut out the plastic stopper tab which stops the continuous rotation.

  • Like 1
Link to comment
Share on other sites

10 hours ago, Savvy said:

Perfect, thank you. I've just ordered 6 of them. If they are standard rotary switches I should be able to pull them apart to remove/cut out the plastic stopper tab which stops the continuous rotation.

May I ask why you would want to do that? At the F-16 at least there is no rotary switch with continuous rotation. Other a/c?

Or do you want to use it as an encoder?

Link to comment
Share on other sites

1 hour ago, Nikolas_A said:

May I ask why you would want to do that? At the F-16 at least there is no rotary switch with continuous rotation. Other a/c?

Or do you want to use it as an encoder?

I use them like that for all the mode switches, things like INS alignment etc. I understand it's not the normal operation for them, however I fly in VR and will set them up similar to an encoder with each movement sending either a clockwise or anti-clockwise button press.

I (personally) find this works really well in VR as the dial is never preset and you can click left or right as needed.

All my switches, gear levers etc etc are also momentary for the same reason, nothing is ever out of sync. For example the gear lever always auto-returns to the middle and can either go up or down.

I'm sure it would make few peeps cringe at the thought, but it works well for me.

Link to comment
Share on other sites

My opinion is you do what you want to do any way you want to - it's your rig not ours. If I was to listen to all the 'advice' given to me on the Arduino forum, I would have packed everything up in boxes and never touched it again as I clearly wasn't clever enough to understand Arduinos so shouldn't use them.

I have stuff that I have made that makes no sense to anyone but me, but it works and I get a quiet satisfaction at having made it. As long as it does what you want it to do, does it matter if it is not conventional?

As for the sync, I get that. I don't use VR for the flight rig as a) I get thoroughly nauseous and b) I spent the last four years building a physical cockpit so that would be a bit of a waste. However having all the buttons and switches syncing at the beginning is an issue that I will have to face at some point. I did try using the polling method discussed on another thread but it kept on generating errors so (for now) that is on the backburner. So to keep everything straight I can see why you want to do what you want to do.

Now, having told you to do it any way that you want, are you aware that Bodnar also sell some heavy duty Rotary Encoders that feel a lot 'heavier' in their action than the cheapo Ebay ones? I have some from when I built the F1 rig, and they do feel a lot better than the cheap ones, so maybe an alternative? Having said that, for feel, the rotary switches do have that very positive 'click' to them

Les 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

@lesthegrngo Those Arduino coding forums annoy the hell out of me at times. The "superior" attitude of some of the people responding to beginners' questions REALLY annoys me.

You go there looking for a solution to a simple problem, and they interrogate you for the full code, then proceed to comment on parts you're not having issues with.

  • Like 2
Link to comment
Share on other sites

27 minutes ago, No1sonuk said:

@lesthegrngo Those Arduino coding forums annoy the hell out of me at times. The "superior" attitude of some of the people responding to beginners' questions REALLY annoys me.

You go there looking for a solution to a simple problem, and they interrogate you for the full code, then proceed to comment on parts you're not having issues with.

+ 1

Regards, Vinc

Regards, Vinc

real life: Royal Bavarian Airforce

online: VJS-GermanKnights.de

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

  • 2 weeks later...
On 9/2/2023 at 4:45 PM, lesthegrngo said:

Bodnar also sell some heavy duty Rotary Encoders that feel a lot 'heavier' in their action than the cheapo Ebay ones? I have some from when I built the F1 rig, and they do feel a lot better than the cheap ones, so maybe an alternative?

Yes, I have found that some of the better quality encoders have a much heavier detent. Though after experimenting they still didn't give the tactile feedback I was after.

I actually spent like 9months on this problem and have made a couple of 3d printed solutions. Some use cogs that connect to an encoder, one uses a flipper arm to activate left-right switches. They worked, but not quite well enough.

My intention was to solder lots of resistors to a rotary switch and use one analogue read input - however these Leo Bodnar ones do essentially just that and it saves me a mess of soldering.

After removing the internal plastic tab from the Bodnar ones, and writing some Arduino code - I now have 6 perfectly working rotary swtiches that can turn left and right without stopping and they each output an increment and decrement joystick button press. And they feel perfect. So happy.

I had a few problems with reading the voltage especially when going from 1024 then left to 0, which was crashing the Arduino - but that was fixed by switching it to use a 3v pin rather than 5v.

I have so many little projects almost complete, I can't wait to get them all added into my new pit.

Oh and thanks for all your help!

p.s. Yes, those Arduino Forums are shockingly rude to new people. It like there are 3-5 people that just are very unfriendly. I wonder how much damage they've done to the hobby.


Edited by Savvy
Link to comment
Share on other sites

  • 4 months later...

Man, you are a lifesaver. Moving over to Arduino and I love my BBI-12. The switch is easy to find, but their PCB solution is quite handy and why waste what you have?

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...