Single channel encoder signal to quadrature signal?

Thread Starter

joykid

Joined Feb 14, 2018
16
I have a closed system with a DC motor and a single-channel incremental encoder for position feedback. I bought a controller that says it takes dual channel (quadrature) encoder input (channels A, B). I do not need the directional elements of the device (the reason for the 2nd channel), but would like to still find a way to interface the system with the controller. Is there a way I can emulate a quadrature signal by feeding the system signal through something to shift its phase 90 degrees? Is that even necessary?

Thanks!
 

MaxHeadRoom

Joined Jul 18, 2013
28,782
What is the name/nature of the controller, it is most likely going to need the A&B signals as many use all four edges to increase the resolution.
And of course they need to retain the 90° shift.
Max..
 

Thread Starter

joykid

Joined Feb 14, 2018
16
What is the name/nature of the controller, it is most likely going to need the A&B signals as many use all four edges to increase the resolution.
And of course they need to retain the 90° shift.
Max..
Hey Max, thanks for the response

The controller is a maxon EPOS2 24/5. It is a position controller. I don't mind a resolution loss but I just need to know if it's possible to actually interface with before I order the controller, and if not, what my other alternatives are for closed loop positional/speed control with a single channel encoder feedback.

Thanks!
 

MaxHeadRoom

Joined Jul 18, 2013
28,782
How much resolution do you need?
A simple quadrature type can be set up with a dual head slot opto sensor or two mounted bonded together in one unit to read off a slotted wheel..
Max.
 

Thread Starter

joykid

Joined Feb 14, 2018
16
How much resolution do you need?
A simple quadrature type can be set up with a dual head slot opto sensor or two mounted bonded together in one unit to read off a slotted wheel..
Max.
I'm mainly looking for a solution with only the output of the encoder that's already there. The dc motor sys and encoder are closed and I do not think I can mount any hardware on the motor shaft. I do not know the metric for how much resolution I need, though the position contrlo application is not very complex or precise. If I had access to the shaft I would just mount my own quadrature encoder, but unfortunately not :(
 

Thread Starter

joykid

Joined Feb 14, 2018
16
A little vague what the resolution is? Have you measured/counted pulse/rev?
Max.
The system is closed, I cannot access the motor to count the revolutions. It is a linear actuator. There is no lead screw info or anything either. It's got a 250mm stroke, so all I know is there is about 1600 pulses from fully closed to fully open.
 

Thread Starter

joykid

Joined Feb 14, 2018
16
1) If the controller does not use the quadrature inputs to increase resolution, your effective resolution will be cut by 1/2.
2) You will have zero noise immunity.
With a 5v signal, how significant can noise even be? And if I were to be okay with this solution, could you describe more closely how i would implement it?

As well, what are some other options I can consider for positional control?

Thanks
 

philba

Joined Aug 17, 2017
959
A grey code counter is a good solution. While the resolution would be half, the compensation is simply multiplying by 2X in the controller. I don't think noise would be increased, it's just that every pulse from the encoder is valid so noise would be interpreted as increased speed by the controller. Unless the encoder is noisy in first place, I'm not sure it would matter much. My guess is it's an optical encoder so no contact bounce.

You can build it with flipflops and xors (2 chips, basically) though the SW guy in me wants to throw a single 8 pin uC at the problem...
 

joeyd999

Joined Jun 6, 2011
5,365
With a 5v signal, how significant can noise even be? And if I were to be okay with this solution, could you describe more closely how i would implement it?

As well, what are some other options I can consider for positional control?

Thanks
You will get a position increment for each transition of the encoder signal. If the transitions are noisy, you will get off track fast.

Also, I was wrong. Your resolution will be 1/4th (not 1/2) if the controller does not properly encode the A/B signals. Here's a rough sketch. One dual D will suffice:

20180214_124901.jpg
 

Thread Starter

joykid

Joined Feb 14, 2018
16
A grey code counter is a good solution. While the resolution would be half, the compensation is simply multiplying by 2X in the controller. I don't think noise would be increased, it's just that every pulse from the encoder is valid so noise would be interpreted as increased speed by the controller. Unless the encoder is noisy in first place, I'm not sure it would matter much. My guess is it's an optical encoder so no contact bounce.

You can build it with flipflops and xors (2 chips, basically) though the SW guy in me wants to throw a single 8 pin uC at the problem...
It's a hall effect encoder
 

joeyd999

Joined Jun 6, 2011
5,365
You will get a position increment for each transition of the encoder signal. If the transitions are noisy, you will get off track fast.

Also, I was wrong. Your resolution will be 1/4th (not 1/2) if the controller does not properly encode the A/B signals. Here's a rough sketch. One dual D will suffice:

View attachment 145992
Crap. Working fast. The connection from Qbar to D is correct. But the output A comes from Q, not Qbar.
 

LesJones

Joined Jan 8, 2017
4,219
From a single pulse train I can see no way to get direction information. If the system moves very slowly and you can be sure the motor has almost no overrun then you could assume the count is incrementing when the motor is being driven in one direction and the count is decrementing when being driven in the opposite direction. This can drop or pick up extra counts if it stops just on a transition of the pulse from the encoder. This system is used for TV satellite dish positioners.

Les.
 
Top