Hello Guest it is March 29, 2024, 08:58:09 AM

Author Topic: AC servomotor calibration problem  (Read 5961 times)

0 Members and 1 Guest are viewing this topic.

Re: AC servomotor calibration problem
« Reply #10 on: September 01, 2017, 07:32:35 PM »
One more thing, the things you said about pulsrate and not being able to use the 4 MHz made me look for the bob´s spec´s but it says nothing about pulsrates. Do you know how fast those optocouplers are. The board is one of the cheap ones from ebay, called universal mach3 usb parallelport bob. (usb only for voltage supply). I have a pic but i can´t seem to find a way to post it here.
Re: AC servomotor calibration problem
« Reply #11 on: September 01, 2017, 08:21:29 PM »
Hi,
have been looking at the manual and found:
Quote
S-0-0032, Primary Mode of Operation
which sounds very hopeful because the nexy entry is:
Quote
S-0-0033 Secondary Operation Mode 1
Description:
The first secondary operation mode is reserved for the jogging operation
for DKC.
Any other auxiliary operating modes are not permitted.

so while is has a primary and secondary mode the secondary is reserved for on-drive jogging....bugger!

Your requirement are that you be able to perform indexable operations but also require max speed from the spindle. Even if indexing is not required at high
speed as you have only one mode of operation available to you then your solution is to choose the compromise between the two.
May I suggest that you keep the signalling rate to about 200kHz , beyond that and you will start encountering speed difficulties. You've already identified
one, the cheap optos used on breakout boards are unlikely to go anywhere close to 200kHz.

Say you assume a top speed of 3000 rpm...that is 50 revs/sec. 200,000/50=4000. So if you program your encoder to give you 4000 counts/rev then you can
achieve you max speed comfortably. 4000 counts/rev is an angular resolution of 360/4000=0.09 degree or 5.4 arc min, very acceptable. If that were direct
coupled to a 5mm pitch ballscrew it would be equivalent to a 1.25um linear resolution. Any man, hobbyist or not, could be proud of a machine that could turn
in that sort of resolution! The question is are you?

It is not necessary to set a high pulse rate to achieve smooth or quiet operation of a servo, that comes from the concept of microstepping which is a valid
technique to get smooth motion from a stepper motor.

The ESS will require a breakout board and I doubt the one you have will work well enuf. I use two break out boards from Homman Designs in Austrailia, I
live in New Zealand and as much as it pains me to admit it some of those bloody Aussies are really clever and relatively close, they don't have opto isolators.
You need to be a bit careful about what the various IO is hooked to so that power supplies don't fight but the speed is determined by the TTL buffers, easily in
the MHz range. Even if you get a breakout board without optos and with TTL buffers you will still need to use differential signalling and a twisted pair cable to signal
your drive at 200kHz or better. Are you electronically inclined? A simple line driver IC will do the trick over a few meters. Other than making one yourself you could
probably buy something pretty cheaply....they are really simple/small after all.

I have not used Mach3 turn. I know there is a feature that allows you to maintain a constant surface speed but as I say have not used it. I have done plenty of
manual turning over the years on all sorts of lathes none of which had infinitely adjustable speeds and I made plenty of good ********* on them. Is it that important?
Anyway the setup we're talking here can handle that easy.

While the servo software may run on a XP machine you should be able to set up your drive which is then programmed onto an EPROM and thereafter you don't
need the setup software at all. That's certainly how the Allen Bradley software works, I program the drive on any computer that has the Ultraware software on it
and the I take it away and put it on my mill which doesn't have the setup software on it!.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: AC servomotor calibration problem
« Reply #12 on: September 01, 2017, 08:35:56 PM »
Ok so endgame here is, getting a faster breakoutboard and then play with the setup of velocity vs speed and find a good compromise. I think 2000 rpm is good enough for this little lathe.

As i said it´s not about precision but the sound and vibes. This servo sounds precise as a stepper just louder, but only when i use step mode, so guess the motor is ok.

When i get the smoothstepper i will set it up and then i will return to you with the result and if it´s still wrong, i will take a video so you can see and hear how it acts.
Craig, again thanks a lot..
Re: AC servomotor calibration problem
« Reply #13 on: September 01, 2017, 09:00:58 PM »
Hi,
just having a look at PMDX-126 breakout board, depending on where in the world you are may be a good bet, $174US, so not cheap but VERY capable
and reputation for backup is 'best in the business' and you'll only need one, it can handle two 'ports' worth of IO.

Am a bit surprised about the noise. I wonder if you have got it set up for 'exact stop' mode or the servo equivalent of. My servo scarcely hums even at
3500 rpm, have to be carful at slow speeds unless you can actually see something turning its easy to reach in without realising its still running.

Anyway once you get your ESS you'll start to make progress. If you haven't used one before may pay to get in some 'patience pills', you will end up
scratching your head to start with.

Do you have a licenced copy of Mach3? It is not possible to upgrade from Mach3 to Mach4, you have to buy anew, so if you haven't already paid for Mach3
you should consider going straight to Mach4. I changed over to Mach4 at the end of last year. Mach4 is new and still developing, for milling/routing it good
to go as is, and for turning ops, not far behind although I cannot personally attest to that.

Anyway good to talk to you, report back once you get some results...your experience will help others.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: AC servomotor calibration problem
« Reply #14 on: September 01, 2017, 10:23:05 PM »
Hi,
try per page 6.4 and 6.5 'Position with Following Error'. If you go with 'Position without Following Error' you get a harsh control much like a stepper motor
whereas the 'with Following Error' option allows the acceleration discontinuities to smoothed.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: AC servomotor calibration problem
« Reply #15 on: September 01, 2017, 10:32:38 PM »
Hi,
apologies those page references should be 6.1 and 6.2.

Note also in figure 6.4 Stepping Motor Interface on page 6. 4 that the max switching frequency is 175kHz.

I'd be tempted to say you could push that a wee bit, 200kHz you would probably get away with. My Allen Bradley drive allows step/dir signals to 500kHz.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: AC servomotor calibration problem
« Reply #16 on: September 03, 2017, 05:39:38 AM »
Hi,
not quite sure yet but yes it would appear that you can program the resolution of the encoder...page 1.4
Quote
The number of steps per rotor revolution is adjustable between 16 and
65536.
If that the case then why choose max resolution of 65536? That equates to and angular resolution of 20 arc seconds! If your machine is rigid
and accurate enuf to demand a resolution of 20 arc minute let alone 20 arc second then you should be on a professional forum not a hobbyists one!
Additionally if you think you are going to successfully signal your drive at close to 4MHz your dreaming.

The solution I came up with for my servo driven spindle is:
Program the drive to operate in two different modes, the first, simple velocity mode using analogue voltage and, the second, with step/dir position
control.

Most of my milling ops can be done under plain velocity control, in fact its quite adequate to have just a knob you lean over and twist until the tool is
cutting as you want and the leave it there for the rest of the op...in some cases hours. This is the first of the control stratgegies and is selected by one
digital input (pin4 from memory) being held low by Mach. When I want position control for rigid tapping I go to the other mode by asserting the input
pin high. Typically when I'm tapping I don't tap at 3500 rpm! 100 rpm is fine and consequently the pulse output rate is 13kHz, in fact well within the
pulse rate of a parallel port let alone my ESS. As it turns out ESS can signal 467kHz no probs and my drive can receive 500kHz with differential signalling
but transmitting signals of that frequency can be fun and ultimately not even really useful or required for mill operations.

I haven't read the Bosch manual enuf to know whether it allows this dual mode strategy, my Allen Bradley drive does and I've seen it offered in other
makes as well and guess it is therefore standard fare for modern drives. If it is it would allow you to get simple speed control running and then put
your thinking cap on for the indexing mode. I doubt you will need anything like the max speed of the spindle when indexing and so when you 'gear it
down' (electronically speaking) you don't have to sacrifice resolution hugely and yet still end up with a pulse rate that means you don't have to be an
RF/ High Speed Digital engineer to get it to work.

Craig
Hi again Craig.
I looked in to the solution of driving the servo in analog interface but i am kinda lost, since i am a novice to this. In my manual i can see that via a potmeter to ired 1and 2 i can control torgue or in jogmode velocity and then it says analog signal to e1 and e2. Now it seems you are an expert in this so i hope you have paitience enough to explain to me how i setup this analog mode.
Re: AC servomotor calibration problem
« Reply #17 on: September 03, 2017, 07:14:28 AM »
Hi,
if you require your spindle to do indexing operations then you need to use position control per section 6 in the manual. 'Position
with Following Error' is the right dynamics mode (sounds and vibes) and on the screen on page 6.3 the right choice is about 4000 pulse
per rev.

If you just want to get your spindle going and make some chips then you use section 7 Drive Control with Analogue Interface. On the screen on
page 7.2 you can set the voltage, offset and speed that you wish. Note that at no time do you need to set the 'pulse per rev' that's required
for position control not speed control.

Just as an aside this servo doesn't have an encoder at all, it has a resolver, a very VERY groovy technique from
analogue days, makes me come over all misty eyed! The pulse per rev setting is actually a programmatic setting for the 'Resolver to Digital' converter
in the drive. Thats how Bosch managed to achieve what is to all intents and purposes a programmable resolution encoder...CLEVER!

Anyway back to analogue speed control....with the settings made per 7.1 and 7.2 all that is now required is to enable the drive and apply a voltage.
To enable the drive (fig 10.56 page 10.54) apply +24VDC to pin 1 X4 with 0V pin 4 X4 and have your BoB or even a short bit of wire apply 24V to pin 3 X4.
Lets for the moment imagine that you selected 10V as max command value and 2000 rpm as max commanded speed. For the moment assume 0V offset.
If you apply 5V between pins 1 and 2 connector X3 per page 7.3 then the servo will run at half speed, ie 1000 rpm. Apply 1V and it will run at 1/10 full speed ie 200 rpm.
The voltage applied could come from PWM from Mach via a low pass filter on your Bob or even easier from a potentiometer hooked to your drive.
Some PWM don't actually quite get to 0V, some hang up about one diode drop above earth at 0.7V. If your PWM is like this use the offset of 700mV
to counteract it. A potentiometer should get to 0V so the offset can be 0mV.

Given how simple having a potentiometer is you should probably have a go just to prove to yourself that you can. On page 7.4 is a circuit diagram of the analogue
input. Note that it says a max of 15V input, DON'T exceed it or will blow it up. Ideally you would get a 10 or 12V regulated DC supply or if you want spindle to go
backwards a -12V, 0V, +12V supply. Why  would you want to go backwards though? You'll need a potentiometer, anywhere between 1 kOhm to 10 kOhm  will be
fine, 10 kOhm is a bit like an arsehole...everyones got one! Hook one of the outside pot terminals to +10V, the other outside terminal to 0V AND pin 1 X3. The centre
pot terminal to pin 2 X3 and the servo should run. If it seems to be going backwards swap the connections between pins 1&2.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: AC servomotor calibration problem
« Reply #18 on: September 03, 2017, 07:25:25 AM »
Hi,
if you require your spindle to do indexing operations then you need to use position control per section 6 in the manual. 'Position
with Following Error' is the right dynamics mode (sounds and vibes) and on the screen on page 6.3 the right choice is about 4000 pulse
per rev.

If you just want to get your spindle going and make some chips then you use section 7 Drive Control with Analogue Interface. On the screen on
page 7.2 you can set the voltage, offset and speed that you wish. Note that at no time do you need to set the 'pulse per rev' that's required
for position control not speed control.

Just as an aside this servo doesn't have an encoder at all, it has a resolver, a very VERY groovy technique from
analogue days, makes me come over all misty eyed! The pulse per rev setting is actually a programmatic setting for the 'Resolver to Digital' converter
in the drive. Thats how Bosch managed to achieve what is to all intents and purposes a programmable resolution encoder...CLEVER!

Anyway back to analogue speed control....with the settings made per 7.1 and 7.2 all that is now required is to enable the drive and apply a voltage.
To enable the drive (fig 10.56 page 10.54) apply +24VDC to pin 1 X4 with 0V pin 4 X4 and have your BoB or even a short bit of wire apply 24V to pin 3 X4.
Lets for the moment imagine that you selected 10V as max command value and 2000 rpm as max commanded speed. For the moment assume 0V offset.
If you apply 5V between pins 1 and 2 connector X3 per page 7.3 then the servo will run at half speed, ie 1000 rpm. Apply 1V and it will run at 1/10 full speed ie 200 rpm.
The voltage applied could come from PWM from Mach via a low pass filter on your Bob or even easier from a potentiometer hooked to your drive.
Some PWM don't actually quite get to 0V, some hang up about one diode drop above earth at 0.7V. If your PWM is like this use the offset of 700mV
to counteract it. A potentiometer should get to 0V so the offset can be 0mV.

Given how simple having a potentiometer is you should probably have a go just to prove to yourself that you can. On page 7.4 is a circuit diagram of the analogue
input. Note that it says a max of 15V input, DON'T exceed it or will blow it up. Ideally you would get a 10 or 12V regulated DC supply or if you want spindle to go
backwards a -12V, 0V, +12V supply. Why  would you want to go backwards though? You'll need a potentiometer, anywhere between 1 kOhm to 10 kOhm  will be
fine, 10 kOhm is a bit like an arsehole...everyones got one! Hook one of the outside pot terminals to +10V, the other outside terminal to 0V AND pin 1 X3. The centre
pot terminal to pin 2 X3 and the servo should run. If it seems to be going backwards swap the connections between pins 1&2.

Craig
great Craig
i will go and try it out just for the fun of it. think i will make the final decision when i also have tried the step mode with the smoothstepper.
I can't say this enough. i apriciate your help so much. if all people were like this the world would be a better place..
Re: AC servomotor calibration problem
« Reply #19 on: September 03, 2017, 07:42:16 AM »
Hi,
nice of you to say but you haven't met me...easy to be nice over the internet...but you may want to shoot me in real life.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'