1

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

  • 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 Aug 6 '18 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 . – ratchet freak Aug 6 '18 at 11:31
  • @ratchet freak you are right – Stefano Zanella Aug 6 '18 at 11:35
  • 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 Aug 6 '18 at 12:18
  • Additional thought, are you sure the shaft is rotating the encoder wheel? – st2000 Aug 6 '18 at 12:45
1

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, privacy policy and cookie policy

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