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

Tutorial SMC3 Arduino 3DOF Motor Driver and Windows Utilities

Discussion in 'SimTools compatible interfaces' started by RufusDufus, Dec 1, 2013.

  1. Kirk

    Kirk Member

    Joined:
    May 19, 2014
    Messages:
    91
    Occupation:
    Sr Software Engineer
    Location:
    Texas
    Balance:
    15,087Coins
    Ratings:
    +114 / 2 / -0
    My Motion Simulator:
    2DOF, DC motor
    A few questions.
    1. The board that sits between the Arduino and the "LG ic5-1", what is it?
    2. The LG IC5-1 inverter, is there a reason that unit was chosen, aside from availability? They seem pricey and unavailable in the states, are you aware of other inverters that would perform similarly?
    3. The motor / gear box, is there a make / model?

    While my current project seems fine with DC motors, I have a future one that your setup would seem perfectly suited, but didn't realize it was attainable (I wasn't aware of SCM3).

    Thank you in advance for your response.
    • Like Like x 1
    • Winner Winner x 1
  2. hooshang

    hooshang Active Member

    Joined:
    Jul 6, 2011
    Messages:
    272
    Balance:
    289Coins
    Ratings:
    +157 / 3 / -0
    My Motion Simulator:
    2DOF, DC motor, AC motor, Arduino, 6DOF
    hello Kirk
    LG ic5-1 is a regular inverter that I chosed just because of availability
    and not for any specifications,maybe others you can find localy works better
    the board between Arduino and inverter is an adapor pwm 0-5 to 0-10v
    and 5 to 24 v for directions.
    here it is : and its not mine for sure:grin
    adaptor.jpg
    other than Arduino and also smc3 you can use other boards and codes too.
    hope it can help
    regards
    Hooshang
    • Like Like x 3
    • Informative Informative x 1
    Last edited: Jul 29, 2014
  3. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,644Coins
    Ratings:
    +1,009 / 8 / -1
    Hi Hooshang, it's great to see SMC3 being used with AC motors. :thumbs

    I am surprised at how much noise you have on the feedback signal even when nothing is moving. It should be much cleaner. My first guess would be it's because the pot wires are running right next to the inverter. Try moving them away, also twisting the wires together may help some, or in worse case maybe shield them.

    Maybe it's just because the pot is only temporary mounted with the stand and clip. Anyway just letting you know you should be able to improve this alot.

    Great work though!
    • Like Like x 1
  4. hooshang

    hooshang Active Member

    Joined:
    Jul 6, 2011
    Messages:
    272
    Balance:
    289Coins
    Ratings:
    +157 / 3 / -0
    My Motion Simulator:
    2DOF, DC motor, AC motor, Arduino, 6DOF
    @RufusDufus
    thank you friend for advices
    yes there is much noise on the feedback.i try to move away the inverter from pot wires,nothing much happened
    as soon as power on the inverter it start to noise on the feedback,:thinkand when inverter turns off,noise disappear
    I donno what should I do for that,
    regards
    Hooshang
    • Like Like x 1
  5. hooshang

    hooshang Active Member

    Joined:
    Jul 6, 2011
    Messages:
    272
    Balance:
    289Coins
    Ratings:
    +157 / 3 / -0
    My Motion Simulator:
    2DOF, DC motor, AC motor, Arduino, 6DOF
    hello Rufus ,there is one more important problem,:sos
    when the pot travel to the end of both directions,Ardunio stop working :mad: and I have to turn back pot
    to somewhere at the middle then restart Arduino to work again.ive changed and checked all the value
    in the smc3util but no success .may this come from inverter setting or adaptor or pot itself?
    thank you for help
    regards friend
    Hooshang
    • Like Like x 1
  6. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,644Coins
    Ratings:
    +1,009 / 8 / -1
    Ahh, that is a feature of SMC3... it shuts down the motors if the feedback moves into the Limit Zone setup in Windows SMC3Utils. This is to help protect your sim and pots getting damaged if the sim moves too far - it shuts down everything. You could set the limits ("Max Limit") to be zero to use maximum scale and the "Clip Limit" to be more say 150. The Clip Limit setting tries to stop the motors from moving any further by using motor braking but doesn't shut the motors down... its only when they get to the "Max Limits" that they are shutdown and you need to reset the Arduino.

    Given that you have alot of noise on the feedback signal, the input may be jumping into the limit zones from the noise causing it to shutdown even if the pots aren't really at the limits?

    If it continues to be a problem I could make a version that ignores the motor shutdown if the Max Limit is set to Zero.

    As for your noise issue... inverters are common sources of noise. You could try getting a large Ferrite Ring and feeding the mains power cable through it a few times. Make sure you have some good capacitors on the arduino power supply. Maybe put a small capacitor on the POT input line to ground. To some extent the PID algorith will smooth out this noise anyway but its always better to remove problems at the source rather than fix them later.
    • Like Like x 2
    • Agree Agree x 1
  7. hooshang

    hooshang Active Member

    Joined:
    Jul 6, 2011
    Messages:
    272
    Balance:
    289Coins
    Ratings:
    +157 / 3 / -0
    My Motion Simulator:
    2DOF, DC motor, AC motor, Arduino, 6DOF
    thank you for reply,i just set pwmmax to zero and then I continue to limit motor movement by simtools ...

    about noise ,I have a lot noise on both feedback pot and pwm ,I just tried
    several different size Ferrite ring for any wires between boards and inverter and also power supply but no progress.and about capasitors,i don't have enough
    knowledge to chose and set up one,but one question,when I use the inverters
    potanciometer on it and even using an external pot on pin V1 it doesn't have any noise at all and works so smooth but as I connect the pwm instead,it start much noise,dont you think I missed anything in between or something...
    how can I get rid of these damn noise:sos
    thank you for supporting friend
    regards
    Hooshang
    • Like Like x 1
  8. insanegr

    insanegr !N$@n€

    Joined:
    Jan 14, 2014
    Messages:
    505
    Location:
    Athens
    Balance:
    16,715Coins
    Ratings:
    +499 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    @hooshang you can replace your cables with shield cables and give it a try.
    there was a discussion in an other build with ac motors here post #165 and greater .
    give it a look it might help.
    nice seeing ac motors "powered" by simtools.:)
    • Like Like x 2
  9. terry wells

    terry wells Active Member

    Joined:
    Jan 19, 2014
    Messages:
    250
    Occupation:
    retired military
    Location:
    minnesota USA
    Balance:
    734Coins
    Ratings:
    +59 / 1 / -0
    My Motion Simulator:
    3DOF, Arduino
    Is the SMC3 utils setup so as mode 2 will work with the IBT-2 ? As of now I am using mode 1 with the monster board and I was wondering if I needed to change anything for mode 2.
    Thanks, Terry W.
    • Like Like x 1
  10. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,644Coins
    Ratings:
    +1,009 / 8 / -1
    Hi Terry, to change the SMC3 code in the Adruino to use mode 2 you need to edit the line of code at the top of the .ino file before you upload the code to the Arduino. ie for mode two change to

    #define MODE2

    You don't need to change any other software.

    If you are using the MonsterMoto boards I would stick with them over the IBT-2... the MonsterMoto boards have much better driver chips in my opinion. (But correct in changing SMC3 to mode 2 for the IBT-2)
    • Like Like x 1
    • Informative Informative x 1
  11. terry wells

    terry wells Active Member

    Joined:
    Jan 19, 2014
    Messages:
    250
    Occupation:
    retired military
    Location:
    minnesota USA
    Balance:
    734Coins
    Ratings:
    +59 / 1 / -0
    My Motion Simulator:
    3DOF, Arduino
    Thank You Rufus Dufus for that reply. As of now Iam sticking with the monster board however I have another problem that you may be able to help me with. When the "BLUE" wire from the pot is connected to the Arduino board, only motor #1 will run both cw and ccw by adjusting the pot. (the way it should work). However when the "GREEN" wire is connected to the board (motor #2 only) motor #2 will only run cw. I cannot adjust the pot to make it run ccw and motor #1 runs also. When I adjust the #2 pot (GREEN), motor #1 will run cw and ccw??? I hope my explanation was ok and maybe you can help me. Is it a bad pot or maybe a bad Arduino board or a bad monster board? see pictures
    Thank You again
    Terry W. 002.JPG

    Attached Files:

    • 003.JPG
      003.JPG
      File size:
      381.6 KB
      Views:
      836
    • 004.JPG
      004.JPG
      File size:
      339.7 KB
      Views:
      884
    • 005.JPG
      005.JPG
      File size:
      254.5 KB
      Views:
      841
    • Like Like x 1
  12. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,644Coins
    Ratings:
    +1,009 / 8 / -1
    Sorry for the late response...

    I believe this is simply because of where the "target" position is for each motor. Remember the code tries to move the motor so the pot and the target are the same. If you haven't sent a target position for one of the motors then it will be sitting at 0 so the pot will be 0 at one extreme and not turn the motor but any other position will be greater than the target and try to move the motor back to zero.

    The way to stop this is to make sure each motor target is set to the center position - this can be done easily with windows SMC3Utils.

    The reason both motors move with only one pot connected is simply crosstalk in the electronics. If one pot input is left unconnected they are very sensitive inputs on the micro and they pickup the signal from the adjacent inputs. Best to always have a pot connected to the inputs. Alternatively just ignore or disconnect the other motor.
    • Informative Informative x 2
    • Like Like x 1
  13. terry wells

    terry wells Active Member

    Joined:
    Jan 19, 2014
    Messages:
    250
    Occupation:
    retired military
    Location:
    minnesota USA
    Balance:
    734Coins
    Ratings:
    +59 / 1 / -0
    My Motion Simulator:
    3DOF, Arduino
    Thank you. I have tested my monster board with another and it seems that my monster board was bad.
    Terry W.
  14. ericRacer

    ericRacer You get old because you stop playing ! Gold Contributor

    Joined:
    Jun 11, 2009
    Messages:
    251
    Occupation:
    Pilot
    Location:
    Canada, Quebec
    Balance:
    989Coins
    Ratings:
    +147 / 2 / -0
    My Motion Simulator:
    3DOF, Arduino, Motion platform
    Last edited: Aug 15, 2014
  15. terry wells

    terry wells Active Member

    Joined:
    Jan 19, 2014
    Messages:
    250
    Occupation:
    retired military
    Location:
    minnesota USA
    Balance:
    734Coins
    Ratings:
    +59 / 1 / -0
    My Motion Simulator:
    3DOF, Arduino
    so if I were to use two Moto Monster boards would they just be stacked on top of each other?
  16. ericRacer

    ericRacer You get old because you stop playing ! Gold Contributor

    Joined:
    Jun 11, 2009
    Messages:
    251
    Occupation:
    Pilot
    Location:
    Canada, Quebec
    Balance:
    989Coins
    Ratings:
    +147 / 2 / -0
    My Motion Simulator:
    3DOF, Arduino, Motion platform
    probably yes , the holes are at the same place over it, but the problem i see , is where you will put the heat dissipator ? If you don't use the board at his maximum power ! MAYBE you don't need a heat dissipator !o_O
  17. ericRacer

    ericRacer You get old because you stop playing ! Gold Contributor

    Joined:
    Jun 11, 2009
    Messages:
    251
    Occupation:
    Pilot
    Location:
    Canada, Quebec
    Balance:
    989Coins
    Ratings:
    +147 / 2 / -0
    My Motion Simulator:
    3DOF, Arduino, Motion platform
    :grin I found a very beautiful simulator on the net I found very good. I saw he was using the same components as some of us. After contemplating his masterpiece, his name reminded me of someone .......:confused:

    file:///C:/Users/Eric/Downloads/MRAP%20Seatmover.pdf

    @RufusDufus Thank you for your help and sharing... :thumbs
  18. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,644Coins
    Ratings:
    +1,009 / 8 / -1
    It won't work without modifying the code first - all the pinouts are different. I have never tried myself. Stacking multiple units would be even more problematic as both moto monster boards would be using the same pins - easier just to wire them up in my opinion. ;)
    • Agree Agree x 1
  19. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,644Coins
    Ratings:
    +1,009 / 8 / -1
    More details in the following threads...

    http://www.xsimulator.net/community/threads/mrap-seat-mover-first-motion.4602/
    http://www.xsimulator.net/community/threads/mrap-seat-mover-traction-loss.5558/

    Never really finished the documentation, but if you have questions just ask in the threads above.

    The unit is still running strong - used almost every day for about 30minutes minimum.
  20. Pit

    Pit - - - - - - - - - - - - - - - - Gold Contributor

    Joined:
    Oct 2, 2013
    Messages:
    3,013
    Location:
    Switzerland
    Balance:
    30,416Coins
    Ratings:
    +3,088 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    For me it won't work as a shield because I use two motor drivers. As they will be very hot under full load they have to be cooled if not they are cooked ;)
    • Like Like x 1
    • Informative Informative x 1