Lfab, I would go with a Sabertooth 2 x 25. It’s two 25 amp motor controllers in one unit. I’m not following you on the “but it made the system even slower and the code was very tempermental” thing. There is no reason two servos controlling the joystick pots wouldn’t work, and work well. If you had problems, it’s not likely they will just go away when you use a motor controller. It’s possible you had power problems with the microcontroller. We’re going to need images of the wiring for the mocrocontroller. And a good description of the overall power system, and please post the code. So you have a few more weeks. Lets get it working now.
Turns out the brakes were on !! I am working up a bypass now, and you think the other controler is better I will buy it!! I got to much in it now to stop and one of the dads has offered to help so we will see.
Jim asked me to weigh in here.
If you’re pretty confident of the current specs, then I concur with Jim that a 2x25 would be the way to go if you switch to a robot motor controller. Make sure to measure your current draw while you’re pushing something of equal weight, not just when you’re driving around unloaded. Its not unusual for a wheelchair moor to be drawing 40 or 50 amps, but your wheels are fairly small. Also, don’t charge the batteries with them hooked up to the motor controller - many chargers put out over 30V when charging a 24v nominal battey, which can damage the controller. A 2x50HV would give you all manner of headroom, so if it was my sumo bot that’s what I’d use, but that’s probably untenably expensive i this case.
Also, just speaking from experience, its a lot easier to remove the brakes from most wheelchair motors than it is to electronically control them. Typically they just bolt to the back of the motor, and you can remove them with a screwdriver in a few minutes.
Hope that helps.
John Bellinger
Designer of the Sabertooth motor controllers.
Dimension Engineering
Ok it drew leftside 14.993 and Rightside 13.869 amps under a tracks locked pushing a wall wide open it really supprised me that it isnt more, as for the breaks I am putting them in the main power feed so ifI loose power the tracks lock where it sits, I am thinking I want the 2x25 to run the motors
Ok Everything is hooked up and its pretty cool If I might say so myself!! We added the code from this forum and it spins and chasses the dark spots on the kitchen floor Whats next I dont have a clue!!
I found a small error in the program. Please try this one…
SLD-01 single line detector plugs into channel 3 and 4 not 2 and 3 as before.
Temporarily remove the remark directly in front of the “goto start” at the end of the main loop. It looks like an apostrophe. This will force the program to keep sending the go forward pulses and ignore the line detectors.
The controller should make 5 beeps one second apart. Then it should try to move the bot forward at top speed. If the Sabertooth is set for independent control from RC pulses it should engage both motors. If one motor is going the wrong way reverse the wires going to that motor. If the bot is acting ok at this point you can put back in place the remark. This will enable the program to go into the behavior part of the code.
[code]'Program name: basumo01.bas for Basic Atom Pro.
'This version uses the pulsout function to control the motors.
'This is for a sumo with two line detectors, but no opponent detectors.
left_motor var word
right_motor var word
backup var byte
turn var byte
edge_detect var byte
aa var byte
input p3 'left line edge sensor
input p4 'right line edge sensor
low 14 'Left motor-control channel
low 15 'Right motor-control channel
backup = 20 'this affects how far the robot backs up from the line.
turn = 20 'this affects how far the robot turns after backing.
sound 9, [100\880, 100\988, 100\1046, 100\1175] 'three quick ascending beeps.
for aa=1 to 5 'Beep at the end of each of the 5 seconds in the delay.
pause 900
sound 9, [100\880]
next
start: 'After 5 second delay, go forward at max speed.
left_motor = 2000 'Adjust motor wiring so the motors rotate forward.
right_motor = 4000 'Adjust motor wiring so the motors rotate forward.
gosub servo_pulses 'Gosub (go and return) to where the pulses are generated.
'goto start 'Remove the remark to this line to test motor
edge_detect = (ina&%1100) 'Look at the 1st I/O nibble and mask off bit 1 and 2.
if edge_detect = %0100 then left_detect 'Look for left edge detector.
if edge_detect = %1000 then right_detect 'Look for right edge detector.
if edge_detect = %1100 then left_detect 'Look for both left and right.
goto start
left_detect: 'This is where the pulses are setup for the
for aa=1 to backup 'Scorpion motor controller for left detect.
left_motor = 4000 'backup…
right_motor = 2000
gosub servo_pulses
next
for aa=1 to turn
left_motor = 4000 'rotate in place.
right_motor = 4000
gosub servo_pulses
next
goto start
right_detect: 'This is where the pulses are setup for the
for aa=1 to backup 'Scorpion motor controller for right detect.
left_motor = 4000 'backup…
right_motor = 2000
gosub servo_pulses
next
for aa=1 to turn
left_motor = 2000 'rotate in place.
right_motor = 2000
gosub servo_pulses
next
goto start
servo_pulses: 'This is where the pulses are actually generated.
pulsout 14, left_motor '2000 = forward, 4000 = reverse, 3000 = stop
pulsout 15, right_motor '4000 = forward, 2000 = reverse, 3000 = stop
pause 20
return[/code]
Ok Everything works, we had to switch the motors to get them to drive forward, it does the countdown (5 Seconds) and then starts turning, so far so good whats next!!
Ok like I said before. If the bot is acting ok at this point you can put back in place the remark. This will enable the program to go into the behavior part of the code. So look where the apostrophe is in front of the “goto start” and delete it.
Keep the bot supported so the wheels don’t touch the ground. Now the program is looking at the SLD parts on pins 3 and 4. With black under them they should output a low. When you turn the bot on it will count down from 5 with beeps. then it will turn the motors on for forward motion. While this is happening place a white paper under the left sensor. The motors should reverse for a short time. The time is changeable by changing the value in backup. Making the number larger will increase the backup time/distance. Lowering the number will make it backup a shorter distance. Then the bot should rotate in place in the right or CW direction. Again the distance the bot turns is changeable with the turn variable.
backup = 30
turn = 40
If the bot does not turn the right way then swap the left and right values in the left_detect section.
If the right sensor detects the white line the opposite of above should happen.
If both sensors detect the white line it will behave as if the left sensor detected it. You can create a different behavior for both sensors if you want.
You might be done… or very close!
Ok we are rewired and reprogrammed it seems to chase its tail a little but so far so good whats next, I loose all my helpers friday till Wednesday we would like to set it on the floor and teast it aginst a box or two!!
Like I said, it should be done. I do not know what you mean by chase its tail. Perhaps you could make a video of the thing so I can see if it is acting right or not. You can also adjust the servo pulse values to make it go slower for the testing stage. Have you studied the code? It should be very easy to figure out how the different servo pulse values effect the speed of the bot…
All right!! I have it programmed with the above code, I have the sabertooth set with #1 and #6 in the down position according to the sabertooth quickreference the motors are plugged into left on 14 and right on 15 now I need to hook up left and right rear line detectors and left and right sharpe IR op detectors and a Ping dector ?
I’m reluctant to try and discuss adding sensors when I’m not sure the bot is working properly at this point.
Does it stay inside the ring when running this code?
Is it still chasing it’s tail?
Were you able to do the video?
I feel we have not been communicating very effectively so far. Please slow down, use some punctuation, tell me what it is doing.
I understand, It just seem to not go to its right? when you place a white card under the left detector it rotates the motor backwards for 4 or 5 seconds, but the right motor when the sencer is activated only rotates 4 or 5 revolutions? I will test it on a black floor with white lines and video it for you, and we can see what happens, The boys learned alot about circuts today !!
Thank you , you are a world of help
I received the video you emailed me. It was too close up to actually see what is going on. Can’t you just place the bot onto the ring so we can see what it does? That is the ultimate goal eh?
I am goint to have to build the ring, It is not set up anywhere for practice I will see what I can do! I am getting worried?
John
We have done everything we can do short of a real world test. You wave a sheet of paper under the sensor and the bot reacts. Now you MUST see if it will work in real life on the floor. Have the competition organizers published what the ring is spec’d at? Size, materials, paint, etc?
I’m not sure of you are worried… But yes man the next step is to see if the sensors can react to the real world scenario, the ring.
facebook.com/video/video.php?v=409567569457
This is the best I can do for a video I did find out theat the light sencer was plugged with dirt twords the end Let me know what you think!!
John
Dude, no one can view that without a facebook account. Can’t you just youtube it like normal?
Anyone else suspect the oil slick and non-uniform floor coloring has anything to do with the problem?