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 Now a Download Plan!
  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. 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

Resolved SOLVED: Motor control via Sabertooth in SMC3Utils

Discussion in 'DIY Motion Simulator Projects' started by Squonk, Aug 12, 2020.

  1. Squonk

    Squonk Member Gold Contributor

    Joined:
    Aug 29, 2017
    Messages:
    93
    Location:
    USA
    Balance:
    436Coins
    Ratings:
    +86 / 0 / -0
    My Motion Simulator:
    6DOF
    Most of you have probably advanced beyond my simulator's tech at this point, but I'm hoping someone will remember enough from the old days that they'll be able to help. I posted a thread a few months ago after my rig became completely unresponsive following disassembly and a move. After some time banging my head against the wall, I gave up on it until today.

    I moved it from the barn to my basement, and set it all up again. I now have control of 50% of the motors, which is real progress. Two of them are not responding at all in SMC3 Utils, but I can see position feedback from the hall sensors when I move them by hand, so I'm thinking that's a power issue. The third rogue motor, though, I can't figure out. It will move as I increase PWMmax, according to the SMC3 Utils initial setup instructions, but no matter how I wire power to the motor, the feedback line from the Hall sensor moves away from the target line until it hits the clipping limit and then it behaves as you see in the photo below. Once it starts to exhibit that square wave pattern, the motor just oscillates. The feedback (green) line behaves as expected when I move the motor manually. I've replaced the Hall effect sensor with a known good one, and the behavior stays the same. Any suggestions? Questions that would help clarify? Thanks in advance!

    ZrezFu7 - Imgur.jpg

    https://imgur.com/a/2dt5kbw
    Last edited: Aug 13, 2020
  2. Ads Master

    Ads Master

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
  3. Squonk

    Squonk Member Gold Contributor

    Joined:
    Aug 29, 2017
    Messages:
    93
    Location:
    USA
    Balance:
    436Coins
    Ratings:
    +86 / 0 / -0
    My Motion Simulator:
    6DOF
    Hi, folks. I'm back, and really hoping someone can help. This thing used to work really well, and I'd like to have it back up in time for the new Microsoft flight sim. I now have 4 of 6 motors under my control in SMC3Utils. The remaining two share the same Sabertooth 2X60. It is configured exactly the same as the other two Sabertooths - first two dipswitches down, the rest up. The Hall effect sensors are working, as I can watch their traces respond appropriately when I disconnect them from the motors and turn them manually.

    I've linked two videos below. The first shows how one of the properly operating motors looks in SMC3Utils. The second shows the behavior of one of the two non-working motors. You'll see that as I increase PWMmax, the green feedback line from the Hall effect sensor initially moves opposite to the target line (this happens no matter which way I wire the motors), and eventually, with more PWMmax, stops reacting to the target and takes off toward the limits, where it then enters that square wave oscillation, as does the motor, which is now rotated out of its normal operating arc of about 180 degrees. All Arduinos are running the same sketch. All have their ports set to 115,200 baud. I will try swapping the motor drivers around later, but if anyone has any insight before then, I'd really appreciate it...

    Video of normally operating motor in SMC3Utils

    Video of problem motor in SMC3Utils
  4. Squonk

    Squonk Member Gold Contributor

    Joined:
    Aug 29, 2017
    Messages:
    93
    Location:
    USA
    Balance:
    436Coins
    Ratings:
    +86 / 0 / -0
    My Motion Simulator:
    6DOF
    Well, switching the problem motors to one of the Sabertooth drivers from the working motors didn't really clear things up at all. One of the two problem motors began functioning correctly, but the other still did not. The problem with both is that the feedback curve doesn't track the target curve in SMC3Utils (it almost appears to move opposite, although it may just be way out of phase), and, as PWMmax is increased above about 40, the feedback curve from the Hall effect sensor just "runs away," and heads toward the upper or lower limits, where it then enters that oscillation. I changed Hall effect sensors just grasping at straws, but that made no difference. I don't understand enough about the Sabertooth controllers to know if that's where the problem lies.
  5. Squonk

    Squonk Member Gold Contributor

    Joined:
    Aug 29, 2017
    Messages:
    93
    Location:
    USA
    Balance:
    436Coins
    Ratings:
    +86 / 0 / -0
    My Motion Simulator:
    6DOF
    Posting results from each head banging session in the hope that they'll spark an idea from someone. The best I can get from the two problem motors that share the same Sabertooth is a PWMmax of about 30. At that level, the feedback doesn't follow the target, but will generate a little PWM spike when the two lines cross, sending the feedback line in the other direction. Once above a PWMmax of 40, the feedback line just heads toward a clip limit. I can disconnect the Hall effect sensor and turn it by hand to match the target line, and that works (at least to the limits of my ability to track the target line). Voltages to and from the Hall effect sensors are appropriate, grounds are all good. I've run the SMC3 sketch on two different Arduino Unos with the same results. Could this all be down to the Sabertooth? Any and all suggestions welcome...

    IMG_20200813_075806.jpg
    IMG_20200813_080047.jpg
  6. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,160
    Location:
    Oklahoma City, USA
    Balance:
    15,974Coins
    Ratings:
    +1,821 / 32 / -1
    Not much is coming to mind but did you try reversing the motor leads when feedback was running away?
  7. Squonk

    Squonk Member Gold Contributor

    Joined:
    Aug 29, 2017
    Messages:
    93
    Location:
    USA
    Balance:
    436Coins
    Ratings:
    +86 / 0 / -0
    My Motion Simulator:
    6DOF
    Thanks for getting back to me. I did try reversing the motor leads, and also tried reversing the motor in the Arduino sketch. It appears that, the more I increase PWMmax, the more the feedback signal from the Hall effect sensor tends to "run away." I have a new motor controller on order, hoping that the problem might be with that, but I'm somewhat skeptical. I've tried a couple of Arduinos, so I don't think it's that. The behavior is so weird and frustrating.
  8. Squonk

    Squonk Member Gold Contributor

    Joined:
    Aug 29, 2017
    Messages:
    93
    Location:
    USA
    Balance:
    436Coins
    Ratings:
    +86 / 0 / -0
    My Motion Simulator:
    6DOF
    Folks, really, if anyone is at all inclined, I would welcome even wild guesses. I've been at this for days.

    Quick recap: 6 motors in three pairs, driven by Arduinos and Sabertooth motor controllers, positional feedback from Hall effect sensors. All components proven functional by swapping. All Arduinos running the same sketch. Two motor pairs functioning normally, one pair not controllable via SMC3Utils.

    As of today, I have the two problem motors connected to their Arduino using Cat-5 cable to rule out my original, braided wires as a problem. When I remove the Hall effect sensor from either motor, and turn the shaft manually, I can control the motor's position in Monitor mode of SMC3Utils. When I connect the sensor back to the motor shaft via the flexible coupler, as soon as I turn PWMmax above 40, the motor starts to move and the feeback line from the pot heads toward one of the clip limits where it displays that full amplitude square wave you can see above and the motor just vibrates.

    I did the manual turning of the Hall sensors thinking that there might be some electrical weirdness when it was connected to the motor. But I have continuity between all grounds, and I can't detect any voltage between the Hall sensor and the motor when the sensor is off the motor and I put a multimeter between them.

    So, yeah. Please? Any ideas?

    Thanks!
  9. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    15,527
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    114,046Coins
    Ratings:
    +9,124 / 46 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    Sounds like connecting the pot to the coupling completes a circuit, which really does sound like a ground issue somewhere. To test try connecting the pot to the coupling with a rubber hose to isolate it.
  10. Squonk

    Squonk Member Gold Contributor

    Joined:
    Aug 29, 2017
    Messages:
    93
    Location:
    USA
    Balance:
    436Coins
    Ratings:
    +86 / 0 / -0
    My Motion Simulator:
    6DOF
    That's exactly what I was thinking about doing last evening when I disconnected the sensors. Couldn't find an appropriate sized piece of tube though. Might 3D print some couplers. I figured I might be able to determine if it was a ground or other circuitry problem just by touching the shaft of the Hall sensor to the coupler on the motor, but I couldn't get anything reproducible. Thanks for confirming my plan to try the insulating coupler. I appreciate your taking the time to weigh in.
    • Like Like x 1
  11. Squonk

    Squonk Member Gold Contributor

    Joined:
    Aug 29, 2017
    Messages:
    93
    Location:
    USA
    Balance:
    436Coins
    Ratings:
    +86 / 0 / -0
    My Motion Simulator:
    6DOF
    Sadly, @noorbeast , that didn't work, either. I isolated the Hall sensor from the coupling with rubber tube. Still the same result. When I have SMC3Utils in sine wave mode, the green feedback line moves essentially in the opposite direction of the wave, until the target line crosses it. Then there's a brief pulse of yellow (the PWM line) and the feedback line heads in the other direction. Eventually, it reaches a point where the target line can no longer intersect it, and it keeps going toward the limits.

    IMG_20200813_075806.jpg

    I'm feeling like I might have to write this machine off. I thought I understood it well enough to be able to troubleshoot any problems. After all, I built it. And until this one I have. But I cannot for the life of me figure out what is going on here. :(
  12. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    15,527
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    114,046Coins
    Ratings:
    +9,124 / 46 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    From the SMC3 instructions - If it is moving away turn off motor power immediately (or quickly reduce PWMmax again). In this case you need to either reverse the wires to the motor being tested –OR– reverse the +5V and GND wires to your feedback pot for the motor being tested (do not do both). Restart the test from the beginning.
  13. Squonk

    Squonk Member Gold Contributor

    Joined:
    Aug 29, 2017
    Messages:
    93
    Location:
    USA
    Balance:
    436Coins
    Ratings:
    +86 / 0 / -0
    My Motion Simulator:
    6DOF
    Right. I've stepped through the instructions. The motors are all wired as they were when the machine was working, but I did try reversing the power wires for each of the two rogue motors at the Sabertooth outputs (because I can't reverse 5V and GND on the Hall effect sensors), just on the off chance that something had been mislabeled. It made no difference. The feedback signal from the pot heads away from the target line each time the two intersect. When they intersect again, it reverses direction.
  14. bbb8cd

    bbb8cd New Member

    Joined:
    Jul 23, 2018
    Messages:
    28
    Location:
    St. Louis, MO, US
    Balance:
    106Coins
    Ratings:
    +7 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I'm having issues with a Sabertooth setup as well, though not quite the same. Have you tried swapping the Sabertooth you're having issues with with one of the others? If you did, what happened? I'm wondering if you accidentally changed a setting on that Sabertooth in DEscribe that you didn't notice.
  15. Squonk

    Squonk Member Gold Contributor

    Joined:
    Aug 29, 2017
    Messages:
    93
    Location:
    USA
    Balance:
    436Coins
    Ratings:
    +86 / 0 / -0
    My Motion Simulator:
    6DOF
    Hi, and thanks for the reply. Yes, I've swapped Sabertooths, and even bought a new one to swap in (returned it when I got the same results). I've never used DEscribe with any of them, just set the dip switches. So, I know the motor controller is working as intended, and I can make the Hall sensor/Arduino work if I hold the Hall sensor in my hand. It's something that happens when the sensor is connected to the coupler on the motor, and I don't think it's electrical, because I've tried insulating the Hall sensor from the coupler with rubber tubing. I just cannot figure out what it is about this pair of motors/Arduino/Sabertooth that is preventing it from working when the others are fine, and the whole thing worked well before disassembly and moving. :mad:
  16. bbb8cd

    bbb8cd New Member

    Joined:
    Jul 23, 2018
    Messages:
    28
    Location:
    St. Louis, MO, US
    Balance:
    106Coins
    Ratings:
    +7 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I read through your original build thread. That's a nice rig! I didn't realize you were using 2x60s meaning Describe wasn't necessary.

    Instead of using the sine wave, set to manual and click one of the top or bottom buttons on the right. Then start increasing PWMmax until the feedback line starts moving. What happens then?
    • Like Like x 1
  17. Squonk

    Squonk Member Gold Contributor

    Joined:
    Aug 29, 2017
    Messages:
    93
    Location:
    USA
    Balance:
    436Coins
    Ratings:
    +86 / 0 / -0
    My Motion Simulator:
    6DOF
    All right. As humiliating as this is, I'm going to post it for the sake of completeness, and just in case there's anyone else out there with a similar problem (though they'd also have to be as stupid as I am for it to become such a saga).

    This weekend, out of frustration, I decided to tear down all the wiring, start from scratch, and move the Arduinos and motor controllers onto a surface that would allow me to sit in a chair while troubleshooting, instead of on the floor.

    Fixed.jpg

    I replaced all the Hall sensor cables with Cat-5, and rerouted the signal and power lines. In the process of reconnecting the motor power cables to the Sabertooths, I noticed that... wait for it... the extension cables/quick connects for motors 1 and 6 were reversed. :roll

    I still don't really understand how this resulted in the behavior I was seeing, but with everything reconnected as originally designed, surprise, surprise, the motors are back under my control.

    Anyway, thanks to all who chimed in. I guess this was the price I pay for skipping step one of basic troubleshooting. You'd figure I'd have learned by now. Now on to Flight Simulator 2020 when the plugin is ready!
    • Informative Informative x 1
  18. Gadget999

    Gadget999 Well-Known Member

    Joined:
    Dec 27, 2015
    Messages:
    1,062
    Location:
    London
    Balance:
    7,665Coins
    Ratings:
    +240 / 6 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, 6DOF
    Pleased to hear you got to the bottom of it !
    • Like Like x 1
    • Agree Agree x 1