Alt. firmware and GUI for Thanos's AMC1.5 & AMC1.6

AMC, H-Bridge projects etc.
Please use the image gallery for your pictures, a short tutorial can be found here.
The first image in the first post will be shown in the project gallery.

Re: Alt. firmware and GUI for Thanos's AMC1.5 & AMC1.6

Postby speedy » Sun 14. Oct 2012, 21:31

Hi Prilad:
Good day my friend ...

1- I want to ask if the latest FW [ the one with the dip#3 & dip#4 functions ] can Now Normally be Used with the x-sim program USO output ... ? or back to the previous one ? ... I mean did you Added these functions to the FW ? ... OR replaced other functions with them ?
2- Should the parser line be exactly like this [AB~255~~a01~~a01~]. OR, can I use the actual axes names [AB~255~~FR~~FL~] ... ?

Note: The FR name stands for [front right] actuator ...The FL name stands for [front left] actuator ... As there will be another com port with another parser line to the second AMC board of the other actuators .

My friend ... As I have by now one ATMEGA644 [it's OK not burned and not used yet] ... waiting for testing your 4DOF Russian system .
Привет из Египта

regards
spe ;) edy
User avatar
speedy
 
Posts: 148
Images: 4
Joined: Thu 19. Apr 2012, 06:46
Location: Alexandria, Egypt
Has thanked: 14 times
Been thanked: 2 times

Re: Alt. firmware and GUI for Thanos's AMC1.5 & AMC1.6

Postby prilad » Mon 15. Oct 2012, 07:57

Hi, Spe ;) edy

speedy wrote:1- I want to ask if the latest FW [ the one with the dip#3 & dip#4 functions ] can Now Normally be Used with the x-sim program USO output ... ? or back to the previous one ? ... I mean did you Added these functions to the FW ? ... OR replaced other functions with them ?


The latest FW is fully functional version. I only added some new "test" functions, don't replace any other.

speedy wrote:2- Should the parser line be exactly like this [AB~255~~a01~~a01~]. OR, can I use the actual axes names [AB~255~~FR~~FL~] ... ?

I think there is no different. FW is waiting from PC next byte sequence: 0x41, 0x42, 0xFF, byte4, byte5 - 5 bytes.
0x41 - ASCII code of char 'A',
0x42 - ASCII code of char 'B'
0xFF - hexadecimal digit = 255
Last two bytes (byte4 and byte5) - two axis positions.

And this is parsers work to translate any lines (like [AB~255~~a01~~a01~] or [AB~255~~FR~~FL~]) to needed byte sequence.

speedy wrote:My friend ... As I have by now one ATMEGA644 [it's OK not burned and not used yet] ... waiting for testing your 4DOF Russian system .


No problem... Ups!! One problem :D I can create FW for 4DOF, but ATMEGA644 has only one 16-bit timer. Unlike ATMEGA64 (It has 3 16-bit timers). Therefore, for ATMEGA644 FW will have two 10-bit PWM and two 8-bit PWM. I don't think that it big problem... But I need to compare It before...

regards,
Ale
User avatar
prilad
 
Posts: 174
Images: 1
Joined: Tue 3. Apr 2012, 14:20
Location: Dubna, Moscow reg., Russia
Has thanked: 3 times
Been thanked: 37 times

Re: Alt. firmware and GUI for Thanos's AMC1.5 & AMC1.6

Postby speedy » Mon 15. Oct 2012, 19:50

Hi Prilad:
That's my friend ... a great news indeed ...

Sorry I miss typed ~a01~ twice .it should be [AB~255~~a01~~a02~]=[AB~255~~FR~~FL~]
my eyes are crossed again but I've got what you mean ...
Google не имеет шестигранную языка перевода :lol:

actually you previously wrote that ATMEGA64 but I thought you missed the last number 4 ... :roll:
now I know your excellent in numbers but not in English like me . :D

Q- [in English please ] ... What is the biggest deference between 8-bit and 10-bit PWM in real simulator motion effects ? .. What will be missing at the end ? the game data follow up speed will be effected ? the very fast movements and bumps will be missing or misrepresented , Road ripples sucks , ... what ?

regards
spe ;) edy
User avatar
speedy
 
Posts: 148
Images: 4
Joined: Thu 19. Apr 2012, 06:46
Location: Alexandria, Egypt
Has thanked: 14 times
Been thanked: 2 times

Re: Alt. firmware and GUI for Thanos's AMC1.5 & AMC1.6

Postby tronicgr » Mon 15. Oct 2012, 20:30

The Atmega64 is SMD part!! QFN64.... Not easy to handle and solder. Unless you know what are you doing... :roll:
User avatar
tronicgr
 
Posts: 624
Images: 11
Joined: Tue 20. Mar 2012, 22:10
Location: San Diego, CA
Has thanked: 130 times
Been thanked: 50 times

Re: Alt. firmware and GUI for Thanos's AMC1.5 & AMC1.6

Postby prilad » Mon 15. Oct 2012, 20:57

Hi, Speedy!!!

speedy wrote:What is the biggest deference between 8-bit and 10-bit PWM in real simulator motion effects ? .. What will be missing at the end ? the game data follow up speed will be effected ? the very fast movements and bumps will be missing or misrepresented , Road ripples sucks , ... what ?


I'm not the x-sim practice. :( I am a theorist. ;) As I say before, I have not any x-sim hardware yet. But I have own opinion about your question. And I think that you will not see the difference between the 8-bit and 10-bit PWM. Because accuracy of PWM only affects the accuracy of setting the motor speed. And does not affect anything more.
What that mean? Motor speed is proportional to PWM level. And not more...

Speedy, In what extent your 4DOF hardware is ready? I will try to make FW for you with 8-bit and 10-bit PWM for testing and comparison. ;)

thanos wrote:The Atmega64 is SMD part!! QFN64.... Not easy to handle and solder. Unless you know what are you doing... :roll:

Yes, yes and no. That's why I do not publish my AMC project yet. But I have the opportunity to order the production of boards industrially. So for me there is no problem in using QFN64 and other SMD parts. I say more - in my own applications i'm using the chip in TQFP144 package like these

http://ru.rsdelivers.com/product/altera/ep2c5t144c8n/fpga-cyclone-ii-ep2c5t144c8n-tqfp144/6244206.aspx


Regards,
Ale
User avatar
prilad
 
Posts: 174
Images: 1
Joined: Tue 3. Apr 2012, 14:20
Location: Dubna, Moscow reg., Russia
Has thanked: 3 times
Been thanked: 37 times

Re: Alt. firmware and GUI for Thanos's AMC1.5 & AMC1.6

Postby speedy » Tue 16. Oct 2012, 01:30

Hi Prilad :
Actually you have a Nuclear Brain . 8-)

prilad wrote: Because accuracy of PWM only affects the accuracy of setting the motor speed. And does not affect anything more.
What that mean? Motor speed is proportional to PWM level. And not more...


Good answer ... and I guess you mean motor acceleration in above phrase [that is how fast the motor will reach the speed required + Instantly = that is accuracy ] during the game ... And at this exact point how much [Instantly ] of the PWM will vary from 8-bit to 10-bit to reach the same motor speed in percent ?.?% ... :?:
In other words ... If a motor reaches [from 0RPM to 1000RPM in 1second = 1000ms ] with constant 10-bit PWM signal ... what is the needed time to reach the same speed with constant 8-bit PWM signal :?:

prilad wrote:Speedy, In what extent your 4DOF hardware is ready? I will try to make FW for you with 8-bit and 10-bit PWM for testing and comparison. ;)


You will not believe me ... :D Actuators are ready from 3 months ago , Painted in yellow with some black racing stickers Excellent condition ... :lol: ... each actuator has a frequency inverter and an AC 3-phase motor 1/2HP with a gearbox gives on it's output shaft a 42rpm 52Nm output torque ... mmmm ... I'll give you a better description in a PM ... :lol: :lol: ... this is really crazy teasing ... I'm Sorry guys .

prilad wrote: That's why I do not publish my AMC project yet. But I have the opportunity to order the production of boards industrially. So for me there is no problem in using QFN64 and other SMD parts. I say more - in my own applications I'm using the chip in TQFP144 package like these

believe me Prilad you have Nuclear Reactor is hiding up here :roll: ... Me too [but not Nuclear ... I'm in a restricted Nuclear aria ] :D ...I have a very easy way for DIY users to mount the SMD high intensity legs like a professional and it really really works ... watch this ... and follow the link on YouTube and you'll find tones of it ...
Sit back and use full screen ... and
>>>>Enjoy the microscopic camera<<<<


>>>>This one is the worst soldering ever ... but it works with him <<<<

see you ...
Regards
spe ;) edy
User avatar
speedy
 
Posts: 148
Images: 4
Joined: Thu 19. Apr 2012, 06:46
Location: Alexandria, Egypt
Has thanked: 14 times
Been thanked: 2 times

Re: Alt. firmware and GUI for Thanos's AMC1.5 & AMC1.6

Postby prilad » Tue 16. Oct 2012, 05:40

Hi, Speedy.

speedy wrote:In other words ... If a motor reaches [from 0RPM to 1000RPM in 1second = 1000ms ] with constant 10-bit PWM signal ... what is the needed time to reach the same speed with constant 8-bit PWM signal :?:


The same time. ;)
Suppose we have a 12V motor and H-bridge and 12V power supply. In this case:
0% PWM is mean 0V on the motor.
100% PWM - 12V on the motor,
50% PWM - 6V on the motor.
And it does not depend from 8-bit or 10-bit PWM. :D but that depends on the bit PWM? Only accuracy of Voltage regulation. With 10-bit PWM you can setup motor Voltage with min. step = 12 mV ( 1/1024 of full Voltage range). With 8-bit PWM min. step = 48 mV (1/256 ).

Regards,
Ale
User avatar
prilad
 
Posts: 174
Images: 1
Joined: Tue 3. Apr 2012, 14:20
Location: Dubna, Moscow reg., Russia
Has thanked: 3 times
Been thanked: 37 times

Re: Alt. firmware and GUI for Thanos's AMC1.5 & AMC1.6

Postby speedy » Tue 16. Oct 2012, 08:20

Hi Prilade:
Definitely yes ... Go get him tiger :twisted: ATMEGA644-20PU is a killer .
thanks for answering My first question ...

Now ... I'm already smiling because I know the answer ... ;)
prilad wrote:Suppose we have a 12V motor and H-bridge and 12V power supply. In this case:
0% PWM is mean 0V on the motor.
100% PWM - 12V on the motor,
50% PWM - 6V on the motor.
And it does not depend from 8-bit or 10-bit PWM. :D but that depends on the bit PWM? Only accuracy of Voltage regulation. With 10-bit PWM you can setup motor Voltage with min. step = 12 mV ( 1/1024 of full Voltage range). With 8-bit PWM min. step = 48 mV (1/256 ).

With the above example I just want to prove that 8-bit PWM is better than 10-bit in motor drive point of view ... Here is how :

Note : To avoid mixing papers and you Prilad know that little peace of info ...
Increasing the feed back resolution value to what ever it's maximum Is a very very good design basic principle using a very good feedback sensor ...
but this may cause the position overshooting problem for the motor ... This is not your problem ...
That is considered under a mechanical problem not PID with a various easy stabilization solutions even with a little peace of wood, rubber, or a spring,... , up to a motor break and many many things ... trust me on this.


Now In your above example ... slowly consider a changing PWM from value% to the next value+1% until 100% PWM ... one% at a time .

-That is in a 10-bit PWM ... the step up voltage will be small so we need 1024 steps to reach the top speed [smooth speed rise up ] ... and in a 8-bit PWM we need only 256 steps to reach the top speed [rough speed rise up ] ... obviously now the step in 8-bit is wider by 4 times the step in 10-bit ... on this point ... every one will say 10-bit is better than 8-bit ... No and No and ... NO .

"why is that ?" every one says ...
I say :
Because you didn't ask what is the real time for each step in both cases 8 and 10 and what is the benefits taken from wider steps when starting a motor .

Because in each step the motor controller is loosing power as heat connecting and disconnecting your motor from the power to give you that momentary voltage step ...

Because these steps are not real steps in motor voltage ... they are On's and Off's which is combined together to give you a RMS summery of let's say 4 of these 10-bit steps to give 48mv voltage variant the same as 8-bit single step do ... which is really NOTHING to 12v motor point of view ... with near zero motor speed difference ... plus that the magnetic field build up in coils has been interrupted four times by now for nothing ... Why is that ?

Because when I'm in Italy and I want to send a message to France ... I can't see Eiffel Tower ... to get the message to France ... I may talk easily with 256 people the size of Eiffel Tower ... but I'll be dead after talking to All these people under the Eiffel Tower for every one to get my message ... :cry:

"why is that" every one says again ... :lol:

I say :
I'm out of here ... @ Prilad ...I suggest using a 4-bit PWM "if there is any" to give the motor enough chance to build the magnetic field and respond to your command without breaking it down on purpose killing it before it starts ... [ Motor inertia ]

Really thanks Prilad for giving us that magnificent Russian FW that changes the KP, KI, KD, ... to give us variety of motion controlling solutions ...

with the best of the best regards ...
spe ;) edy
User avatar
speedy
 
Posts: 148
Images: 4
Joined: Thu 19. Apr 2012, 06:46
Location: Alexandria, Egypt
Has thanked: 14 times
Been thanked: 2 times

Re: Alt. firmware and GUI for Thanos's AMC1.5 & AMC1.6

Postby prilad » Tue 16. Oct 2012, 10:14

Hi, Speedy
speedy wrote:With the above example I just want to prove that 8-bit PWM is better than 10-bit in motor drive point of view ... Here is how :

I'm sorry, but I can not agree with you :D
Look at my first example. For simplicity I have given the difference between the 5-bit PWM and 3-bit PWM with the same frequency (that's important. I think that idea of ​​the different frequency PWM knocked you astray, my friend ;) )

the difference between the 5-bit PWM and 3-bit PWM with same period


As you see - 5-bit PWM is no worse than 3-bit one. Conversely, the better. because it allows other equal things being precisely to regulate voltage.

speedy wrote:Now In your above example ... slowly consider a changing PWM from value% to the next value+1% until 100% PWM ... one% at a time .

Ok, my friend, slowly as possible :lol: Look at my second example. I hope you will forgive me for what I add not 1% PWM but at once 12.5%. But I do it the same for both types of PWM.
Adding 12% PWM


if you use the term "percent" rather than a "step" there are NO difference between both PWM type in adjustment speed. Only if you try change PWM from 0 to max value STEP-by-STEP, you really spend four times more time to 5(10)-bit PWM then to 3(8)-bit one.

speedy wrote:-That is in a 10-bit PWM ... the step up voltage will be small so we need 1024 steps to reach the top speed [smooth speed rise up ] ... and in a 8-bit PWM we need only 256 steps to reach the top speed [rough speed rise up ] ... obviously now the step in 8-bit is wider by 4 times the step in 10-bit ... on this point ... every one will say 10-bit is better than 8-bit ... No and No and ... NO .

Yes,Yes and... Yes :D When using the 10-bit PWM I can raise the voltage skipping (through 4 step) steps to give the same rate of rise and the same accuracy as for the 8-bit PWM. But using the 8-bit PWM I can not set the voltage with the same accuracy as for the 10-bit PWM. It is not necessary to change the value of the PWM step-by-step

To sum up:
I think that at the same frequency generation of 10-bit PWM is no worse than 8-bits PWM. And the voltage accuracy is better (four times) for 10-bit.
But this is in theory only. For the x-sim hardware I think both PWM type is really equal. Because the precision of 10-bit PWM is redundant for this applications (IMHO)


Best regards,
Ale
User avatar
prilad
 
Posts: 174
Images: 1
Joined: Tue 3. Apr 2012, 14:20
Location: Dubna, Moscow reg., Russia
Has thanked: 3 times
Been thanked: 37 times

Re: Alt. firmware and GUI for Thanos's AMC1.5 & AMC1.6

Postby speedy » Tue 16. Oct 2012, 14:07

Hi Prilad:
very very nice explanation ... and we are walking and talking in the same direction ... but with different point of view to the same subject in here ...
controlling a motor with a PWM pulse ...

Your side of view [programming and Fast TTL IC's talking to each other ]:
Of course 10-bit PWM is more accurate than 8-bit that is the clear issue from the beginning ... And I know and I've got the message already ...
the [smaller the change] gives [the better in accuracy] ... that is best given in the 10-bit PWM ... next to it is the 8-bit PWM and so on ...
a very very fast timing her and the minor precisely adjustments really makes a different ... that's the digital world features. :)

My side of view [Motor & motor controller ]analog world side with some big voltage :
I'll take the wiper motor as an example here ... Every motor have a mass in it's rotors ... current that flows in coils that need to build magnetic field to start attract to each other and make force to start rotating the motor axle ... that is unlike a pulse going up and down easily ... that is the start up inertia of the motor ... time consumed for the fastest motor in starting from zero to it's full RPM is [in hundreds milliseconds] ... that's very very slower than a digital pulses ... simply that motor doesn't need that accurate pulses because it can't follow them up ... the motor is blind ... he can't see them ... he just see the overall result of them ... take this Example .

Example 1- As above Assuming we are walking and talking to each other in the street ... and you are the digital brain that gives all instructions to my analog brain which is my body controller ... and my body is the motor ... and you want my brain to make my body stand up slowly as a final result ... imagine that digitally ... in terms of standup/sit down commands :lol: my body will do it but my brain is suffering ... or ... while walking ... you want me to maintain me speed or slowing down or stopping ... in terms of accurate stop/run commands that has some tiny longer stops than runs to make me slower ... My brain understand you very will and is confirming doing exactly what you command [consuming power as heat] but simply my body is taking the over all result and follow it regardless your sensitive changes ...

Another example ... assume a traffic light is super accurate blinking RED just to maintain the cars speed ...!!! I guess accurate blinking is more than enough ... going up or down with the overall speed or to give them a sudden stop and reverse command with 100% PWM .

from the motor controller side of view ...8-bit is better than 10-bit ... in term of accuracy spare it for other applications ... simply the motor doesn't need that accurate pulses because ... it can't see them actually ... it can't follow them up precisely as described in the book ...

What do you think now?
spe ;) edy
User avatar
speedy
 
Posts: 148
Images: 4
Joined: Thu 19. Apr 2012, 06:46
Location: Alexandria, Egypt
Has thanked: 14 times
Been thanked: 2 times

PreviousNext

Return to Controllers and Drivers Projects

Who is online

Users browsing this forum: No registered users and 2 guests