1. 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!
  2. 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
  3. 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

Arduino UNO/Duemilanove 2dof firmware

Discussion in 'SimTools compatible interfaces' started by prilad, May 29, 2013.

  1. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    405Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    thanks for give me full support....
    i measured the voltage.. pins 9, 10.. seems thats working correctly but it don't go above 3v
    in dir pins 8 ,12 it changes abruptly very quick from -5 to +5 when moving pots

    I'm still learning how to config xsimctrl so i will keel try until i get there.. see if the values in edit field is correctly or how should i identify the correct values thakss

    Attached Files:

  2. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    378
    Location:
    Dubna, Russia
    Balance:
    9,261Coins
    Ratings:
    +493 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Try to reduce "max save time" value to 1 or 5 or 10 sec. It will change the X-scale of both graphics. And you can to see data more detailed.

    You can turn ON "oscillator" and to change (reduce) its frequency (by right slider). You should see Sinus on PWM signal and you should check it on Arduino pins. I think - PWM must change from 0 to 5V
    • Like Like x 1
  3. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    405Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    okay.. i was joaking a bit with the sliders and I'm starting to comprehend how they works, now it gives me the 5 volts
    but the graphics still the same no sinus... the rest sims thats working correctly now i think is just to setup the software with correct parameters,,, that i don't understand haha..

    another question.. ur firmware need some plugin to work with games..? or it works with all games withough plugin?

    Attached Files:

  4. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    378
    Location:
    Dubna, Russia
    Balance:
    9,261Coins
    Ratings:
    +493 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    mandarr ultimoo 222.JPG

    Use right slider for reduce oscillator frequency. And after changing "max save time" turn OFF and then turn ON "display data" checkbox for applying changes...

    About games - you should use SimTools software for extracting games data and sending it to Arduino. Without xSimCtrl of course. In SimTools you should select COM-port and baudrate and write command string for sending data to arduino...
    • Like Like x 2
  5. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    405Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    so i will have to use plugin.. coz simtools need plugins to work so not all games r supported.. but no problem ..
    i will test now with the pcb... i haven't fixed the h-bridge yet
  6. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    405Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    well seems that now I've got sinus I've got better sinus it depends ,, if i move the right slider down the sinus stay more visible. and if i move it up the lines stay (together,) no sinus...

    so xsimctrl is just to calibrate the ard? now I'm understanding..
    ive. tested with pcb... and the lines IN1 and IN2 CHANGES voltages.... by changing pots positions...
    i don't know how to test pwm signal in these pins... i put voltmeter + in IN1 and - IN2
    and it gives me random 4v

    is it right? whats the next step?

    Attached Files:

    Last edited: Sep 30, 2013
  7. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    405Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    arduino seems good.. h-bridge too... the problem now is the pcb
    ive double checked all the connections and soldering points its all right..

    but it gives continuously current on IN2 an IN1.. if i connect to h-bridge it will burn again,,
    even if i disconnect all wires from ard the pcb keeps still sending current...on both channels....its driving me crazy.. is this schematic picture really right?
    using 74ls08

    Attached Files:

  8. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    378
    Location:
    Dubna, Russia
    Balance:
    9,261Coins
    Ratings:
    +493 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Wiring diagram is OK.

    You should check the voltage not between IN1 and IN2 pins, but on each pins relative GND. And you should see viltage ONLY on ONE pin when other must have 0V.

    For this case do not use "oscillator". Simple set pots in middle position and by hand move slider "motor set pos" (left slider) to upper position. In this case you should have PWM = 1023 and on pin IN1 (or IN2) voltage must be equal 5V (on enother pin = 0V).
    Next move slider "motor set pos" to bottom. PWM = -1024 and now check +5V on IN2 and 0V on IN1..

    Important - ONLY ONE PIN (IN1 or IN2) must have some voltage. Opposite pin must have 0V in this moment.
    • Like Like x 2
  9. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    405Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    hey mate good news..
    the pcb seems to work good
    the voltage drops in PIN1 and go up in PIN2/ and vice versa
    i never can get 0v don't matter what i change. it always stay nearly but never on 0v
    so I'm getting voltage on both pins.. but now its only software calibration not the hardware anymore.. i was joking a bit with the values,, i thought that software were to be the most easy party loll i don't know how to calibrate it correctly i think the most big problem now is to know how to calibrate the voltage,,,,
    Last edited: Sep 30, 2013
  10. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    405Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    well guys after ive twisted my mind with its configurations, I'm given up.. theres a guy selling me the entire kit, amc 1.6 and h-bridges here in brazil,, it will be extremely expensive,, i didn't want.. but it very difficult to calibrate this things withought a parameter to follow.or guide.. so I'm thinking in buy it.. no one that don't really understand the entires process of this softwares will not now how to configurate..and xsimctrl has very little information about and how to deal with it.. .. if any one know some guide or parameter to flow i all be glad thanks
  11. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    378
    Location:
    Dubna, Russia
    Balance:
    9,261Coins
    Ratings:
    +493 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Whatever you want, it's your choice, try. I did not understand - what is your problem? If the h-bridge does not work - what's the xSimCtrl? This software was created just for a simple set of PID parameters.
    Regards,
    Ale
  12. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    405Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    hey man sorry if i bored u,that was not my intention the h-bridges is working fine. no problem with it..
    the problem was to calibrate the software i can't get it configured correctly, to be more specific the (right values) ...
    ive tested only with the pcb and arduino.. the problem is to put the right values infield.. how it does not have very information in how to do it..we stay disappointed thats normal... in every project that u stay stucked in some thing...
  13. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    405Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    the problem is the (values) if i change a number, I must change the other too.. (the maths for the correct calibration)
  14. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    378
    Location:
    Dubna, Russia
    Balance:
    9,261Coins
    Ratings:
    +493 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    What values do you mean? What calibrate? For begining you should to tune only one Value per Axis (if you set KpLo = KpHi) - coefficient Kp. And you should do that (calibrate) after you will made the rig and will connect motors to H-bridge. What do you want to calibrate now?

    No problem, as I said, it your choice. If you are sure that it will be easier to configure AMC1.6 (personally, I do not know about)

    Regards.
  15. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    378
    Location:
    Dubna, Russia
    Balance:
    9,261Coins
    Ratings:
    +493 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Do not think that I'm trying to dissuade you. I just recommend you read the forums that would be quite sure what you're doing. Especially about calibrate. ;)

    Regards
  16. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    405Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    I'm reading some stuffs about this configs.. i gonna be using only half of the pot, i was trying to calibrate the entire pot 270 of working area...maybe thats were the problem
    see the picture

    yellow,, value -1022 slider motor position in middle
    what should be the yellow value?
    if all up must be 1022 an at bottom -1022 so In middle must be 0?
    if i don't get the right value it send me signals in both wires..

    we are doing basically an read me manual loll

    Attached Files:

  17. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    405Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    double post skip this
  18. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    378
    Location:
    Dubna, Russia
    Balance:
    9,261Coins
    Ratings:
    +493 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Ok... A little manual for you.

    about Signals and Colors

    - Red line - Setting motor position. (SetPos) It sended to Arduino from PC by software (xSimCtrl or SimTools or other). xSimCtrl give you possibility to controll this signal manually or automaticaly (by Oscillator)

    - Blue line - Getting motor position (GetPos) (from potentiometer or other sensors). This sensor should be mechanically connected to the motor shaft. Important! Firmware set PWM signal for move motor to setting position. Easy formulas to calculate PWM is

    PWM = Kp * (SetPos - GetPos)

    - Green line - PWM signal, prodused by firmware.

    lets KpLo = KpHi = Kp...

    conclusion 1 - Do not set Kp to big (for beginig - not more 3-5)

    conclusion 2 - As long as there is no mechanical connection of a potentiometer to the motor shaft, not any calibration may be created, because the sensor does not track the position of the motor shaft.
    • Like Like x 1
  19. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    405Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    yeh it will help many others who are starting... and now i can say I'm getting the away how the software works.. i could get the 0v and set all almost correctly.. thank you very much...

    im curios with 2 things... the software are freezing I'm my system (win 7 32bits) and i must restart the computer to work again if i only reopen it freezes again......

    2 i couldn't select baud raid 5600 it doesnt recognize the ard.. the high baud rate the better?
  20. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    378
    Location:
    Dubna, Russia
    Balance:
    9,261Coins
    Ratings:
    +493 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    About "freezing" - do you disconnect Arduino befor soft freezes? You should disconnect Ard only after exiting from xSimCtrl.

    To work at different bauds, you need to upload the appropriate firmware...
    • Like Like x 2