Hi guys

I'm having a hard time getting my lathe spindle speed sensor to work. It was working correctly with the $5 Chinese bob I was using but since upgrading to the g540 I can't get a reliable signal.
This is the sensor I'm using.
HKZ-101 Hall Effect Device Re-introduced | Sensors | Other | Active Components | PRODUCTS | ZD1900 | Jaycar Electronics
I've got it connected to a 5v psu. Circuit goes: sensor positive to 5v positive, sensor negative to 5v negative, sensor sender to g540 input, 5v negative connected to 36v g540 psu negative. I know the g540 inputs are opto coupled where the Chinese bob wasn't and I'm wondering if I'm not putting in a clean enough pulse or not high enough voltage for the g540 to register. Not sure if I need a pull up/down resistor or something like that?
I've threaded a part with the old setup so presumable the sensor is up to the task. I can usually get the index light in mach3 to switch if I rotate the spindle slowly but it's not consistent.