2 Attachment(s)
Re: DIY AC Servo Drive - ATMega based
Quote:
Originally Posted by
James Newton
First, HOW EXCELLENT! I'm very pleased to see you doing this and posting it open source.
I would be interested in making a PCB or 20 if you could post gerbers and a PDF or PNG or something of the schematic instead of the Eagle board files. I'm trying to avoid installing, but more importantly, learning Eagle.
Sorry Gerber output form Eagle seems to be buggy. However I exported some large images of the schematic and some HPGL files. It's most probably that you could import those PLT files in your CNC Software directly and make a PCB. There are 2 files, one for milling and one for drilling.
You can see how this file looks in my CNC software.
Re: DIY AC Servo Drive - ATMega based
to: mcm_xyz
why you dont try with stm32f103,
it is cheap and have encoder interface , 72mhz, 32bit with give bester performance
Re: DIY AC Servo Drive - ATMega based
Quote:
Originally Posted by
tivoidethuong
to: mcm_xyz
why you dont try with stm32f103, you can use with mikrobasic for ARM,
it is have encoder interface , 72mhz, 32bit with give bester performance
:)
I am old school... :) I need something that I can solder myself... Just kidding...
This has started as a hobby project. If in time something faster is needed I will probably switch to a different MCU.
However the goal for now it is for this project to be fully DIY!
Mihai
Re: DIY AC Servo Drive - ATMega based
Quote:
Originally Posted by
mcm_xyz
:)
I am old school... :) I need something that I can solder myself... Just kidding...
This has started as a hobby project. If in time something faster is needed I will probably switch to a different MCU.
However the goal for now it is for this project to be fully DIY!
Mihai
thanks you, exellent diy
Re: DIY AC Servo Drive - ATMega based
Pretty good news...
I've just made a quick dirty test... I've setup the MCU tu run with internal oscillator (8Mhz)... I am still able to achieve 1500 RPM so the speed limit I have now is given only by the power source... (Still waiting for the lab source)...
So basically with 20Mhz and same encoder (400 PPR) there will be no problem to reach 3-4000 RPM. This I think it's more than enough for many uses.
I've also changed the PID code allowing the integral part to accumulate more errors (10 errors in a shift register) and the movement is now even smoother...
The only drawback I feel now is that we do not have a current sensing circuitry. Maybe someone could help me with that and give me some ideas...
I will keep you informed and up to date with source code.
Mihai
PS. I managed to reach 2000 RPM with the actual power source by decreasing PWM Frequency by 8. But I hate the high frequency noise from the coils... :)
Re: DIY AC Servo Drive - ATMega based
Current sensing, i think you can user comparator like lm393,
detec peak current and check it every procedure UpdatePID
Re: DIY AC Servo Drive - ATMega based
First tests on my new Z axis (unfinished yet)... Please do not lough about my motor coupling :)
Things seem to be good enough
https://www.youtube.com/watch?v=6lVSf3y4Phs
Mihai
Re: DIY AC Servo Drive - ATMega based
Quote:
Originally Posted by
mcm_xyz
What you need is a precision current sense amplifier. Here are a few links to get you started;
http://datasheets.maximintegrated.co...s/MAX44285.pdf
http://cds.linear.com/docs/en/datasheet/6102fe.pdf
http://www.ti.com/lit/sl/slyb165g/slyb165g.pdf
See page 13 for TI current sense amplifiers.
Hope this helps,
Iron-Man
Re: DIY AC Servo Drive - ATMega based
1 Attachment(s)
Re: DIY AC Servo Drive - ATMega based
Hello dear machinists!
I am finally satisfied! The movement is now so smooth you can barely hear anything.
I am now sure we can reach 5000 RPM with 400 PPR encoder. (even if the motor says 3000RPM max )
I found a bug in mikroelectronica's UART library. Sometimes, especially after power failures, the MCU entered a state where no data could be sent to it via UART. So I wrote my own UART implementation and all works perfect now.
The sinus commutation table has been replaced by a square one and the PID process now controls PWM duty.
Besides the fact that the circuit misses a current detector all is perfect! For this time I will use it like this. I will buy a separate PSU for each controller, with a power matching the motor, limiting the current like this.
Also I received the LAB power source. The current consumption when no load is present is near 0!!!! Perfect again!
Here is the latest firmware (reaching V 1.3).
Enjoy the video!
Mihai
https://www.youtube.com/watch?v=x-4f_ng8s-Q
Re: DIY AC Servo Drive - ATMega based
Mihai, thanks for your share
Re: DIY AC Servo Drive - ATMega based
I believe you made the right call to ditch the sine table. Really just a truth table is probably the best. for whatever position the shaft currently is in you should always have the capability to apply full torque. My controller used 3 hall sensors and it was very easy to just look at the on/off status of all three input lines and pick one of six valid combinations. Very little overhead for this approach.
I cant wait to get a chance to try this out.
thanks
Marvin