dc motor with integrated rotary encoder.. no documentation.. any ideas?

in a fit of ill-thought-out late night shopping I ordered some motors from ebay... these ones to be exact:

canon ironcore motor with encoder

there's a datasheet available for the motor, but not for the encoder.. the motor has two wires coming out of the top end of the housing in addition to the two wires at the bottom. I'm able to drive the motor without a problem, but my (perhaps overly simple) attempt to use an encoder library to count pulses did not work...

I used this library: GitHub - PaulStoffregen/Encoder: Quadrature Encoder Library for Arduino

I used the sample code and plugged the two wires into pins 20 and 21 (interrupt) on my mega. for good measure, I connected the power and ground for the motor to the motor shield as well. the program should send the current position to the serial monitor, but when i rotate the shaft, perhaps unsurprisingly.. no change.

usually a few google searches can get me going in the right direction, but i'm at a loss here... any help would be appreciated. not sure what's the best way to share code here, so I attached the example file I used. I just changed the pins from default to 20, 21.

Basic.pde (741 Bytes)

I just found this: https://www.canon-prec.co.jp/english/pdf/dcm/DP35.pdf

it's probably not exactly the same encoder, but from the same product line, and might be similar.. any idea how i can use this??

thanks again in advance!

With just two wires, the encoder is most likely a tachometer that generates a low voltage AC waveform.

You'll need to check with an oscilloscope to be sure.

ok, so i've been barking up the wrong tree then eh? any advice on using it?

I should add - I don't have an oscilloscope.. :frowning:

If you have a multimeter with an AC range, try measuring the "encoder" output voltage. Frequency would be another possibility. Or ask around. Friends or repair shops might be willing to take a look.

sure enough! I ramped the motor up and down and back and forth, and got an obvious corresponding ramp in the A/C reading from 0-2.4v

I also noticed this link in the original ebay description to a video of an oscilloscope reading: Sample shaft encoder output from EF35-T1N1 Canon Precision Motor - YouTube