First project - please help

Hello,

This is my first time working with robotics. I recently bought the Basic Atom 28 Pin Starter Pack and have begun working on/experimenting with a simple robotic setup which, when programmed, should make two seperate motors run at timed intervals (see attached image below). I have used using the 4wd Rover wiring diagram as a template (but without the GP2D12 as I have no need for this item) as this is the closest match to the setup I’d like to achieve.
When the motor controller and the board are turned on green lights indicate power is “on” and when attached to my PC, the Basic Atom software recognizes the hardware and allows me to “compile” (no errors) and “program”. The problem is that after pressing the “program” tool, the Basic Atom Software prompt in the lower workscreen says “Programming…” indefinitely and never seems to resolve/finish the programming. I initially thought this was the last step, but there is no visible response from the microcontroller/motor controller/motors.

This is the test program I have been uploading. From what I’ve read, the below serout command should prompt the motors to move forward a specified distance (of course, this doesn’t seem to be the case in my instance):

main
serout 8,396,"!M1160018"]
PAUSE 100
serout 8,396,"!M1160018"]
PAUSE 100
serout 8,396,"!M1160018"]
PAUSE 100
serout 8,396,"!M1100001"]
goto main
end

Other questions:
• Does the “flip” wire from the motor controller need to connect to something in order for the motor controller to function? This wire is not in the diagram, so I have left it unconnected.
• If SEROUT 8, 396 is the prefix for the drive motor, and in this case I have two drive motors, then the second motor prefix would be SEROUT 8, 397? Maybe SEROUT net, baud (i believe this is the command for a servo, not a DC motor).
• I notice the wiring diagram for the Rover indicates i should enable the ‘DAT’, ‘CMD’ and ‘ATT’- when i push them i get red, green and yellow lights…what function do these have?
Initially I thought it would be plug and play to achieve such simple robotic operations, but now I’m stuck and am getting nowhere with my own troubleshooting.

ANY HELP OR ADVICE WILL BE GREATLY APPRECIATED!

Thank you,

Justin

http://i26.photobucket.com/albums/c121/isbn_1/diagram-robotics100207.jpg

Confusion… It looks as if you are using the Sabertooth 2x10 RC, but are trying to use the Sabertooth 2x10’s serial control mode. Note the 2x10 (no RC) has additional modes thet the 2x10 RC does not have. To control the 2x10 RC you need to provide servo pulses. This is normally done with pulsout commands.

[code]
low 0
low 1

start:
pulsout 0,1500
pulsout 1,1500
pause 20
goto start[/code]

Note you must make sure the output pin is set to low to ensure the pulses are positive going. The pause 20mS is also important. The pulse argument is in uS, so the above code will generate 1.5mS pulses. The range is 1000 to 2000 and 1500 should stop the motors. I can’t help you with the programming not working though.

Also make sure the power for the group of 4 I/O pins that the Sabertooth is connected to does not have any power going to the middle row of pins. The Sabertooth sends back 5vdc on the orange wire as a battery elimination circuit for RC receiver modules.

Thanks for the reply!

I’ve been experimenting with the code you provided and have had some luck. In addition, i’ve ordered the Sabertooth 2x10 for future use.

A question though in regard to your comment:

“Also make sure the power for the group of 4 I/O pins that the Sabertooth is connected to does not have any power going to the middle row of pins. The Sabertooth sends back 5vdc on the orange wire as a battery elimination circuit for RC receiver modules.”

How do I prevent power from going to the middle row of pins? Is this done via code or does this require a hardware adjustment?

Also, I suspect that their may be some sort of short in the wires running from the motor controller to the bot board (see above image). If this were the case, would the “error” light come on?

Thanks in advance!!

Your images are not close enough to see the power jumpers on the bot board. Each group of four I/O pins have a power selector via jumpers. You can jumper VL (5vdc) or VS (whatever is connected to the VS terminal) to the center row of the I/O pins in groups of four. The easiest way to do this is to just not install the jumper. Or you can remove the orange wire from the two cables from the Sabertooth as shown in step 2 and 3 of this tutorial.
lynxmotion.com/images/html/build123.htm