PDA

View Full Version : 2m542 source or sink current help?



Evengravy
09-07-2014, 02:07 PM
I have some issues with wiring on my cnc and was wondering if some more experienced guys could step in. I have searched around and found a thread with similar issues but I still have a bit of a hard time wrapping my head around current source vs sink arrangement:linuxcnc.org/hardy/lucid/index.php/engli...tle-assistance/reply


I have my cnc wired with similar hardware, ZP5A-int breakout board with 2m542 drivers. I have been running mach3 but missed steps occur often.


Initially I set up my breakout to source current to the drivers as in the second image attachment and things seemed fine at first but missed steps are common so I now believe that my BOB can't source enough current to drive the driver optoisolator inputs on my 2m542 drivers correctly so want to move to current sink ( image 1) as per this thread (although i'm having difficulty wrapping my head around this arrangement)

If anyone can shed some light I'd appreciate it.

thanks and regards

JAZZCNC
09-07-2014, 11:23 PM
This won't be your problem it will most likely be else where why your getting missed steps.! . . .But for people to help more then you'll need to provide much more info about the machine and how you have it setup.

Edit: First port of call is to try another parallel cable before doing anything else.!

Evengravy
10-07-2014, 08:16 AM
Hi jazz,

The machine is a momus design belt driven, il post pics ASAP. Motors are 381oz in from keling inc. I will check the parallel cable thanks, that is one I've overlooked. Looking at the circuit of the bob the output current (74hc244d schmitts) can only source just over 7mA current and the optical isolators on the drivers expect up to 16mA so I think it's definitely out of spec there and needs to be addressed, I think I have a solution using logic level mosfets to sink the optical isolator GND on dir step and ena so I will try today and report back. There is probably a few things going on, always the way so far, I may have too much preload on the bearings too.

irving2008
12-07-2014, 03:35 PM
Hi jazz,

The machine is a momus design belt driven, il post pics ASAP. Motors are 381oz in from keling inc. I will check the parallel cable thanks, that is one I've overlooked. Looking at the circuit of the bob the output current (74hc244d schmitts) can only source just over 7mA current and the optical isolators on the drivers expect up to 16mA so I think it's definitely out of spec there and needs to be addressed, I think I have a solution using logic level mosfets to sink the optical isolator GND on dir step and ena so I will try today and report back. There is probably a few things going on, always the way so far, I may have too much preload on the bearings too.
The drive current could be the reason for missed steps. M542 is 7mA min, 10mA typical, assuming 5v supply and 270ohm resistor as per leadshine datasheet. But the driver can only output around 3.8v so assuming a 2v LED you're actually getting something like 6mA. Having said that, you should never drive optos from a logic output, you should always sink to ground, i.e. the driver PUL+ to +v, usually an isolated 5v supply, driver PUL- to BOB output, configure as active low. The hc244d can sink 7ma nominal with 0.4v drop so a sink will drive the LED harder. you'll get nearer 8-9mA.

Also likely your parallel port is 3.3v out and BOB is expecting 5v signals (the 'logic high' for a 244d on 5v supply is 3.15v). too much preload is stalling the motors is a distant possibility...

Evengravy
12-07-2014, 03:55 PM
The drive current is unlikely to be the reason for missed steps. What optoisolators are they? More likely too much preload is stalling the motors or your parallel port is 3.3v out and BOB is expecting 5v signals.

Hi,

I check through the bearings yesterday and there were some bearings that were too tight indeed. Not sure what optical isolators are without opening the drive but the drive datasheet gives max 16mA per channel and the bob Schmitt gives a little over 7mA sourcing current.

I have a transistor system built to sink current from the ena-, dir- and step- such that I can wire the ena+, dir+ and step+ on drivers directly to 5v using the bob step dir ena to trigger the gates. Between the two I think I should have solved things but need to test it, I also ditched my mach3 machine and built a new rapid linuxcnc box that should help, my other machine was borderline. I scoped the output yesterday from the parallel port and it is putting out 5v.

The current sink arrangement was just confusing to me, I'm more used to working with n channel circuitry vs p channel I guess. the transistors gating the ground should solve things with minimal re-wiring and they are able to rise in 80-90ns and fall in 32ns so shouldn't impact timing.

thanks for the help, appreciate it, il report back when I get things tested,

irving2008
12-07-2014, 04:27 PM
I just edited my post having re-read the datasheets. The leadshine 16mA is a max value when using > 5v sources, used to calculate the additional external resistor, its not relevant here. On a true 5v drive with an open collector sink, the current will be 10mA. Using the existing BOB as a sink should work as would your additional output transistors (messy though). Timing isn't going to be an issue...


Hi,

I check through the bearings yesterday and there were some bearings that were too tight indeed. Not sure what optical isolators are without opening the drive but the drive datasheet gives max 16mA per channel and the bob Schmitt gives a little over 7mA sourcing current.

I have a transistor system built to sink current from the ena-, dir- and step- such that I can wire the ena+, dir+ and step+ on drivers directly to 5v using the bob step dir ena to trigger the gates. Between the two I think I should have solved things but need to test it, I also ditched my mach3 machine and built a new rapid linuxcnc box that should help, my other machine was borderline. I scoped the output yesterday from the parallel port and it is putting out 5v.

The current sink arrangement was just confusing to me, I'm more used to working with n channel circuitry vs p channel I guess. the transistors gating the ground should solve things with minimal re-wiring and they are able to rise in 80-90ns and fall in 32ns so shouldn't impact timing.

thanks for the help, appreciate it, il report back when I get things tested,

Evengravy
12-07-2014, 04:40 PM
Thanks Irving, just for reference then the sinking arrangement I posted is correct?

irving2008
12-07-2014, 04:50 PM
Your first picture, yes... I'd try that first before making an intermediate driver.. or change the BOB for one with better output drivers...
.
And don't connect motor supply and BOB supply grounds else you'll lose the isolation.



Thanks Irving, just for reference then the sinking arrangement I posted is correct?

Evengravy
12-07-2014, 04:52 PM
K, so can I just leave the BOB xn (GND) unconnected, that had me confused mainly

irving2008
12-07-2014, 07:34 PM
yes., assuming BOB xn(GND) and 5v GND are connected (I'd be surprised if they're not)


K, so can I just leave the BOB xn (GND) unconnected, that had me confused mainly