586,113 active members*
3,495 visitors online*
Register for free
Login Register
HEIDENHAIN Forum
Open Source Controller Boards > DIY AC Servo Drive - ATMega based - Page 6
Page 6 of 14 45678
Results 101 to 120 of 264
  1. #101
    Join Date
    May 2006
    Posts
    190

    Re: DIY AC Servo Drive - ATMega based

    Hello again!

    I've made some additional optimizations in code and got the PID to work at 9.12 kHz! very good...
    Also there is a new procedure in place allowing a 5 % decrease in power when motor is in stopped position making this way the vibrations induced by the integral windup ZERO!!! so there are no more unwanted vibrations when stopped.
    Also there is no decrease in actuation performance, the servo response curve is near perfect, only 13% overshoot and 52 ms settling time for a 100 steps jump.

    I will come back with pictures and videos of my new router when a new encoder for the third axis will arrive. I accidentally connected it wrong and smoked it... shame on me...

    For now the new firmware...

    Mihai

    PS. I see a growing interest in this project. Rest assured, it will newer transform in a commercial one. But I am interested for a better design in the schematic and board. If someone could improve it, this could be a nice addition. Also it would be nice to separate the inputs for step / dir / enable with optocouplers and maybe even the encoder, given the advantages and the low price for such circuits.
    Attached Thumbnails Attached Thumbnails ServoResponse.jpg  
    Attached Files Attached Files

  2. #102
    Join Date
    Oct 2005
    Posts
    10

    Re: DIY AC Servo Drive - ATMega based

    do you test in code something like this to prevent anti windup


    If(PWM_out {
    process integral calculation
    }

  3. #103
    Join Date
    May 2006
    Posts
    190
    Quote Originally Posted by grabik View Post
    do you test in code something like this to prevent anti windup


    If(PWM_out {
    process integral calculation
    }
    Yes, simple protection like this is also present. However if the motor refuses to stay in a certain position when power is not applied, because of the magnets inside, then we have a problem. Something had to be done to be able to stop.
    Check the code.

    Mihai

  4. #104
    Join Date
    May 2006
    Posts
    190

    Re: DIY AC Servo Drive - ATMega based

    3 servo drives working on my new router. Max speed you see is 10 meters / minute.
    System seems to be ok. After a hour long program zero position is kept, so no steps lost.
    Enjoy

    Mihai

    https://www.youtube.com/watch?v=T7vj81t6yPk

    PS. Video is public now.

  5. #105
    Join Date
    Mar 2005
    Posts
    159

    Re: DIY AC Servo Drive - ATMega based

    Hello Mihai,

    That's great news. I can't wait to get mine working.
    I tried to watch the video but it says "Private".
    Would really like to see it.

    Thanks
    James

  6. #106
    Join Date
    Jan 2005
    Posts
    1695

    Re: DIY AC Servo Drive - ATMega based

    Looks good. It would be interesting to see the maximum acceleration /deceleration capabilities once the parameters are optimized.

  7. #107
    Join Date
    Mar 2005
    Posts
    159

    Re: DIY AC Servo Drive - ATMega based

    That does look good. Nice and smooth.
    Totally the reason for getting away from stepper drives.
    Can't wait!

    James

  8. #108
    Join Date
    Dec 2008
    Posts
    28

    Re: DIY AC Servo Drive - ATMega based

    Excelent work! Next step is test it under a load.

    Mihai, what kind of encoders you are using, model number?
    Thanks

  9. #109
    Join Date
    Apr 2006
    Posts
    85

    Re: DIY AC Servo Drive - ATMega based

    hi
    i want to make this but here atmega 644 is not available. but i can found atmega 2560.
    help me for this.
    also available atmega 88 n 162.
    shabbir

  10. #110
    Join Date
    May 2006
    Posts
    190
    Quote Originally Posted by boldive View Post
    Excelent work! Next step is test it under a load.

    Mihai, what kind of encoders you are using, model number?
    Thanks
    http://www.protehno.ro/rotary-encoders/module/1161169/

  11. #111
    Join Date
    May 2006
    Posts
    190
    Quote Originally Posted by moghul View Post
    hi
    i want to make this but here atmega 644 is not available. but i can found atmega 2560.
    help me for this.
    also available atmega 88 n 162.
    shabbir
    I just looked over atmega 2560 datasheet. It has all the features needed. Lots of pwm outputs, adc, uart, external interrupts. You just have to change the pin out, maybe some additional initializations.
    You can use 6 pwm outputs in 16 bit mode so in theory you can make the movement smoother.

    Mihai

  12. #112
    Join Date
    Apr 2006
    Posts
    85

    Re: DIY AC Servo Drive - ATMega based

    Hi Mihia
    Thanks for reply. Now I start study of Ur last firmware.
    One question more.
    All 3 phase a.c. servo drives use commutation feedback must. But in here it is not used.
    I m feeling after watching Ur video there is no problem in this.
    Thanx
    Shabbir

  13. #113
    Join Date
    May 2006
    Posts
    190

    Re: DIY AC Servo Drive - ATMega based

    Somebody asked me about acceleration... Check this out. Movement on X axis (left to right) in the middle of the movie is done from limit to limit so practically deceleration is enormous.I also have some other changes in firmware and servo tuning program. I will post asap.

    Mihai

    https://www.youtube.com/watch?v=AuhWhJ6WaOs

  14. #114
    Join Date
    May 2006
    Posts
    190

    Re: DIY AC Servo Drive - ATMega based

    Quote Originally Posted by moghul View Post
    Hi Mihia
    Thanks for reply. Now I start study of Ur last firmware.
    One question more.
    All 3 phase a.c. servo drives use commutation feedback must. But in here it is not used.
    I m feeling after watching Ur video there is no problem in this.
    Thanx
    Shabbir
    No. No back EMF or Hall Sensors are used. As I explained before, the motor is initialized first by applying power to 2 phases, then it is kept in phase by the encoder. So very important to know is: Encoder PPR and motor Poles.

    Mihai

  15. #115
    Join Date
    May 2006
    Posts
    190

    Re: DIY AC Servo Drive - ATMega based

    New firmware in place. Ver 1.5
    Major changes: Enable / Disable is done by interrupts now.
    Stop position stabilization is done by decreasing ki and kp values.

    Servo Drive Tuner
    You can see the encoder register now if you want.

    Mihai

  16. #116
    Join Date
    Jan 2005
    Posts
    1695

    Re: DIY AC Servo Drive - ATMega based

    Here is a very low cost 400 ppr encoder that might be suitable for this project.
    Encoder 400P R Incremental Rotary Encoder AB 2 Phase 6mm Shaft 5V 24V W Coupling | eBay

  17. #117
    Join Date
    Feb 2007
    Posts
    966

    Re: DIY AC Servo Drive - ATMega based

    Hi Mihai
    One simple thing you could add is a voltage divider to one (or 2) of the A-D pins to be able to measure the power supply voltages for "Low Voltage detection".
    This lets you only enable the output if the voltage is over 15 volts , because if the voltage dips lower, then you will blow the mosfets if they are under biased.
    Also you can measure the voltage rise during braking and fault if it is over a limit.
    It also tells you if main power is on.

    Larry

  18. #118
    Join Date
    Dec 2008
    Posts
    28

    Re: DIY AC Servo Drive - ATMega based

    Quote Originally Posted by H500 View Post
    Here is a very low cost 400 ppr encoder that might be suitable for this project.
    Encoder 400P R Incremental Rotary Encoder AB 2 Phase 6mm Shaft 5V 24V W Coupling | eBay
    It looks like the shipping cost can change the story.

    There are few available encoders for reasonable price:
    non-contact, magnetic AMS AS5040-ASSU
    or something like CUI INC AMT312Q-V

    Magnetic is very cheap and has high resolution.

  19. #119
    Join Date
    Jan 2005
    Posts
    1695

    Re: DIY AC Servo Drive - ATMega based

    Quote Originally Posted by boldive View Post
    It looks like the shipping cost can change the story.
    That vendor sold out, possibly because I linked to their site. Shipping was free when they had stock. Several others are offering the part at the same cost with free shipping.

    The magnetic chip looks interesting, but I'm not sure how accurate it is. I think they are using an estimator algorithm to increase the reported resolution, like some of the CUI's. Any lag would making them unsuitable for some applications.

    The low cost Chinese units might be doing the same also. If I don't already have 10 HEDS 5500's lying around, I would purchase one just to test.

  20. #120
    Join Date
    May 2006
    Posts
    190

    Re: DIY AC Servo Drive - ATMega based

    Quote Originally Posted by Larken View Post
    Hi Mihai
    One simple thing you could add is a voltage divider to one (or 2) of the A-D pins to be able to measure the power supply voltages for "Low Voltage detection".
    This lets you only enable the output if the voltage is over 15 volts , because if the voltage dips lower, then you will blow the mosfets if they are under biased.
    Also you can measure the voltage rise during braking and fault if it is over a limit.
    It also tells you if main power is on.

    Larry
    Interesting ideas. Noted. it's easy to implement in future versions.

    Mihai

Page 6 of 14 45678

Similar Threads

  1. Servo module for UHU based drives now available.
    By H.O in forum UHU Servo Controllers
    Replies: 1
    Last Post: 01-24-2022, 03:11 PM
  2. Servo drive with ATMEGA
    By mcm_xyz in forum Servo Motors / Drives
    Replies: 1
    Last Post: 12-15-2014, 01:12 AM
  3. Suggestions on New VSD-Core Based Mains Powered Drive
    By Adamj12b in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 4
    Last Post: 05-05-2009, 08:28 PM
  4. Pic based servo motor drive
    By ahmedrehan in forum PIC Programing / Design
    Replies: 7
    Last Post: 08-08-2007, 01:08 AM
  5. I need help on PC-based for servo control
    By NASR1 in forum Servo Motors / Drives
    Replies: 1
    Last Post: 08-14-2006, 09:43 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •