Understanding MPG output.

More
19 Jun 2023 09:08 - 19 Jun 2023 09:09 #273830 by beefy
Understanding MPG output. was created by beefy
When you get a MPG wheel this is 100 PPR, I'm wanting to understand exactly what "100 PPR" means.

A single cycle of a quadrature encoder is a total of 4 edge changes from 2 outputs A & B.
So in the forward direction you get A going high, then B going high, then A going low, then B going low.
And in the reverse direction you get B going high, then A going high, then B going low, then A going low.

So does a 100 PPR MPG handwheel give 100 edge changes, which is actually only 25 quadrature waveform cycles.

Or is one "pulse" actually a complete quadrature waveform cycle, and thus a 100 PPR wheel will give 400 edge changes.
Last edit: 19 Jun 2023 09:09 by beefy.

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
19 Jun 2023 10:45 #273836 by tommylight
Replied by tommylight on topic Understanding MPG output.
Last paragraph is OK.
Internet is full of bad info.

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

More
19 Jun 2023 11:10 - 19 Jun 2023 11:11 #273837 by beefy
Replied by beefy on topic Understanding MPG output.
Thanks for that, and I agree with you on the bad info you can come across on the web.

Since my opening post I've been searching for data sheets on 100 PPR MPGs and one of them did show the wheel detents/stops with the 4 edge changes in between, so it's starting to make sense.

The next thing I have to understand is this "1x mode" the Peter from Mesa mentions a lot for use with MPGs, but my brain is starting to hurt and it's time for sleepies. I'll probably make a new post on that in a few days.
Last edit: 19 Jun 2023 11:11 by beefy.
The following user(s) said Thank You: tommylight

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

  • rodw
  • rodw's Avatar
  • Away
  • Platinum Member
  • Platinum Member
More
19 Jun 2023 12:45 #273850 by rodw
Replied by rodw on topic Understanding MPG output.
PPR = pixels per revolution
On a Mesa card with MPG inputs, they are not quadrature. This is the style you need. Check the images for connections
A, B, +5v, 0v
www.amazon.com/100PPR-Driver-Output-Wheel-Encoder/dp/B01EA9I5LW
I documented how I used a MPG like this in my original build thread
forum.linuxcnc.org/show-your-stuff/32029...build?start=20#85279

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
19 Jun 2023 13:14 #273853 by tommylight
Replied by tommylight on topic Understanding MPG output.
PPR = Pulses per revolution.
100 PPR encoder will have 100 pulses per revolution on channel A and on channel B, and those are shifted 90 degrees from each other.

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

More
20 Jun 2023 07:01 - 20 Jun 2023 07:50 #273902 by beefy
Replied by beefy on topic Understanding MPG output.
Thanks guys.

I'm going to go over to the Mesa boards section to ask Pete a question on the 1x mode.

Rod, 
I'm working on doing things a bit differently. I've gave up on that damn wireless XHC usb pendant.
Instead of a MPG jog wheel, I've programmed a microcontroller to emulate an MPG quadrature signal. So the Mesa board won't know any difference because all it sees is the incoming A & B quadrature signals and their phase shift representing forwards or reverse.

This way, instead of a multiplexer in hal for scaling, I can simply control the frequency of the quadrature signal with a selector switch on the pendant. Likewise a fwd/rev momentary rocker switch will control the phase shift of the quadrature waveform for direction.

Doing things this way I can have a serial connection between my pendant and the microcontroller which "feeds" the Mesa board, and I can have a trillion buttons on my pendant so no limit to the amount of things the pendant can do, so long as I have enough I/O on the Mesa card, which I don't think will be a problem at all once I interface to the P1 expansion port.
Last edit: 20 Jun 2023 07:50 by beefy.
The following user(s) said Thank You: rodw

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

  • rodw
  • rodw's Avatar
  • Away
  • Platinum Member
  • Platinum Member
More
20 Jun 2023 09:23 #273910 by rodw
Replied by rodw on topic Understanding MPG output.
Seems like you described a 7i73 which is a smart serial RS422 device
 

I've got a spare here if interested.
Attachments:

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

More
20 Jun 2023 10:12 #273913 by beefy
Replied by beefy on topic Understanding MPG output.
Cheers Rod,

let me have a look into that one and I'll see if I can make use of it.

Gimmee a day or two.

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

Time to create page: 0.074 seconds
Powered by Kunena Forum