Rotary Selector Switches & Resistors

  • fully_defined
  • fully_defined's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 Dec 2024 02:57 - 28 Dec 2024 04:00 #316363 by fully_defined
Rotary Selector Switches & Resistors was created by fully_defined
EDIT: I ordered and received binary switches, after some contemplation. They only output in binary - no pins for switch positions - and seem to be the right tool for the job in LinuxCNC with a Mesa 7i73 card. Time will tell.

Weirdly, Mouser doesn't even include this in their "Coded Rotary Switches" section, so finding them was down to luck. The pins are super delicate, so it's pretty clear it was meant to be mounted directly on a PCB. I'm not currently sure how that would work in a DIY console, so I still might get some little breakout PCBs made.

Lorlin BCK1006 pictured below, though BCK1008 would also make a lot of sense, maybe even more sense. It would have more closed circuits than open circuits in the most oft-used positions.

File Attachment:


EDIT: I added a graphic to illustrate the alternative that I found during this discussion. A mux switch seems to be the right tool for the job, but existing products, and documentation combined with illustration of their function are basically nonexistent. This is my attempt to create a resource for future me and others to refer to when creating their own mux selector switches.

I am moving from EdingCNC to LinuxCNC.

Sorting out the MPG/pendant, I thought I could just use 1k resistors like in the attached image of the EdingCNC manual, with the 7i73 analog input sensing the resistance value, but I can't seem to find any examples of anyone doing this in LinuxCNC. Here is a screenshot from the EdingCNC manual, that shows what I was planning to do:

File Attachment:
Last edit: 28 Dec 2024 04:00 by fully_defined. Reason: Added the solution I went with: BCK1006 binary rotary switches.

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
10 Dec 2024 03:48 #316367 by tommylight
Replied by tommylight on topic Rotary Selector Switches & Resistors
Do you already have the switches?
If not, use potentiometers, cheaper, easier to wire, and linear regulation/range/etc

Please Log in or Create an account to join the conversation.

  • fully_defined
  • fully_defined's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 Dec 2024 03:55 #316369 by fully_defined
Replied by fully_defined on topic Rotary Selector Switches & Resistors
I appreciate your response, but I am not sure we are talking about the same thing.

Can you elaborate on how a potentiometer would work as a switch?

Please Log in or Create an account to join the conversation.

More
10 Dec 2024 07:07 #316377 by rodw
Replied by rodw on topic Rotary Selector Switches & Resistors
I would recommend you use a binary rotary switch and the mux4 component as outlined in the documents for scale and axis selection.
linuxcnc.org/docs/stable/html/examples/mpg.html
Using binary inputs makes frugal use of inputs (4 states only needs 2 inputs)

Please Log in or Create an account to join the conversation.

  • fully_defined
  • fully_defined's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 Dec 2024 08:28 #316383 by fully_defined
Replied by fully_defined on topic Rotary Selector Switches & Resistors
This seems like a good suggestion.

I suppose by "binary" you mean digital (is that the Australian way of saying digital?) as opposed to analog. Are you saying I don't need analog pins at all for this? I still want to know how to do this kind of thing with analog pins, even if it's just for a learning experience. I am literally starting from scratch here, and I already have the switches and 1k resistors.

Also, seems like mux4 has a limit to the number of selections on a switch. What if I have a switch with 7 selections I want to make? Or 9? I don't know any more know now than I did before about the physical wiring.

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
10 Dec 2024 11:08 #316394 by tommylight
Replied by tommylight on topic Rotary Selector Switches & Resistors
The drawing you posted, it is the same thing as using a pot, except its done in steps in your case, and linearly with a pot. And pot does not need any additional parts.
Pot/potentiometer is a variable resistor.

Please Log in or Create an account to join the conversation.

  • fully_defined
  • fully_defined's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 Dec 2024 15:53 #316410 by fully_defined
Replied by fully_defined on topic Rotary Selector Switches & Resistors
I struggle to understand how that would be better than a switch.

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
10 Dec 2024 16:04 #316412 by tommylight
Replied by tommylight on topic Rotary Selector Switches & Resistors
I never said it was better, but easier and more control while simpler to wire in.
I use pots for feed rate, but if it seems better to use a switch, please do, they do the same job and both work fine.

Please Log in or Create an account to join the conversation.

More
10 Dec 2024 16:32 - 10 Dec 2024 16:37 #316415 by PCW
Replied by PCW on topic Rotary Selector Switches & Resistors

This seems like a good suggestion.

I suppose by "binary" you mean digital (is that the Australian way of saying digital?) as opposed to analog. Are you saying I don't need analog pins at all for this? I still want to know how to do this kind of thing with analog pins, even if it's just for a learning experience. I am literally starting from scratch here, and I already have the switches and 1k resistors.

Also, seems like mux4 has a limit to the number of selections on a switch. What if I have a switch with 7 selections I want to make? Or 9? I don't know any more know now than I did before about the physical wiring.
 


Binary in this case means both digital and encoded (in binary)

In addition to mux4 there are mux2,mux8,mux16 and mux_generic
(mux_generic supports up to 1024 inputs!)

You can certainly do this in analog but the hal support will be more
complex, since you likely want accurate increments and that means
using a mux component anyway.
Last edit: 10 Dec 2024 16:37 by PCW.
The following user(s) said Thank You: fully_defined

Please Log in or Create an account to join the conversation.

  • fully_defined
  • fully_defined's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 Dec 2024 17:05 #316419 by fully_defined
Replied by fully_defined on topic Rotary Selector Switches & Resistors
I had planned to use a pot for feed and spindle speed overrides, but on commercial machines I have operated, these dials are often detented and incremented, like maybe 2% or 5%. I am happy to use a rotary encoder instead of a pot, but I have to learn how to implement that in LinuxCNC. Looking forward to it!

My point was that I already have the analog stuff that I want to learn how to implement, and I can and will use binary controls after I have sorted out LinuxCNC at the most basic level - I am not there yet! I figured that if I could just wire up an MPG and axis and resolution dials, I could at least jog the machine. That is my objective, right now.

With mux, there just aren't enough data points available to to jump in yet. For example, what value of diode should I use on a rotary switch? What happens if I mistype a value in the HAL configuration as I set this up? I don't know what I don't know.

Please Log in or Create an account to join the conversation.

Time to create page: 0.090 seconds
Powered by Kunena Forum