Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: tmoney68 on April 19, 2010, 09:26:26 PM

Title: Help with Sabertooth and BS2
Post by: tmoney68 on April 19, 2010, 09:26:26 PM
Hey all, I've been lurking here for awhile 'absorbing ideas'. With my current project I am trying to control my sabertooth 2x25 with my Basic Stamp2. I have it setup to act like a servo (ie. accept pulse signals) with the dip switch in mcu mode.(6 off).

This is my problem, I have sent several signals and the results seem random whether I send a signal to control both motors at once or separately. I have sent pulses using the pulsout command from 10 to 2000 us with varying affects. Now I can't get the motors to stop! The closest I got was one stopped with the other one still moving forward slowly. When I send the same pulsout numbers I tend to get a different effect each time (ie. no consistancy between signals). I would have thought this would have been the easiest way to use it, but alas I am frustrated! After 4 hrs of messing with it I finally just removed power from the board.

I have the 0v tied to the vss on the BS2 board where I am sending signals from so I don't think that's the problem. I specifically bought the sabertooth controller due to some things I have read here. Should I use serial commands instead? Has anyone else had this problem? Your help is greatly appreciated!

TM
Title: Re: Help with Sabertooth and BS2
Post by: Soeren on April 19, 2010, 09:34:34 PM
Hi,

You need to look at the pulses with an oscilloscope to see whether they're correct.
You could build a simple servo tester (with a 555) and see if the Sabertooth responds correctly to that.

First step is to find which side of the wire is failing.
Title: Re: Help with Sabertooth and BS2
Post by: tmoney68 on April 19, 2010, 10:31:04 PM
Thanks for the speedy reply, now I have a reason and need to learn how to use my oscilloscope  :D
Title: Re: Help with Sabertooth and BS2
Post by: Soeren on April 20, 2010, 06:09:50 AM
Hi,

Just start with the basics and add a little from time to time when you use it, pretty soon, you won't know how you managed without it and you'll use it far more than your multimeter :)


For seeing a (correct) servo pulse, a useable setup would be:
Trigger: adjusted to eg. around 0.5V.
Horisontal (timebase): 10ms/div will give you almost two periods to check the interpulse time, while 0.5ms/div will make checking a single pulse easy.
Vertical (voltage): 1V/div to 2V/div.
This setup will give a reliable and stable "picture".

(The nn/div means nn for each division of the screen grid (10 horizontal x 8 vertical) and that's what the dials are calibrated in.
Title: Re: Help with Sabertooth and BS2
Post by: tmoney68 on April 22, 2010, 05:28:37 PM
OK, did the test on the pulses and they definitely show up on my oscilloscope screen. I used 2 channels, 1 on the output of the BS2 and on on the other end of my wire, they were the same. So, I am wondering if my sabertooth is fubar cause I still am getting random actions using 1000, 1500 and 2000 us pulses and the motors never stop together (i.e they both start in the same direction, the on the next pulse, they turn in opposite directions, sometimes they speed up or slow down, sometimes one stops and the other keeps turning).  My question is: should I be using shorter pulses even though what documentation I have says 1500us is stop?

Getting frustrated now cause it was a nice chunk to lay down for a motor controller.
Title: Re: Help with Sabertooth and BS2
Post by: madsci1016 on April 22, 2010, 05:39:28 PM
Have you tried serial or analog control mode?
Title: Re: Help with Sabertooth and BS2
Post by: tmoney68 on April 22, 2010, 06:52:34 PM
No I havn't. I need to get a potentiometer to do analog and I was hoping not to use serial cause I thought it would be easier.

Has anyone used one of these animals? If so, how did you implement it? Code?
Title: Re: Help with Sabertooth and BS2
Post by: madsci1016 on April 22, 2010, 07:00:04 PM
I have used the 5 Amp version, but only in simple serial mode. It's just two bytes to control it. If you are out of Uart's on your Stamp, is there a software serial driver?
Title: Re: Help with Sabertooth and BS2
Post by: tmoney68 on April 22, 2010, 08:05:08 PM
Thanks, I'll try that next and let you all know how it went.
Title: Re: Help with Sabertooth and BS2
Post by: Soeren on April 24, 2010, 10:02:44 AM
Hi,

OK, did the test on the pulses and they definitely show up on my oscilloscope screen. I used 2 channels, 1 on the output of the BS2 and on on the other end of my wire, they were the same.
Oh, I didn't really mean to suggest that the wire was at fault, just that you needed to find out if the pulses were good which would indicate that the 'tooth was at fault or, if the pulses were bad, you needed to fix that.


So, I am wondering if my sabertooth is fubar cause I still am getting random actions using 1000, 1500 and 2000 us pulses and the motors never stop together (i.e they both start in the same direction, the on the next pulse, they turn in opposite directions, sometimes they speed up or slow down, sometimes one stops and the other keeps turning).  My question is: should I be using shorter pulses even though what documentation I have says 1500us is stop?

Getting frustrated now cause it was a nice chunk to lay down for a motor controller.
I have no personal experience with it. However, you didn't mention if the pulses were the right width or not?
If the pulses can be set to 1500µs and the 'tooth still doesn't behave, perhaps you should ask the folks behind it what goes wrong.
Title: Re: Help with Sabertooth and BS2
Post by: tmoney68 on April 24, 2010, 02:46:58 PM

I have no personal experience with it. However, you didn't mention if the pulses were the right width or not?
If the pulses can be set to 1500µs and the 'tooth still doesn't behave, perhaps you should ask the folks behind it what goes wrong.


Yes, the pulse widths are correct. I suppose I will have to contact DE to find out whats going on.
Thanks for your input.
Title: Re: Help with Sabertooth and BS2
Post by: Soeren on April 24, 2010, 09:13:51 PM
Hi,

[...] contact DE to find out whats going on.
DE? Hopefully not DealExtreme?
Title: Re: Help with Sabertooth and BS2
Post by: Razor Concepts on April 24, 2010, 09:26:20 PM
Hi,

[...] contact DE to find out whats going on.
DE? Hopefully not DealExtreme?


Usually they are referred to as DX
Title: Re: Help with Sabertooth and BS2
Post by: madsci1016 on April 24, 2010, 09:37:47 PM
Hi,

[...] contact DE to find out whats going on.
DE? Hopefully not DealExtreme?


SaberTooth Motor-controllers are made by Dimension Engineering.

They also make nice switching regulators.
Title: Re: Help with Sabertooth and BS2
Post by: Soeren on April 24, 2010, 10:30:53 PM
Hi,

Thanks guiys - I'll go to bed now ;D
Title: Re: Help with Sabertooth and BS2
Post by: tmoney68 on April 25, 2010, 10:20:05 PM
SaberTooth Motor-controllers are made by Dimension Engineering.

They also make nice switching regulators.

I have one of those too, havn't used it yet as I have been trying to get these dang motors running correctly first.
Title: Re: Help with Sabertooth and BS2
Post by: madsci1016 on April 25, 2010, 11:14:44 PM
My SAGAR robot

http://www.billporter.info/?cat=11 (http://www.billporter.info/?cat=11)

Uses 2. They are nice much more efficient than linear regulators.
Title: Re: Help with Sabertooth and BS2
Post by: tmoney68 on May 01, 2010, 10:50:56 AM
OK, still playing with this pulse thing. I figured I was getting some stray signals from the other channel so I hooked up both signal channels and began sending signals to only one. I also put a 100K ohm pull down resistor on the respective pin as well to eliminate any stray signals. Well contrary to what was stated by Dimension Engineering, each channel does not use a 1000-2000 uS signal. After experimenting, I have found that 750uS is STOP and then is ramped in either direction down to 500 uS for reverse and up to 10000 uS for forward.

Now my new delima. If I send the same signal more than once it speeds up and to slow it down or stop it I need to send the 750 signal just as many times. Perplexing I know. I have not heard back from DE yet eother. One would think that after laying down $124 for a controller they would at least help out a little. There has to be something going on that I am not thinking of. Any ideas?
Title: Re: Help with Sabertooth and BS2
Post by: Soeren on May 01, 2010, 02:38:54 PM
Hi,

I have not heard back from DE yet eother. One would think that after laying down $124 for a controller they would at least help out a little.
About a month ago, I requested some material on a logic analyzer (several times as expensive) from a small company, I would think they'd be hungry and want to sell their stuff, but Nada response.
So, they just lost that sale, but it's harder when you have parted with your doe - perhaps try emailing them once a day until you get answer.
Title: Re: Help with Sabertooth and BS2
Post by: $WMc% on May 23, 2010, 01:25:38 PM
tmoney68

 I am having the same problems with the sabertooth 2X25. I have tried servo pulses,PWM,and simple serial. Using simple serial has got me some results, But not like D.E. says I should get.The doc.s state that sending a "character" of 1 to 127 will control M1 and a "character" from 128 to 255 will control M2.I have not been able to run M2. When I send a "character" 128-255 It affects M1 in a seemly random action.
 Has D.E. made an error in thier program with 255?,Since half of 255 is not 127 its 127.5 and half of 127 is not 64(center-off) its 63.5?
Title: Re: Help with Sabertooth and BS2
Post by: madsci1016 on May 23, 2010, 01:48:30 PM
WMc,

Post your code and I'll take a look. I have used many 2x5 with no problems before, with my own code running it.
Title: Re: Help with Sabertooth and BS2
Post by: tmoney68 on May 24, 2010, 08:50:41 AM
I thought I had it figured out, but now I'm back to getting random motor reaction to my signals. Since this is the first step in my project build, everything is being delayed until I can get reliable bot manuvering and movement. I'm running out of patience about ready to just throw everything out!