Script or hardware error?

Greeting fellows, I just bought a micro maestro 18 channel to be used for a hexapod robot, i write these code

begin
5000 2 servo
7000 0 servo
5000 4 servo
1000 delay
5000 8 servo
5000 14 servo
1000 delay
7000 6 servo
7000 12 servo
1000 delay
5000 10 servo
5000 16 servo
1000 delay
7000 2 servo
5000 0 servo
7000 4 servo
1000 delay
7000 8 servo
7000 14 servo
1000 delay
5000 6 servo
5000 12 servo
1000 delay
7000 10 servo
7000 16 servo
1000 delay
repeat

but after several loop all the servo is off, without an error, video can be seen at http://www.youtube.com/watch?v=XT0HxFpRBqs, but when i write these code (used for the other three legs)

begin
5000 3 servo
7000 1 servo
5000 5 servo
1000 delay
5000 9 servo
5000 15 servo
1000 delay
7000 7 servo
7000 13 servo
1000 delay
5000 11 servo
5000 17 servo
1000 delay
7000 3 servo
5000 1 servo
7000 5 servo
1000 delay
7000 9 servo
7000 15 servo
1000 delay
5000 7 servo
5000 13 servo
1000 delay
7000 11 servo
7000 17 servo
1000 delay
repeat

everything went just normal, i use a cheap power supply with 9V output that goes through a 7805 IC as the Vsrv, and USB power the Vin, i wonder what cause the problem, is it the servo or the code or maybe the power supply ???

even my servos won’t start at all when I write these code

begin
6000 6000 6000 6000 6000 6000 6000 6000 6000 6000 6000 6000 6000 6000 6000 6000 6000 6000
restart 
500 delay
7000 7000 5000 7000 7000 5000
joint1_right joint2_right
500 delay
7000 5000 7000
hjoint_right 
500 delay
6000 6000 6000 6000 6000 6000
joint1_right joint2_right
500 delay
6000 6000 6000
hjoint_right
500 delay
7000 7000 5000 7000 7000 5000
joint1_left joint2_left
500 delay
7000 5000 7000
hjoint_left 
500 delay
6000 6000 6000 6000 6000 6000
joint1_left joint2_left
500 delay
6000 6000 6000
hjoint_left
500 delay  
repeat

sub restart
joint1_right joint1_left joint2_right joint2_left hjoint_right hjoint_left
return

sub joint1_right
6 servo 8 servo 10 servo
return

sub joint1_left
13 servo 15 servo 17 servo
return

sub joint2_right
12 servo 14 servo 16 servo
return

sub joint2_left
7 servo 9 servo 11 servo
return

sub hjoint_left
1 servo 3 servo 5 servo
return

sub hjoint_right
0 servo 2 servo 4 servo
return

I hope you can give me fast response because it’s D-3days to my project presentation…

thanks,
hgrmty

Hello,

Is the Maestro continuing to run through the loop according to the control center window? My guess is that you are overloading your 7805, and it is going into thermal shutdown after a while. You need a power supply capable of delivering at least 1A per servo, and you are far below that!

-Paul

so there’s nothing wrong with the code ???
okay then I’ll try using another voltage source…

thanks :smiley:

Hello,

I can’t promise that there is nothing wrong with your code. That is why I asked you about what the Maestro is doing according to the Control Center.

-Paul

according to the status tab all the servos still moves, and nothing happened in the error tab…

Then it sounds like the program is running just fine, and you only need to fix your power situation.

-Paul