Proximity Switch wiring

I’m having a hard time getting these inductive prox switches to work with Ruida. They are PNP NO (or advertised at that). I can get them to trigger on bench but not on the Ruida diagnostic screen. I’m assuming that screen will show machine status at any time?

I’ve tried every combination I can think of but I think I’m misunderstanding the controller. The + and - on the controller designate the direction of travel when homing? on the screenshot below the ‘LMT Polarity’ indicates exactly that. I’ve tried neg and pos to no avail.

Enable limit trig simply turns the limit switch on? confusing.

PNP switches are the wrong type; you want NPN.

The problem is that PNP switches pull the load up from ground when activated. The Ruida controller has internal pull up resistors, so the input pin is high when the switch is inactive and the switch pulls the input high when it’s active, so the controller doesn’t see any electrical difference.

The Lmt Polarity option selects NO or NC switches.

1 Like

That’s no good! I’ll order the correct ones. Thank you

@ednisley is correct, but it should be configurable to use the positive going switches.

These are within the Ruida

On the Ruida, the - inputs are for a home operation. The + inputs are for limit switches.

:smile_cat:

1 Like

Thank you, Jack. I’ll verify I have it set as homing.

Should the diagnostic screen work regardless of limit or home if I’m trying to test the switches? If I need to replace them I will but it’d be nice if it’s configurable.

Yes it should reflect the status in the Z/U → Diagnosis screen… You should also see it on the controller, assuming it has led’s like mine does. Mine is active low with an npn hall switch… It lights when it goes low. Don’t know if it’s smart enough to flip the signal when it’s active high… You’ll have to let us know… My suspicions are it isn’t that smart.


This led for the Y axes home switch…

:smile_cat:

1 Like

Which is the point: a PNP switch cannot pull the input low, it can only pull the input high.

If I’ve got that right, the controller’s status display will always show the switch as inactive, even when the LED in the switch shows it’s active.

Yes, commonly with a Ruida they are pulled down, requiring an NPN type sensor.

You may be right… I get your point, electrically speaking.

I’ve never seen the actual input schematic of the Ruida or any other piece.


Could you please explain the purpose of the items marked in red in post 3?

Maybe I’m reading too much into their manual :crazy_face:


If @resh already has them installed, It would be a fast, easy check and may save him time and money if it works properly.

:smile_cat:

That’s the selection for Normally Open / Normally Closed switch operation: whether the switch closed or open when a metallic object is near enough to activate the switch:

  • NO = switch closes when activated
  • NC = switch opens when activated

A closed PNP switch pulls its output high and a closed NPN switch pulls its output low.

So there’s an electrical choice based on the circuit the switch is driving (PNP vs NPN) and a logical choice based on how the switch operates (NO vs NC).

This was my point… What you are saying is the machine must be run with only mechanical switches if I want to invert the inputs…

:smile_cat:

Not at all.

This is a NC PNP switch:

https://www.amazon.com/Heschen-Inductive-Non-Screen-LJ18A3-8-Z-AY/dp/B072JMY18S/

This is a NO PNP switch:

https://www.amazon.com/Heschen-Inductive-Proximity-LJ18A3-5-Z-Detector/dp/B071JFK2L8

Neither will work with a Ruida digital input, because they cannot pull the input down.

This is a NC NPN switch:

https://www.amazon.com/Heschen-Inductive-Proximity-PR18-8DN2-Cylindrical/dp/B081DGFYN8

This is a NO NPN switch:

https://www.amazon.com/Heschen-Inductive-Proximity-Non-Screen-BX/dp/B072Q68493

Both of those will work with a Ruida digital input, because they will pull the input low. The Ruida input has an internal pull up resistor holding it high unless the external switch pulls it low.

The difference:

  • The NPN NO switch output will be low when it is near metal
  • The NPN NC switch output will be low when it is not near metal

The two settings of Limiter Polarity correspond to the NC and NO variations, but I have no clue which one is which.

AFAICT, if you want to have both home and limit switches, they must both be either NC or NO: you cannot mix polarities.

Because only NPN switches can activate the Ruida inputs, you cannot use PNP switches.

There’s no need for mechanical switches, although you certainly can use them.

I misspoke earlier. The Limit Trigger settings enable the limit switches on the other end of the axis travel from the home switches, which is what GRBL calls Hard Limits.

A little clarification please. I looked at the linked post and it’s not clear to me what statement you’re correcting here. I may be missing the obvious but would appreciate the education.

@jkwilborn asked about the highlighted lines showing the Limit Trigger settings in the screenshot of the Ruida settings.

I launched into an explanation involving the Limit Polarity settings, which are relevant but not what he asked about.

Which boils down to:

  • NPN switches for Ruida inputs
  • Limiter Polarity to match NC or NO operation
  • Limit Trigger to enable hard stop with two switches on each axis

Unless I fumbled something else, which is always possible. :grin:

Got it. Thanks for that. I see now that my initial confusion was from Jack’s reference to post #3 when actually it was post #4 so never connected the dots there.

I guess, I’ve worked with so many controllers, that I find it hard to believe it won’t work with any generic positive output…

I understand @ednisley electronic explanation of it not being able to drive it…


The Ruida has surprised me before, so I’m not going to hold my breath about it being operational with these switches…

Not knowing the input structure or circuitry of the Ruida has it’s limits when speculating about it’s operation.

Unfortunately the Ruida documentation addresses all of these switches a limit even if they are actually only used for a home operation.

@berainlb I used the title bar to determine it was the 3rd post… opps.


Nevertheless, if I had gone through the problems of mounting these, I would at least give it a try before I coughed up extra funds and efforts to replace the switch.

:smile_cat:

A quick test: measure the open-circuit voltage of a switch input pin for all four states of those two config settings.

If I understand the controller’s vague doc correctly, the pin will always float high, regardless of the settings. I’d expect 5 V, but 24 V would be … unsurprising.

I have measured the voltage on my home switches … it’s at the 24V supply rail … I’m sure you’re not surprised…

The only thing that I know of on the Ruida that is limited to a ttl or 5V level is the pwm/analog outputs. I haven’t check each one… just the home switches and the pwm/analog outputs.

So has @ednisley … I’ve seen it on his scope photos… :crazy_face:

:smile_cat:

Is that the bare switch output or when it’s wired to the controller input?

The key question is what the Ruida controller input looks like, without the switch connected. That will give the controller’s internal pullup voltage and show whether any of the config settings affect the result.

I removed the connector and measured them on the Ruida itself with no other external wiring… However there was no difference either way… Have you measured yours?

I use NPN which can only pull down the output, as you described…

:smile_cat:

So then I think we’ve pretty much run that whole question to, uh, ground.

We just bought a house, we’re selling this one, most of my stuff is in a PODS out back, my shop is in shambles, and I am utterly frustrated by being unable to do anything for the next month. Or two. Or three. :frowning_face: