Asked — Edited

How To Control 2 Motors Using Ez-B And Only S1, M1a And M1b Of The Sabertooth 2X

Hello, I'm newbie and testing how to use EZ-B and Sabertooth 2x12 and I have 2 motors that I'm needing to go forward motion at the same time and also when in reverse move at the same time using just the M1A ,M1B and S1 connections on the Sabertooth 2x12. Here is my current setup:

User-inserted image

The problem i'm having is that I can get both motors to move forward simultaneously but not able to get them to move in reverse at same time. Still new to coding in EZ-B and electronics in general so not sure if it's my code or is it even possible to do this with just one channel on the Sabertooth.

I'm using D0 on my EZ-B

Below is my code

 
# Forward
SendSerial(d0,9600,1) # motor 1  forward

#Reverse
SendSerial(d0,9600,127) # motor 1  reverse

On my ARC gui I have 3 buttons, a forward button that has the code for going forward, a reverse button that has the code for going in reverse and a stop button that just stops the motors.

Would appreciate any feedback from the experts here in the community. It seems like it is pretty easy to accomplish for a newbie like me, so hoping it's obvious :D

Thanks


ARC Pro

Upgrade to ARC Pro

With ARC Pro, your robot is not just a machine; it's your creative partner in the journey of technological exploration.

#1  

Is there a reasion why you're not using the second motor channel on the ST for your second motor? I've not seen anyone use a ST like you are so I'm not sure it can or should be done. Your application should really use the second motor channel on the ST and set the dip switches accordingly so both motors are controlled properly. Have a good read through the ST manual and it will tell you the right way to set up the ST for your needs. ;)

#2  

Yeah I actually went through the manual and it is geared towards S1 for motor 1 and S2 for motor2 but wanted to see if anyone may have thought to try out what I explained. I'm guessing it's not a good idea to use the ST in this fashion. I was trying to avoid purchasing another ST but it appears I need to for my second pair of motors. Thanks

PRO
Synthiam
#3  

You're 50% on the right track!:D What you are attempting to do is impossible because it contradicts logic by attempting to control two motors individually with 1 pair of wires. Each of the two wires carry electricity. Each of the two wires are attached to a motor. When electricity is applied to the two wires, both motors receive the same electricity.

Much if you have a home with two lights on the same light switch, they both share the same electricity. You cannot control just one light of two with a single light switch. Each light would require it's own switch and set of wires.

Here's an awesome tutorial that covers electricity from beginning to end: http://www.explainthatstuff.com/electricity.html

It's a great and insightful read :)

#5  

Although from the comments what I attempted to do is not suggested, I managed to control my motors with one channel. The problem I had was my dip switch on the Sabertooth 2x12 was not set correctly. I went back in and ran the Dip Switch wizard provided by dimension engineering and to it to work. I won't continue to run it this way and will use 2 channels for my motors but wanted to try for sakes sake:D . Anyway just thought I mention it. Thanks for all advice :D .

#6  

@arkofthecovenant

My two cents ... late though it is. I think it all gets down to the definition of "control." While you can motivate more than one motor from the same Sabertooth, you cannot actually fully control them as such. Your hookup will only ever go forward and back. That's fine as long as everything is perfectly aligned. Of course it rarely is. Eventually, the unit will start to turn due to slight differences between the two motors and their associated mechanisms. Also, you cannot fully control the motors to correct for this drift. Nor will you be able to turn the unit when you actually want to turn. At least not without a steering mechanism. Such a mechanism will still require another signal source. With having to use two signal sources, one for steering and one for the two motors, anyway you might as well go to the separate Signal inputs to begin with. That way you can control the direction without the need for a separate steering mechanism at all. Just change the speed of the motors to turn left or right (or anything in between). Change the speed and direction between the motors and you can literally turn on a dime.

This is the way it is done with tanks, both real and small scale. There is no other practical way to turn them. With wheeled devices, you can use a separate steering mechanism, as in automobiles and RC cars, but, on the small scale anyway, you could also use casters for the front wheels, and steer with the same methods as described above, using the rear wheel motors. This is how the Adventure Bot turns. Likewise the Roli Rover.

For that matter, once the "Inverted Pendulum" is perfected for use with EZ-Robot configurations, you can base your robot platform on only two wheels. Much like the Segway transport vehicle (I still get a chuckle when I see cops on them).

#7  

Thanks @ WBS00001 . Yes I plan to go with separate Signal inputs. My robot is a sphere robot and will use a flywheel, pendulum and weights to make it lean side to side. By the way who or what is perfecting this "Inverted Pendulum" you mentioned. Thanks again for your informative response. Appreciate it.

#8  

@arkofthecovenant You're welcome. I'm not sure who is actually responsible for the Inverted Pendulum at the moment. It has been worked on by at least two people in the past. If you do a search for it in this forum you will find several posts about it.

Ah, a sphere. That is indeed a different animal from either a wheeled or tank treaded platform. I'm not familiar with it's drive mechanisms, but I suppose it needs a two axis system to cause movement in all directions (except up, of course). But then, I suppose if one included drone capabilities, that too would be a consideration. It would be really cool for drone propeller arms to fold out from a spherical robot and have it take off. Someone is undoubtedly working on that very thing. It may already exist.

#9  

In case it wasn't clear, the Inverted Pendulum WBS00001 is talking about is an EZ-Bit sensor that is under development:

https://synthiam.com/Shop/AccessoriesDetails.aspx?prevCat=105&productNumber=1360

Alan

#10  

Thanks WBS00001 and Alan. It is a single axis so should be fun. I can definitely take advantage of the sensor to limit the wobble in the sphere. Thanks