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. evolaco

    evolaco Member

    Joined:
    Sep 27, 2015
    Messages:
    260
    Location:
    Spain
    Balance:
    1,070Coins
    Ratings:
    +29 / 0 / -0
    My Motion Simulator:
    3DOF
    http://s.aliexpress.com/YbEFruIR

    Can you use a h bridge like this with smc3? Seems to have two connections less than the motomonster Put max 30a but those mosfet hold 110a, I just do not understand that
  2. Wagnard

    Wagnard Well-Known Member Gold Contributor

    Joined:
    Jan 30, 2017
    Messages:
    501
    Location:
    Canada, Quebec, Mirabel
    Balance:
    4,888Coins
    Ratings:
    +660 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Found a BUG with SMC3. FPWM is crewed up when starting the SMCUTIL app.
    Example:
    SMC Mode2 with IBT-2
    Configuration saved with FPWN 5kHz for Motor1, motor make a whining and is able to turn on lower MINPWM.
    In smcutil , it shows 5kHz . Ok so far.
    -CLose smcutil.
    -All good, motor work and sound as expected (they are still at 5kHz)
    -Start back SMCutil. Sound disapear and motor is not able to turn. SMCUtill still show 5kHz.
    -Set FPWN at 10 and back at 5kHz , and now its working as intended at 5kHz.

    So there seem to be an issue on start of the SMCUtil tool that affect the FPWN.
    Last edited: May 19, 2017
  3. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,952Coins
    Ratings:
    +1,016 / 10 / -1
    If the POT signal is too noisy it can sometimes register a reading outside the limits range even though it doesn't appear to move to this range. The chart does not display every sample.

    Try to twist the three wires to the POT together. Keep them away from the motor power wires. You could try using shielded wire. If you have a CRO or DSO have a look at the signal quality from the POT. It should be stable and smooth. Sometimes low quality POTs are noisy because the contacts don't continously make contact. You could put a capacitor between the POT signal wire and GND close to the Arduino to help filter noise. You could modify the Arduino code to average the ADC samples.

    Make sure you have good GND connections between everything.
  4. Wagnard

    Wagnard Well-Known Member Gold Contributor

    Joined:
    Jan 30, 2017
    Messages:
    501
    Location:
    Canada, Quebec, Mirabel
    Balance:
    4,888Coins
    Ratings:
    +660 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Thanks for your suggestions, it seems to have helped as we didn't had the problem yesterday with our testing.
    Now,only need to force 5khz to motor 1 via Arduino code since smcutil seems to.have an issue on start with fpwm.
    Ever considered making the utility open-source?
  5. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,952Coins
    Ratings:
    +1,016 / 10 / -1
    Yes I've been asked that before but that source code is on an old computer packed away - I've been too busy(lazy?) to set it up again.

    It doesn't make sense that it is related to SMC3Utils anyway because the settings are saved in Arduino EEPROM. Just had a quick look at the SMC3 arduino code that is posted and I think the problem is the call to ReadEEProm(); needs to be added to the beginning of the Setup() function. At the moment it is in the start of the main loop after the timers are initialised.
  6. Wagnard

    Wagnard Well-Known Member Gold Contributor

    Joined:
    Jan 30, 2017
    Messages:
    501
    Location:
    Canada, Quebec, Mirabel
    Balance:
    4,888Coins
    Ratings:
    +660 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Ill see with the Arduino code then, it just weird that the issue happens when starting SMCUtil and not when "starting/plugging" the arduino.
    I thought that it could have been that SMCUtil reads the config on start and maybe did an apply of this config and was applying it incorrectly on start. (or something along this.).
    Anyway, ill do some testing with your suggestion.
    Thanks for your time , i'll post back if the issue is fixed.
  7. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,952Coins
    Ratings:
    +1,016 / 10 / -1
    No SMC3Utils doesn't write anything to arduino until you change a setting. It does reset the arduino on startup though.
  8. Wagnard

    Wagnard Well-Known Member Gold Contributor

    Joined:
    Jan 30, 2017
    Messages:
    501
    Location:
    Canada, Quebec, Mirabel
    Balance:
    4,888Coins
    Ratings:
    +660 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Ok it must be like you say then, it's probably on the arduino code.
    Thanks for your time !
    btw, is there a way to make a donation to you for your software? as a programmer myself (Display Driver Uninstaller aka DDU) I would appreciate sending you a beer for your hard work and support ;)
    • Friendly Friendly x 2
    • Like Like x 1
  9. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,952Coins
    Ratings:
    +1,016 / 10 / -1
    HaHa, thanks for the offer but I did this one for my own interest so just enjoy it!
    • Winner Winner x 3
    • Funny Funny x 1
    • Friendly Friendly x 1
  10. Wagnard

    Wagnard Well-Known Member Gold Contributor

    Joined:
    Jan 30, 2017
    Messages:
    501
    Location:
    Canada, Quebec, Mirabel
    Balance:
    4,888Coins
    Ratings:
    +660 / 2 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    I have tried your suggestion and it work as expected now. Thanks !
  11. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,952Coins
    Ratings:
    +1,016 / 10 / -1
    Thanks for testing, I have added a new version to the first post with this change and the fix for the motor 2 and 3 min cut off limits bug. I haven't tested it myself but was a straight forward change so should be OK. ;)
    • Like Like x 3
  12. evolaco

    evolaco Member

    Joined:
    Sep 27, 2015
    Messages:
    260
    Location:
    Spain
    Balance:
    1,070Coins
    Ratings:
    +29 / 0 / -0
    My Motion Simulator:
    3DOF
    Hi, how do you connect the POT that controls the intensity of the total movement?
  13. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,142
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,547Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  14. cthiggin

    cthiggin Active Member

    Joined:
    Jul 1, 2012
    Messages:
    672
    Occupation:
    Self-Employed
    Location:
    Montgomery AL USA
    Balance:
    15,209Coins
    Ratings:
    +435 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino, Motion platform
    Noorbeast,
    Don't see the correlation - Pots IMHO are to send back data as to crankarm position / and / to allow for sending error-correction data??

    cthiggin
    Last edited: May 29, 2017
  15. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,142
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,547Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    The question as I understood it was how to connect pots and the first page has example wiring diagrams.
  16. cthiggin

    cthiggin Active Member

    Joined:
    Jul 1, 2012
    Messages:
    672
    Occupation:
    Self-Employed
    Location:
    Montgomery AL USA
    Balance:
    15,209Coins
    Ratings:
    +435 / 0 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino, Motion platform
    The question part that threw me in his thread: controls the intensity of the total movement
  17. evolaco

    evolaco Member

    Joined:
    Sep 27, 2015
    Messages:
    260
    Location:
    Spain
    Balance:
    1,070Coins
    Ratings:
    +29 / 0 / -0
    My Motion Simulator:
    3DOF
  18. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,142
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,547Coins
    Ratings:
    +10,902 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Sorry I don't understand your question or why you have an AN5 in mind.

    Use an Arduino and wire the pots as per the diagrams on the first post of this thread.

    Read the 'Initial Setup' section of the first post re using the SMC3 Utility software for adjusting settings.
    • Old Old x 1
  19. evolaco

    evolaco Member

    Joined:
    Sep 27, 2015
    Messages:
    260
    Location:
    Spain
    Balance:
    1,070Coins
    Ratings:
    +29 / 0 / -0
    My Motion Simulator:
    3DOF
    Sorry my english, I think I'm not explaining well, the pot that does not connect to the arduino is the one in version 0.7, limit the total movement of the sim
  20. Pit

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

    Joined:
    Oct 2, 2013
    Messages:
    3,012
    Location:
    Switzerland
    Balance:
    30,451Coins
    Ratings:
    +3,091 / 31 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    EDIT and deleted due to languages issues
    Last edited: May 29, 2017