Rotary Selector Switches & Resistors
- fully_defined
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 5
10 Dec 2024 02:57 - 18 Dec 2024 21:52 #316363
by fully_defined
Rotary Selector Switches & Resistors was created by fully_defined
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:
Hopefully the diodes are in the right orientation now. This is my current understanding the correct electrical path of a mux8 rotary switch:
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:
Hopefully the diodes are in the right orientation now. This is my current understanding the correct electrical path of a mux8 rotary switch:
Last edit: 18 Dec 2024 21:52 by fully_defined. Reason: Added that a solution may have been found, and an illustration to show how a mux8 switch functions. Corrected diode orientation.
Please Log in or Create an account to join the conversation.
- tommylight
- Online
- Moderator
Less
More
- Posts: 19408
- Thank you received: 6507
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
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
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 5
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?
Can you elaborate on how a potentiometer would work as a switch?
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
Less
More
- Posts: 10737
- Thank you received: 3540
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)
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
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 5
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.
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
- Online
- Moderator
Less
More
- Posts: 19408
- Thank you received: 6507
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.
Pot/potentiometer is a variable resistor.
Please Log in or Create an account to join the conversation.
- fully_defined
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 5
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
- Online
- Moderator
Less
More
- Posts: 19408
- Thank you received: 6507
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.
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.
- PCW
- Away
- Moderator
Less
More
- Posts: 17899
- Thank you received: 4774
10 Dec 2024 16:32 - 10 Dec 2024 16:37 #316415
by PCW
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.
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
- Offline
- Senior Member
Less
More
- Posts: 51
- Thank you received: 5
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.
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.217 seconds