1. Hundreds of coffees, endless nights of debugging and coding, and countless feedback by our beta testers led to this new major release. SimTools 2.4 is probably the version with the most upgrades and improvements in a single release ever. Look at everything Dustin has included:
    SimTools 2.4 all features.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Download Package Now!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant here. Do not following these rules will lead to permanent exclusion from this website: Read the forum rules.

I need some help connecting the encoder in a motor...

Discussion in 'Motor actuators and drivers' started by mariano68, Sep 16, 2018.

  1. mariano68

    mariano68 Active Member

    Joined:
    Nov 15, 2014
    Messages:
    585
    Occupation:
    builder contractor
    Location:
    Argentina
    Balance:
    3,452Coins
    Ratings:
    +385 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino, 4DOF
    Hi guys!
    I got a motor for cheap just to do some test before I get some more for some projects, as a small linear actuator, etc.
    This is the motor and all the info I got:
    1.jpg s-l1600.jpg 3509.jpg
    The motor has 10 cables, black and red for power, I tested them and got movement in both ways, and another 8 more cables from the encoder I think.
    Is there any way to test this cables to see how can I get the encoder to work either with an arduino, or the @Thanos AMC1280USB I have lying around for sometime?
    I saw a video from the clearpath servo motor and it has the same amount of cables and colors.
    Any help?
    Last edited: Sep 17, 2018
  2. Pit

    Pit - - - - - - - - - - - - - - - - Staff Member Moderator Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    2,995
    Location:
    Switzerland
    Balance:
    29,165Coins
    Ratings:
    +3,000 / 29 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    Thanos AMC1280USB can handle servo motors, you need additional things to get this working. Thanos had shared any relevant information about this.
    • Like Like x 1
    • Informative Informative x 1
  3. mariano68

    mariano68 Active Member

    Joined:
    Nov 15, 2014
    Messages:
    585
    Occupation:
    builder contractor
    Location:
    Argentina
    Balance:
    3,452Coins
    Ratings:
    +385 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino, 4DOF
    Thank you for your reply, I'm still looking for that info, I hope @Thanos can check that someone put @Thanos in a thread :grin
    @Thanos
    @Thanos
    hug::cheers
    Thanks anyway!
  4. Thanos

    Thanos Building the Future one AC Servo at a time... or 6

    Joined:
    Jul 6, 2017
    Messages:
    446
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    3,110Coins
    Ratings:
    +392 / 4 / -0
    My Motion Simulator:
    AC motor, Joyrider, Motion platform, 4DOF, 6DOF
    Servos have to have matching servo drive unit with them. The encoder is usually matched in the servo drive parameters, without a matching set of parameters you will have trouble setting this motor on a servo drive.

    Also this motor looks like BLDC, which usually has 3 sensor wires to send feedback about the coils current. Are you sure there is an encoder on the back of the motor? Do you have datasheet of the motor or its encoder?
    • Like Like x 1
  5. mariano68

    mariano68 Active Member

    Joined:
    Nov 15, 2014
    Messages:
    585
    Occupation:
    builder contractor
    Location:
    Argentina
    Balance:
    3,452Coins
    Ratings:
    +385 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino, 4DOF
    Thank you very much for your reply!
    All the info I got is what I posted, I did some research and it looks like this motor is from a big printer or something like that. The guy that sells them is advertising as a motor with encoder.
    I will try to open it if that helps, Anyway, it can be used also with an external decoder or Pot I think. Am I right?
  6. Thanos

    Thanos Building the Future one AC Servo at a time... or 6

    Joined:
    Jul 6, 2017
    Messages:
    446
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    3,110Coins
    Ratings:
    +392 / 4 / -0
    My Motion Simulator:
    AC motor, Joyrider, Motion platform, 4DOF, 6DOF
    On the photos you posted that shows some motor data, it doesn't mention anywhere encoder CPR, just tachometer in herz which is completely different thing. You can open it and see if there is encoder in there, perhaps there is model number on the encoder is there is any.

    Is that DC motor? You have your finger on the motor label...
  7. mariano68

    mariano68 Active Member

    Joined:
    Nov 15, 2014
    Messages:
    585
    Occupation:
    builder contractor
    Location:
    Argentina
    Balance:
    3,452Coins
    Ratings:
    +385 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino, 4DOF
    I will try to open it.
    Yes, it is a DC motor, I tested it at 24v, runs fine to both sides. It's not my hand but the seller's hand :)
  8. OZHEAT

    OZHEAT Member

    Joined:
    Oct 26, 2015
    Messages:
    146
    Location:
    Australia
    Balance:
    1,800Coins
    Ratings:
    +78 / 6 / -0
    My Motion Simulator:
    3DOF, DC motor
    @mariano68
    You probably got a differential incremental encoder.
    signals A A+ B B+ Z Z+ (6 wires) and +ve -ve (2 wires) from the encoder. Motor +ve and -ve (2 wires, red black) makes 10 wires.
    Remove the cover over the encoder end and look at the circuit board.
    Post a detailed pic of the board and wiring and we maybe able to work out the connections for you.
    Even looking at the optical sensor will tell you a lot especially if it is a HP(agilient) one.
    Andy
    • Like Like x 1
    Last edited: Sep 24, 2018
  9. mariano68

    mariano68 Active Member

    Joined:
    Nov 15, 2014
    Messages:
    585
    Occupation:
    builder contractor
    Location:
    Argentina
    Balance:
    3,452Coins
    Ratings:
    +385 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino, 4DOF
    Thank you very much!
  10. mariano68

    mariano68 Active Member

    Joined:
    Nov 15, 2014
    Messages:
    585
    Occupation:
    builder contractor
    Location:
    Argentina
    Balance:
    3,452Coins
    Ratings:
    +385 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino, 4DOF
    Here we go!
    20180924_173135.jpg 20180924_173152.jpg 20180924_173223.jpg 20180924_173235.jpg 20180924_173258.jpg
  11. mariano68

    mariano68 Active Member

    Joined:
    Nov 15, 2014
    Messages:
    585
    Occupation:
    builder contractor
    Location:
    Argentina
    Balance:
    3,452Coins
    Ratings:
    +385 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino, 4DOF
  12. Thanos

    Thanos Building the Future one AC Servo at a time... or 6

    Joined:
    Jul 6, 2017
    Messages:
    446
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    3,110Coins
    Ratings:
    +392 / 4 / -0
    My Motion Simulator:
    AC motor, Joyrider, Motion platform, 4DOF, 6DOF
    I can't find any information about this encoder by part number, but the single diode used for sensor looking at the wheel disk, indicates that this is only a tachometer...
  13. mariano68

    mariano68 Active Member

    Joined:
    Nov 15, 2014
    Messages:
    585
    Occupation:
    builder contractor
    Location:
    Argentina
    Balance:
    3,452Coins
    Ratings:
    +385 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino, 4DOF
    Are you sure? 5 pair of cables just for a tachometer?
    Anyway, I can take it out and put a real encoder in the same place, do I need something more than the AMC1280usb to use an encoder?
    @OZHEAT you're my last hope :sos
  14. Thanos

    Thanos Building the Future one AC Servo at a time... or 6

    Joined:
    Jul 6, 2017
    Messages:
    446
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    3,110Coins
    Ratings:
    +392 / 4 / -0
    My Motion Simulator:
    AC motor, Joyrider, Motion platform, 4DOF, 6DOF
    Without datasheet its impossible to tell. It could be just tachometer with decade counter chips that convert the pulses to 8bit speed value...
    • Agree Agree x 1
  15. OZHEAT

    OZHEAT Member

    Joined:
    Oct 26, 2015
    Messages:
    146
    Location:
    Australia
    Balance:
    1,800Coins
    Ratings:
    +78 / 6 / -0
    My Motion Simulator:
    3DOF, DC motor
    I'd have to disagree with you @Thanos .
    Looking at the encoder pic I would say it is an optical encoder with its glass encoder disc, a tacho is usually a coil which generates voltage proportionally to speed.
    While the encoder board uses proprietary maybe custom chips it isn't too hard to sus out what their probable functions are
    ppp.jpg A signal only shown.

    @mariano68 I don't know what kind of test equipment you have but a CRO would be very helpful in finding out what wires do what. If you don't have one then a dozen LEDs and resistors could be rigged up to indicate a sorta logic probe.
    Due to the woeful pictures, I can't trace any wires but what little I can see Red= +ve supply to encoder Black= -ve supply.
    +ve voltage could be +5v +9v +10v try 5v first and look at the IR LED with a camera to see if it lights up.
    My first guess would be White= A Yellow= B Orange= Z Blue= A+ Brown= B+ Green= Z+
    The A and A+ signals are differential signals, what that means is when A is high A+ is low and vice versa. You will probably use the encoder as single ended signals, so just choose the 3 same type of wires to use.
    Z or index signal is easiest to find as it will either be high or low all of the time except for one position per rev.
    A & B will alternate between A high B low, A high B high, A low B high, A high B high..... A+ B+ will be the opposite.
    The hard part is turning the motor shaft slow enough to see the changes as I suspect you have a 1000cpr encoder.
  16. mariano68

    mariano68 Active Member

    Joined:
    Nov 15, 2014
    Messages:
    585
    Occupation:
    builder contractor
    Location:
    Argentina
    Balance:
    3,452Coins
    Ratings:
    +385 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino, 4DOF
    @OZHEAT Thank you very much and sorry for the pics, I will do my best to take better ones if you want, just tell me what do you need to see better.
    I don't have electronic devices (or background...), I will try to find someone who have them if needed, sorry, what is a CRO? :blush

    Edit
    CRO=osciloscope
    Last edited: Sep 27, 2018
  17. OZHEAT

    OZHEAT Member

    Joined:
    Oct 26, 2015
    Messages:
    146
    Location:
    Australia
    Balance:
    1,800Coins
    Ratings:
    +78 / 6 / -0
    My Motion Simulator:
    3DOF, DC motor
    @mariano68
    As you don't have a great deal of equipment, hopefully you have a multimeter and an ardinuio.
    I think it would be easiest for you to work out the connections from the motor...
    You have 8 wires from the encoder
    Red & Black (I think I can see a black wire) - power to the encoder, check by following where wire go to on board.
    A & B - Encoder Output signal, see quadrature encoding.
    Z - Index signal, only has 1 pulse per revolution.
    A,B & Z have complimentary signals as well, you have a proper optical encoder albeit an older one so they use differential signals for long distance to mitigate EMI. A bit like rs-422.
    ppp.jpg
    Using this pic for reference....
    The red & black wire will be the only 2 connections that don't just go to the line drivers
    Apply +5v to red wire. -5v to black. Look at the area between the IR led and sensor board with a digital camera, it should glow. This will confirm that it is powered up.
    Write on a piece of paper the wire colors. Measure each wire and note the results.
    Now move the motor shaft and note results. Each time there should be 3 low an 3 high signals.
    The 2 signals Z or index shouldn't be hard to find as they don't change except for at one position.
    A & B will be last 4 wires. Complement signal will always be opposite to each other while A or B will lead or lag depending on direction.
    Get an Arduino and google rotary encoder sketch maybe a Leonardo with the ffb code and use that to test motor and the encoder.
    • Winner Winner x 1
  18. mariano68

    mariano68 Active Member

    Joined:
    Nov 15, 2014
    Messages:
    585
    Occupation:
    builder contractor
    Location:
    Argentina
    Balance:
    3,452Coins
    Ratings:
    +385 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino, 4DOF
    Great info @OZHEAT !
    I will have some free time next weekend to test and report!
    Thank you very much!
  19. mariano68

    mariano68 Active Member

    Joined:
    Nov 15, 2014
    Messages:
    585
    Occupation:
    builder contractor
    Location:
    Argentina
    Balance:
    3,452Coins
    Ratings:
    +385 / 2 / -0
    My Motion Simulator:
    2DOF, Arduino, 4DOF
    @OZHEAT , you nailed it! Thanks!
    Got an old friend to jump up into my project, he is doing the electronics now, already got the encoder (2000cpi) to work with arduino, but arduino and also the sabertooth will get out of the ecuation soon... I want my little 48v servo motor to work at that 48v!
    For now:

    Just quoting my friend Hernan:
    In more technical terms, the pic receives the quadrature signal from the enconder, and generates a pwm proportional to the position, that is filtered and sent to the arduino as a 0 to 5V signal, as if it were a pot.
    inside the pic you can count all the laps that are needed, so that the 0 to 5 V end up representing the number of laps multiplied by the resolution of the enconder, in our case it would be something like 70,000 positions.
    But, in the arduino all that goes to the bin, it must have 10bit input, 1024 positions. So that is worse than reading my tester hahaha.

    BTW, that red part, its the bottom of my new actuator design.
    • Like Like x 1
    Last edited: Dec 23, 2018