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 prilad » Fri 28. Sep 2012, 10:06

Hi, speedy!
speedy wrote:So, I've tested ... sending data from any x-sim software with a string [ ab~255~~a01~~a02~ ] to the AMC com port ... and the LCD first left numbers for both lines are still fixed ...

I want to draw your attention that ab~255~~a01~~a02~ is not equal AB~255~~a01~~a02~. AMC wait string with "AB" header, not "ab".

And now about your communication problem. I think that is not Windows problem, and not Software problem.

SubZERO step - Make shure, that you use FW for your quartz frequency ;) .

Step ZERO - Shut down any communications programm on PC, set dip switch 1 to "off" position, connect AMC to PC. On LCD should be string that AMC in TTY mode. Then run 'terminal' program on PC, open COM-port. Make shure that COM-port setup is: 115200 bod, One stop bits, Non parity. Then try to reset AMC. After reset In the terminal window should appear message from AMC. If it absent, go to step 1

The first step - check, please, electrical connection between the TXD (and RXD) pin of FT232RL module and RX (andTX) pin of ATMEGA. Check solder quality. I hope, you have a multimeter to do it. If it done, go to step 2 ;)

The second step - if you can (if you have oscilloscope), check communication pulses on pin RX ATMEGA when xSimCTRL is run. If they are present go to step 3.

The third step - if you can (if you have oscilloscope), check quartz frequency. Because if it is different from the nominal ( 22.1184Mhz) more than on 1-2% there is sinhronization problem. It is possible if quartz works on another harmonica.

The next step - :shock: :o :?:

The next step - ask help to Thanos :oops:

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 » Sat 29. Sep 2012, 05:23

Yessssss ... I'm dancing


I'm breathing again ... :lol:

note that pot1 is working good and moved my hand to pot2 ...
dancing again ...

My crystal is 22.1184Mhz " case grounded " ... and using FW ATMEGA8535 [ x-sim_AMC_22118kHz_v21_resistors.hex ] that is on your first page .
IT is written on LCD first line [AMC 2.1 ALESoft+] second line [TTY editing mode] .



But my dear the AMC is working for about half second and restarting when sending box are selected !!! ... and working nice if receiving is selected !!! ... why is that ? is it the ATMEGA ?

If yes ..I'm waiting for my ATMEGA644 tomorrow or after ... I'll see how it goes .

Wow you have a lot calibration options here ... :lol:
thanks for the tip [ AB~255~~a01~~a02~ ] ... I guess that is one of reasons why it didn't send commands in the first place from x-sim . Grrrr :x

Good job my friend ... Good job

really thanks
speedy ;)
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 speedy » Sat 29. Sep 2012, 08:15

OMG ... I can't believe I did it again :lol: ... I encouraged myself with a cup of coffee and tried to read the first page of your post 2hrs reading the same lines again ... then goes OFF the fuse ..!! :lol:
In these pages you're the big guy and I'm the babe ... give me a hand pls. .
what is the " algorithm " ? where I can find it ?
Don't laugh ... :oops:

speedy ;)
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 » Sat 29. Sep 2012, 08:38

Hi, speedy!
speedy wrote:Yessssss ... I'm dancing

This is a good news :D

speedy wrote:IT is written on LCD first line [AMC 2.1 ALESoft+] second line [TTY editing mode] ...
But my dear the AMC is working for about half second and restarting when sending box are selected !!!

Wait wait wait... There are two ways to setting up parameters for AMC with Alt firmware - in TTY mode with terminal program (on LCD line TTY editing mode) and with xSimCTRL software (on LCD - digits with current pos, pwm, ets). Modes select by DIP-SWITH#1.
From you words I see, that you try to control AMC when it in TTY mode? Say me that I'm wrong ;)
If I'm wrong, that (resetting) is really strange problem. :oops: This is a first case with this problem..

And I have one request to you. Please write for me and for the comunity more detailes - how you are resolved problem with opening COM-port and with making communications with AMC? You wrote in some posts that you have a problem, and then in the next post you wrote that problem was solved... But HOW? I think it is wery intresting not only for me.

Thank you and good luck,
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 prilad » Sat 29. Sep 2012, 08:57

Hi again :D
speedy wrote:OMG ...
what is the " algorithm " ? where I can find it ?


If you mean this phrase:
prilad wrote:- The firmware uses the modified control algorithm, in contrast to a simple proportional control is used in the original firmware Thanos.

... in this section I wrote about it^
prilad wrote:- 2. Description of the control algorithm motors.
At each step of the control (the period of 3.57 ms), the computation of the error of positioning:
Error = SetPos - CurrSens
where

SetPos - position received from x-sim software.

CurrSens - the current value of the sensor feedback (motor current position).

With the implementation of the classical algorithm P-control action is calculated by the formula:
PWM = Error * Kp
where

PWM - the new value of the control signal output,

Kp - coefficient of proportional control.

The modified control algorithm is implemented in this version, as follows:
PWM = minPWM + Error*KpX
where

minPWM - the minimum level of the PWM to the motor,

KpX - dynamically modifiable factor proportional control.


:D
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 » Sat 29. Sep 2012, 09:30

prilad wrote:And now about your communication problem. I think that is not Windows problem, and not Software problem.

SubZERO step - Make shure, that you use FW for your quartz frequency ;) .

Step ZERO - Shut down any communications programm on PC, set dip switch 1 to "off" position, connect AMC to PC. On LCD should be string that AMC in TTY mode. Then run 'terminal' program on PC, open COM-port. Make shure that COM-port setup is: 115200 bod, One stop bits, Non parity. Then try to reset AMC. After reset In the terminal window should appear message from AMC. If it absent, go to step 1


My pleasure ...You told me ... I don't have any idea how it worked ..!!
You said that to reset the AMC after the com port parameter adjusting [ marked red above ] ... that is a missing step for me... I did ... and since the message you asked for is absent !! ... moved to step 1 ... while reading what to do and I'm little sure of my board [my play field ]... I noticed that there is no changes in the xSimCTRL program ... So moved back the Dip SW1 to ON and reset AMC again in case you missed the translation hoping my problem ends ... tried the three selections at the same time ... to display data, receive, send data to AMC and Voila came the blue bars and numbers on the green aria ... but as described earlier ... a restart problem .

when selecting only to receive and display data it works smoothly and I can play with the pots ...
I can give you a video screen capture for it ... let me try .
edit :
here is what now happening when I click send data to AMC



speedy ;)
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 » Sat 29. Sep 2012, 10:53

Hi, speedy! Hi, friend ;)
speedy wrote:My pleasure ...You told me ... I don't have any idea how it worked ..!!

Mmm...
Ones again ;)
The startup sequence for using Alt. firmware with terminal progpam (mode TTY, DIP-Swith 1 is OFF)
- set dip-switch 1 OFF (attention! You must change dip-switches before powering AMC, because FW read its position once, when starting)
- connect AMC to PC, set AMC power ON (on LCD line "TTY editing mode"),
- execute the terminal program on PC,
- open and setup COM-port in terminal. You will see empty terminal screen, because the prompt message from AMC was received before program executing.
- reset AMC. This step is needed only in TTY mode and only to check communication with terminal program by receiving prompt message from AMC after resetting,
- follow the screen instruction for changing FW parameters,
- save parameters to EEPROM AMC,
- close terminal program,
- set AMC power OFF,
- set dip-swith 1 ON - this is normal work mode of AMC.

The startup sequence for using Alt. firmware with x-sim software or xSimCTRL software (normal work mode, DIP-Swith 1 is ON)
- set dip-switch 1 ON,
- connect AMC to PC, set AMC power ON (on LCD lines with current AMC values for two axes),
- execute the xSimCTRL program on PC,
- If it FIRST TIME executing or if you CHANGE COM-port, go to "setup" menu, select COM-port and setup it. In any other way you dont need use "setup" menu every time when program is executing. And you dont need reset AMC for begining comunication in this case.
- set checkboxes for working with programm.

That as it MUST work. :) But in this scenario AMC resetting after toggle checkbox is absent. :oops: :?:
Mmm... I must think.

Regards,
Ale

PS: And many sorry for my English :oops:
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 prilad » Sat 29. Sep 2012, 11:06

prilad wrote:Mmm... I must think.


I have one idea. Early you wrote that you can write FW to AMC by two ways
speedy wrote:- I have programmed the ATMEGA8535 with the 22Mhz file using the pony program and the old serial programming interface for the AMC1.5 as a first try ...
- Then came back to program the ATMEGA8535 with the 22Mhz file the one using USB one click from Thanos as a second try ...


Can you reprogram ATMEGA8535 using the pony and the old serial programming interface with .HEX FW files? May be we have a problem when converting .HEX to .BIN?
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 » Sat 29. Sep 2012, 11:36

I already have 6 ATMEGA8535 that are labeled with different FW's ... two of them are having your FW hex and bin files 22Mhx v2.1 ... and tested to swap them ... nothing.
Even I have another computer with windows 7 and a stander com1 port ... same result with the two FW methods. :cry:
Tried to communicate with the stander com1 on the other computer ... nothing .
I even downloaded the
FT_Prog v2.6.8.zip
(2.32 MiB) Downloaded 745 times
a special program from FT to program the FTDI232RL blank IC and reversed the Rx with the Tx to see if this could help [I have a DIY FTDI USB UART module ]... nothing ... returned them back.
I downloaded a Microsoft serial monitor
usbview.zip
(36.74 KiB) Downloaded 745 times
too to see the communication in real time ... gave me this

if any thing into these lines means any thing to you ... pls let me *

Don't worry my last chance is to change the crystal or the 18pf capacitors and test with the new ATMEGA644 ... but I'm going after the 8535 to know why is that

thanks for interesting in my case

speedy ;)
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 » Sat 29. Sep 2012, 19:52

Hi, speedy.

I have one more idea (hope not a last one :D ) - Can you to program AMC with Thanos's firmware? And try to SEND to AMC data from xSimCTRL. In this case AMC must to receive data correctly and to change digits on LCD.

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

PreviousNext

Return to Controllers and Drivers Projects

Who is online

Users browsing this forum: No registered users and 2 guests

cron