Quadratic encoders - voltage issue

Using encoders with the MCP product line
Post Reply
cgirerd
Posts: 2
Joined: Tue Jul 16, 2019 11:09 pm

Quadratic encoders - voltage issue

Post by cgirerd » Tue Jul 16, 2019 11:26 pm

Hello,

I am using a MCP236 Brushed DC Motor Controller, and have issues to read quadratic encoder inputs. The controller is powered by 12VDC on the B- and B+ pins. I am connected to the controller via USB, and have this motor plugged into it: https://www.pololu.com/product/3497 with this encoder attached: https://www.pololu.com/product/3499. The motor is connected to the pins M1A and M1B. The encoder is connected to this extension: https://www.pololu.com/product/3596. It is connected to 5VDC on pin 3, to the ground on pin GND, and the 2 output channels of the encoders are connected to pin 14 and 15.

When I manually rotate the encoder and the 2 output channels are not connected to the encoder, I can measure either 0 or 5V on these. However, when I connect them to the controller, the voltage is either 0 or 1.5V. So the voltage is much lower.

In the Basicmicro Motion Studio, if I set these inputs as analog, I can see the corresponding voltage displayed. However, if set to pulses or quadratic encoder, I am not able to detect any pulses. I guess it is due to the drop in the voltage from 5 to 1.5 when connected to the controller, which is to low to be detected as a pulse by the controller.

Are there some steps that I miss or something I am doing bad? Your help would be greatly appreciated.

Best,

Cedric

User avatar
Basicmicro Support
Posts: 1280
Joined: Thu Feb 26, 2015 9:45 pm

Re: Quadratic encoders - voltage issue

Post by Basicmicro Support » Wed Jul 17, 2019 10:35 am

I've never used these Pololu encoders before, but it sounds like you need a stronger pull-up on each encoder signal line.

Because of voltage and current protection on the MCP pins, there is an effective 3.4Kohm impedance from each pin to ground(eg 3.4k pulldown on each pin). If you encoders pullup is very weak(10k for example) that would explain almost exactly the 5v -> 1.5v drop. You can fix this by adding stronger pullups on the signal lines. A 2k or lower pull-up resistor should fix the problem if I am correct in my guess.

Alternatively, a buffer would fix the problem as well.

cgirerd
Posts: 2
Joined: Tue Jul 16, 2019 11:09 pm

Re: Quadratic encoders - voltage issue

Post by cgirerd » Wed Jul 17, 2019 2:10 pm

I've added some 2.2k pullup resistors on the 2 encoder channels and it raises the voltage enough now for the controller to detect it.
Thank you very much for your fast reply and your help, this was very useful!

Post Reply