Robotic arm

Denzel

Senior Member
The following link is a circuit diagram for a small robotic arm that uses 3 servos (2 at shoulder, 1 at elbow) and 2 dc motors. (rotation at base and end effect)
http://tinypic.com/view.php?pic=4m1srxk
Is this correct?
Having never used servos with a picaxe chip before im not sure how to wire them or control them via a picaxe. The book I have bought shows the following wiring shown in my schematic and the code example is as follows...

Symbol servo motor = 4
Symbol left = 50
Symbol centre = 150
Symbol right = 250
Symbol counter = b0
Symbol counter1 = b1

Loop:
for counter = 50 to 250 step 10
pulsout servomotor, counter
pause 100
next counter

pause 1000

for counter1 = 1 to 5
for counter = 1 to 20
pulsout servomotor, left
pause 100
next counter
pause 1000
for counter = 1 to 20
pulsout servomotor, centre
pause 100
next counter
pause 1000
for counter = 1 to 20
pulsout servomotor, right
pause 100
next counter
pause 1000
for counter = 1 to 20
pulsout servomotor, centre
pause 100
next counter
next counter1
pause 1000
goto loop

Could someone please help me understand this?
 

BeanieBots

Moderator
Can't comment about the diagram and what it's for because it was drawn by Liam and not me.
As for driving servos from a PICAXE, nothing could be easier.
Use the SERVO command. It's very clear in the manual what to do.
The servo only has three wires. Supply, signal and 0v.
They draw high currents, so it is best to run the servo from a seperate supply.
Connect PICAXE 0v to servo 0v.
PICAXE output to servo signal.
PICAXE supply to battery pack A
Servo supply to battery pack B

servo pin,150 will move the servo to center.
servo pin,225 will move it one way
servo pin75 will move it the other way

You can also use pulsout to control servos but that will NOT be a background task and it will be up to YOU to do the servo frame timing in your code. For an example on how to do that, have a read of my Autonomous Hexapod thread.
 

Denzel

Senior Member
Thanks thats very very helpful! I have read the manual and this looks like a suitable solution.
I didn't make myself clear earlier. The schematic is my own. I drew it up using the servo circuit found in my book and the code sample is the code for one servo using the wiring I have and I just wanted to know how and wether my setup would work. But now I think I will use the servo command so thats that.
Thanks
denz
 
Top