Hello everyone,
I'm thinking about purchasing this limit switch https://docs.rs-online.com/e21a/0900766b815865d9.pdf and I'm wondering if I should power it by 250V power supply.
In the following tutorial : https://arduinogetstarted.com/tutorials/arduino-stepper-motor-and-limit-switch the limit switch is directly connected to the Arduino board without using any power supply. Is it possible for me to connect the chosen limit switch directly to the Arduino? Is there any impact on the accuracy?
Thank you in advance.
It's a simple SPDT switch. How you connect it is up to you. Accuracy? What do you want it to do? The fact that is has a LONG lever means there may be a long movement before switching. Is that what you want? Please explain the use!!!
No. 250Vac is the upper limit, not the required power. The switch will work fine with the Arduino power of 5V or 3.3V.
Connect that switch like any other switch. I would wire the com terminal to ground and the NO terminal to an input set to pinMode INPUTPULLUP. The input will read high when the switch is open and low when the switch is closed.
No!!! The voltage & current ratings on a switch are it's maximum ratings. You'll be using it at 5V and less than 1mA.
Did you look at the tutorial? Generally, you'll use the Common and Normally Open terminal. This means the switch is "off" when not triggered.
Wire one terminal to the Arduino's ground and the other to a digital input.
Configure the input pin as INPUT_PULLUP.
This enables/connects a resistor inside the microprocessor between 5V and the digital input. The input will read high with nothing connected or when the switch is off/open. When the switch is activated the input is grounded "overpowering" the resistor and the input will read low.
Your software should see low as the limit.
...It's also possible to use a pull-down resistor, and connect the switch to 5V. Of course that reverses the logic (high=limit), but you have to add a physical resistor.
Thank you very much for your replies.
It was doubtful for me, it's the first time that I'm gonna work with such sensor. It will detect the limit of a ball screw system's distance.
Beware, a lever operated limit switch is NOT very accurate.
Thank you Paul_KD7HB for your reply.
How is it not accurate, what do you suggest?
I'm not going to use a very high velocity in order to move the slider of the ball screw system.
I thought it's the most accurate one compared to a photo interrupter or an inductive sensor, because it's mechanical and not sensitive to the environment.
Is there a way that the sensor cannot detect the mechanical stress?
The long arc of the lever makes it not accurate. The lever also flexes. Those are made just to record that something happened, not when it happened. An accurate end switch will have the least amount of movement possible to activate the switch, on or off.
Yes, I see what you mean, the lever flexes and it can also be very difficult to press the switch due to spring resistance or other, the press position is also important, I think it must be in the middle of the lever, not at both ends
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.