Encoder pull-up resistor choice

Questions about using encoders with the Roboclaw product line
Post Reply
gdoisy
Posts: 33
Joined: Tue Oct 18, 2016 7:53 am
Encoder pull-up resistor choice

Post by gdoisy »

Hello,
First of all, it is a pleasure to work with your products which are really well documented.
I am trying to get feedback from my motor encoders through the RoboClaw 2x30A controller.
I am using these 2 Channel Quadrature Magnetic Encoders: http://www.phoenixamerica.com/products/ ... P9123.html
I don't know the exact model but since I get no feedback when wired directly to the controller, i guess that i have to add a pull-up resistor on both channel outputs.
Any advise in chossing the proper pull-up resistor which will not damage the controller?
Or maybe I am missing something?
Thanks!
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Encoder pull-up resistor choice

Post by Basicmicro Support »

Between 10k and 1k. The lower resistance will pullup harder and support faster speeds but in the vast majority of cases 10k or 4.7k will be plenty.
gdoisy
Posts: 33
Joined: Tue Oct 18, 2016 7:53 am
Re: Encoder pull-up resistor choice

Post by gdoisy »

Thanks for your answer. I had a nice answer from the support in the meantime. Everything works fine now.
Here is the full answer.

"The inputs on the Roboclaw will draw very little current(Digital I/Os look open circuits) as long as the input voltage is not higher than their clipping diode limits. Make sure you pullup to 3.3v or 5v. 3.3v is more efficient if you have access to it. If not then 5v is ok but some disipation will happen in the Roboclaw(100ohm current limit resistor with 3.3v zenor clipping diodes are built in to each I/O).

I usually recommend between 10k to 1k for the pullup depending on the speed the encoders will run at. If your encoders are running 100k+ counts per second go with 2.2k or 1k. Or check the encoders on a scope and make sure the pulses look reasonably square.

Note some encoders drive there outputs and dont need pullups."
pmichaud
Posts: 2
Joined: Sat Jan 07, 2017 2:47 pm
Re: Encoder pull-up resistor choice

Post by pmichaud »

I'm assuming I need pull-up resisters too. I have a roboclaw 2x15a with ServoCity's HD Premium Planetary Gear Motor w/Encoder. The documentation on the encoder is extremely limited and doesn't say what the output is. I know I have channels A and B connected correctly, but I'm not totally sure where the ground wire from the encoder is to go. I connected it to the ground pin of s1. Can someone confirm that is correct? Ion Motion App is not reading any values from the encoders. I don't have an oscilloscope, but when I put my voltmeter across one of the channels to ground, it reads 0.4v. Assuming the ground wire is correct, I have to assume I need pull-ups. Can you please explain to me how these pull-ups are to be wired in.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Encoder pull-up resistor choice

Post by Basicmicro Support »

On those motors builtin encoders you should not need pullups. Having a very low voltage on it at all times could indicate you have it wired wrong(those need 5v, gnd and A and B wired up) or that the motors encoder is faulty(its rare but I've had a customer whos motor was bad and after replacing it worked correctly.

The GND wire can be connected to any ground pin on the Roboclaw header. The 5v wire can also be connected to any 5v pin on the header. The 2 rows of pins next to the Encoder pins on the Roboclaw labeled + - are there to make this wiring easy but you dont have to use those. The 5v and ground pins begind each singal pin(S1 thru S5) will also work just fine to power the encoder.

Post Reply