Shop OBEX P1 Docs P2 Docs Learn Events
Brushless servo drive — Parallax Forums

Brushless servo drive

ManAtWorkManAtWork Posts: 2,176
edited 2013-02-01 21:33 in Propeller 1
Hello,

here in the propeller forum most of the time the word "servo" means a small actuation device used in model vehicles or robots. Here, I mean something completely different: A controller for an industrial servo motor in the 1/2..2HP range used for positioning in CNC or automation machines.

I have built one, with a propeller, of course. As you can see in the pictures the PCB is quite small (46x94mm) when compared with other servo drivers in that power range. It is capable of delivering up to 12A continous and 20A peak per phase at a supply voltage up to 160V DC. The use of the propeller chip helped a lot keeping the hardware simple. The separate PID control loops for current, velocity and position and the handlers for the encoder, step/dir input and PWM output run in different cogs and therefore do not disturb the timing of each other.

I use a IMHO quite clever way to measure the motor phase current. I have conventional shunt resistors in the motor lines. Their voltage is modulated onto a HF signal which is transfered to the low voltage side with a small toroid transformer. The HF signal is then demodulated and measured with the sigma delta ADC feature of the propeller. So no expensive hall current sensors nor special HV chips nor external ADCs are required. Another pair of sigma delta ADCs is used for the position feedback input. So I can optionally use optical encoders or resolvers.

I haven't calculated the price of all components, yet, but except for the propeller chips itself there are not many expensive parts. So I think an end user price comparable to a gecko G340 should be possible.

Here is a video of the first test run:
http://www.youtube.com/watch?v=-UsIcyime04
The motor is a SanyoDenki brushless servo rated 200V and 750W. I mounted an external 2000 lines incremental encoder because the former owner wrecked the original one by hitting·the motor shaft·with a hammer.smiley-tock.gif

Cheers
600 x 393 - 77K
600 x 395 - 87K
800 x 458 - 156K
772 x 579 - 166K

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2010-07-31 13:17
    can you post some information about the precisision that is achievable with this kind of control?

    best regards

    Stefan
  • ManAtWorkManAtWork Posts: 2,176
    edited 2010-07-31 13:59
    Hello Stefan,

    errrr, depends.... Do you mean the precision of (static) position, dynamic following error, or the precision of the current control loop?

    The accuracy of static position is only dependant on the mechanical system and the precision of the feedback device. So with a standard 2000 lines incremental encoder the error would be +/- one count = 1/8000 revolution. If you connect the motor to a ball screw with 5mm pitch this would give a position error of 5mm/8000 = 0.625µm. If you like to spend more $ you could use a glass scale or a heidenhain rotary encoder with sin/cos output. This can be further interpolated to achieve higher resolution in the 10nm range or 10+ million counts/rev.

    Dynamical following error, however, is of course higher than one encoder count if the load changes or is accelerated. This depends on how high the control loop gain can be set without oscillations. With a stiff mechanical system, ground preloaded ball screws for example, following errors below 0.01mm or around 10..20 encoder counts can be achieved at a typical machning feed rate of 3000mm/min.

    The precision of the current control loop is not very impressive. The PWM cycle time is 41.6µs (1/24kHz) which translates to 3333 processor cycles at 80MHz. This results in a resolution a bit less than 12 bits for the ADC and PWM. The actual precision is much less. The error of the shunt resistor value, gain and offset error of the analogue circuit and inaccuracy of the sigma delta·ADC is more than 10%. But that doesn't matter much as any gain error is compensated by the surrounding velocity control loop. Even 20% wouldn't hurt. Offset is automatically adjusted by software. The analogue circuitry also adds some noise which can be heared as a soft audible noise with the motor acting as speaker. However, due to the mechanical inertia it has much less than one encoder count amplitude.

    Best regards
  • ManAtWorkManAtWork Posts: 2,176
    edited 2011-10-29 03:35
    It took over a year, now. I had to make two new board revisions and several software changes. But now the servo controller is ready for the first field tests. I added support for SanyoDenki brand absolute encoders with 17 bit resolution (131072 counts/rev). They have a strange 18-bit-frame serial protocol but since the propeller is good at bit banging it was no problem to implement it.
    Prototyp5.JPG

    Blast-Case.jpg
    800 x 476 - 74K
    800 x 543 - 139K
  • RaymanRayman Posts: 14,677
    edited 2011-10-29 04:57
    Nice looking device there!
    Would a similar circuit also control the brushless motors in an electric bycicle?
  • MicksterMickster Posts: 2,694
    edited 2011-10-29 05:30
    This is an outstanding development...well done!

    What is the maximum encoder frequency?
    Have you provided for complementary and index encoder signals?
    When will these be available for sale?
    Do you intend to develop a larger unit?

    Any more details would be greatly appreciated.

    Mickster
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-10-29 05:31
    I want to point to a IMO interesting encoder
    it's a magnetic incremental encoder with 12bit resolution (4096 inc/rev)

    http://www.austriamicrosystems.com/eng/Products/Magnetic-Encoders/Rotary-Encoders/AS5045

    ManAtWork I would like to know your opinion about this encoder

    I ordered three samples for free. I'm very curious how they will work.

    best regards
    Stefan
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-10-29 05:40
    It is quite wonderful to see the Propeller being used in a competitive industrial context and performing as good or better than other devices.

    I am sure this would work quite well with an electric bicycle, but that isn't really exploiting the full potential of the Propeller. Very nice work and I am sure that Parallax appreciates the proof of concept in an industrial servo context. For most of use, the cost of just one industrial servo is well beyond budget.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-10-29 06:10
    Congratulations MenAtWork. The board and casing look impressive and professional.
  • ManAtWorkManAtWork Posts: 2,176
    edited 2011-11-05 04:22
    Thanks to all for the tribute.
    Rayman wrote: »
    Nice looking device there!
    Would a similar circuit also control the brushless motors in an electric bycicle?

    Theoretically yes, at least the hardware could do but with a completely different software. The servo controller needs a high resolution encoder to work well whereas in a simple speed control application like bicycle or model aircraft/boats you don't want an expensive encoder but just hall sensors or no sensor at all.
    Mickster wrote: »
    What is the maximum encoder frequency?
    Have you provided for complementary and index encoder signals?
    When will these be available for sale?
    Do you intend to develop a larger unit?

    The max. encoder frequency is 1,000,000 counts per second or 250,000 cycles/lines per second. The feedback interface can handle complementary (RS442) or single ended TTL signals (A, B and index channel), complementary analogue signals (sine/cosine mode) or reference signal out, two amplitude modulated signals in (resolver mode).
    Yes, I plan to sell them starting next year, hopefully if nothing goes wrong. I already have plans for a unit with higher voltage (230Vac or 320Vdc input) and another one with higher current (up to 25A max continous). But first I have to debug the software carefully, otherwise I'd only produce expensive smoke.
    StefanL38 wrote: »
    I want to point to a IMO interesting encoder
    it's a magnetic incremental encoder with 12bit resolution (4096 inc/rev)
    http://www.austriamicrosystems.com/eng/Products/Magnetic-Encoders/Rotary-Encoders/AS5045
    ManAtWork I would like to know your opinion about this encoder

    This seems to be a smart chip for simple and low cost applications. I think there is no easier way to get relatively precise absolute position feedback. It can replace low cost encoders like HEDS54xx with the additional bonus of the absolute information. However, I think it also has some limitations. 12 bit is not much if you really need fast response and precise control. If your motor is one count (1/4096rev) off the nominal position, you only know the direction but nothing about speed and force/torque. You have to wait for at least 3 counts to calculate acceleration so you know the exact current you need to apply as countermeasure. For this reason it's always good to have one order of magnitude higher resolution than you need accuracy.

    For industrial control I like the encoders from SanyoDenki which offer 17 bit resolution. It's not only accuracy, you also hear much less noise (grunting, squealing) due to quantisation errors ("stair-casing") at low speeds. To provide a low cost solution I even developed my own optical encoder. It has only 400 lines/rev but it doesn't output phase shifted square waves but instead sine/cosine waves. They can be interpolated by A/D converting and an arctan calculation resulting in a resolution of over 400,000 counts/rev! I know, such devices are already available, but not affordable.
  • ManAtWorkManAtWork Posts: 2,176
    edited 2011-11-05 04:27
    Thanks to all for the tribute.
    Rayman wrote: »
    Nice looking device there!
    Would a similar circuit also control the brushless motors in an electric bycicle?

    Theoretically yes, at least the hardware could do but with a completely different software. The servo controller needs a high resolution encoder to work well whereas in a simple speed control application like bicycle or model aircraft/boats you don't want an expensive encoder but just hall sensors or no sensor at all.
    Mickster wrote: »
    What is the maximum encoder frequency?
    Have you provided for complementary and index encoder signals?
    When will these be available for sale?
    Do you intend to develop a larger unit?

    The max. encoder frequency is 1,000,000 counts per second or 250,000 cycles/lines per second. The feedback interface can handle complementary (RS442) or single ended TTL signals (A, B and index channel), complementary analogue signals (sine/cosine mode) or reference signal out, two amplitude modulated signals in (resolver mode).
    Yes, I plan to sell them starting next year, hopefully if nothing goes wrong. I already have plans for a unit with higher voltage (230Vac or 320Vdc input) and another one with higher current (up to 25A max continous). But first I have to debug the software carefully, otherwise I'd only produce expensive smoke.
    StefanL38 wrote: »
    I want to point to a IMO interesting encoder
    it's a magnetic incremental encoder with 12bit resolution (4096 inc/rev)
    http://www.austriamicrosystems.com/eng/Products/Magnetic-Encoders/Rotary-Encoders/AS5045
    ManAtWork I would like to know your opinion about this encoder

    This seems to be a smart chip for simple and low cost applications. I think there is no easier way to get relatively precise absolute position feedback. It can replace low cost encoders like HEDS54xx with the additional bonus of the absolute information. However, I think it also has some limitations. 12 bit is not much if you really need fast response and precise control. If your motor is one count (1/4096rev) off the nominal position, you only know the direction but nothing about speed and force/torque. You have to wait for at least 3 counts to calculate acceleration so you know the exact current you need to apply as countermeasure. For this reason it's always good to have one order of magnitude higher resolution than you need accuracy.

    For industrial control I like the encoders from SanyoDenki which offer 17 bit resolution. It's not only accuracy, you also hear much less noise (grunting, squealing) due to quantisation errors ("stair-casing") at low speeds. To provide a low cost solution I even developed my own optical encoder. It has only 400 lines/rev but it doesn't output phase shifted square waves but instead sine/cosine waves. They can be interpolated by A/D converting and an arctan calculation resulting in a resolution of over 400,000 counts/rev! I know, such devices are already available, but not affordable.
  • TinmukTinmuk Posts: 15
    edited 2013-01-31 20:43
    ManAtWork,
    I saw this thead and was very interested as i have a Brother TC-217 CNC mill that uses Sanyo Denki servos and I want to retrofit it to more modern drive and control system.

    Is this the unit you describe inthis thread - DC servo amplifier UHU 120V 12A? I found it at Benezan-Electronic.de, I assume that is your site?
  • ManAtWorkManAtWork Posts: 2,176
    edited 2013-01-31 23:35
    Yes it's my site, but the UHU DC servo is the predecessor of the current development. It is based on the UHU project by Uli Huber, an AVR processor with an ingeniously small and simple program for servo control. Unfortunatelly, it has the limitation of beeing suitable only to DC motors and has resolution/frequency limits.

    The hardware of the new brushless drive is working, the propeller software is nearly completed. The only thing still missing is the PC software for tuning and parameter adjustment. This seems to be only a small task but is in fact the hardest work and absolutely required to sell the thing to the public market. There's no progress for two years now and it's absolutely frustrating that a good idea is wasted by not completing the project. But I have to admit that I don't have the time and money to do it because I'm busy with other projects I'm payed for.
  • MagIO2MagIO2 Posts: 2,243
    edited 2013-02-01 02:33
    Why do you need a PC program for parameter adjustment? You can simply use a terminal software on PC-side and let the propeller send a nice ASCII-based input-mask for maintaining the parameters.
    Need some help?
  • ManAtWorkManAtWork Posts: 2,176
    edited 2013-02-01 03:40
    Hello MagIO2,
    this is exactly how it is solved at the moment. I can send ASCII input to a command line parser and tune the PID controller and other parameters by trial and error. I'm sure most of us here in the forum would be happy with this. But the average engineer that has to install a servo drive to a machine doesn't want to. If I'd sell it like this my phone was busy all the time by customers complaining.

    My idea was to
    1. provide a nice PC program with GUI to enter the motor parameters or select a set of parameters from a predefined list of known motors (easy job, mostly done)
    2. provide an autotuning feature for the non-obvious PID parameters. I've already implemented a scope function that can send a plot of several parameters (torque/current, velocity and position deviation) as funtion of time to the PC. The PC software could then do a fourier analysis and compute the PID values from it. (I know, this could also be done inside the propeller but is much easier if you have unlimited memory and it doesn't have to be real-time)
  • TinmukTinmuk Posts: 15
    edited 2013-02-01 21:33
    I'm glad to hear the project is not dead, only delayed. I think there is a market for this and if you were to finish you would be able to sell them to people like me with older CNC's that have obsolete servo drives. I even bought a box of dead Sanyo drives in hopes of resurrecting two of them for my mill.

    Brother was very helpful by providing full electrical scematics, but unfortunatley they have no info on these older drives and Sanyo did not have any info either. So I an stuck trying to troubleshoot the drives I have or search Ebay for working drives.

    I hope you can find some time to finish this!
Sign In or Register to comment.