1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Revolution firmware and software for AMC1.5+1.6

Discussion in 'SimTools compatible interfaces' started by CraCk, Jun 15, 2012.

  1. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,635Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Re: Revolution firmware and software for AMC1.5

    Can you describe the situation in more detail? And try to put the AMC into terminal mode by turning dip-switch number 1. Did you receive a message to computer from AMC in this mode?
    I think I could make a mistake when adapting the project for the atmega644, when made UART initialization . If you are not able to receive the data into terminal, so it is.

    I think - this is a small mistake. :D You have been connected to another PWM channel and received noised signal (from UNCONNECTED potentiometer). Connect, please, oscilloscope to second PWM channel.
  2. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Re: Revolution firmware and software for AMC1.5

    I tried terminal mode, nothing either... I don't see activity on the RX led on the USB breakout meaning the atmega644 doen't even try to send anything. I had the hardware tested with my firmware so I can assure you there is nothing wrong with the board, it connects correctly to x-sim and terminal.

    Also the problem with potentiometers exists even with two of them connected. I never have such problem with my firmware, one unconnected channel doesn't affect the other especially if its connected!!! Maybe you need to set the ADC to Single shot conversion instead of Free running, I don't know how this could called in the programming language you used.



    Also, why you swapped the PWM channels? I had them like that forever... :lol:

    Regards,
    Thanos
  3. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,635Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Re: Revolution firmware and software for AMC1.5

    Ok. I will try to test my firmware in Proteus simulator
  4. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,635Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Re: Revolution firmware and software for AMC1.5

    But with mega8535 it works good.
  5. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Re: Revolution firmware and software for AMC1.5

    Hi,

    I managed to connect it to software, it was some settings on the FTDI com port I had set for other project.

    But the problem with ADC potentiometers still exist and I took a video of the capture of it on your program so you can see it graphically! Something is not on in the code for the potentiometers or you have mixed the channels or something.



    Thanos
  6. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,635Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Re: Revolution firmware and software for AMC1.5

    Hi,

    OK. I hope it reduced disappointing level :D

    I think, I have fixed this problem in this firmware

    AMC16_mega644_22mHz_byALE_fix.rar
  7. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Re: Revolution firmware and software for AMC1.5

    I tried the new firmware and get the same results... as on the last video I posted.

    Used different type potentiometers even SS490 ratiometric hall effect ones but I get the same faulty realings.

    To describe it better, its like every half second the first potentiometer's value is set to the value of the second potentiometer, like its following the second potentiometer's value. I think you are doing the measurement twice and for the second time you mix up the ADC channel names or something.
  8. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,635Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Re: Revolution firmware and software for AMC1.5

    Unfortunately I am unable to check the firmware on the device. But software emulation shows that there is no problem. The problem was that the ADC input multiplexer does not have time to switch from one channel to another. Now I added a delay in the ADC measurement cycle.

    Here's another firmware version, in which I increased the delay in the hope that the problem will disappear.

    AMC16_mega644_22mHz_byALE_fix2.rar

    And one more modification

    AMC16_mega644_22mHz_byALE_fix3.rar
  9. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Re: Revolution firmware and software for AMC1.5

    Yes, looks good now! Works! No more crazy potentiometers! Let me do some real tests now with motors.

    Do you mind if I put a link to it at the AMC1.6 project blog?

    *EDIT: lol, why you took down the link? Was working fine!
  10. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,635Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Re: Revolution firmware and software for AMC1.5

    I compared the firmware for mega644 with old firmware for mega64 and found one difference in the procedure for initializing the ADC. The version of fiх3 I did initialize identical mega64.
    Check, please, the third firmware too.
    Of course I do not mind.
    I can make firmware for 18 MHz too.
  11. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Re: Revolution firmware and software for AMC1.5

    Ok Thanks!! I tried fix3 works fine too... what was that?

    Anyway another issue I just realized is that I can't change the settings KP Hi Lo etc from the interface. I fill thee values I want into fields, press the save settings button but they are not updated into the chip, still get the same numbers. Is that another bug or incompatibility between the two chips?

    Generally whatever code I write for my chips is directly transferable to another chip of the same family with the only change the chip identification...!
  12. CraCk

    CraCk Member Gold Contributor

    Joined:
    Aug 1, 2010
    Messages:
    53
    Location:
    Made in Ukraine
    Balance:
    691Coins
    Ratings:
    +17 / 0 / -0
    My Motion Simulator:
    2DOF
    Re: Revolution firmware and software for AMC1.5

    The procedure for writing this:
    1. Input value
    2. Press Enter
    3. Press key Save the new settings in the EEPROM of the controller
  13. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Re: Revolution firmware and software for AMC1.5

    Oh... I guess I missed that Enter thing in the directions... Hahaha...

    Works fine then I guess!!! Ready for some actual motor testing!

    Thanks!!
  14. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Here is a test with my motor... Works great I would say!

    http://www.youtube.com/watch?v=ImRfTZ5qI8A

    I love the graphing function... Can you make it to start over again automatically?

    Thanos
  15. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,635Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    how could it be otherwise? :D

    You mean the automatic restart recording data in the buffer after the end of the record?
    Like in oscilloscope?
  16. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0

    Yes....!!! No need to click it over and over again when you have to adjust other values... Just an Auto mode button would be great!
  17. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Wait to see the next video... I finally have proof about the refresh period rate importance...
  18. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,635Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
  19. value1

    value1 Nerd SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Jan 9, 2011
    Messages:
    2,184
    Location:
    Zug, Switzerland
    Balance:
    14,751Coins
    Ratings:
    +3,322 / 11 / -1
    My Motion Simulator:
    2DOF, DC motor, JRK, Joyrider
    :D
  20. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Here it is ....



    The video speaks of it self... You want quality in motion? Change that 33ms delay to 3ms or 1ms if possible!!! :lol: