HI Mihai
no no
i wants only that when we apply the motor power to drive it would not to free run for calibration..
shabbir
Printable View
HI Mihai
no no
i wants only that when we apply the motor power to drive it would not to free run for calibration..
shabbir
hi Mihai
can i use ATMEGA 162.
it has 16 kb flash
6 pwm 8bit
shabbir
Yes you can. It has all ports needed. You will have to modify the size of the array that holds the response positions required for sending to Servo tuning software wont fit (ATMega163 has only 1K RAM and ATMega644 has 4K). The current size is 1024 positions. You can lower it to 128 and still see the position response in good conditions.
The rest should be compatible with some minor changes.
Mihai
hi Mihai
thanks for info but a little problem more. i m not familiar to pascal .
help me in that u have said.
thanks
Hi Mihai
I get the mikropascal 4.6 .now finally decided to use mega 2560. As is Ur firmware. Mega2560 n 644 same price here.
But I want to learn little about Pascal
Shabbir
:wave:
I've modified the code further, adding an encoder look up table, eliminating this way all calculations required for position commutation shifting. Surprise! We got more than 20 kHz for PID frequency. The only drawback is that we can not use encoders with more than 3072 PPR because ATMega 644 does not have more memory to allocate a bigger table. However I do not think we could use higher PPR encoders before because of the immense frequency of pulses they have per rotation.
check out the latest version!
Mihai
hi Mihai
it a grate success .
keep it up.
thanks
shabbir
hi Mihai
please upload a video latest power on off n running.
thanks
Using the encoder for commutation is a really interesting solution. I like it a lot.
It occurs to me that since you are using a mikroelectronika compiler it would be a fairly easy process to port this to ARM (mikropascal for ARM). STM32 development has become dirt cheap and in some cases even less expensive than Arduino. Taking a wild guess I'll bet you could at least double or triple your maximum PID frequency, probably more.
Sometime in the next few weeks I plan to build at least one controller of your design. If that works out like I think it will I'll probably be building around six more.
Thanks for sharing your excellent work.
Marvin
Hello Marvin.
Porting the code for other mcus should be straight forward. The tough part is maybe initialization. There are tons and tons of differences there even between mcus on same architecture. I am really thinking about porting this to C and AVR Studio because mainly of the impact with community. There are far more fans. If you want to build this I suggest to use optocouplers for encoder, step, dir, and enable. I had quite a few problems when leveling with my controller. There are some cheap optocouplers that have logic.level outputs, also very cheap, also buffered with trigger schmidts.
http://www.tme.eu/ro/Document/85863b...11L1-2-3-4.pdf
Best regards
Mihai
Yes, I'm a big fan of optocouplers, and have been looking into adding schmidts to some of my own designs.
If you move away from ME compilers you will probably reach quite a few more AVR developers, ME stuff seems to be fairly umpopular on most AVR forums.
Of course nothing beats Arduino for popularity and huge user base who like to share. But I'm not sure how much performance hit you'd take running Arduino vs standard C.
Marvin
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