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

Question SMC3 Looses Tracking

Discussion in 'DIY Motion Simulator Building Q&A / FAQ' started by Joe Cortexian, Jun 1, 2022.

  1. Joe Cortexian

    Joe Cortexian Member Gold Contributor

    Joined:
    Sep 8, 2021
    Messages:
    36
    Balance:
    229Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    3DOF
    I posted this on my build thread but no responses. So I will post again here.

    Controls

    I was originally attracted to this site based on the smc3 control system. I have some experience with the Arduino and it was a completely understandable approach. I picked up some H bridges and a pretty hefty 24V power supply. I also had a 20W motor purchased for a TBD upgrade on another Arduino project.

    With these parts I put together a motor test stand to allow me to understand how things work before I invest in real motors:

    [​IMG]

    I have not been able to get reliable performance with this very simple setup. When I run the sin wave motion generator (or any other motion) the motor will track for 10-15 seconds and then stop tracking. When the tracking stops I can see that the motor is OFF according to SMC3Utils. I cannot turn it back on. If I exit and restart SMC3Utils the motors will come back on momentarily and then stop. Seems like the motor moves to the target position and shuts off. I get the same result with two totally different pots.

    Here is the setup and example of the failure plot with settings:

    [​IMG]

    Can anyone suggest what I might be doing wrong?

    Attached Files:

  2. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,886
    Location:
    London
    Balance:
    11,543Coins
    Ratings:
    +453 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    What type of h bridge are you using ?

    Does it get hot ?

    If you move the pot by hand does it track correctly ?

    Is the pot a linear output ?
  3. Joe Cortexian

    Joe Cortexian Member Gold Contributor

    Joined:
    Sep 8, 2021
    Messages:
    36
    Balance:
    229Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    3DOF
    Thanks for the reply. By the way it has always nad this issue I have never had it run correctly.

    Songhe BTS7960 43A High Power Motor Driver Module/Smart Car Driver Module for Arduino Current Limit 2pc

    No it does not get hot.

    Yes, it tracks when I move it by hand.

    Yes, both pots are linear pots.

    When I am moving it by hand (for a long time actually) I can move it so that the target and feedback lines are aligned. The motor stops as expected but 50% of the time it turns off and won't move after that.

    You can see from the plot that the motor is OFF. In the pot testing and running I can't turn the motors back on. If I stop and rerun SMC3utils it generally does not fix the issue. The only way to fix it is to move the pot and rerun SMC3utils.

    So on startup SMC3utils seems to clear the problem but if the target and feedback are the same it just turns back off again.
  4. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,886
    Location:
    London
    Balance:
    11,543Coins
    Ratings:
    +453 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    It switches the motors off if they go out of range

    Your P number is very big, have you tried a smaller number ?
  5. Joe Cortexian

    Joe Cortexian Member Gold Contributor

    Joined:
    Sep 8, 2021
    Messages:
    36
    Balance:
    229Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    3DOF
    Thanks for the input. I haven’t tried a low p-num for awhile. I can try that again tomorrow.

    When it moves out of range the motors go off but when I move it back into range I can turn them back on. In this case I can’t turn the motor back on once they go off.
  6. early_m

    early_m Active Member

    Joined:
    Jul 28, 2016
    Messages:
    317
    Location:
    Chelmsford
    Balance:
    818Coins
    Ratings:
    +335 / 4 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
  7. Joe Cortexian

    Joe Cortexian Member Gold Contributor

    Joined:
    Sep 8, 2021
    Messages:
    36
    Balance:
    229Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    3DOF
    Good idea to start over. When I got to step 9 I increased the PWMmax and at 60 the motor slowly moved toward the target. When it was almost there it turned off and won't turn back on again. That is I push the OFF and it does not toggle to ON.

    Here is the screen:
    startover.PNG

    NOTE: The tutorial says to start at Kp = 400.

    Attached Files:

  8. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,886
    Location:
    London
    Balance:
    11,543Coins
    Ratings:
    +453 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    Reduce max limits and clip input to small numbers

    Change pwm max to 255
  9. Joe Cortexian

    Joe Cortexian Member Gold Contributor

    Joined:
    Sep 8, 2021
    Messages:
    36
    Balance:
    229Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    3DOF
    Pretty much where I started this thread still does the same thing.
  10. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,886
    Location:
    London
    Balance:
    11,543Coins
    Ratings:
    +453 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    What is the resistance of your pot ?

    Does it move if you turn it by hand
  11. Joe Cortexian

    Joe Cortexian Member Gold Contributor

    Joined:
    Sep 8, 2021
    Messages:
    36
    Balance:
    229Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    3DOF
    I have also seen an additional symptom. With the settings above the motor is still following the input but the position line is light blue. My suspicion is that the incoming communication from the Arduino is no longer working. Since the motor moves in a sin wave it MUST still be receiving the position updates.

    It has been moving for a long time. I have the original Uno not some knock off. I am using a the 1 foot braided cable that comes with the Uno. When I restart SMC3Utils it hangs. Never gets a prompt box like it does when the port is wrong. Totally hangs up. Further evidence the serial port is off line.

    Here is what that looks like:
    cyanpos.PNG

    So now I am wondering if there is some bizarre grounding issue. The Uno is powered from my computer and the H-bridge is powered from the power supply on the motor side and the Uno power and ground on the signal side.

    Any suggestions?
  12. Joe Cortexian

    Joe Cortexian Member Gold Contributor

    Joined:
    Sep 8, 2021
    Messages:
    36
    Balance:
    229Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    3DOF
    I unplugged the H bridge and everything works as expected. These were like 2 for a dollar at Amazon. I replaced it with a different one and it still breaks communication.

    I thought this was the go to H bridge on this forum at present. Its "rated" at 50A so 24V means 120W continuous. Is there an alternative I should consider?

    The power and ground from the Arduino are connected to the power and ground on the H bridge. Is there an alternative way to wire this? Some way to isolate the ground?
  13. Joe Cortexian

    Joe Cortexian Member Gold Contributor

    Joined:
    Sep 8, 2021
    Messages:
    36
    Balance:
    229Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    3DOF
    10k and things work when I turn the pot.

    EDIT: 150k
    Last edited: Jun 5, 2022
  14. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,886
    Location:
    London
    Balance:
    11,543Coins
    Ratings:
    +453 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    use a different usb cable

    is the power supply noisy
  15. Joe Cortexian

    Joe Cortexian Member Gold Contributor

    Joined:
    Sep 8, 2021
    Messages:
    36
    Balance:
    229Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    3DOF
    I wired the 3.3v line to the H-bridge (second one) and things work pretty well. It ran for an hour before loosing communications. This is plugged into USB2.0 so there is limited power available. I suspect that is the root cause.

    The motor kept running after the feedback monitoring stopped working. Since the SMC3Utils accommodates this failure mode so nicely I suspect that I am not the only one with the communications problem.

    I am going to investigate tapping off the 24v power supply for 5v supply and using that to power the H-bridge(s). I think as long as I have a common ground that should work. Also, a hefty ground aka wire the grounds to a terminal block and to the Arduino via the outer ring of the barrel connector.
  16. Joe Cortexian

    Joe Cortexian Member Gold Contributor

    Joined:
    Sep 8, 2021
    Messages:
    36
    Balance:
    229Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    3DOF
    Yes two different cables including the extremely short braided one that comes with the Uno. Makes no difference.
  17. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,886
    Location:
    London
    Balance:
    11,543Coins
    Ratings:
    +453 / 9 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    Can you run off a 12v battery to see if it improves things
  18. Joe Cortexian

    Joe Cortexian Member Gold Contributor

    Joined:
    Sep 8, 2021
    Messages:
    36
    Balance:
    229Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    3DOF
    My conclusion is that I have to be more robust in grounding and powering the external devices. I think with USB 3 you might be OK but with USB 2 it is marginal in terms of current.

    Thanks for all of the inputs.
  19. early_m

    early_m Active Member

    Joined:
    Jul 28, 2016
    Messages:
    317
    Location:
    Chelmsford
    Balance:
    818Coins
    Ratings:
    +335 / 4 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    • Agree Agree x 1