Re: DIY AC Servo Drive - ATMega based
Quote:
Originally Posted by
moghul
hi all
i found this another forum then i understands all bldc commutation signal where use.
"""
At power up, the UVW signals are present and they provide a low resolution "absolute position" feedback that tells the servo drive the electrical position of the servo motor rotor (electrical position is different from mechanical position due to multiple pole pairs in most servo motors - if the motor was 2 pole then electrical position would be equal to mechanical position). No movement of the rotor is necessary to initialize the torque angle in the servo drive. The torque of the servo motor is proportional to the sin of the angle so there is plenty of torque to start the initial motion even if the torque was off by as much as 45 electrical degrees (70% of peak torque would be available in this case). After power-up, the UVW signals are automatically switched over to the high resolution quadrature "incremental position" data and the once per revolution reference marker signal. As soon as the servo drive detects the first occurrence of the encoder marker signal the torque angle is adjusted in the servo drive to the near perfect value. The servo motor manufacturer mechanically aligns the marker pulse to provide the near perfect torque angle during manufacturing of the motor. If the motor encoder were to be removed or replaced then this alignment process must be repeated.
With the SureServo system, the UVW encoder signals are present at power-up for about 0.5 seconds. This gives the servo drive enough time to detect rough position of the servo motor rotor. After about 1/2 second, the motor encoder automatically switches over to high resolution ABZ data signals which the servo drive uses for real-time commutation of the brush less servo motor. With the first occurrence of the Z signal (marker pulse) the rotor angle inside the drive is set to the exact value. Hope this answers your question.
""""
thanks
shabbir
I do not have such encoders on my motor. Actually I do not even have Z output on my encoder, only A and B. So it's not possible for me to implement this.
Mihai
Re: DIY AC Servo Drive - ATMega based
Dear Mihai
yes
u r good programmer u can implement. its very nice for all. that we can use normal only ab r abz encoder for bldc.
i was just study why uvw encoder use. that i understand.
all ok
thanks.
shabbir
Re: DIY AC Servo Drive - ATMega based
Shabbir How far you have reached?.. Did you made the controller? any video?
Re: DIY AC Servo Drive - ATMega based
hi all
today i finally purchased all components for this.
now i will try to complete this in this week.
IN SHA ALLAH.
also i have to modify this for atmega 2560.
shabbir
Re: DIY AC Servo Drive - ATMega based
First, I wanted to say congratulations on a fantastic project so far. You've accomplished a huge amount in a very short period of time.
I wanted to touch on a couple of things that have been brought up in the thread already.
1. I think porting this to one of the more popular development platforms could be a huge advantage to user acceptance and people who could contribute to the project. For the hardware and firmware, the easiest choice would be to move to arduino, however the requirement for 3 hardware interrupts limits you to only the Mega 2560 platform. I haven't had a chance to dig through the code too much, but could you give some details on the requirements around the external interrupts? If we could get away with 2 hardware interrupts and 1 pin interrupt, then the rest of your listed requirements could be met by the very cheap Arduino Uno.
2. Would you be willing to transition to using an online repository to maintain your code? There's multiple to choose from, and I'm not partial to any, but I'd be happy to help maintain the code base (my day job) on github, sourceforge, google code, etc.
3. Micro Pascal and Delphi are going to be hard to find experts in. If we moved to arduino, then the microcontroller code is set. Would you consider moving the client application to maybe... .NET/Mono, java, or even some of the newer html/broswer based languages?
Again, a huge thank you from the community. I'm excited to give this a try and see what happens.
Re: DIY AC Servo Drive - ATMega based
Since I'm thinking in a similar project (I talked about it back in this topic), I think I can answer you (although my knowledge is a lot smaller).
The Mega 2560 board can be get pretty cheap, mine (Funduino brand, fully compatible) was 15 USD (shipping included). There are other arduinos with enough interrupts (I have a Pro Micro that have 5 external interrups, using the MEGA32U4).
BUT the arduino code is slow, but you can program them with C o Pascal without problem, that will be much faster. But as you said, this microcontrollers are more popular and pretty easy to find.
Re: DIY AC Servo Drive - ATMega based
arduino is the best i feel because it is available in all countries.
and noe made smd pcb .
i m also trying this in arduino mega 2560
shabbir
Re: DIY AC Servo Drive - ATMega based
I've seen some complaints about the execution speed for arduino code, so you're right, there's likely portions of the code that would need to be written in the lower level language. It would be nice to leverage the Arduino libraries for things like serial communication and configuration.
I also did a little digging and found the same thing, the Mega 2560 isn't that much more expensive. I'll pick a few up and see if I can get something prototyped. I'd be interested to see if you could do shields for multiple servo types since brushed DC servo's are a dime a dozen and could leverage the same PID and encoder code and just need a different output scheme.
Re: DIY AC Servo Drive - ATMega based
Arduino code is actually compiled C/C++. The code is not slow. What is slow are some of the libraries. They were written for ease of use rather rather than performance. But they are easily bypassed.
Re: DIY AC Servo Drive - ATMega based
I stayed away from Arduino for a long time, I was under the impression that it was running on an interpreter. But its compiled and like H500 said, its just some of the libraries that are slow. Whats so nice is the dirt cheap dev boards and HUGE user community. If Arduino is still too slow after some work you can just port the code over to a teensy3 or one of the other ARM-duino's out there. Cost-wise they are the same.
Re: DIY AC Servo Drive - ATMega based
hi
i buy arduino but i m not using arduino software for programming.
i m using avr studio. n then upload hex from isp r usb cable.
thanks
shabbir
Re: DIY AC Servo Drive - ATMega based
Quote:
Originally Posted by
S.A.C.
First, I wanted to say congratulations on a fantastic project so far. You've accomplished a huge amount in a very short period of time.
I wanted to touch on a couple of things that have been brought up in the thread already.
1. I think porting this to one of the more popular development platforms could be a huge advantage to user acceptance and people who could contribute to the project. For the hardware and firmware, the easiest choice would be to move to arduino, however the requirement for 3 hardware interrupts limits you to only the Mega 2560 platform. I haven't had a chance to dig through the code too much, but could you give some details on the requirements around the external interrupts? If we could get away with 2 hardware interrupts and 1 pin interrupt, then the rest of your listed requirements could be met by the very cheap Arduino Uno.
2. Would you be willing to transition to using an online repository to maintain your code? There's multiple to choose from, and I'm not partial to any, but I'd be happy to help maintain the code base (my day job) on github, sourceforge, google code, etc.
3. Micro Pascal and Delphi are going to be hard to find experts in. If we moved to arduino, then the microcontroller code is set. Would you consider moving the client application to maybe... .NET/Mono, java, or even some of the newer html/broswer based languages?
Again, a huge thank you from the community. I'm excited to give this a try and see what happens.
Hello
1. We only need 2 external interrupt pins. 1 for encoder, 1 for Step. (earlier versions needed 2 for the encoder, not needed anymore). Enable is handled now using a PCINT but because it's not a critical signal we can drop it if MCU is not capable for this and use a simple test in the main loop.
2. I would be very very happy if someone would create an online repository for this project. We could maintain all files there, including some documentation that is missing for now. The repository choice is entirely yours, as I am only familiar with TFS (Microsoft) at my work.
3. Mikropascal should be dropped I agree. But giving my expertise I started this project in my most familiar environment. I would opt for C and AVRStudio as the first alternative. The servo drive tuner software id badly written, fast and dirty. That one could be easily written in C# for eg.
Mihai