kas:
swap pinServo_X (D9) and pinServo_Y (D10) wires
I tried this but it just rotated the stick movement another 90 degrees so left and right movements caused it to go forwards and backwards so I put it back to how I had it .
If I put the DIP to 1 down and the other 5 up my wheels don't turn at center stick movement but the sticks are 45 degrees off and left / right are mirrored again .
woodygb:
The Arduino servo library is NOT an exact match for the R/C signal format ....SERVO 90 or OFF/Neutral/Idle is actually equiv to a signal value of 1471 rather than the standard neutral value of 1500 ...hence your getting the motors slowly turning.
Solution ... Turn ON Autocalibrate.
EDIT ...Or I suppose that you could redefine neutral in the Arduino prog as a servo value of 92.8.
Thank you for the suggestions, I will try this . Where did you get the value of 92.8 ?
@Kas ...It would seem that the approach to use is to define the servo attach range... eg.
Ahhh gotcha thank you for taking the time to explain it to me, I just read that blog. I am going to have to read it 5-6 more times for it to fully sink in . I still need to test this and see if it works, I would just have to change :
int servo_L, servo_R = 90; // servo's positioning values
to
int servo_L, servo_R = 92.72; // servo's positioning values
Is this correct?
@kas I changed the polarity of one motor and its working perfect now. Thank you for the suggestion.
It fixed my motors from turning at center stick position however my top speed of the wheel chair is down
drastically compared to before. So It might be best to remove this range and adjust the servo position?
myservoX.attach(pinServo_X, 1000, 2000); // R/C norm range
myservoY.attach(pinServo_Y, 1000, 2000);
Using the above code solves the problem of the slightly off neutral value of 1472 ... as 1500 is now slap in the middle...half way between 1000 and 2000. .. and 90 degrees is also halfway between 0 and 180 degrees.
So ...
int servo_L, servo_R = 90;
can stay as it is.
The code mod also does away with the need for the LIMIT_ANGLE as you have defined the range and in doing so have set a NEW number for the servo angle values.
woodygb:
Using the above code solves the problem of the slightly off neutral value of 1472 ... as 1500 is now slap in the middle...half way between 1000 and 2000. .. and 90 degrees is also halfway between 0 and 180 degrees.
So ... can stay as it is.
The code mod also does away with the need for the LIMIT_ANGLE as you have defined the range and in doing so have set a NEW number for the servo angle values.
I tried making these changes using the same DIP settings and BOT just freaks out, motors start turning, stopping, slowly turning, then back wide open, pauses for a minute and repeats LOL
I tried to revert back to my old code that was working now it's acting silly and unstable, I am really confused now as it worked fine but top speed was alot slower .
I thought maybe I screwed up my sabertooth so I hooked it back up to my radio control and everything worked perfect. I thought I was really making progress now I just screwed it up.
Here was a video from earlier, don't know why it doesn't work now.
I attached the last working code, even though it doesnt work now??
disconnect battery(ies) for 5 minutes and try again
I was using 1 off, 2/3 on, 4 off, 5 on, 6 off
What is the purpose of switch 3 ??
If not used, keep it OFF just in case
EDIT
from your message #677:
Edit :
I do have an update though and finally getting some where . I reset the board, loaded 1.7 code with limit at 50 , check all connections and now it's kinda working .
To muddy the waters even more ...
You tried at least once with dip switch 6 ON.
Which should have been ..... according to the instruction pdf ...Autocalibration mode.
I wonder if the Sabertooth did actually Autocalibrate and if it has possibly RETAINED the now erroneous setting ?
Woody and kas first off I want to apologize for the time you guys wasted to help me chase a problem that didn't need to exist . Somehow I manage to place a lead from the 5V pin from uno into my breadboard positive bus bar . I suppose the 5V from uno and the 6v battery both being tied into the positive bus bar was causing my hc05 to freak out ?
@Woody, I set the limit angle to 0 and now I have full range and with the wiring correction it's working great .
@kas do you have a suggestion for amp sensor for these wheel chair motors ?
Somehow I manage to place a lead from the 5V pin from uno into my breadboard positive bus bar . I suppose the 5V from uno and the 6v battery both being tied into the positive bus bar was causing my hc05 to freak out ?
:o :o
Happy guy, you didn't fry your BT card
@kas do you have a suggestion for amp sensor for these wheel chair motors ?
It's now time for you to describe your electrical setup, a drawing or a photo will help.
Woody is the expert for wheel chairs, most of them appear to be powered by two 12Volts batteries, please confirm
Remember you don't need a specific battery for the Arduino supply, as it can be powered from 12 volts (NOT 24V ).
NOTE:- The analog voltage output from the sensor is a nice 0-5v and a standard R/C servo plug fits straight on the pins ... the Arduino headers will solder on directly ... BUT the POS & NEG pins of the sensors are reversed compared to a Futaba R/C servo plug so you'll need to lift the tags and swap wires to get a colour polarity match.
It's now time for you to describe your electrical setup, a drawing or a photo will help.
Woody is the expert for wheel chairs, most of them appear to be powered by two 12Volts batteries, please confirm
Remember you don't need a specific battery for the Arduino supply, as it can be powered from 12 volts (NOT 24V ).
Any need for battery Voltage monitoring ??
Yes it is a 24 v system , I am power over a 6v battery for simply sake for now as I have everything mounted to a tray so it makes it easier to run back and forth from the garage to the computer . The sabertooth also has a BEC but I haven't used it yet .
The larger bot will need voltage monitoring and amps, I am building this one as a TUG so it can help me move things around the house easier.
Will a simply voltage divider work like on the smaller BOT ?
@woody , thank you for the link . I will order that now. Do you have a gear reduction drive on your BOTS?
The bot has a single stage gear reduction of 6-1 ...the most that can be obtained in one stage...two stages would be better to give 15 or 20-1 ratio....but I haven't got the space with this design.
I'd not use the built in BEC .... instead I recommend a UBEC or SBEC.