My quad and my bs2

hi everybody

i’m working on programming my quaruped 3dof/leg and i have some trouble with my basic stamp. the program i have write is very long and i see kinématics inverse have too many variable for the basic stamp.

i want to have my quad walking and turning on flat terran and commanded by a remote control

have i to change my bs2 for and more powerfull ic, may be with a coprocessor and EEprom update? could you help me to choose? i prefere full assembled kit because i’m not skilled in soldering

or helping me for a more simple program

my actual loop for walking forward

IF x=0 THEN p0=550
IF x=0 THEN p1=750
IF x=0 THEN p2=650
IF x=0 THEN p3=850

'----------------------------

IF x=1 THEN p0=p0+3
IF x=1 THEN p1=p1+1
IF x=1 THEN p2=p2+1
IF x=1 THEN p3=p3-1
IF x=1 THEN p48=1100
IF x=1 THEN p59=500
IF x=1 THEN p610=500
IF x=1 THEN p711=900
IF p0=850 XOR p1=850 XOR p2=750 XOR p3=750 THEN GOTO error1
IF p0=850 AND p1=850 AND p2=750 AND p3=750 THEN x=2
IF x=2 THEN p48=900
IF x=2 THEN p59=300
IF x=2 THEN p610=500
IF x=2 THEN p711=900
IF x=2 THEN p0=p0-1
IF x=2 THEN p1=p1-3
IF x=2 THEN p2=p2+1
IF x=2 THEN p3=p3-1
IF p0=750 XOR p1=550 XOR p2=850 XOR p3=650 THEN GOTO error2
IF p0=750 AND p1=550 AND p2=850 AND p3=650 THEN x=3
IF x=3 THEN p48=900
IF x=3 THEN p59=500
IF x=3 THEN p610=300
IF x=3 THEN p711=900
IF x=3 THEN p0=p0-1
IF x=3 THEN p1=p1+1
IF x=3 THEN p2=p2-3
IF x=3 THEN p3=p3-1
IF p0=650 XOR p1=650 XOR p2=550 XOR p3=550 THEN GOTO error3
IF p0=650 AND p1=650 AND p2=550 AND p3=550 THEN x=4
IF x=3 THEN p48=900
IF x=3 THEN p59=500
IF x=3 THEN p610=500
IF x=3 THEN p711=1100
IF x=3 THEN p0=p0-1
IF x=3 THEN p1=p1+1
IF x=3 THEN p2=p2+1
IF x=3 THEN p3=p3+3
IF p0=550 XOR p1=750 XOR p2=650 XOR p3=850 THEN GOTO error4
IF p0=550 AND p1=750 AND p2=650 AND p3=850 THEN x=1

IF x=0 THEN x=1

Hi,

In order to make your program smaller, I would recommend using an SSC-32 Servo Controller Board in addition to the Basic Stamp. Your Basic Stamp will be able send movement commands to the SSC-32 over a TTL serial connection, and the SSC-32 can take care of doing the transitions from one position to another.

For example, see the Group Move command that would allow you to move all your servos at the same time while using the T parameter to specific the transition time.

With this setup, your program would then only have to specify the start and stop positions and transition times, without having to worry about calculating the intermediate positions of each transition.

Another option is to use a BotBoarduino+SSC-32 instead, since there already exists sample code for controlling a quadruped with these boards.

We hope this helps,

thanks for respond

it seem to be a powerfull add for my quad spider. but i don’t understand how it work with the stamp, have i to programm the stamp as normal includind a command line like :
serout 12, #5 P1600 T1000 ] ?

it can help me if i want to do kinematics inverse ?
yhanks for help

That’s right, you can get the Stamp to send serial commands to the SSC-32 to move the servos. The SSC-32 doesn’t have any direct support for inverse kinematics, so that is still something you still need to calculate with the Stamp. However, if your servo movements are linear, the SSC-32 will be able to do transitions between positions.

If that’s not sufficient for you, you may be able to use two Stamps to achieve your objectives: use the first one for the main program that sends general movement commands through serial to the second one which does all the IK calculations and controls the servos.

We hope this helps,