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

Tronic's AMC motor motion-controller with pwm/servo output

Discussion in 'SimTools compatible interfaces' started by tronicgr, Aug 30, 2007.

  1. RaceRay

    RaceRay Administrator Staff Member SimAxe Beta Tester

    Joined:
    Nov 8, 2006
    Messages:
    4,656
    Occupation:
    Self-employed | Web and application development
    Location:
    Hamburg, Germany
    Balance:
    23,864Coins
    Ratings:
    +2,007 / 13 / -0
    My Motion Simulator:
    2DOF, DC motor, SimAxe, SimforceGT
    Superb, i will build it and give feedback about it. Looks great.... :D :top:

    Thank you Thanos!!!

    regards
    René
  2. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Ok, I used a frequency meter to measure the exact PWM frequency of the AVR controller and I found the the actual PWM frequency that it drives the RN-VN2 is 23,47khz !!!!!!!! I expected this to be 20 or top 21khz but 23,47khz is more than good!!! Thats why the high pitched noice is totally disappeared!!! I wonder, though, how the RN-VN2 continue to work in this frequency since the datasheet states that the maximun is 20khz. Anyway I don't see any difference in performance so I guess it can run fine with 23.47khz after all!


    And checked again for other chips and found out that the Atmega644 that has six full featured PWM channels is pin to pin compatible with Atmega8535. So we can use the same PCB board i already gave to host the Atmega644!

    Regards, Thanos
  3. SimHawk

    SimHawk Member

    Joined:
    Oct 3, 2007
    Messages:
    120
    Occupation:
    Engineer
    Location:
    Norway
    Balance:
    0Coins
    Ratings:
    +0 / 1 / -0
    Good work! I am starting to regret that I went for a pneumatic setup and not a motor solution. :? :wink:
  4. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Well, don't worry. You can always use my controller with a servo proportional valve! And have pneumatics with variable motion speed!

    Thanos
  5. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    I finally found the Atmega644 I wanted on a local store and I'm going to test it for four 9-bit PWM channels. If it works ok the final version wil use this chip with the PCB board I already gave.

    EDIT: Also just checked Ponyprog site and they released new version that supports Atmega644!!!

    Someone asked me about PWM (email) and I realized that I didin't mention that I actually drive the motors on 10-bit resolution! 0-511 for one direction of the motor and 512-1023 for the other direction!!! Same double resolution is used for motors 3,4 (9-bit)!


    Regards, Thanos
  6. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    I fixed the first page to show the latest version 1.3 of the Avr Motion Controller. And some other minor things.

    Thanos
  7. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    By now some of you might have builded the PCB board of the avr motion controller and want to program the beta firmware on it.

    Here is a small guide on how to use Ponyprog2000 to program the board:

    [​IMG]Thanos_ponyprog_guide.pdf (390.65 KB)



    Yobuddy had a look around for a suitable alternative of RN-VN2 and came up with this:

    Part#0708, Dual VNH2SP30 motor driver carrier

    http://www.pololu.com/products/pololu/0707/


    It uses the same VNH2SP30 chips as RN-VN2. Only the header pins are a little different but this isn't problem at all!

    Thanks, Yobuddy!



    Regards, Thanos
  8. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
  9. skratchbilder

    skratchbilder New Member

    Joined:
    Oct 22, 2007
    Messages:
    4
    Balance:
    - 60Coins
    Ratings:
    +0 / 0 / -0
    Hi Thanos,

    Good work... I was just wondering, which language are you using to program the AVR?

    If you dont mind, could you please post the code here?

    Thanks,
    Madhu.
  10. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Hi Madhu,

    I prefer to give to the public only the coded firmware as its personal hard work. If you need something more to add to its features, ask me and I'll try to add it too. I could even customize it to your motion sim needs if you like.

    I use Bascom to program it and some pieces of assembly.

    Anyway, do you have expierence in programming AVRs?

    Regards, Thanos
  11. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Does anybody had the same problems with the motor (and power) connectors of the RN-VN2? I had to discart the connectors with the bolts cause they had poor contact.

    Now I use directly cables with crocodile clips, but I have to figure another way to mount the thick cables I use in the joyrider! The motors can draw lots of current and can burn the simple crocodile cables!!

    conn_headers.jpg
  12. skratchbilder

    skratchbilder New Member

    Joined:
    Oct 22, 2007
    Messages:
    4
    Balance:
    - 60Coins
    Ratings:
    +0 / 0 / -0
    Hi Thanos,

    I understand about the hard work you have put in into this project. Sorry for asking.

    As far as my microcontroller experience goes, Im afraid that it is restricted to PIC and C.

    I prefer to use mikroC (http://www.mikroe.com/en/compilers/mikroc/pic/ and have one of their PIC experimentation boards.

    I was thinking of porting your application to PIC as they are very easily available here in India; but it looks like I have to start out on my own.

    Thanks a ton for the inspiration,

    Warm regards and wishing you luck,
    Madhu.
  13. RaceRay

    RaceRay Administrator Staff Member SimAxe Beta Tester

    Joined:
    Nov 8, 2006
    Messages:
    4,656
    Occupation:
    Self-employed | Web and application development
    Location:
    Hamburg, Germany
    Balance:
    23,864Coins
    Ratings:
    +2,007 / 13 / -0
    My Motion Simulator:
    2DOF, DC motor, SimAxe, SimforceGT
    Yes Thanos, the connectors were described as quality connectors, but i don´t think so! At my RN-VN2 they shake and does not fit exactly into eachother. Only question of time, when the contact loose. We should replace that connectors with kind of this ones:

    LINK
  14. tronicgr

    tronicgr

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

    The connectors on the link are good but it whould be better if they were atleast 15amp rated!

    I have measured surges of 18amp on my motors under load!!!!

    Thanos
  15. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    While waiting for your input on the performance of the beta001, I developed a SimforceGT (frex-like) motion beta version for Egoexpess and everyone else with simular motion cockpit!!!


    [​IMG]PWMBETA002FREXkp3.zip (2.32 KB)


    As the name of the firmware states, I coded Kp=3 (proportionality constant) in it as it seemed me fast enouph with the simple pots. Just test it and ask me for greater Kp contant firmware if needed.

    Motor assignements are as follow:

    Motor1 connection (on first RN-VN2) is the right motor on the simulator.
    Motor2 connection (also on first RN-VN2) is the left motor on the simulator.

    Again potentiometers are used for feedback on the motors: Motor1 --> Pot1 , Motor2 --> Pot2


    Beta002frexsetup.jpg


    I took a demostration video with LFS to see how it moves on my test table dc motors. I wanted to hang a large piece of paper to be moved like the car seat but the rotation of my motors was 270 degrees. Yes I used simple 270 degrees pots attached directly on the axis of the motors and had great positioning precision and fast moves! The motion is limited in half for left-right as I reserved the rest motion capability for front-back motion! Seeing frex like motion in action makes me wanna built a full scale model to try how it feels! :)

    Beta002SimforceGT.wmv


    Regards, Thanos
  16. SimHawk

    SimHawk Member

    Joined:
    Oct 3, 2007
    Messages:
    120
    Occupation:
    Engineer
    Location:
    Norway
    Balance:
    0Coins
    Ratings:
    +0 / 1 / -0
    Great work thanos! I will try to experiment with your code at a later stage, after finishing my pneumatic setup. And I also need the electronics for the motor drive. I'll see what we have at work. I got som AVR prototypes, but not the one you use.
  17. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    I could have implemented also a 3DOF motion beta (EvanF, chair of pain :) ) but I lack the second RN-VN2 motor controller to do tests on my own.

    And Profiler doesn't output yet third axis data (z). :(

    Thanos
  18. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +10 / 1 / -0
    The layout should arrive next week, and yours will be shipped dircetly to you. But I dont know how long parcels take to Greece.

    regards
  19. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,307
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,505Coins
    Ratings:
    +5,109 / 18 / -0
    Thanks tronicgr!
    I’m sure this will be handy when I get done building the frex like frame.

    yobuddy
  20. egoexpress

    egoexpress Active Member

    Joined:
    Dec 13, 2006
    Messages:
    3,839
    Location:
    Germany - Frankfurt/M
    Balance:
    421Coins
    Ratings:
    +10 / 1 / -0
    Something important.

    For Simforce Sims we'll need the possibility to assign the max difference between both pot/encoder values.

    In order to prevent the seat breaking the contol-rods underneath.

    Thanks