Hello Guest it is October 18, 2019, 12:22:36 AM

Author Topic: Connecting an MPG to Mach3  (Read 20117 times)

0 Members and 1 Guest are viewing this topic.

Offline Sage

*
  •  365 365
    • View Profile
Re: Connecting an MPG to Mach3
« Reply #10 on: December 23, 2008, 09:24:28 AM »
Rogerbsst:
4.7k (Written as 4k7 in the industry so the decimal point will not be misinterpreted - mostly a problem on lousy paper prints) is what I suggested. But it sort of depends on what they have as a pull down. Pull-downs are a bit of a pain (and quite un-necessary if the circuit is designed properly) since they always form a divider with whatever else you put on the line to pull it up.
 The trick is to get a pull-up resistor value that gives to at least 3v on the line when the circuit tries to go high. You may have to try a few values.
 What value do they have as a pull-down? Is there a circuit diagram of the output available to look at?

Sage
Re: Connecting an MPG to Mach3
« Reply #11 on: December 23, 2008, 09:24:45 PM »
Sage,
right on the money. I fitted two 4K7 resistors across the 5v and 13 / 15 pins and the MPG now works. GREAT STUFF!
I can get a 1 step movement on the X axis of .0021 mm. I am stoked.
THANKS to HOOD and you for your suggestions.
Merry Xmas from Australia, and happy NEW YEAR to you all.

rogerbsstt

Offline Sage

*
  •  365 365
    • View Profile
Re: Connecting an MPG to Mach3
« Reply #12 on: December 24, 2008, 11:51:02 AM »
Great !!!
Glad to hear it. You may want to check the two logic levels. The high logic level voltage on the pin should be over 3v and the low should be below - say 1v else you may get flakey operation. Lower the resistor value if the high logic voltage is below 3v. And as previously mentioned it will be a balancing act to maintain a low logic level that insn't too high.


Sage
Re: Connecting an MPG to Mach3
« Reply #13 on: December 30, 2008, 08:11:27 PM »
Thanks,
I will check those values.

rogerbsstt
Re: Connecting an MPG to Mach3
« Reply #14 on: January 04, 2009, 04:28:32 PM »
Sage, Hood,
Thank you for your previous advice, the 4K7 resistors gives a max 2.89 v Hi at the pin and .2v Low, and the unit works OK. but after checking the Hi / low volts as suggested, I tried using a transistor to replace the resistor. I used a CBC327 (TO-92h) semi-conductor, (sorry I really dont what the correct terrms are), connected the emmitter(E pin) to the 5v and the Common(C pin) to the board 13 /15 pins, the A & B MPG signal wires connected to the central (B pin). When I checked the Hi / Low volts I got 4.84v hi and .21v low at the board.
The MPG works the machine so I think this appears to be an answer to finding the correct resistor to raise the Hi v to over 3v.
Please advise me if you can see any problems with this set up.

rogerbsstt

Offline Sage

*
  •  365 365
    • View Profile
Re: Connecting an MPG to Mach3
« Reply #15 on: January 05, 2009, 09:33:04 AM »
The transistor will work fine to change the levels to more solid values BUT (assuming I follow what you have done) the MPG signal has now been inverted using the transistor i.e. when the MPG gives a low the BOB is now seeing a high and vise versa. I'm not sure what Mach is doing with the signal but I'm surprised it isn't a bit confused. Perhaps it is looking at logic edges only and not the levels.
  Apparently it's not making any difference and if it works stick with it.
 As for your old single resistor arrangement, The 2.8v was a marginal high and it looks like the low did not suffer so you might have gotten away with just a lower resistor than 4k7 as a pull up - say 3k3 or 2k2. If you were buying resistors every time to try this then leave it like it is and see what happens. I have piles of components around to use to get it just right so I have an advantage there.

Also. I'm not sure what the MPG is using to drive it's output but it might be a bit easier on the transistor if you leave the 4k7 in the line going to the transistor base (B) to limit the current when it drives the transistor base low. Check the temperature of the transistor when it is supplying a high to the BOB. Probably won't be a problem.

Keep these comments in mind if you experience problems later but as I say if it works leave it alone. You'll be better off like it is now with the transistor if everyting is working.

 Good work.

Sage
Re: Connecting an MPG to Mach3
« Reply #16 on: January 05, 2009, 04:47:25 PM »
Sage,
Many thanks for your comments. I will check the transistors temp as I go, perhaps I will also try some other resistor values as a backup just in case of a problem with the trannys. The MPG data specifies the outputs at min -.5v at -1ma, to max 7v at 5ma on the signal wires A & B.
From what I see the Mach3 doesnt care if the signal is HI / Low or Low /Hi because in the MPG config setup there is no Hi / low choices as in other config inputs and I guess Mach3 just reads the changes.

One last thing I need to resolve is how do I get my glass scale encoder to display on the 4th axis DRO in Mach3. In a past response HOOD mentioned changing the 4th axis OEM code to an encoder DRO. He stated it can be done in screen 4. I have no experience with programming and cant find a screen 4 that show the DRO. Can someone please explain in simple steps how to do this.

Thanks Again

rogerbsstt

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: Connecting an MPG to Mach3
« Reply #17 on: January 05, 2009, 05:04:52 PM »
 Cant remember saying that but then again I cant remember what I have just typed :D

OEM code list can be found at the top of the forum in one of the stickies, you will find all of the documented OEMs in it.
Hood

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: Connecting an MPG to Mach3
« Reply #18 on: January 05, 2009, 05:07:45 PM »
Just reading again and wondering if you are meaning you dont know how to use screen4, is that what you are meaning?

Hood
Re: Connecting an MPG to Mach3
« Reply #19 on: January 06, 2009, 09:13:23 PM »
Hood,
Thanks, Yes I mean I dont even know what screen 4 is or where it is.
and sorry, but what 'Sticky' ?? has the OEM codes.
I feel like a dunce, but I dont have much to do with programs and such, I just use the machines.
Hope you can help,

rogerbsstt.