1 Attachment(s)
Problems on installing rotary encoder on Gecko G540
https://www.cnczone.com/forums/attac...d=443066&stc=1Hi!
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!
Re: Problems on installing rotary encoder on Gecko G540
What resolution is the encoder? the pulses may be too narrow for the relatively slow G540 inputs to see...
Re: Problems on installing rotary encoder on Gecko G540
Right so a 500 line encoder would output a 500 Hz A signal at 1 RPS (60 RPM) and a 1 ms index pulse.
I don't know G540 input speeds but I suspect they are fairly slow so this is not likely to work at more
than a few hundred RPM at best. You might have to bypass the G540 inputs and connect the encoder
directly to the ESS pins to be able to use a 500 line encoder.
You might also ask Gecko what is the maximum frequency of its input pins
Re: Problems on installing rotary encoder on Gecko G540
I think that "input" frequency refers to the step input not the external isolated inputs
1 Attachment(s)
Re: Problems on installing rotary encoder on Gecko G540
The problem is, even without connecting to the gecko, I can't see a on/off pattern on the output of the optocoupler, when measuring with the multimeter. I can see this pattern when connecting the hall sensor to the very same circuit. When connecting the encoder, it's just as the mosfet doesn't switch when it rotates really slow by hand. I tried to replace the mosfet to a 2N222 (with a 1k resistor from the base of the transistor to to the signal output index (z) of the encoder and still nothing happens. As the transistor never turns on and off.
Any ideas?
This are the electrical specs of the encoder, if anyone needs it...
https://www.cnczone.com/forums/attac...d=443086&stc=1
Re: Problems on installing rotary encoder on Gecko G540
Can you measure the encoder output directly?