Here is a quick video I did. It shows how fast it is. The robot does not notice the edge until it is a long way off!
Anyone have any idea how to do PWM on the SX controller to slow down the motors to a reasonable speed?
That’s a really nice little mini-sumo bot. I bet it will be effective.
How much does it weigh?
Something like 200 grams. I need to add a lot of weight. The lithium battries don’t weigh much.
lol, well, im sure u will win if thet have a competition to go out of the ring
im not sure about the PWM wat language are u programming it?
That little bugger is super cool and super fast. Lol - you’re right you’d better slow it down
hey spacejunk - for the PWM try here forums.parallax.com/forums/default.aspx?f=21&m=73867
SX/B
Did it move at the speed of light earlier that it knocked the other bot off the ring, made it go flying and then went back to its starting spot?
Man that thing is slow
What are you programming in?
Can someone explain the ASM code? :mrgreen:
I would love a 2 motor PWM setup.
You do not necessarily need to slow it down! Now here me out on this. What you need to do is control the speed for more control, but the speed is your friend in sumo. The best performing sumos I have ever had the pleasure of seeing in person are from Rick Brooks. He does not use ring edge sensors at all! But he does have some very nice opponent detectors. What you need to strive to do is be able to make your robot accurately make arcs and turns so you can have several routines. Here is his website… www.brooksbots.com
Now for some fun follow this…
For most situations you can go forward to win.
brooksbots.com/Movies/Peoria%202007/1A%20ExSpurt%20vs%20Land%20Mine.wmv
However if that doesn’t work…
brooksbots.com/Movies/Peoria%202007/7A%20Wild%20Tire%20vs%20ExSpurt.wmv
Try a different approach…
brooksbots.com/Movies/Peoria%202007/13A%20ExSpurt%20vs%20Wild%20Tire.wmv
So it’s all about the speed and control. Don’t slow the bot down enough so it can respond in time for the ring edge detectors. That’s the wrong answer…
My idea is it will drive at 75% speed so it can detect the edgeand then as soon as it sees the oponent it will ramp up to full speed and attack.
I would still need PWM control.
Yes of course, but for control of where the robot goes, not for slowing it down enough to prevent the robot from missing the edge detect. The robot even at 75% speed would probably still not have enough time to prevent it from leaving the ring. It’s a matter of traction, momentum, and speed. What I’m showing you is proven to work effectively, but to each his own I guess.
This is the code I’m using. All it seems to do is drive motors in full reverse. No matter what PWMValue is.
[code]
'=========================================================================
’
’ File…
’ Purpose…
’ Author…
’ E-mail…
’ Started…
’ Updated…
’
’ =========================================================================
’ -------------------------------------------------------------------------
’ Program Description
’ -------------------------------------------------------------------------
’ -------------------------------------------------------------------------
’ Device Settings
’ -------------------------------------------------------------------------
DEVICE SX28, OSCHS2, TURBO, STACKX, OPTIONX
FREQ 50_000_000
’ -------------------------------------------------------------------------
’ IO Pins
’ -------------------------------------------------------------------------
PWMPinR VAR RA.0
PWMPinL VAR RA.2
’ -------------------------------------------------------------------------
’ Constants
’ -------------------------------------------------------------------------
’ -------------------------------------------------------------------------
’ Variables
’ -------------------------------------------------------------------------
PWMCount VAR Byte
PWMValue VAR Byte
’ -------------------------------------------------------------------------
INTERRUPT
’ -------------------------------------------------------------------------
ISR_Start:
\ADD PWMCount, #1
IF PWMCount = PWMValue THEN
\CLRB PWMPinR
ELSE
\SETB PWMPinR
ENDIF
\ADD PWMCount, #1
IF PWMCount = PWMValue THEN
\CLRB PWMPinL
ELSE
\SETB PWMPinL
ENDIF
ISR_Exit:
RETURNINT 250
’ =========================================================================
PROGRAM Start
’ =========================================================================
’ -------------------------------------------------------------------------
’ Subroutine Declarations
’ -------------------------------------------------------------------------
’ -------------------------------------------------------------------------
’ Program Code
’ -------------------------------------------------------------------------
Start:
TRIS_A = %0000 ’ All outputs
OPTION = $81 ’ Enable RTCC interrupts, RTCC Prescaler = 1:4
PWMValue = 0
\CLRB RA.1
\CLRB RA.3
Main:
GOTO Main
’ -------------------------------------------------------------------------
’ Subroutine Code
’ -------------------------------------------------------------------------
’ =========================================================================
’ User Data
’ =========================================================================[/code]
WAIT! I think it is working. I changed = in the if then statement to >=.
YES! Full speed control! If anyone wants me to post the finished code I can.
wow, tested it and it works ok? how aboiut a video of it turning and doing some arcs