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

Nuevo proyecto Pruebas y problemas - New Proyect Test and problems

Discussion in 'New users start here - FAQ' started by mikem, Jun 13, 2014.

  1. mikem

    mikem New Member

    Joined:
    Apr 30, 2014
    Messages:
    8
    Balance:
    336Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    6DOF
    Buenos días a todos.

    Os presento mi proyecto y la lista de componentes que actualmente tengo.

    Software:

    Xsimulator – SimTools (la ultima version disponible en la Web) - http://www.xsimulator.net/community/marketplace/motion-simulation-software-simtools.63/

    Codigo Arduino - https://github.com/daankortenbach/a...ols/blob/master/arduino_2dof_for_simtools.ino

    Hardware:

    Arduino Mega - http://arduino.cc/en/Main/ArduinoBoardMega2560

    Driver Pololu vnh5019 - http://www.pololu.com/product/1451

    Motor 12 -24v - http://www.smolka-berlin.de/onlines...cteur_24V_DC__Offre_sp%E9ciale%21%21%21_/4398

    Potenciometros de 10 K


    Antes de montar todo estoy realizando unas pruebas, el resultado no es el esperado por lo cual necesitaría contar con vuestra ayuda.

    Me imagino que lo que me está sucediendo será algo muy simple, pero no soy capaz de darme cuenta donde está el error.

    Esta todo conectado de la siguiente manera:



    Arduino

    PIN 7 Driver 1 Pololu - PIN INA
    PIN 4 Driver 2 Pololu - PIN INA
    PIN 8 Driver 1 Pololu - PIN INB
    PIN 9 Driver 2 Pololu - PIN INB
    PIN 5 Driver 1 Pololu - PIN PWM
    PIN 6 Driver 2 Pololu - PIN PWM
    PIN Analog 4 Potenciometro L pin central (GND y 5V en cada Extremo)
    PIN Analog 5 Potenciometro R pin central (GND y 5V en cada Extremo)

    Los potenciómetros están con GND y 5V

    Esta todo conectado de la siguiente manera:



    Arduino

    PIN 7 Driver 1 Pololu - PIN INA

    PIN 4 Driver 2 Pololu - PIN INA


    PIN 8 Driver 1 Pololu - PIN INB

    PIN 9 Driver 2 Pololu - PIN INB


    PIN 5 Driver 1 Pololu - PIN PWM

    PIN 6 Driver 2 Pololu - PIN PWM


    PIN Analog 4 Potenciometro L pin central (GND y 5V en cada Extremo)

    PIN Analog 5 Potenciometro R pin central (GND y 5V en cada Extremo)



    Los potenciómetros están con GND y 5V


    PRUEBA:

    Cargo el PGM en el Arduino

    Configuro el SimTools indicando el puerto del Arduino como indica la guía.

    - Interfaz setting SER

    - Puerto (el del arduino)

    - Startup Output:

    - Interfaz Output: <Axis1><Axis2><Axis3><Axis4><Axis5><Axis6>

    - Shutdown Output:


    Voy a Output Testin y arranco la interfaz, el Arduino empieza a recibir datos (la luz enciende)

    Y la mover las barritas del AXIS los motores no se mueven,



    Si giro los potenciómetros para un lado el motor empieza a girar constantemente para un lado, si lo giro para el otro el motor gira en sentido contrario, si lo dejo en el centro se queda quieto.

    Porque puede ser que los motores no se mueven con el SimTools?



    Dudas

    El Pin Analog 0, 1, 2 y 3 tienen que ir conectado al Driver Pololu??? En el código se cita.


    // CS: Current sense ANALOG input
    int cspin[2] = {
    2, 3
    };

    // EN: Status of switches output (Analog pin)
    int enpin[2] = {
    0, 1
    };

    Este es el driver.
    [​IMG] [​IMG]
  2. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,400Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Hello @mikem we try to use English here , you will get a faster answer.

    Plenty of Ard guys here that are very good at it, Im sure they can help you.
    @RacingMat will be the man to help you on this one.
    • Like Like x 1
  3. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    2,234
    Location:
    Marseille - FRANCE
    Balance:
    20,895Coins
    Ratings:
    +2,084 / 21 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thanks @eaorobbie !
    @mikem : hello!
    you would better don't use this fork code: there is a bug inside!

    your 2 pictures are not available :-(
    • Like Like x 1
    • Friendly Friendly x 1
  4. mikem

    mikem New Member

    Joined:
    Apr 30, 2014
    Messages:
    8
    Balance:
    336Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    6DOF
    Good morning everyone.

    I present my project and the list of components that I have currently.

    Software:
    Xsimulator - SimTools (the latest version available on the Web) - http://www.xsimulator.net/community/marketplace/motion-simulation-software-simtools.63/

    Arduino Code - [/U]https://github.com/daankortenbach/a...ols/blob/master/arduino_2dof_for_simtools.ino

    Hardware:
    Arduino Mega - http://arduino.cc/en/Main/ArduinoBoardMega2560
    Pololu Driver vnh5019 - http://www.pololu.com/product/1451
    Motor 12-24v - http://www.smolka-berlin.de/onlines...cteur_24V_DC__Offre_sp% E9ciale% 21% 21% 21_/4398
    Potentiometers 10K

    Before assembling everything'm doing some tests, the result is not as expected so need to have your help.

    I guess what is happening I will be very simple, but I'm not able to realize where the error is.

    It's all connected as follows:

    Arduino

    Pololu pins 7 Driver 1 - PIN INA
    Pololu Driver 2 PIN 4 - PIN INA
    Pololu PIN 8 Driver 1 - PIN INB
    Pololu Driver 2 PIN 9 - PIN INB
    PIN 5 Pololu Driver 1 - PIN PWM
    Pololu Driver 2 PIN 6 - PIN PWM
    PIN potentiometer analog 4 L center pin (GND and 5V on each end)
    Analog potentiometer R 5 PIN central pin (GND and 5V on each end)

    The potentiometers are with GND and 5V

    It's all connected as follows:

    Arduino

    Pololu pins 7 Driver 1 - PIN INA

    Pololu Driver 2 PIN 4 - PIN INA
    Pololu PIN 8 Driver 1 - PIN INB
    Pololu Driver 2 PIN 9 - PIN INB
    PIN 5 Pololu Driver 1 - PIN PWM
    Pololu Driver 2 PIN 6 - PIN PWM

    PIN Analog 4 Potenciometro L pin central (GND y 5V en cada Extremo)

    PIN Analog 5 Potenciometro R pin central (GND y 5V en cada Extremo)

    The potentiometers are with GND and 5V

    TEST:
    Load program in Arduino
    Configure the port indicating SimTools Arduino as indicated by the guide.

    - Interface setting SER
    - Port (the arduino)
    - Startup Output:
    - Output Interface: <Axis1> <Axis2> <Axis3> <Axis4> <Axis5> <Axis6>
    - Shutdown Output:

    Output'll Testin and I start the interface, the Arduino starts receiving data (the lamp lights)

    And move the bars of AXIS engines do not move,

    If I turn the knobs to one side as the engine is constantly rotated to one side, if you turn to the other motor runs in reverse, if I leave in the middle stands still.

    Because it may be that the motors do not move with the SimTools?

    Query or doubts

    Analog Pin 0, 1, 2 and 3 must be connected to the Pololu Driver?? The code is given.

    / / CS: Current sense input ANALOG
    cspin int [2] = {
    2, 3
    };

    / / EN: Status of output switches (Analog pin)
    enpin int [2] = {
    0, 1
    };

    This is the driver.
    [​IMG]
    • Informative Informative x 1
  5. mikem

    mikem New Member

    Joined:
    Apr 30, 2014
    Messages:
    8
    Balance:
    336Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    6DOF
    you can use code to arduino?
  6. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,400Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    • Like Like x 1
    • Friendly Friendly x 1
  7. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    2,234
    Location:
    Marseille - FRANCE
    Balance:
    20,895Coins
    Ratings:
    +2,084 / 21 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hi!

    CS pins and EN pins are not used: I will remove it from the code! :) for more simplicity

    Please follow the steps of the tutorial http://www.xsimulator.net/community...dof-and-1-pwmpin-1-dirpin-hbridge-board.4614/
    and post actual pictures of your setup! ;)

    step 1 : no simtools, pot not connected to motor
    that's good! it works like this without any Simtools connection.
    step 2 : no simtools yet, pots connected to motor
    send instructions to arduino via serial monitor

    step 3 : with simtools
    For interfacing with Simtools, please use the presets I shared http://www.xsimulator.net/community/threads/2dof-arduino-simulator-with-rear-wipers.4896/
    • Like Like x 2
    • Informative Informative x 1
  8. mikem

    mikem New Member

    Joined:
    Apr 30, 2014
    Messages:
    8
    Balance:
    336Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    6DOF
    OK thank you very much, today Carries out tests following your comments. ;);)
    • Like Like x 2
  9. mikem

    mikem New Member

    Joined:
    Apr 30, 2014
    Messages:
    8
    Balance:
    336Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    6DOF
    hello
    first thank your advice.
    I managed to move the engines from the "SimTools / Ouput testing".

    Configure the "Live For Speed" by applying the patch in the Game Manager and setting him on "Profile Editor" on Main Level% to 100%.
    When I run the LFS the arduino starts receiving data but the motors do not move.


    Any advice?

    When I leave the arduino LFS does not receive data from the Game Manager to see the interface as

    thank you very much

    I leave a picture of the evidence!

    Attached Files:

  10. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    2,234
    Location:
    Marseille - FRANCE
    Balance:
    20,895Coins
    Ratings:
    +2,084 / 21 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    congratulations! that's exciting, isn't it ?!!

    I didn't understand your question, sorry...
    Mat
  11. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,400Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Ok so the Output testing is working and you have setup the interfaces correctly, then in the GameEngine - Tuning centre you should see values in the green area. If they are not moving your sim then either the Min Max (red area) are too high for your sim and need to be adjusted closer to zero.
    Try this if data is present in the Green Area. If no data is present in the Green Area then the game was not patched correctly with the Game Manager.
    • Like Like x 1
    • Useful Useful x 1
    Last edited: Jun 17, 2014
  12. mikem

    mikem New Member

    Joined:
    Apr 30, 2014
    Messages:
    8
    Balance:
    336Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    6DOF
    hi.
    sorry you do not understand.
    My test is
    1. open Game Engime
    2. Output Testing
    3. Turn On
    4. Move Roll bar and Pitch

    my motor move OK

    Test Simulator
    1. Start Game Manager.
    2. Pacth LFS (bar Green indicate Connected)
    3. Start Game (my Arduino RX data)
    ..... no move motor ;(

    TAnks
  13. mikem

    mikem New Member

    Joined:
    Apr 30, 2014
    Messages:
    8
    Balance:
    336Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    6DOF
    ahhhhhhhhhhh and
    potentiometer are not connected to the motor shaft.
    It is necessary for the test?
    as I set the maximum and minimum limits?
  14. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,400Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Yes, to test properly the Pot needs to be connected to the motor shaft, the pot represents the position of the lever to the Ard so that in the code it can decide how to act.
  15. RacingMat

    RacingMat Well-Known Member Gold Contributor

    Joined:
    Feb 22, 2013
    Messages:
    2,234
    Location:
    Marseille - FRANCE
    Balance:
    20,895Coins
    Ratings:
    +2,084 / 21 / -2
    My Motion Simulator:
    2DOF, DC motor, Arduino
    step 1: Yes, it's better to start the tests unconnected to check the wiring... if the pot is wiring in the wrong way, you will blow your pots!
    it requires to think twice with the pot in front of the motor and manual turning) :confused:

    step 2: Once that checked, yes connect the pot onto the motors! sit down and watch the motors moving along the Arduino Serial commands you type! :popcorn

    step 3: follow the advices of @eaorobbie to tune your Simtools
    Does your TX/RX led flash on arduino board when games is running or not?
    • Like Like x 1
  16. mikem

    mikem New Member

    Joined:
    Apr 30, 2014
    Messages:
    8
    Balance:
    336Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    6DOF
    Hi RacingMat,
    Only led flash arduino only RX, no led flash TX.
    tanks
    • Like Like x 1