Rotary switches

Hello all,

I have a question regarding rotary switches and the config required for multi button. I have TheSaberMerchant’s 3 way rotary switch on my saber and while the power button works fine, the aux inputs are not registering. I’m not sure what’s wrong here, so if anyone has experience with this part, thanks.

I’m confused.
What does rotary switches have to do with AUX buttons?
Is this actually a rotary switch, or something that springs back to neutral when you let go?

How did you wire it?
What did you put in the config file?
How do you imagine it should work?

Hello, sorry for not clarifying. the part is this. https://www.etsy.com/listing/1580985273/tsm-multi-button-rotary-switch-usb-c

Here is my config, one for two and one for three

)

That URL has no information about how the part works, how to use it or how to connect it.

Your config seems to be set up for a standard momentary button, but that’s not what you have. (unless the rotary thingy somehow behaves like a momentary button.)

ProffieOS has support for rotary switches (assuming that’s what this is.) however, those don’t behave like an AUX buttons, instead you have to choose what they do in the config file.

I’m thinking that’s what it is. Here is the wiring diagram for reference.

. The wiring for the aux buttons is on the back. Assuming it is a true rotary switch, how would I edit my code so it recognizes left and right as aux and aux2 respectively? Regardless it works as a one button though it’s not ideal

My understanding is that the TSM 3 way switch works like three momentary switches. You need to ask Jeremy from TSM to confirm–but I suspect button 2 and button 3 get wired to the L and R pads on the back of the PCB, and U/D wired to button 1 (for when you press the rotary knob). Note: I don’t think there is a prop file that supports button 3. I wired up a KR 5pectre Five as 3 buttons, but coded it to replicate a basic AUX when button 3 was pressed until I could find time to customize the prop file. if you write one–please post it :slight_smile:

Here is how you set the config to recognize all three buttons–but the prop file determines what the buttons actually do when pressed…

#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
Button AuxButton(BUTTON_AUX, auxPin, "aux");
Button Aux2Button(BUTTON_AUX2, aux2Pin, "aux");
#endif

This line should be "aux2" at the end.

To clear all this up:
The switch is not “rotary” as in a rotary encoder.
It is simply a 3 way momentary switch.
Turn right, turn left, or press down.

As I have mentioned on Facebook @Tony_Yau , you should just open serial monitor and confirm that all 3 buttons are registering events.
If they are, then it’s working as it should be.
You will only be able to use the 3rd button (aux2) if the code is set up to use it.
Currently, the only prop file that has controls available for a 3rd button is
saber_sa22c_buttons - Battle Mode and Previous preset.

So my question still stands… what do you want the 3rd button to do anyway?

Thanks for jumping in to clear that up!
Is that a mistake in the configurator? I just copied and pasted and didn’t look that close–I should have…

Are you sure?
Because it very much looks like a rotary encoder.
A rotary encoder could be used as a switch I suppose, if you just don’t turn it fully to the next detent.

I’m 100% sure it springs back to home position.
“three independent momentary switches in one! Twist left for momentary switch activation, twist right for a separate momentary switch activation and lastly, press it down for yet another momentary switch activation”

https://www.etsy.com/listing/1544994211/tsm-3-way-rotary-momentary-switch

Hello, thanks for all the help everyone! Looks like this is most likely a wiring issue according to Jeremy, so we are trying to fix that with myself and my installer. I tried the serial monitor and as described on the FB, power, twist, battery level, and all other data appear. But the aux buttons do not appear on the serial monitor. Thus most likely means that a) wiring issues, or b) there was a missent part as there were other versions that only act as a single button I believe.

I’ve used one of these in an install. It’s definitely sprung so it returns to original position. it registers click, left flick, right flick, and left and right flick clicks.

EDIT/SOLUTION: Switch was defective. Sabermerchant is currently replacing the part and installer will handle the proceedings. Thanks to all that replied!

1 Like