Hello Guest it is July 27, 2021, 08:31:03 AM

### Author Topic: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..  (Read 2365 times)

0 Members and 1 Guest are viewing this topic.

#### joeaverage

• 6,455
##### Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
« Reply #30 on: February 06, 2020, 12:58:03 AM »
Hi,
I have drawn a somewhat simplified circuit diagram for one pulse input of your drive.

With reference to the attached diagram:

If you apply +24V at pin35 and 0V at pin 37 current will flow through the 2k parallel resistor R4, and through R3, R1, the photodiode, R2.
Note that the forward bias voltage drop of the photodiode is 2V.
The current is:
I= 24/2000 (through R4) +(24-2)/(2000+75+75) (through the forward biased photodiode)
=22.3mA

If you powered the photodiode by applying +24V to pin39 and 0V to pin 37 the current would be:
I=(24-2)/(75+75)
=147mA and the photodiode would be destroyed within micro seconds.

If you power the photodiode by applying +5V to pin 39 and 0V to pin 37 the current is:
I=(5-2)/(75+75)
=20mA which is entirely acceptable.

The termination of pin 39 allows the use of differential signal which can turn the photodiode on and off rather faster
than using 24V at terminal 35.

What must be avoided is the application of greater than 5V between pins 39 and 37 or the photodiode will blow.
My contention is that the first arrangement, namely using the in-built 24V supply at pins 17 and 14, and pins 35 and 37
of the photodiode input circuit is easier and more forgiving than differential signalling and even 200k pulses per second is
still very fast indeed.

Maybe at a later date you will want to try differential signalling, if you are demanding even faster axis speeds and/or higher resolution,
but for now stick with single ended signalling.

Craig
My wife left with my best friend...
and I miss him!

#### machiavellian

• 18
##### Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
« Reply #31 on: January 22, 2021, 08:01:22 PM »
Hi Craig,

Sorry to wake this sleeping thread.  It's just that reading thru this, I'm rather confused.  This stuff is out of my pay grade!  You've been so patient with @natefoerg, I'm hoping you or someone else can help me out while setting the record straight so folks like me in the future can 'skip to the end' and get the answers they need without wading thru pages of confusing detail.

I'm also trying to figure out how to hook up my CNCdrive AXBB-E to Delta ASDA-B2 servos as well.  So far I have the the ASDA's PULSE & DIRECTION input signals working by connecting them to AXBB-E's unbuffered outputs O9+ & O10+, O9- & O10- to 5V0 and it seems to work.  Is this correct so far?

Now I'm trying to get the AXBB to monitor the ALRM signal from DO5+ & DO5- (while trying to avoid frying anything) and have a few  questions:

1. Can I simply do the same as the pulse/direction controller output signals above, tie DO5- & I2- to 5V0 and DO5+ to I2+?  This is an isolated input on the AXBB, is +5VDC enough to trigger the input on isolated inputs?  Or should I get a AXBB breakout board and use an unisolated input?  Or should I be somehow using the 24V rail.  I hesitate doing this without clearly understanding doing this for obvious reasons.

2. Without going into the history of this machine (from China, its not short or pretty) it appears that the vendor was trying to wire servo ALRM outputs to the Estop CNC controller (it was a XHC MKX) input.  And the 24V estop button. Neither the estop nor servo alarms ever worked properly.  Question is, is it OK to gang all these outputs into one input on the controller like they did?  Or do they have to all go to separate inputs and use a brain to OR them together into an ESTOP signal of some kind?

3  Seeing as these servo driver outputs were apparently apparently subjected to 24 volts, can you summarize how to check inputs & outputs using a multimeter?  Again I'm confused by the detail above, all this wiring up transistors, etc, is it really necessary?

4. This is all the user should have to do to get safe & correct function, right?  Three pairs of wires, no commons.  Two pairs for step & direction.  One pair for monitoring alarms.  Am I missing anything?

Think twice before you G0 -Z...

#### joeaverage

• 6,455
##### Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
« Reply #32 on: January 22, 2021, 09:05:48 PM »
Hi,
I think you'll need a few more wires that that.

I'm wiring up my servos at the moment and in order to get the pulse rate I want I need to use differential signalling for
step and direction, ie a pair of wires for each.

I want one (for the moment, may have more monitors in the future) alarm per servo. Each drive needs an Enable signal and each drive needs
an AlarmReset signal and each drive needs a COM- that can be tied to the 0V of the BoB/controller.

Step = 2 wires
Direction= 2 wires
Alarm = 1 wire
Enable = 1 wire
Reset = 1 wire
Com- =1 wire
Total= 8 wires

On page 3-32 of the Delta manual I'm using circuit diagram C9. So the internal (to the drive) 24V supply (pin 17 CN1) is connected to COM+ (pin11 CN1)
with a short piece of wire within the plug. The digital inputs to the drive called SON (servo on) and ARST (alarm reset) are pins 9 and 33 CN1 per the default pinout
of CN1 page 3-22.

Note that the voltage on those lines is capable of 24V so cannot in any circumstance be connected to a 5V output on your BoB/controller. I got around this
by using a small NPN transistor as a level translator for each line, per the attached circuit diagram. The 5V output of my BoB turns on the transistor and the transistor
shorts to COM- the 24V via the optocoupler photodiode in the drive thereby forming an active low signal to the drive.

The default alarm output (DO) of the drive are pins 28 and 27 per page 3-21. I am using a variant of circuit diagram C5 on page 3-31.
DO5- (pin27 CN1) is connected with a short piece of wire within the plug to COM- (pin14 CN1). The Alarm output is pin 28 CN1 and it will short to COM-
any voltage on that line. Note DO NOT DIRECT CONNECT that line to any power supply or you will overcurrent and blow the transistor in the drive. The voltage
on the line MUST be supplied via a current limiting resistance. I would suggest 4k7 Ohm for 5V and 27k Ohm for 24V.

Craig

My wife left with my best friend...
and I miss him!

#### machiavellian

• 18
##### Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
« Reply #33 on: January 23, 2021, 04:10:04 AM »
Thanks for the timely and detailed response, Craig.  I'm happy to have found someone with a far deeper knowledge than mine who's willing to help.

First, we seem to be out of sync on page numbers.  I'm looking at this, which is the Delta ASDA-B2 user manual I'm using where details on CN1 begins: https://www.deltaacdrives.com/Delta-ASDA-B2-User-Manual.pdf#page=56  Am I looking at the right manual?

Regarding stepper signaling:

So if I understand correctly, you're aiming to use HPULSE+- instead of PULSE+-?  What are you setting in the servo's parameter P1-00?

On whether to use PULSE or HPULSE, on one hand I definitely like the idea of a higher pulse rate (faster, smoother moves).  On the other hand, I was getting along OK with a 500K pulse rate and I kind of fear potentially up to 8x faster moves.  To implement HPULSE I assume you've got a breadboard setup with transistor & resistor circuits wired up for each servo?  That seems doable, but breadboarding raw components is a little out of my depth and  downtime is killing me.  I really need to get this machine running so I can get on with my project before my wife files for divorce.  No, seriously, since I have the servos stepping what looks to be correctly on PULSE with non-isolated +5V outputs, are you just recommending an ideal config or am I doing something seriously wrong?

Alternatively (or I'm totally missing the point, it happens quite often) could I drive the servo's HPULSE input with the AXBB's isolated outputs (O1-O8) and bypass the breadboarding?  They can do 24V 500mA output.  Can you help clarify TTL (5V) vs. 24V signaling?  I think this is the sources of my confusion.

Regarding connecting CN1-11 to CN1-17, I think I get it, you're putting the servo into source mode [bottom of pg 3-21 (my link above)] that's what's putting you on +24V signaling.  But SON & ARST, on my machine nothing is connected and it works(?)  Is this overridden somehow in the parameters?  I've taken a look at params and don't see anything jumping out at me.  My cables only have 6 wires (see attached image), 2 for pulse, 2 for direction, and 2 for alarm.

Finally, about DO5 alarm output, I think I understand what you're saying, but it appears to be a powered output so why not just wire DOX- (pin 27) to, say I1- and DOX+ (pin 28) to I1+ and keep it fully isolated?

Thanks for your patience, I really appreciate it, Craig.  After staring at the manual for about five hours straight now it's starting to make a little sense.

FYI, just a little background for context, this machine had a bad crash for no apparent reason a few months ago and I've been trying to get it back into operation ever since.  Had to replace the spindle (bent, too much runout) & z-axis ballscrew.  I suspect line power fluctuation - I was running a heavy roughing operation but within parameters that ran fine before - 6061-T6,  1/2" roughing mill, .2 RDOC, .5 ADOC, 20K RPM, forget exact chipload but it was reasonable, maybe .002".  My theory is a servo alarmed, but the servos being improperly connected to the cnc controller by the manufacturer caused it to continue feed instead of estop retracting and this greatly compounded the problem.  So sorry if I'm more than a little paranoid here.
« Last Edit: January 23, 2021, 04:28:36 AM by Tweakie.CNC »
Think twice before you G0 -Z...

#### machiavellian

• 18
##### Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
« Reply #34 on: January 23, 2021, 04:11:45 AM »
Uh sorry for that giant image, should have downscaled it.  Apparently no way to remove it on edit(?)
Think twice before you G0 -Z...

#### Tweakie.CNC

• 8,734
• Super Kitty
##### Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
« Reply #35 on: January 23, 2021, 04:29:28 AM »
Uh sorry for that giant image, should have downscaled it.  Apparently no way to remove it on edit(?)

Resized it for you

Tweakie.
KEEP SAFE !

#### joeaverage

• 6,455
##### Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
« Reply #36 on: January 23, 2021, 03:18:28 PM »
Hi,
you are correct the manual I'm using has slightly different page numbers.

I'm using the line driver input pairs (37,39 and 41,43) but NOT the HighSpeed inputs (36,38 and 40,42).
The line driver inputs allow 500kHz signaling and yet I require 417kHz for my machine, so the 'plain' line driver inputs
are sufficient.

I have made circuit boards to interface between my BoB and the servo drives. I'll post a picture at a later date, I'm at home now and my machine
(under construction) is at work.

The wiring of CN1-11 and CN1-17 becomes clear in circuit diagram C9 on page 3-33. VDD (pin 17) is hooked to COM+ (pin 11) by a jumper in the plug.
All the digital inputs (DI's) become active low, per the example depicted in C9. In that particular case SON (servo on) is the DI depicted and if
pin 9 is pulled low (that is to COM-) then the servo is turned on. I'm using a transistor in my adaptor board to pull the input low.
Note that once you have wired pins 11 and 17 like this ALL DI's assume the same character. Thus the alarm reset signal, ARST, needs to be pulled
low, hence another transistor.

The two inputs, SON and ARST, in effect require three wires, one for each input, but also the COM- which establishes the 0V of the BoB/adaptor board
as the same potential as COM-.

Quote
But SON & ARST, on my machine nothing is connected and it works(?)

Yes, you can either hardwire SON to be permanently on, or program it to be permanently on, OR have a signal to it.....which is what I have done.
Its the norm in industrial practice to have a enable signal to each servo, and I have followed that practice, but its not strictly required.
If the servo never faults then you don't ever need to reset it and therefore ARST is not required. If the servo does fault and you need to reset it
in absence of a ARST signal you'll have to de-power then re-power the servo. I have elected to have a dedicated signal. On my Mach4 screen
I will have three LEDs indicating the fault status of each servo and a button to reset all of them.

Note that my controller has only one SON output and that enables ALL three servos. Also my controller has only one ARST signal an I'm applying
that to ALL three servos.

Each servo has its own fault signal however. If a servo faults I want to know which axis faulted, therefore combining all the fault signals together
would thwart that.

As far as the DO signal outputs. I have elected to wire CN1-27 to COM- CN1-14 and have just on wire attached to CN1-28 travelling back to my adaptor/BoB/
controller combination. You could as you say have two wires and therefore the transistor in the drive is isolated....but why? The transistor has
NO current limiting whether its isolated or not so the precaution about supplying external current limiting applies in either case. I elected a wiring scheme
that requires just one wire in the control cable rather than two, but that just a matter of preference. My scheme means that the DO is active low
which is symmetrical and 'philosophically' identical to my DIs, which is again my preference or 'style' if you will, rather than essential.

Quote
I was running a heavy roughing operation but within parameters that ran fine before - 6061-T6,  1/2" roughing mill, .2 RDOC, .5 ADOC, 20K RPM, forget exact chipload but it was reasonable, maybe .002".  My theory is a servo alarmed, but the servos being improperly connected to the cnc controller by the manufacturer caused it to continue feed instead of estop retracting and this greatly compounded the problem.  So sorry if I'm more than a little paranoid here.

A couple of things to consider here:
1) Limits. As you know the limits can be direct connected to the drive, and the drive is smart enough to stop but also prevent you from jogging even further
out of bounds to get the axis back. The drive could, if you program it, report the limit fault back to Mach and Mach could stop the other servos.
The other alternative, which seems simpler to me, and certainly more 'philosophically' familiar to me, is have the limit switches connected to Mach via the
BoB per normal and allow Mach to EStop all the servos.
2) Estop. You may have noticed there is a programmable DI called EMGS (CN1-30 by default) that if asserted will emergency stop the servo. You could wire your
machine such that if one EMGS is asserted it would stop ALL servos. I have not done so, for any particular reason, I'm quite happy with Machs EStop
arrangement as is. All my limit switches, the EStop panic button, the three servo alarm signals can individually set an EStop and the whole machine stops.

With regards the crash you had.....how have you setup the 'Following Error Window'?

A servo has a number of conditions where it faults, over-voltage, over-current and over-heat are usually immediate EStop conditions....but there are others
which are not immediate. Following Error is one.  You can program the drive to fault if the actual servo position deviates from its commanded
position by a certain amount, called Following Error. If the actual position deviates from commanded position then you will at least have an inaccurate
part but worse may be that one axis lags the other two and you end up with a crash.

When the drive comes from the factory the Following Error parameter is set very wide so that when you are tuning and setting up you do not get whole
bunch of nuisance trips. It is intended that you will narrow the window when you have tuned up. Have you done so? What may happen is that an axis
can lag 1/2 a revolution or so BEFORE an alarm condition is generated, but 1/2 a revolution could also mean CRASH.

Craig
My wife left with my best friend...
and I miss him!

#### machiavellian

• 18
##### Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
« Reply #37 on: January 24, 2021, 05:27:24 PM »
Thanks, Craig, it's all becoming a lot clearer.

I think (with your generous help) I have most issues sorted out.  So rather than going TLDR about that, I'm going to move on.  Just a few things - after more circuit tracing I discovered the manufacturer had connected the emergency stop button using it's 'NO' switches, not 'NC' as is correct practice.  I had just assumed it was correct.  I should have checked the switch operation first off, it would have made so things so much easier.

First new question, is it acceptable to tie all the ALRM outputs (DO5+ & DO5-) from all the servos together as was the machine wired by the manufacturer?  I can't seem to find anything in the manual on this.  (only stuff on cascading inputs not outputs)  I.e. these are active-low outputs, so if, say two are high and one low, will the signal go low?  Or will current flow from the high outputs across drivers as I expect and keep the output high?  I'd like to logically 'OR' these inputs together if possible, I don't have enough inputs on the controller to hook them all up separately along with zero switches, etc.  The manufacturer also had the emergency stop button tied in as well, and this common circuit was all hooked to estop.  Is this acceptable (if maybe not recommended)?  I think the root cause of my estop failure was the 'NO' estop button was causing many if not all the problems.  I'm kind of hesitant to just wire them back together and try now that it looks like I'm on course to getting things working & no fried electronics so far.

Related to this, is there any value to trigger a emergency stop on WARN signal instead of ALRM?  Reading the manual this signals first; I'd like to abort on the first sign of trouble.

For my usage I prefer to have any alarm or estop to just emergency stop the machine.  If this happens I can note any alarm codes, etc, and restart the machine since the job is likely botched or will need some level of manual intervention.  Just looking for shortest path to accomplish that.

Or perhaps separate inputs into three:  WARN, ALRM, ESTOP?  I think I can just afford three inputs on the AXBB controller.  That would keep stop options more flexible.

Regarding HPULSE, just curious, this seems superior to standard PULSE control.  Have you considered using HPULSE?  If you rejected it, can you share why?  I'd think with your advanced usage you would have opted for that.

About the crash, unfortunately I was a little shocked when it happened (it was a pretty loud bang) and I shut off the machine before noting alarm codes.  I recall the servo brakes let go and I could manually rotate them by hand which was unusual.  Several servos were in alarm condition before I powered the machine off.  Hmm, I think the controllers do keep an alarm history, I need to go back and search for alarms that might trace back to the crash...

On tuning (and troubleshooting) and this Following Error, I'll try to understand it better going forward.  The manufacturer had represented the machine as being well-suited & tuned for roughing 6061-T6.  However from what I can tell the servos had no real tuning done to them - comparing their settings to defaults only a few of the most basic parameters were changed.

Now that I'm basically re-engineering the machine I guess I need to take full responsibility for monitoring & tuning.  Thanks for bringing this up.  If you have any recommendations or suggestions for places to read up, watch videos, etc I'm keenly interested in learning more.

One of the things that both impressed and kind of disappointed me watching these servos in operation; even when running challenging jobs the motors never even get warm.  The electronics bay does get to maybe 90F, but nothing gets hot.  I was wondering if the hardware was anywhere near capacity.  Even as it is though, I'm really impressed at these servos - they're as strong, smooth & reliable as I could ever hope for.  Especially for their price, they can be had on Alibaba for really for cheap considering.

Thinking about it, going forward I probably need to dedicate some time to optimizing both G0 air-moves (where the driver automatic self-tuning might work well once I have limit switches correctly hooked up) and G1 material-specific optimization.  Or at least learning to monitor how close to or far from limits I'm pushing these servos (and the spindle) when running jobs.

Any knowlege you or others have to share on these monitoring & tuning topics, I'm sure would be welcome by more than folks just me.
Think twice before you G0 -Z...

#### joeaverage

• 6,455
##### Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
« Reply #38 on: January 24, 2021, 07:48:40 PM »
Hi,

Quote
First new question, is it acceptable to tie all the ALRM outputs (DO5+ & DO5-) from all the servos together as was the machine wired by the manufacturer?  I can't seem to find anything in the manual on this.  (only stuff on cascading inputs not outputs)  I.e. these are active-low outputs, so if, say two are high and one low, will the signal go low?

Yes, I think that would be permissible. I would however put a 50-100 Ohm resistor in series with each so that one sinking output does not current hog as is common
with BJTs. And.....Yes....if one (or more)  output goes low the signal will go low, and that constitutes a wired OR function.

I see no advantage in using WARN in preference to ALRM. In my previous post I explained that I was happy with what Mach4 does already so I'm not using the
Delta supplied EMGS DI at all, if Mach EStops then all step signals cease and therefore all servos stop. There may be subtle differences between EMGS and a Mach wide
EStop, things like is the servo still on, ie the state of SON but otherwise I'm happy with how Mach does it so I see no need to use the broadly equivalent Delta supplied
functions.

Note that if you use my suggestion and wire CN1-27 to COM- and one wire from CN1-28 (per servo) then all those wires can be combined (preferably with a 50-100 ohm resistor)
as wired OR, thus all your servo alarms  behave as one alarm.

I believe HPULSE is largely a PC to servo drive signalling mechanism, capable of MHz as opposed to plain line driving of 500kHz.

The B2 series has a 160,000 count per rev encoder, and with careful use of electronic gearing I have a solution that delivers 1um resolution (linear equivalent) and still allows
me to drive the servos to 5000rpm at 417kHz pulse rate. I do not need HPULSE so I didn't bother with it. If you had an A2 series or later with an 20 bit encoder, 1,280,000
count per rev, and you want even finer resolution than I require the HPLUSE would be the only viable signalling solution.

I have not experimented with it but I would suggest to you that signalling using HPULSE at low MHz rates, which is radio frequency, in a noise prone environment
is not likely to be easy. As it is, I was doing this over the Christmas break and I had no access to parts beyond what I had in stock. Thus I used what I had,
a dozen 300Mhz UnityGainBandwidth opamps, and made my own line drivers with them. As it turns out I can get my home brew line drivers to run at 3.5MHz driving
a 270pF line capacitance....so way WAY better than I need. I have experimented with my home brew line drivers and they work perfectly, I really see no need to invest
yet more time, energy and materials into an HPULSE signalling solution.....which will not yield any real benefits when using my mill. After all I want my mill to make chips....
not fly to the moon.

The short answer to your question is I did not use HPLUSE signalling because I did not need it and I suspect would take quite a bit of messing around to signal reliably
anyway.

Unless the load-to-motor inertia ratio is over 10-15 then self tuning should work fine. I have not experimented with my machine (still under construction) to even
know whether I could benefit from the notch filters for instance. Following error is not so much a tuning item as a machine accuracy parameter, and Delta can't set
that for you....you have to understand what it is and set it yourself to suit your machine.

Craig
My wife left with my best friend...
and I miss him!

#### joeaverage

• 6,455
##### Re: Mach3, Delta ASDA-B2, ESS. 12 straight hours working on this. could use assist..
« Reply #39 on: January 24, 2021, 07:57:56 PM »
Hi,
the FollowingError is called 'Excessive Error Warning Condition' in the Delta manual and is parameter P2-35.

Craig
My wife left with my best friend...
and I miss him!