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 Download Package Now!
  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 here. Do not following these rules will lead to permanent exclusion from this website: Read the forum rules.

Arduino UNO/Duemilanove 2dof firmware

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

  1. prilad

    prilad Well-Known Member SimTools Developer SimAxe Beta Tester SimTools 2.0 Beta Tester

    Joined:
    Apr 29, 2012
    Messages:
    381
    Location:
    Dubna, Russia
    Balance:
    8,789Coins
    Ratings:
    +481 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Hi, Guys.

    I (with my friends) has created the port of alternative 2dof firmware to Arduino platform.
    It must to work at all Arduino with atmega328p - UNO, Duemilanove, ( Nano not confirmed ).

    x-sim_arduino_uno_by_Ale.rar

    Here you can found soft for uploading HEX files to Arduino:
    http://xloader.russemotto.com/

    IMPORTANT: after flashing Arduino UNO you must unplug it from PC and then plug in again.

    This port contains all features described in this thread ...
    http://www.x-simulator.de/forum/revolution-firmware-and-software-for-amc1-5-1-6-t3912.html
    ... with three changes:
    - different COM-port Baud.
    - LCD display is not supported
    - Terminal is not supported. For setting parameters use xSimCTRL software...

    Arduino_2dof_from_Ale.jpg
    I recommend to use the board with galvanic isolations ( http://en.wikipedia.org/wiki/Galvanic_isolation ) for each control lines. It may be based on opto-isolators as 6N137 (and you can use Thanos opto isolators board). And it may be based on transformer isolators, like ADuM1400 (http://www.platan.ru/pdf/datasheets/analogdevices/ADuM1400_1401_1402.pdf)

    As alternative you can use USB-isolator board as
    http://herostechnology.co.uk/pdf/USB_Digital_Isolator_Manual_diagram.pdf
    http://www.saelig.com/product/UBUSB1001.htm

    Here is the video with simple work demonstration:


    One more video - test with wiper motor.

    PS: This is a project of small group of authors and testers from Russian SIM forum:
    http://mal4x.ru/viewforum.php?f=6


    UPDATE 19.11.2013
    new firmware version with fixed bug "incompatibility" with SimTools

    Attached Files:

    • Like Like x 9
    • Useful Useful x 4
    • Agree Agree x 2
    Last edited: Nov 19, 2013
  2. bsft

    bsft

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Groovy, thanks man!
    On the eventualto do list......get and arduino.....
    Now the info is here. :clap:
  3. RaceRay

    RaceRay Administrator Staff Member SimAxe Beta Tester SimTools 2.0 Beta Tester

    Joined:
    Nov 8, 2006
    Messages:
    4,605
    Occupation:
    Self-employed | Web and application development
    Location:
    Hamburg, Germany
    Balance:
    24,456Coins
    Ratings:
    +1,080 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, SimAxe, SimforceGT
    Arduino rocks :) Well Done! I did a sticky to your thread
  4. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    344Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    i would love to use arduino... but can u show us a detailed diagram of the wires,, can i skip the galvanic process? the most part of this stuffs is difficulty to find,, and how can i take only the pwm signals? i have an hbridge but it does not have the pot pins,, it only have to input pins for directions and one for ground.. can it work? how can assembly the pots? thanks
  5. prilad

    prilad Well-Known Member SimTools Developer SimAxe Beta Tester SimTools 2.0 Beta Tester

    Joined:
    Apr 29, 2012
    Messages:
    381
    Location:
    Dubna, Russia
    Balance:
    8,789Coins
    Ratings:
    +481 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Ups... Sorry, but some yours question I can't understand.

    At the topic you can see connection diagram. If you want to avoid galvanic isolation, then the diagram will look like this
    Arduino_2dof_from_Ale_2.jpg


    What do you mean?


    You must connect potentiometers to Arduino, not to H-Bridge.
    • Like Like x 1
    • Informative Informative x 1
  6. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    344Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    sorry, my keyboard is not in its best conditions to type, loll
    this is my tread about my h-bridge,,,, its a simple h-bridge with pwm input signals.. all the h-bridges that i have seen theres a ton of pins to be connected... and my one only have 3 pins... 2 pins for directions and one ground pin

    http://www.xsimulator.net/community/threads/h-bridge-12v-40amps.4731/#post-45150

    could u help me connect it to the arduino if possible? i don't understand very much the diagram,, were i connect the pots?..I'm planning to build thanos h bridge its very simple but limited,, this one can handle 40 amps 12v.. thanks
  7. Historiker

    Historiker Dramamine Adict Staff Member Moderator Gold Contributor SimTools 2.0 Beta Tester

    Joined:
    Dec 16, 2010
    Messages:
    1,742
    Occupation:
    Teacher/Cabinet Maker
    Location:
    Michigan USA
    Balance:
    8,981Coins
    Ratings:
    +1,576 / 11 / -1
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    Hi Trust,

    As Prilad mentioned, you do not connect the potentiometer to the H-Bridge, they are attached to the Arduino. You can see the pot wires attached in his picture there to ports A0 and A1 (for the potentiometer wiper wires) and the positive and negative potentiometer wires are connected to v5 and ground.

    The two pins that you have on your H-bridge are for the PWM wire and the Direction wire coming from the Arduino. On the Arduino pin 8 is motor 1 (M1) direction (DIR1) and pin 9 is Motor 1 (M1) PWM. You will also need to run a ground wire from the Arduino to the ground pin on the H-Bridge but NOT to the same ground port where you connect the 12v power supply or connect the motor wires.

    I am not sure which of the two pins on your H-Bridge are PWM and DIR though. You might post the schematic here that you posted in your build thread.

    My own 2DoF platform has a similar setup using the Arduino but also using two Pololu755 driver boards.

    David
    • Like Like x 1
  8. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    344Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    thanks david, i was confused by the initias name like (m1 and dir 1) loll it make much more sense haha

    this is the diagram of the hbridge,, as u can see inB and inA are for directions

    Attached Files:

  9. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    344Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    okay this will be a noob question but lets go.. loll

    the pwm signals wires is not same ones who goes to the directions pins.... coz it only have 3 pins..
    if i take.. 2 wires for directions.. just will have one for ground and nothing more.... were the pwm goes? i don't even know exactly how the pwm works or if it works toghter with direction.. sorry
  10. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    344Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    now I'm understanding what is pwm and looking to the diagram.. seems that i must find were i could take the pwm signals.. coz it only have directions pins.. i need professional help if some one could read the schematics// or tell me how i can identify the pwm in the pcb....
  11. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    344Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    i have discovered one thing.. the guy who made it,, says

    (to use pwm signals to control the direction speedy.. just connect the pwm wires to the input directions pins) and thats it... no direction wires needed... only the pwm to control directions ...

    can this work? look at the pictures

    Attached Files:

    • Like Like x 1
    • Informative Informative x 1
  12. Historiker

    Historiker Dramamine Adict Staff Member Moderator Gold Contributor SimTools 2.0 Beta Tester

    Joined:
    Dec 16, 2010
    Messages:
    1,742
    Occupation:
    Teacher/Cabinet Maker
    Location:
    Michigan USA
    Balance:
    8,981Coins
    Ratings:
    +1,576 / 11 / -1
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    Can you post the original site where you found your information? I am pretty sure he has one PWM and one DIR (and a ground).
  13. prilad

    prilad Well-Known Member SimTools Developer SimAxe Beta Tester SimTools 2.0 Beta Tester

    Joined:
    Apr 29, 2012
    Messages:
    381
    Location:
    Dubna, Russia
    Balance:
    8,789Coins
    Ratings:
    +481 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    NO. Unfortunately it doesn't be work correctly. You can't connect your bridge directly to Arduino. You should modificate your schematics...
    • Like Like x 1
  14. Historiker

    Historiker Dramamine Adict Staff Member Moderator Gold Contributor SimTools 2.0 Beta Tester

    Joined:
    Dec 16, 2010
    Messages:
    1,742
    Occupation:
    Teacher/Cabinet Maker
    Location:
    Michigan USA
    Balance:
    8,981Coins
    Ratings:
    +1,576 / 11 / -1
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    I found the website where you are getting your information on this H-Bridge:

    http://www.robotizando.com.br/artigo_ponte_h_pg1.php

    Interesting read. It looks as if the author only wanted to make a circuit that could drive an electric wheelchair through direct user input so used an Arduino controlled by buttons. One button would turn off PWM A and one would turn on PWM B allowing polarity change and therefore reversing direction. This circuit does not indeed have a DIR input type as it looks like both inputs are "live" and having them both active high would result in magic smoke being released.
    • Like Like x 1
    • Agree Agree x 1
  15. prilad

    prilad Well-Known Member SimTools Developer SimAxe Beta Tester SimTools 2.0 Beta Tester

    Joined:
    Apr 29, 2012
    Messages:
    381
    Location:
    Dubna, Russia
    Balance:
    8,789Coins
    Ratings:
    +481 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Yes. This schematics can be modified with adding one chip 74ls02 like on this example
    mod  H-Bridge SCHEMATICS.jpg
    • Like Like x 5
  16. Historiker

    Historiker Dramamine Adict Staff Member Moderator Gold Contributor SimTools 2.0 Beta Tester

    Joined:
    Dec 16, 2010
    Messages:
    1,742
    Occupation:
    Teacher/Cabinet Maker
    Location:
    Michigan USA
    Balance:
    8,981Coins
    Ratings:
    +1,576 / 11 / -1
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    Excellent Prilad! Thank you.
  17. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    344Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    thanks prilad im gonna make the circuit,,, and i will be :thumbsstill needing the help of u guys thanks
  18. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    344Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    prilads can u help me with the pot wiring? u diagram is confusing me...
  19. Historiker

    Historiker Dramamine Adict Staff Member Moderator Gold Contributor SimTools 2.0 Beta Tester

    Joined:
    Dec 16, 2010
    Messages:
    1,742
    Occupation:
    Teacher/Cabinet Maker
    Location:
    Michigan USA
    Balance:
    8,981Coins
    Ratings:
    +1,576 / 11 / -1
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 6DOF
    The pot wiring is pretty simple. Look at the picture that he provided. On the bottom left of the UNO are ports A0-A5.

    He has motor 1 (M1) potentiometer wiper wire connected to Arduino UNO port A0
    He has Motor 2 (M2) potentiometer wiper wire connected to Arduino Uno port A1

    The wiper wire is usually the center wire on standard potentiometers but it would be best to verify this by looking at the specification sheet for the potentiometer that you plan on using. Multi-turn pots often have the wiper connector on the back or bottom of the pot.

    A potentiometer has three connectors or wires coming off it. A positive (+), a negative (-) and a wiper. Read the documentation for the particular potentiometer that you plan to use! ;)

    You can connect the positive wires from both pots together (common) and connect them to the v5 port on the Arduino UNO (see Prilad picture)

    You can connect the negative wires from both pots together (common) and connect them to the ground (GND) port on the Arduino UNO (see Prilad's picture).
    • Like Like x 2
  20. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    153
    Location:
    brazil
    Balance:
    344Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    more clear than water haha thanks.. 10k pots i shoud buy is it?