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

Arduino UNO/Duemilanove 2dof firmware

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

  1. DDU

    DDU New Member

    Joined:
    Jan 4, 2014
    Messages:
    29
    Location:
    Melbourne
    Balance:
    908Coins
    Ratings:
    +22 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hi prilad

    I just wanted to say thank you to you and your friends for writing and sharing the Arduino code. :thumbs

    I wired up the Arduino to the Monster moto shield, and everything worked as expected. Sure, stacking it would have been easier, but 2 minutes, half a dozen jumpers and it's good to go.

    You should have a paypal donate button. I'd gladly buy you a beer or 2 :cheersor even a vodka :grin
    • Like Like x 2
    • Friendly Friendly x 1
  2. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,611Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    @DDU, thanks, buddy :cheers
    • Informative Informative x 1
  3. DDU

    DDU New Member

    Joined:
    Jan 4, 2014
    Messages:
    29
    Location:
    Melbourne
    Balance:
    908Coins
    Ratings:
    +22 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Another question for you Prilad, hopefully an easy one....

    I would like to put limit switches on my sim. Some of you guys may think this isn't necessary, but from prior experience, electronics can/do fail, so IMHO, it never hurts to design with safety in mind.

    From my little knowledge of the Arduino, there appears to be lots of inputs. I would like to connect the limit switches to any of those pins, wired normally closed preferably. If a switch is triggered, I would like all motion to stop immediately.

    My question is, would your code support that? And if not, how much work would it be to add that feature? Or if I found some code on the net that appeared to serve my purpose, would you be able to add that to your code?
    Last edited: Feb 7, 2014
  4. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,611Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Hi, @DDU

    I think if you want to use limit switches - you should make hardware switches for disconnect power supply. The firmware already has limiters based on feedback sensors (potentiometers or Hall sensors). And if Arduino will broken, limit switches connected to Arduino will do no effect.

    IMHO limit switches will need only for using encoders as feedback sensors.
    • Agree Agree x 1
    • Useful Useful x 1
  5. DDU

    DDU New Member

    Joined:
    Jan 4, 2014
    Messages:
    29
    Location:
    Melbourne
    Balance:
    908Coins
    Ratings:
    +22 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hopefully this isn't too dumb a question, but why is there several different firmwares with different baud rates?
    Is there any advantage to flashing with a higher baud rate?
  6. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,611Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Yes and Yes..
    Arduino family consist some different USB-to-RS232 translators (FTDI or Atmega8U2 or Atmega16U2). Some boards may have problems at high baud rates.
    • Agree Agree x 1
  7. DDU

    DDU New Member

    Joined:
    Jan 4, 2014
    Messages:
    29
    Location:
    Melbourne
    Balance:
    908Coins
    Ratings:
    +22 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Ahh, OK. I flashed with the v3 19200 firmware.

    With oscillator ticked, the 2 motors move back & forth and the sinewave looks nice and clean, so it all appears to be working just like in your youtube video in the first post.

    However when I launch Simtools, I can't get any movement at all. Would you mind sharing your presets please? At this stage, I'm testing 2 motors to be mounted under the seat
  8. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,611Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    • Like Like x 1
  9. DDU

    DDU New Member

    Joined:
    Jan 4, 2014
    Messages:
    29
    Location:
    Melbourne
    Balance:
    908Coins
    Ratings:
    +22 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thank you again, it now works :)

    If I re-flash with a faster firmware, (my board has a FTDI chip next to the USB port, if that means anything) how will I know if it's having problems at that baud rate?
  10. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,611Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Flash and try... I think all will be OK... But if it works good now, for why reflash it? ;)
  11. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    hey guys, hey prilad, ive been out, due to lack of money lool, but im almot finishing my simulator but i found some problems that you guys may knows, arduino, pcb and hbridge all works good as it should... they share a commom ground arduino----pcb----hbridge all is one ground from arduino.. the thing is when i test with no load on motor all goes good but when its under load 2 of my screens turns off and the xsimctrl frezzes ,, seems that some thing is coming back and conflicting with computer.. when it happens my hbridge frezzes some fets... im not using galvanic isolator what can be?
  12. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,611Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Hi, @trust928 ... I have spoken, I speak and I will speak - I strongly recommend to use galvanic isolation. The best way - opto isolator between Arduino and H-Bridge.
  13. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    i see you were right, i tought about it, but listen, theres a way to build an galvanic isolator? coz its very very expensive here, galvanic isolator is for the gnd wires? can u help me i miss only this.... soon i will post pics of the simulator
  14. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,611Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    • Like Like x 1
  15. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    Thanks prilad for the schematic.. but its a little confuse for me.. i dont understand very well the draw... its was gonna be easy if it was like the pcb one.... im trying to understand may i will need to send for some eletronic shop to build... if some one could make more easy to understand the schematic it wiil help many other thanks for all
  16. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    Hey prilad after look with atentio i see its very easyy to build, im gonna build it tomorrow i ve got some question,,
    1 this schematic connect in the ard out puts? Like ard -- isolator-- pcb--
    hbridge............. its goes like this the connection? And one more thing can i ignore m2-in2 and m1-in2???
  17. doctorxeno

    doctorxeno Member

    Joined:
    Nov 10, 2013
    Messages:
    33
    Balance:
    607Coins
    Ratings:
    +19 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    • Like Like x 1
  18. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    im having some problem in find, 6n137.. and here in my country is difficult to find galvanic isolators because of it im building one... i could find 6n135 can i use it? instead of 6n137? i bouth it.. im just waiting for the unswer of you guys to start soldering the wires lool:thumbs
  19. trust928

    trust928 Member

    Joined:
    Sep 19, 2013
    Messages:
    152
    Location:
    brazil
    Balance:
    435Coins
    Ratings:
    +7 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    Someone can help?
  20. Historiker

    Historiker Dramamine Adict Gold Contributor

    Joined:
    Dec 16, 2010
    Messages:
    2,158
    Occupation:
    Retired
    Location:
    Michigan USA
    Balance:
    9,176Coins
    Ratings:
    +2,156 / 19 / -1
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform, 6DOF
    Prilad has been AFK for a couple of weeks. I hope you are ok and look forward to seeing future posts buddy. Thanks for all the help.