2

Hello guys I am trying to count the number of the steps of a stepper motor with an encoder (Avago heds).

I found an Arduino sketch to count that steps and display them on the console and I found online the scheme to connect that encoder to Arduino.

The problem is that the encoder returns as output only 0, even if I rotate manually the motor. I also tried to measure the voltage of the encoder with a voltmeter but the voltage does not change even if I rotate the motor.

That is the Arduino Sketch

Here some picture's of Arduino-encoder connections arduino1 arduino2 arduino3

schema1 schema2

P.S. The motor works because I tried it before

Thank you for help

9
  • What is the point of a stepper motor with an encoder? When you make 100 steps with the stepper motor, it has done 100 steps.
    – Jot
    Commented Aug 6, 2018 at 10:46
  • 3
    @Jot it can skip or something can exceed the holding torque, it also allows calibration on startup without a detectable home position or limit switches . Commented Aug 6, 2018 at 11:31
  • 1
    1. I think the encoder @zzan has pick only outputs relative position information. So the argument of using this encoder to find home position may not work out. 2. Most design steppers to have more than adequate torque for an application so detecting slipping is not necessary. 3. There are much simpler ways to find home position such as end-stop switches found on 3d printers and CNC machines.
    – st2000
    Commented Aug 6, 2018 at 12:18
  • 1
    Yes the encoder wheel is rotating. I am building a robot arm and I need the encoder to determine the steps to go in a position with the motors turned off Commented Aug 6, 2018 at 13:26
  • 1
    yes, do you have any idea? @sa_leinad Commented Aug 7, 2018 at 6:50

1 Answer 1

2

In my experience (industrial encoders and PLCs) when the output don't change when the motor shaft is rotated its usually one of the following:

  • The set screw connecting the motor shaft to the encoder that isn't tight,
  • broken wire (bad connection to the encoder) or
  • a bad encoder.

Your picture shows what looks like a cover over the encoder coupling to the motor. Look and make sure that the encoder is actually rotating with the motor.

Then double check your connections. If a DMM still shows no voltage changes (use AC range if turning the motor to show that the encoder output is pulsing).

If there is still no joy, its likely that the encoder is bad.

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.