Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: jlbs00 on December 13, 2017, 04:27:00 AM

Title: Delta servo and uc 300 5 lpt motion controller.
Post by: jlbs00 on December 13, 2017, 04:27:00 AM
Hi all,
I am very new to cnc and I want to convert my conventional lathe to mach 3 based cnc.
I have got 750 watts delta asda-b2 series servo drive and motor and uc300 5lpt motion controller.
My first question is does uc 300 works with servo drives? If yes how to interface it with mach3 ,Bob and servos.
If I want to use servos in velocity or torque mode.from the drives documentation I understood that there are pulse and sign inputs whereas mach 3 gives step and dir signals. So how to interface mach3 with servos,using uc300 5 lpt motion controller.

Can someone plz help me with this.
Thanks and regards
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: joeaverage on December 13, 2017, 09:11:07 AM
Hi,
yes the UC300 will drive servos just fine.

The pulse/sign signals are the same as step/direction. If  you want velocity or torque mode you wont be using step/direction though, those modes
require an analogue voltage (or current).

If you wish to do threading then I would recommend step/direction control, it results very VERY tightly controlled motion just perfect for threading.
Some servos offer two modes of control selectable by the state of one input pin. Would allow you to have a velocity mode spindle for the majority
of operations and switch over to step/direction for threading.

Craig
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: jlbs00 on December 14, 2017, 04:14:04 AM
Hi Craig,
Thanx a lot,
 So, that means I have to use my servo drive in position control mode.my requirement mostly will be plain and profile turning and boring.so,will position mode be ok for my operations?secondly can u help me with  signals from mach 3 to uc300 to my servo drive asda-B2-0721( I mean which signals to use,I m kinda lost there).
If it's position control mode,will I be getting the reqd torque or power from the drive.
Your answer will help me a lot.
And thanks once again for replying.

Regards
Jeetesh
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: joeaverage on December 14, 2017, 04:30:39 AM
Hi,
no, you don't have to use position control. Position control is very precise and good for threading but even for threading you can use just speed control.

I suggest then that you concentrate on velocity mode control. Once your familiar with that some of the other strategies will make sense but for most of the
time velocity control will be good for what you want to do.

You will need to program the drive to accept an analogue voltage as a velocity control input.

You will also need the UC300 and BoB to produce an analogue voltage from PWM.

There will probably be two (at least) other control signals between the UC300/BoB and drive, an enable signal to the drive , a fault signal from the drive
to the BoB/UC300 and possibly a fault reset line as well.

What BoB have you attached to the UC300? Can you post the manuals?

Craig
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: jlbs00 on December 14, 2017, 09:54:20 AM
hi,
thx for the quick reply and sorry to reply u late,
i am trying to upload the bob manual for last 2 hrs but its not uploading.
so i am posting a link of the bob manual.

http://www.tinycontrols.com/datasheets/PP-BOB2-v2.pdf



regards
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: jlbs00 on December 14, 2017, 10:01:33 AM
also attaching servo drive manual
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: ger21 on December 14, 2017, 10:29:25 AM
Which UC300 do you have, USB or Ethernet?
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: jlbs00 on December 14, 2017, 11:38:18 AM
It's a usb uc300
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: joeaverage on December 14, 2017, 10:47:06 PM
Hi.
the BoB manual tells us that you have an optpisolated PWM output on pin 17.
Using the UC300 plugin assign Machs PWM output to pin 17 of port 1, which should in turn operate the PWM output
on pin 17 of your BOB. Note that you'll need an isolated 10V supply. For testing purposes you could use a 9V battery
but a mains derived 10Vdc supply would be best. Another alternative is to use a linear reg to drop the 24Vdc auxillary supply
available from the drive to 10V. An LM317, a couple of resistors and capacitors and you'd be fine. Let me know if you need
a sketch of the circuit.

With a modest load on the output pin, say 1-2kOhm you should be able to measure a voltage corresponding to spindle speed
by issuing S*********x commands at Machs MDI line. If you can do this you are well on your way to effective speed control of
your spindle.

Craig
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: jlbs00 on December 15, 2017, 03:42:40 AM
Hi,
Thanks Craig for the immense help,I will follow your instructions on spindle,but I was talking about axis drives.
I am using the above said servo drive for my X and Z axis.
Will uc 300 be helpful with axis movement.
If yes how can I wire or configure it for moving my axis.

Regards
Jeetesh
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: joeaverage on December 15, 2017, 12:23:39 PM
Hi,
well, that's a different kettle of fish altogether.

You need position mode. Forget velocity and torque mode, they don't provide positional motion.

With the exception of the extra enable, fault and fault reset wires the servo drive behaves and is wired the same as a stepper drive.

Craig
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: joeaverage on December 15, 2017, 01:20:27 PM
Hi,
as a preliminary matter there are a couple of things to think about and decide. The drive manual does not tell me the number of pulses the encoder will produce.
I'm going to assume it has a 2500 line (ppr) encoder for 10,000 counts per revolution. 10,000 count per rev is now the entry level standard for differential encoders
while 17bit seems the standard for absolute encoders.

If your servos are capable of 3000 rpm (50 rev/sec) then the encoder will count 50 x 10,000=500k per second. To get maximum resolution would require Mach,
your UC300 and BoB to produce pulses at 500kHz. The specs for the drive input alone say that open collector the input speed max is 200kHz so you will require
differential signalling, ie using two wires rather than just one. This is certainly possible but will markedly increase the difficulty of getting your machine to work.
Sensible decisions about speed and resolution will bring the pulse rate back to 200kHz, ie open collector, and be very much easier to get to work.

You need to decide what you think is a reasonable maximum axis speed which will determine the max rpm of the servo. While it is nice to have full resolution ie
10000 steps per rev, ie 2.6 arc min/step, with a 5mm pitch ballscrew that results in a linear resolution of 0.5um, very good indeed. Can you really use this very
fine resolution, unless you have a hundred thousand dollar plus machine then the answer is probably not. If you decided that a 0.005 mm (5um) resolution is
adequate then the calculation starts to look a lot more achievable.

If you wish to have max speed, ie 3000 rpm (50 rev/sec) at a resolution of 1000 count per rev the numbers are: 50 x1000 =50kHz, easy! In fact you could increase the
resolution and still be comfortably within the open collector limit. Say resolution of 2.5 um, ie 2000 count per rev with a 5mm pitch ballscrew:
50 x 2000 =100kHz. This would be a good compromise.

You may ask how you can vary the resolution of the servo, surely that is fixed by the encoder? That is what 'electronic gearing' is provided for. It allows you to program
your drive so that one step pulse can mean one or more encoder pulses, very convenient and very very crafty, it allows you to use a servo with a built in encoder
to behave as if it had a different encoder fitted if you were replacing an existing device for instance.

Can you post some of the numbers that relate to your machine, ballscrew pitch etc and the specs of the servo you've got, speed and encoder count?

Craig
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: ger21 on December 15, 2017, 02:16:50 PM
The USB UC300 has a max pulse rate of 200Khz. The UC300ETH goes up to 400Khz.
I use the UC300ETH, with a UB1 breakout board, which has differential step/dir.
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: joeaverage on December 15, 2017, 02:34:51 PM
Hi ger21,
I have an ESS which is supposedly good to 4MHz! I suspect that this really only of significance as an input, who tries to signal to a servo drive
at 4Mhz?. I found it entirely enough of a battle to differentially signal my Allen Bradley servo at 480kHz let alone MHz. Even then I realised that I was
trying to achieve best possible resolution which is far far better than I could ever use and so made a rational decision about resolution and got back to
open collector signalling rates.

Natural inclination is 'I'm going to build this sucker to go at max speed with max resolution at max power' and then realise its just not possible or practical.
Rational decisions can reduce those hurdles to manageable.

Craig
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: ger21 on December 15, 2017, 02:45:19 PM
I recently ran into an issue with a Leadshine AM882 drive.
I was just doing some testing with a single stepper motor on a test bed.

The drive has a max input of 200Khz. When I set the UC300ETH at 200Khz, the drive wouldn't see the pulses correctly when the pulse rate went over ~130Khz. But with the UC300ETH set to 400Khz, I was able to send pulses right near the 200Khz limit of the drive.
I was spinning the motor over 3000RPM with 1/16 microstepping.
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: joeaverage on December 15, 2017, 02:54:20 PM
Hi ger21,
whoops, I try to stay comfortably within the specs for this reason.

Do you have a scope? Would be nice to see the waveform at max speed, could it be input capacitance of the drive dragging the output of the BoB down
or is the BoB output just not plain fast enough?

Craig
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: ger21 on December 15, 2017, 03:10:35 PM
No, I don't have a scope, or even know how to use one. :)

Since I won't be running the motor anywhere near the speeds I was testing at, I'm not too concerned about it.

It's not the breakout board. I'm using a UB1, which is based on the MB2, that was designed to work with the ESS. It's an excellent, high quality breakout board.

When I get a chance, I'll wire up the DMM servo I have and do some more testing at high pulse rates.
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: jlbs00 on December 15, 2017, 10:47:19 PM
Hi,
Thanks Craig and Gerry for the quick help,
As per my servo specs,it has a 17 bit incremental encoder and it's 3000rpm and 2.4nm torque. My ball screw is 32mm dia 5mm pitch and I plan to have 2:1 reduction.
A 2.5 microns resolution is perfect for me cuz it's a conventional lathe and I don't intend to use it at full 3000rpm,cuz with reduction it will automatically be half of full rpm.thats fine for me.
  My drive manual says it can accept frequencies of max 200khz with open collector and 500khz with line driver.
I will definitely go with open collector to reduce the complications.
So, how to hook up signals coming from uc300 and Bob to drive.
Do I need some additional driver circuitry for open collector (I.e from mach3 to uc300 to Bob and in between Bob and drive do I need to put any driver).
Or I can directly feed the signal from uc300/Bob to the pulse/sign input of the drive?

Regards
Jeetesh

 

Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: jlbs00 on December 15, 2017, 10:52:55 PM
Or even a resolution of 5 microns is even fine for me.
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: joeaverage on December 16, 2017, 12:28:26 AM
Hi,
I think that if your servo has a 17 bit encoder then it will be absolute and if memory serves it has a resolution of 131,072 counts per rev.

Lets work backwards and say that for simplicities sake you wish to keep the pulse rate to 100kHz. I imagine you'll still wish your servos to achieve max speed,
ie 50 rev/sec. Therefore the resolution is limited to:
100,000 / 50 =2000 counts per rev.

The electronic gear ratio is 131072/2000= 65.536   If you read the manual the gear ratio can be selected with two numbers, a numerator and a denominator.
Both numerator and denominator have to be integer and less than 65536. The exact ratio could be achieved by selecting numerator as 65536 and denominator
as 1000.

Just as a matter of interest with a 2:1 reduction and your servos having 2000 count per rev resolution your linear resolution would be:
5 (mm/rev) / (2 (gear reduction) * 2000 (servo count per rev)) = 1.25um, pretty damn good. Your Steps Per, that you would put in the motor tuning
would be 800 step/mm. If the servos reach their max speed the axis velocity in the motor tuning page would be 7500 mm/min, there again that's great
speed for a hobbyist machine.

I imagine you'll have a breakout board between the UC300 and the servo drive. Unless you bought an absolute dog any breakout board should do 100kHz
in a canter. ger21's recommendation, a UB1 sounds good.
There should be no extra circuitry required between the BoB and the drive. Probably a good idea to use a shielded cable and don't make the cable
any longer than it need be. Microphone cable would be a good idea, its beautifully flexible and shielded to preserve low level signals, two wires plus the shield.
That would cover your Step and Direction signals.

As I posted earlier you will need some extra wires, they will not be high speed signalling wires. One will be a Mach output from the UC300/BoB to the drive
to enable it. There will be one wire from the drive to a digital input on your BoB/UC300 to Mach to flag a fault. The last wire will be an output from Mach
to rest the fault condition. Note this last wire could probably go to the fault reset input of both servo drives.

You'll need to program your drive. I see in the manual that Delta produce software to allow you to easily program you drive. Do you have it? My Allen Bradley
servo can only be programmed this way, and its very very good. It has a database of all the servo motor models with all the limiting values, physical, thermal
and electrical characteristics and makes choosing and defining parameters for your application easy.  Delta drives can also be programmed with the digital
keypad, tedious but doable.

The essential parameters to set are that you wish to use step/direction position control. You need to set the electronic gearing numbers. There will also be the
limiting values, things like max speed, max current, overload duration and others. Hopefully Delta's setup software will provide all of those.
You will need to assign the digital inputs, your enable and fault reset signals and one digital output, drive fault signal.

Most servo drives, I haven't read the manual closely enough yet, allow you to hook limit switches direct to the drive. As you know it is common in Mach to hook
limit switches to your BoB/UC300 to signal Mach and Mach shuts down as a result of a over limit excursion. With a servo drive you can, within limits, program
what you want to happen. The limit switches would be hooked direct to the drive and would stop the servo from exceeding the limit  and would prevent any jogging
which would take the axis further out of bounds. It will if you wish signal Mach on an output of your designation of the condition. It could trigger some automatic
response like rehoming as well. I've not heard any argument that suggests that hooking limits to the drive offers any compelling advantage over hooking the limits
to Mach. As I'm using my servo as a spindle I've not had to worry about it. My suggestion would be to hook your limits to Mach in the normal way to start with.
If a reason comes up to change that strategy do it then. Keeping it simple to start with is probably the way to go.

You may have noticed in the manual that you can directly jog a drive by using two inputs per your designation and those inputs could be hooked to physical buttons
via your UC300/BoB. Likewise you can program a number of positions that can be selected by reading a number of digital inputs of your designation. In short the
servo drive has many more options than is required for your lathe but could be a great deal of use in huge printing press for instance which could have hundreds
of servos for any number of tasks. That those options exist does not mean you have to use them but could be useful to you at a future time.

Craig
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: ger21 on December 16, 2017, 06:47:30 AM
The UB1 breakout board only works with the ethernet UC300ETH. it won't work with a USB UC300.
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: jlbs00 on December 16, 2017, 01:11:18 PM
S0 I will use the drive in position control mode and do u think my Bob that I have  can be used or shall I have to buy UB1.
But again if I go for ub1 Bob it only works with uc300eth as said by Gerry
Cuz now I am planning to run the setup on table before connecting to the actual machine.,hope it works well,and if I have still anyn

Regards
Jeetesh  mm
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: joeaverage on December 16, 2017, 02:53:05 PM
Hi,
the BoB you've already got will probably work. The documentation is very light on detail. In particular it does not specify the characteristics of the outputs 2-9.
To hook direct to your servo you want open collector outputs capable of sinking current and can withstand 24V. I suspect that they can't withstand that voltage
and will have to be buffered before it can be used. I think also that you'll probably need two of them.

Each one has only 5 inputs, you'll need two for the fault lines which leaves only three for all the limits, homes etc.

My I suggest that you try the one you have on the bench to see if will work OK and then decide if you want or need another one. The only way to
know if it can handle the 24V opencircuit voltage of the servo drive input is to hook it up and try it. It is quite possible that it will damage the BoB.
The safe way would be to hook up a transistor/mosfet or buffer IC. How are your electronic skills?

There are BoBs on the market that will handle 24V, they would have to be chosen with care but they are out there.

Craig
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: jlbs00 on December 17, 2017, 02:24:32 AM
Once again thx Craig,
I will try the Bob I have on the desk and see if it can handle 24v,can u let me know how to hook a transistor ,mosfet or buffer ic .all I know is some basic electronics.can u give me a ckt. Diagram along with part number to hook to my Bob.
Regards
Jeetesh.
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: joeaverage on December 17, 2017, 02:38:36 AM
Hi,
you have to decide whether you'll try to hook it up without a transistor/mosfet and risk blowing it or use a transistor/mosfet. It'll be too late
if you decide to hook it direct and it can't handle it.

Craig
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: jlbs00 on December 17, 2017, 03:44:26 AM
Hi,
I don't want to blow it anyway.
Better to be safe than sorry.
Can u help me with a circuit diagram on how to hook a transistor or a mosfet or a buffer ic to the Bob.

Regards
Jeetesh
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: joeaverage on December 17, 2017, 12:13:51 PM
Hi,
you'll need at least four of these circuits, one each for Step and Dir for both servos. You'll probably need another four eventually, one for enable and one
for fault reset for both servos.

Given that you have to signal the Step pins at 100kHz it maybe that a simple transistor like this will be inadequate. If that's the case we'll use an IC.
Try the transistor to start with. Note I used a BC547 as I have hundreds of them but any small signal NPN transistor would do.

Craig
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: jlbs00 on December 17, 2017, 01:28:43 PM
Thx Craig,
I guess I can start now but on the desk and not on the actual machine.once my bench setup is complete and servo motor is running as desired,I will go for the actual setup on my lathe.
I can't thank you enuff Craig for supporting me so much.
I will let u know the results asap.
Regards
Jeetesh.
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: jlbs00 on December 25, 2018, 09:37:13 AM
hi craig
,i am coming here after a year almost.just got  some time to setup my bench setup of delta servo uc 300 and mach 3.i tried as we discussed.but my servo motors not moving .then i tried a parallel setup with stepper motor and the same bob,uc 300 and mach 3 and it worked.but with servo i havent got any luck in moving it.i just checked voltage levels of outputs from my bob and it shows near to 5 v(precisely 4.89v).
               i feel pulse and sign inputs for delat servo drive asda b2 is 24v.i tried to read the manual but couldnt found it anywhere written in the manual about the magnitude of signals to fed to pulse and sign inputs.
all i can get is written open collector outputs.
can u plz help with this
thx and regards
jeetesh
 and yes merry xmas to you.
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: joeaverage on December 25, 2018, 04:28:45 PM
Hi,
the UC300 is  a 5V TTL device. You would be most unwise to hook it directly to ANY other device that either has onboard a differing
power supply voltage or even requires a signal source of a different voltage.

If, for instance, the Delta servo drive has a input hooked via a resistor to 24V expecting your input device (the UC300) to sink current and
'drag' that 24V down to near zero then there is a high probability that the 24V will damage the TTL output of the UC300.

For this reason you need a buffer or amplifier that adapts the 5V TTL output of the UC300 to the 24V Delta servo drive.

As I posted earlier a simple NPN transistor (or a N channel MOSFET) would be a simple way to do it. You would require one for each
input (1 step plus 1 direction for two servos, (1+1) x 2 =4) and one for each servo enable line, ie another 2 transistors. You may wish to
consider additional circuitry for each of the servo drives to signal the UC300 if a fault occurs with either drive. This could be done
with a resistor and a zener diode. As you can see this dictates that you will have to solder together six transistors, 8 resistors and two
zener diodes at a minimum. If you are not electronically inclined that may rather put you off. I am electronically inclined and trained and so
would happily persue this idea where you may not.

As Gerry has pointed out the UB1 breakout board includes all that circuitry. Exactly why it would not work for a USB connected UC300 is a bit
of a mystery to me. I think it would be worth an email to the manufacturer to ask if that is the case and if there is a modification that would
allow a USB connected to be used. Gerry is clearly impressed with the quality of the UB1 and with Gerry's experience that comes as a high
recommendation.

Craig
Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: jlbs00 on December 26, 2018, 02:32:44 AM
Hi,
Thx for the reply,I have hooked my uc300 on to a Bob and  from Bob to the transistor ckt.  That u have given in the ckt diagram above.the only thing is that I made the ckt on a breadboard.as far as UB1 is concerned ,as Gerry said it only works with uc300eth whereas mine is uc300 usb.
             Second thing is that I tried to run the stepper motor with the same connections (I.e pc( mach3) to uc300usb,to bob,from Bob to stepper drive) and it works well and the stepper motor runs smoothly.
But when it comes to driving a servo motor,it's not working.can u plz tell me if pulse and sign of the servo drive is to be given 24v signals as uc300 is a ttl device,and how to get 24v signals from a 5v Bob.can u suggest some circuitry.
Thx and regards
Jeetesh


Title: Re: Delta servo and uc 300 5 lpt motion controller.
Post by: joeaverage on December 26, 2018, 02:50:36 AM
Hi,
the same single transistor circuit I posted earlier will work on a UC300 output OR an output of you existing BoB.

Note that it will 'invert' the logic. Thus if the UC300/BoB output is high (5V) then the transistor turns on and it sinks current reducing
the collector voltage to VCEsat, about 0.2V, ie low.

You will need at least three such circuits to get one servo to work, one for the step, one for direction and one for servo enable.

Craig