Roko homing sensors

cnc-maker

CNC Maker
Hi guys, I would like to purchase Roko homing switches for my new build. This is the same switch Peter from CNC nutz shows in his "homing" videos #15 is a SN04-N at the 1:31 second mark. Is this a "Normally Open" type switch. Are we best off to use the "Normally Closed" type as they are safer with regard to wires breaking or coming off. I tracked down a supplier of this brand of switch, he offers them in a 'NO' or 'NC', but also the option of NPN or PNP, can u please tel me which is the correct type to purchase. Thanks in advance.
 

cncnutz

CNCnutz
Staff member
Hi @cnc-maker

Your thinking is correct about the fail safe nature of switches however if you look closely you will see that these work as fail safe in case of a broken wire.

You will see that the normal state of these sensors is high and i need to invert them to bring them low. In the case of a broken wire the input will go high and limit axis movement to 10mm.

The ones I used are labeled ROKO SN04-N NPN - NO



Hope this helps

Cheers

Peter
 

derekmccoy

derekmccoy
The ones I used are labeled ROKO SN04-N NPN

Being NPN, the output would be 0v. Surely you need a PNP sensor so that Masso can pick up a positive signal? How have you wired them?

Thanks
 

cncnutz

CNCnutz
Staff member
Quote from derekmccoy on July 3, 2020, 1:57 am

The ones I used are labeled ROKO SN04-N NPN

Being NPN, the output would be 0v. Surely you need a PNP sensor so that Masso can pick up a positive signal? How have you wired them?

Thanks

You can use either but if you think about it the NPN's are the safer option.
If the PNP wire breaks Masso will not see a signal and will try to home for the length of the entire axis before raising a homing alarm.
If the NPN wired breaks Masso will only move 10 mm before stopping with a homing alarm.

As someone who regularly unplugs my homing switches this is great because more than once I have forgotten to reconnect them.
The NPN's were cheaper when I bought mine, so for half the price I get additional safety which seems like a good idea to me.

The NPN is wired exactly the same as I would wire a PNP sensor.

Cheers Peter
 

derekmccoy

derekmccoy
Quote from CNCnutz on July 3, 2020, 9:01 pm



You can use either but if you think about it the NPN's are the safer option.
If the PNP wire breaks Masso will not see a signal and will try to home for the length of the entire axis before raising a homing alarm.
If the NPN wired breaks Masso will only move 10 mm before stopping with a homing alarm.

Isn't that the difference between an NC and NO sensor? It's the NC setup that is safer, just like e-stops right? But your sensors are NO so I'm confused as it seems like a contradiction.

My understanding is that when an NPN sensor is triggered, it connects the output wire to ground. I can't understand how these sensors could work as you mention. Sorry for all these questions, its just my curiosity trying to understand it. Logic tells me to get the PNP-NC sensors.
 

cncnutz

CNCnutz
Staff member
The sensor is Normally open and switches the negative rail.

This means that in the normal state Roko sensor normally outputs a positive signal which changes to -ve when it is triggers.
Because the input has to be low when the sensor is not triggered and changes to high when it is triggered it means that it is working backwards so the input has to be inverted.

If the wire breaks or the sensor is not plugged in the input will have nothing on it but because it is inverted it will go high? A logic high on the input tells Masso that the sensor is triggered and it needs to back off the sensor. The back off is only 10mm and if the sensor doesn't change to low in that distance, which it won't because of the circumstances, it will alarm.

In the case of the PNP sensor that goes high when triggered the input is not inverted. A broken wire or unplugged sensor will keep the input low so Masso will assume the sensor has not been triggered. If your carriage has 1 metre of travel it will try and move the full distance before it gives an alarm.

As you can see the NPN normally open sensor is the better option of the two though both will work just fine.

Cheers Peter
 

cncnutz

CNCnutz
Staff member
In theory they would at the logic level but it would need to be tested. The Roko ones that I am using have built in pullup resistors in them that provide the +ve output when they are idle. Some need these to be added externally to work with Masso. Something to also be aware of is that while on a logic level they will look the same, it will be a different matter if you want to use them to switch any meaningful current load like a relay. In that case the NPN's only switches Negative while the PNP's only switches Positive.

Cheers Peter
 

bradm

bradm
Help......i have RoKo sensors SN04-N NPN.NO how do you wire these to the masso i know this is simple stuff but if the life of me i can not get them to be recognised by masso? i have inverted the setting in masso and tryed both but still nothing!

i think im just missing somthing simple with my wiring



Brad
 

breezy

Arie
Staff member
Brad,

Wire as per documentation https://docs.masso.com.au/wiring-and-setup/setup-and-calibration/masso-homing-sensors but it is the black wire that goes to MASSO.

To test sensors, power them up and bring a metal object towards the sensor face and the LED should light and the black will go to 0v with respect to -ve supply.

MASSO requires +5v minimum on it's input to reliably trigger, if you are not getting that from the sensor, connect a 5.6k resistor to the input from the +ve supply.

Regards,

Arie
 

cncnutz

CNCnutz
Staff member
Hi Brad

These are the same sensors that I use on my machine.
Brown to Masso +ve
Blue to Masso Gnd
Black to Masso input

The input should go high when the sensor is connected and if it doesn't it is possible that the internals have changed in the sensor and it no longer has the built in pull up resistor in it.
If the pull up is missing run a 5K6 resistor between Masso +ve and the input as Arie said. The input will go high and triggering the sensor will change it to low. You will need to invert the input to get the logic correct.

Cheers
Peter
 
Top