DRO usage

More
11 Oct 2012 11:13 #25235 by bigfefi
Replied by bigfefi on topic Re:DRO usage
I think you are right.
It seems I don't see volt change.
I mean.. with Halscope I don't see nothing... but with Xoscope I see a nice square wave...
This mean that encoder works fine at least.

Please Log in or Create an account to join the conversation.

More
11 Oct 2012 11:17 #25236 by andypugh
Replied by andypugh on topic Re:DRO usage
bigfefi wrote:

I think you are right.
It seems I don't see volt change.
I mean.. with Halscope I don't see nothing... but with Xoscope I see a nice square wave...
This mean that encoder works fine at least.


Halscope will only see the pin change if the parallel port setup is correct, so that isn't all that informative.
The test is to see if the real oscilloscope sees the parallel port pin voltage level change when everything is wired up.
If there is a voltage swing at the parallel port pin, then the problem lies in the software config.
If the parallel port pin voltage stays high or low then it looks like you need an RS422 to TTL converter.

Please Log in or Create an account to join the conversation.

More
11 Oct 2012 12:35 #25237 by bigfefi
Replied by bigfefi on topic Re:DRO usage
What do you mean with "real oscilloscope"?
I've tried the encoder with a classic laboratory oscilloscope and the signal was a square wave... But, sorry, I don't mind the amplitude...
The interface from RS I've linked is only a "mechanical" interface, so if I see a square wave with Xoscpope on suond card
I suppose that kind of signal is the same that arrive to integrated parallel port on my pc.
Maybe my encoder output a wrong voltage amplitude signal...

Please Log in or Create an account to join the conversation.

More
11 Oct 2012 12:49 #25238 by andypugh
Replied by andypugh on topic Re:DRO usage
bigfefi wrote:

What do you mean with "real oscilloscope"?

I mean a real, physical oscilloscope, rather than Halscope

I've tried the encoder with a classic laboratory oscilloscope and the signal was a square wave.

Yes, but the input characteristics of the lab scope are completely different to a parallel port.

The interface from RS I've linked is only a "mechanical" interface, so if I see a square wave with Xoscpope on suond card
I suppose that kind of signal is the same that arrive to integrated parallel port on my pc.

Not necessarily. You need to scope it _while_ it is attached to the parallel port (you can do this at the breakout)
The point is that the pins on the parallel port have a weak pull-up to 5V. To change the state of a parallel port pin it is necessary to source/sink a certain amount of current. To change the voltage at an oscilloscope probe you need practically no current as they have effectively infinite input resistance.

Maybe my encoder output a wrong voltage amplitude signal...

The encoder output is differential. It is quite possible to have 0V between the A and /A wires and have A still at 5V due to the pull-up on the parallel port. All that requires is that /A is also at 5V, which iis easily achived as that wire is not connected to anything.
en.wikipedia.org/wiki/Differential_signaling

Please Log in or Create an account to join the conversation.

More
12 Oct 2012 23:28 #25281 by bigfefi
Replied by bigfefi on topic Re:DRO usage
Some update...
This afternoon I have check the signal at the end of the parallel cable...
Using
encoder phase A & phase B --> breakoutboard (on pin 2 that originally was used for Xclock and pin 3 originally for Xdit)--> parallel port cable ... and a real oscilloscope (LeCroy WaveSurfer 422) I don't see nothing significant...
So I made a new piece of custom cable to adapt DB9 encoder's terminal to DB25 paralle port.
Using
encoder phase A & phase B --> pp cable and a oscilloscope I see two square wave going more or less from 0V to 5V.
Not properly 5V...
I could say that the signal was from 0 to 4 V, with a spike on the rising edge of the signal that arrive to 5V for 1 or 2 sample and then goes to 4V.
The phase B was shifted on the left (in the time base axis) in respect of the phase A (the B rising edge was at half duration of the phaseA 4V level... if I'm able to explain)
So.. Now.. I have to try this configuration...

Please Log in or Create an account to join the conversation.

More
15 Oct 2012 11:26 #25329 by bigfefi
Replied by bigfefi on topic Re:DRO usage
Here I am with some news.
Somethings works !
I create a custom cable that adapt DB9 connector at the encoder's end to DB25 cable that goes to the PP Port on the pc.
Using a "real" oscilloscope (LeCroy Wavesurfer 422) I can see the square wave signal from phaseA and PhaseB.
I use pin1, pin2 for phase A&B, and pin3 for index pulse on the DB25 cable (a mistake)
Tha HAL file that I use (found on wiki page under "Big DRO" thread) wants phaseA on pin2 and phaseB on pin3.
So I change config to use phaseA on pin1 and phaseB on pin2, but when I try to launch the HAL file I get an error "parport0.pin1 doesn't exist...
So using the original config I try to launch the HAL file..
and.....
The Xaxis dro change, following forward and backward the rotation of the encoder....
I mean... Now this working (?) config use phaseA on pin2 and pulseindex on pin3...
How can this work?
Counter component doesn't need phaseA and phaseB to work?
When attached to oscilloscope I notice that phaseB signal was shifted right respect phaseA signal (on the time scale), I think out of phase.
I thought that when phaseA was +5V, phaseB must be 0V or -5V...
Attachments:

Please Log in or Create an account to join the conversation.

More
15 Oct 2012 11:52 #25331 by BigJohnT
Replied by BigJohnT on topic Re:DRO usage
The only way to "know" if your counting up or down the A and B are shifted. If A then B then you are counting one direction and if B then A your counting the other direction.

en.wikipedia.org/wiki/Rotary_encoder

John

Please Log in or Create an account to join the conversation.

More
15 Oct 2012 13:19 #25337 by andypugh
Replied by andypugh on topic Re:DRO usage
bigfefi wrote:

I thought that when phaseA was +5V, phaseB must be 0V or -5V...

No, a quadrature signal has a 90 degree shift. The last encoder I made had a 180 degree shift like you seem to have been expecting, that doesn't work at all :-)
The 90-degree shift gives 4 distinct states, and from the order the states are seen in you can determine the direction of rotation as well as the speed.

Please Log in or Create an account to join the conversation.

More
15 Oct 2012 15:59 #25342 by bigfefi
Replied by bigfefi on topic Re:DRO usage
Yes, it's clear...
What I can't understand is... How counter encoder can count using only 1 phase (in my case phaseB, looking at hal file and pinout of my soldered cable that have phaseA on pin1, phaseB on pin2 and index pulse on pin3) forward and backward?
Maybe I made two mistake that compensate each other...
Asap I will controll again pinout of my cable...

Please Log in or Create an account to join the conversation.

More
15 Oct 2012 18:36 #25344 by andypugh
Replied by andypugh on topic Re:DRO usage
bigfefi wrote:

Yes, it's clear...
What I can't understand is... How counter encoder can count using only 1 phase

In counter mode it just increments every time it sees an edge (and only ever counts up)
If you are seeing it count up and down with only one phase then that is indeed rather spooky.

Please Log in or Create an account to join the conversation.

Time to create page: 0.247 seconds
Powered by Kunena Forum