I am quite a newbie to Arduino and currently stuck with an encoder.

I have a BLDC geared motor with encoder, all I want to do is to get values from the encoder.

There are 6 wires: out A, out B, out Z, +V, 0V, FG. How should I wire the six of them correctly?

Encoder specification says 5 VDC is OK to power it, and I want to make a circuit to power an encoder using an Arduino Mega board.

  • 1
    It depends on what kind of encoder it is. You need to know if it is an absolute or incremental encoder. Is there a description, model number, or other information?
    – Duncan C
    Jan 4, 2021 at 17:50
  • Encoder model name is e40h8-5000-3-n-5.
    – 3XBULL
    Jan 5, 2021 at 5:38

1 Answer 1


This should be in the documentation of the motor or encoder, and that is the first place to look.

If you don't have any documentation, here is my best guess:

ABZ suggests it is an incremental encoder with channel A and B for quadrature encoding (giving direction and speed), with Z as the index pulse for getting absolute position once every rotation. FG is most probably Frame Ground, or maybe be the Fault signal.

How you wire it all depends on what you want to do with it, but knowing what each signal is should make it easy enough.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.