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

I am New to DIY sim building. Anyone chiming in with help is great.

Discussion in 'DIY Motion Simulator Building Q&A / FAQ' started by james wheeler, Mar 17, 2014.

  1. 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,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    My humble apologize my friend, Skimmy through didn't not pickup you were talking about a pair. DOH! :oops:
  2. james wheeler

    james wheeler Active Member

    Joined:
    Mar 17, 2014
    Messages:
    185
    Balance:
    216Coins
    Ratings:
    +48 / 1 / -0
    My Motion Simulator:
    2DOF, Arduino
  3. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,622Coins
    Ratings:
    +1,835 / 32 / -1
    Thanks for the clarification Robbie! I try to give the best advice I can so I was curious if I missed something that would allow a different hookup with these. Some motor controllers allow for a master and slave configuration also. Since we all learn from each other, if there is more for me to learn about something, I am eager to accept it!
    • Agree Agree x 1
  4. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,622Coins
    Ratings:
    +1,835 / 32 / -1
    I think this is the code you require @james wheeler http://www.xsimulator.net/community/marketplace/arduino-code-2dof-and-2-pins-direction-hbridge.67/

    Just one thought. This may a little easier to set up with a shield and a dual motor controller than using the individual ones. However, if you fry a mosfet or something on one of the channels then you will be looking at replacing a dual controller vs only the single one that's bad. The dual appears to be almost exactly double the price of the single so their is not a cost benefit in going with the dual.

    Also to try to find things on this website google xsimulator and what you are looking for. I googled "xsimulator arduino 2 pin" to find this code for you. It was the first link I got after the sponsored ones.
  5. Historiker

    Historiker Dramamine Adict Gold Contributor

    Joined:
    Dec 16, 2010
    Messages:
    2,161
    Occupation:
    Retired
    Location:
    Michigan USA
    Balance:
    9,201Coins
    Ratings:
    +2,164 / 19 / -1
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform, 6DOF
    Prilad's, Rufus Dufus' and RacingMat's codes all use 1 pin or two pin.

    All three work well, I have used them in my builds.

    Currently using Rufus Dufus' code as it has a nifty tuning utility and can handle three motor controllers.
    • Winner Winner x 1
  6. james wheeler

    james wheeler Active Member

    Joined:
    Mar 17, 2014
    Messages:
    185
    Balance:
    216Coins
    Ratings:
    +48 / 1 / -0
    My Motion Simulator:
    2DOF, Arduino
    the boards are here.:) IMAG0903.jpg
  7. james wheeler

    james wheeler Active Member

    Joined:
    Mar 17, 2014
    Messages:
    185
    Balance:
    216Coins
    Ratings:
    +48 / 1 / -0
    My Motion Simulator:
    2DOF, Arduino
    BlazinH I took your advice and bought a uno and the pololu vnh5019 sheild. now lets get them working. they just got here so now the code. i did check the link you provided but was it ment for a shield or my origional idea?
  8. james wheeler

    james wheeler Active Member

    Joined:
    Mar 17, 2014
    Messages:
    185
    Balance:
    216Coins
    Ratings:
    +48 / 1 / -0
    My Motion Simulator:
    2DOF, Arduino
    OK i have gotten this far building all the hardware and wiring. The only thing I am not sure of is the pots wires.
    Where do they go? IMAG0904.jpg IMAG0905.jpg IMAG0906.jpg IMAG0907.jpg

    this is just a test bench (although its a old record screwed onto a couple of 2x4s) in a sence. I will rewire everything when i bolt it to the frame. Once I learn how to wire the pots I can move onto code.
    My power supply at the momment is still my old 19v 5 amp laptop power. will this effect the code at all?
  9. 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,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Ah none of the Ard code is setup for stacking like you have, unless changed recently.
    Pots signal wire goes to the Analog pins on Ard and +ve and -ve go to 5v and gnd respectively.
  10. james wheeler

    james wheeler Active Member

    Joined:
    Mar 17, 2014
    Messages:
    185
    Balance:
    216Coins
    Ratings:
    +48 / 1 / -0
    My Motion Simulator:
    2DOF, Arduino
    is pololu motorboard not a threw way for the signals from the pots? you are saying i need to connect the pots directly to the ard. i assumed the siglals would relay through the pololu to the ard. they can bedissasembled and wired sepertaly but i wanted to avoid as much solderimg as possible.
  11. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,622Coins
    Ratings:
    +1,835 / 32 / -1
    The code I linked to above shows to hook up the ard like this:

    Arduino /..Motomonster1
    ......GND <-> GND pin
    ........5V <-> 5V
    .....pin 4 <-> pin 4 inA motor1
    .....pin 5 <-> pin 5 pwm1
    .....pin 6 <-> pin 6 pwm2
    .....pin 7 <-> pin 7 inA motor2
    .....pin 8 <-> pin 8 inB motor1
    .....pin 9 <-> pin 9 inB motor2

    If the vnh5019 motor driver has the same pin mappings as the Motomonster then it should work stacked with the code used as is. If the ards pot input pins used in the code are available on the sheild, then I think you could solder them to the sheild instead of to the ard. However, if the pin mappings are different than above, you will either have to separate the shield from the ard and wire unstacked, or change the code in the ard so it will use the correct pin mappings for the vnh5019.

    btw. I recommend going with the single motor drivers, not the dual! Then if one channel goes bad you would only have to replace the bad one at half the cost of replacing a dual controller.

    Disclaimer: I'm not a arduino user so I might have got something wrong but this is how it appears to me.
  12. 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,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Sorry @james wheeler none of the existing code supports the driver being plugged in the way you have it, you need to make connecting wires and have the two board separate.
  13. james wheeler

    james wheeler Active Member

    Joined:
    Mar 17, 2014
    Messages:
    185
    Balance:
    216Coins
    Ratings:
    +48 / 1 / -0
    My Motion Simulator:
    2DOF, Arduino
    using this image


    from pololu and blazinh pin lay out I hooked them up seperate but I think somehow the conntroller is dead. B4 I was getting a green and red light on either side of the hook ups for the motors but now there is only a blue light meaning that the power is on sheild connection.jpg
  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,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    To test the controller flash it with the blink tutorial within the Ard IDE and you may find its all ok. Not sure if @BlazinH has used this driver or code personally, I wouldn't.
    Prilads or RufusDufus is by far easier for a newbie to MC to setup and get running.
    The apps they have makes it nice and easy to setup, where as the other you have to manually edit everything , a headache and a pain for a newbie.
  15. james wheeler

    james wheeler Active Member

    Joined:
    Mar 17, 2014
    Messages:
    185
    Balance:
    216Coins
    Ratings:
    +48 / 1 / -0
    My Motion Simulator:
    2DOF, Arduino
    Are you refering to the pin 13 blink tutorial found on the ardino site? how do i use that to test if the pololu motor controller is working?
    where do I find rufusdufus
  16. 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,440Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Ok you need to upload the sketch to the Ard. then wait a few secs and the red led , default set to pin13 will beat like a heartbeat, if all good then re upload the motion code and all is well with the Ard.

    Its just a basic test to make sure the Ard is functioning and not about the motor controller.

    1.Connect the Ard to the Usb Port.
    2.Open the Ard IDE
    3. File - Examples - Basics - Blink
    4. Tools - Board - make sure the right board is selected.
    5. Tools - Serial Port - make sure the right serial port is selected.
    6. File - Upload.
    Once finished uploading the red led will blink like a heart beat.
    This confirms the Ard is ok.
    Now repeat the process and open the motion code you wish to run.

    Now from there you need to follow the code writers instructions to get it to run properly.
    RufusDufus code and instructions and nice little setting up app can be found here,
    http://www.xsimulator.net/community...3dof-motor-driver-and-windows-utilities.4957/
    As you want 3DOF this is exactly what he has built it for.
  17. james wheeler

    james wheeler Active Member

    Joined:
    Mar 17, 2014
    Messages:
    185
    Balance:
    216Coins
    Ratings:
    +48 / 1 / -0
    My Motion Simulator:
    2DOF, Arduino
    @eaorobbie can you please just confirm that I am starting to figure this out.

    using the written pin diagram and the vnh5019 picture above I am assuming that this is how the modified wire hook up should be laid out.

    arduino => pololu vnh5019

    pin 4 => pin 2 m1inA
    pin 5 => pin 9 m1 pwm
    pin 6 => pin 10 m2 pwm
    pin 7 => pin 7 m2inA
    pin 8 => pin 4 m1inB
    pin 9 => pin 8 m2inB

    5v => 5v
    GND => GND

    POTm1 => A4
    POTm2 => A5

    I have been reading the link you sent me and if this is correct I will start putting the power to it.

    The motor controll board seems to be working. At least the lights are on/
  18. james wheeler

    james wheeler Active Member

    Joined:
    Mar 17, 2014
    Messages:
    185
    Balance:
    216Coins
    Ratings:
    +48 / 1 / -0
    My Motion Simulator:
    2DOF, Arduino
    I have looking at the rufusdufus code and I am stuck at the first part. I don't know what is is i am needing to do to edit the code for mode 1 or 2
    Do I add something in or delete something. I downloaded scm3 v0.6
    I cant use the software till I install the scetch.
  19. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,622Coins
    Ratings:
    +1,835 / 32 / -1
    The pin mapping modifications you made appear to be correct if you want to use it as a shield. However, if you are not going to stack it (as recommended by eaorobbie) then you can use the general purpose pins [1 in pic] on the vnh5019 to wire to instead.

    [​IMG]

    Also, while your probably excited to get up and running, I recommend you try reading post here a little more thoroughly. Not only did I recommend going with a single, not a dual controller; but also I stated the pin mappings I posted would only work if the monster moto and vnh5019 had the same mappings.

    And as stated earlier, I am not an arduino user! Just trying to help out if I can. But I would rely more on the arduino experts here than myself! Good luck getting going!
  20. james wheeler

    james wheeler Active Member

    Joined:
    Mar 17, 2014
    Messages:
    185
    Balance:
    216Coins
    Ratings:
    +48 / 1 / -0
    My Motion Simulator:
    2DOF, Arduino
    after rereading you post again earlier i did notice that i took your meaning in reverse of what you said and that pushed me towards understanding that shields are not universal. thank you for taking the time to look over my guessimations. i am probably out of my leage since I have no training in this field but with all the helo i am getting from everyone I am going to at least get up to bat. Thanks agin