Hi!


Can anyone that understand electronics help me?


I have a hall sensor as an index on my lathe’s spindle. I have the sensor pulled high by a 1k resistor and can’t change it because they’re both glued in epoxy.


This sensor works normally with 5V, from a 12V supply inside the lathe, separated from the gecko’s supply. This 12v supply powers also the lathe’s tachometer.


I made an optoisolated circuit (an n channel mosfet 2N7000 and a 4N25 opto) to detect the 5v-0v change from the index sensor and had the output of the optocoupler wired in one input of my gecko, that sinks 11V.


So far so good, it works and the RPM is the same shown in the tachometer and in Mach3’s RPM DRO.


I then bought an encoder, that needs 5V also, and has A,B, and index outputs. The encoder is this one:


https://www.usdigital.com/products/e...ental/shaft/H5


I’m installing an Ethernet SmoothStepper in my system, so I hope to be able do to threading better with the encoder.


Buti can’t make it work!!


I duplicated my optoisolated circuit to have as input the index (or the A signal) from the encoder and wired the output of the optocoupler to another input of the gecko.


But it doesn’t work.


If I get the hall sensor on the input of the circuit everything works. If I put the index from the encoder for instance, it doesn’t. As Mach is not even receiving any signal.


My knowledge in electronics is basic, so, anyone could help me with my circuit? What am I doing wrong? Is the signal from the encoder different to be used with my optocoupler circuit? Should I add something to my circuit? Or change it? I’d like it to remain optoisolated...

My circuit is attached


Thanks!