Anyone worked with this type of encoder signal?

Hello,
A certain incremental encoder has fallen into my lap.
Its a 2 channel hall effect (magnetic) unit - and the hall effect chips switch between .4 vdc and 1.2 vdc in its current circuit. For a full 360 degree rotation - it will switch 36 times between a full high-state and full low-state. But it is supposed to be useful for resolution down to the degree.

The hall effect outputs are analog producing sinusoidal rather than a square wave signal.
I suspect the design intention for this type of encoder is to perhaps drive it with a clock frequency instead of a constant + voltage. The clock frequency would be fast enough to split the the sinusoidal signals into slices.

So each sinusoidal cycle would look like a ladder incrementing up to 1.2vdc - and then decremeting back down to .4vdc

So if we sliced 1 sinusoidal cycle into 10 slices - and took a voltage reading during each slice (i.e. high clock state) then for a full 360 degrees of rotation - we would end up with 360 slices. Thus we get a 360 degree encoder.

I'm wondering if anyone has every worked with this type of encoder, and could you share how you did it?

Very sincere thanks!!
Mr. D

I suspect your mystery encoded relied on external circuits to make the digital signal necessary to use it with an Arduino.

Paul

The hall effect outputs are analog producing sinusoidal rather than a square wave signal.

That is called a quadrature output. As shown in the link, two ADC channels are handy for decoding the signals.

Thanks Jrem. That sounds like it. Exactly it.

got_arduino ------ looks like that encoder simply might not have the circuitry included that converts the rising and/or falling edges of the sinusoids to square-wave ------ or two level waveforms. Maybe it actually has ----- not sure (eg. got any more wires in the cable for it?).

Thanks all!
Yes - I think you're right - its a quadrature with two signals 90 degrees out of phase. And yes on the external circuit. It was part of a system that had a monitor. And I suspect the electronics within that monitor were chopping its signals up to get higher movement resolution out of it. Since it equates to 36 full sinusoidal cycles for one full revolution - that is why I suspected the electronics in the monitor must be slicing each one of those sinusoidal signals up into sequences and then interpreting direction and count accordingly - to get 10 times the resolution for each sinusoidal cycle.

However, I'm only guessing and without getting more detailed understanding I probably won't pursue using it with the arduino.

But my sincere thanks for your good thoughts on the matter!!

Hi,
Can you please post a picture of the units?
Does it have a name plate?
If so what has it written on it?

I would guess you have what is called a RESOLVER when you say that a sinewave is present on the outputs.

Tom.. :slight_smile:

got_arduino:
Hello,
A certain incremental encoder has fallen into my lap.
Its a 2 channel hall effect (magnetic) unit - and the hall effect chips switch between .4 vdc and 1.2 vdc in its current circuit.

Most encoders are either open-collector (needs pull-up resistors), or differential signalling (A+/A-/B+/B-).
I suspect you lack the pullup resistors.

I'm new to this forum interface - is there a way for me to upload a picture?

Hi,

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.

Tom... :slight_smile:

Yes - according to that - the system is expected to display a link "Additional Options" down and to the left of the posting input field.

From there, a user can add/upload a graphic.
And that is a typical option for a forum system.
But I'm not seeing that link/option anywhere.

Wait!
I found it - I clicked on the "Quick Edit More" option for my last post and there is the option for the attachment.
I'll post a couple of pics

So I think what I have here is a sine/cosine encoder.
Something new to me
But from what I read - they've been around for a long time.
Used for example by HP in their old large printers.

Interpreting the output of this encoder is called "Interpolation".
And one way to do this is with constant A/D reads on the two sine/cosine signals - and performing trig math.

To save myself some time - I'm going to look for a possible off-the-shelf IC designed to do this.
With the hopes that I can read its output with the arduino.

Well - here is a wild idea that might possibly work to read this encoder.
First we amplify both encoder signals so we get 0vdc to 4vdc for each cycle - for both Channels.
Then we use 4 voltage comparitors to trigger high at 4 voltage points.
This gives us 5 voltage values for channel A, and 5 voltage values for channel B.

We then feed the comparitors into 4 Arduino pins e.g. PORTB - which reads these as a 4 bit word - having 5 possible decimal values.

And the other comparitors into 4 Arduino pins e.g. PORTD - which reads these as a 4 bit word - having 5 possible decimal values.

During movement - the first half of a sinusoidal cycle would resolve to the decimal values of: 0, 1, 3, 7, 15
During continued movement - the second half of the sinusoidal cycle would resolve to decimal values of 15, 7, 3, 1, 0
So in the CW direction - channel A values will shift from 15 to 7, while channel B values will shift from 3 to 7.
But in the CCW direction - Channel A values will shift from 15 to 7, while channel B values shift from 7 to 3
Thus we have one count for every shift in value, and direction can be ascertained by using a Switch-Case statement.

Hi,
PLEASE answer post#5.
Picture would be great to see what you are working with.

Thanks.. Tom... :slight_smile:

TomGeorge:
Hi,
Can you please post a picture of the units?
Does it have a name plate?
Tom.. :slight_smile:

TomGeorge:
Hi,
Can you please post a picture of the units?
Does it have a name plate?
If so what has it written on it?
Tom.. :slight_smile:

The company name on the PCB is "Tangent Instruments" and I understand they make encoder related products for Astronomy. And this encoder is for the azimuth axis of a telescope. But I haven't been able to get any more info beyond that. The left side shows the magnetic disk which is divided into 36 sections. The right hand pic shows the hall effect sensors and a filter cap.

So I think what I have here is a sine/cosine encoder.

Yes, as suggested in reply #2, and discussed in the link. Two ADC channels will decode it quite accurately.

jremington:
Yes, as suggested in reply #2, and discussed in the link. Two ADC channels will decode it quite accurately.

Thanks!
Can you suggest how I would search - where I would search - for some example code - reading it with ADC?

If you have never used the ADC, one place to start would be the example program in the Arduino IDE menu file>examples>03.analog>AnalogInOutSerial.

Did you read the material that I linked in reply #2? There are two articles preceding the one I linked.

Use two analog channels and the atan2() function to get the phase angle in radians (multiply by 180.0/PI to get degrees).

Yes - I can take it from there.
Sincere appreciation!!