Let's Make Robots!

Servo problems

My Picaxe 228x1 arrived today with the servo upgrade pack. I have followed all instructions but can't get the servo command to work. It appears to be trying to turn clockwise past the stop - i.e. it turns all the way and then buzzes. I can get it to move ok with pulsout commands so I don't think that the servo or any connection is fundamentally broken. The following is my program - the servo 0,150 is the command that isn't working as expected (any position I give seems to give the same result)

Anybody got any ideas what I've missed?

 

symbol servopin = 0
b0 = 150 : gosub pulseto
b0 = 225 : gosub pulseto
b0 = 150 : gosub pulseto
b0 = 75 : gosub pulseto
b0 = 150 : gosub pulseto
b0 = 225 : gosub pulseto
b0 = 150 : gosub pulseto
b0 = 75 : gosub pulseto
b0 = 150 : gosub pulseto
b0 = 225 : gosub pulseto
b0 = 150 : gosub pulseto
pause 2000
servo 0, 150
pause 2000
end

pulseto:
for b1 = 1 to 20
pulsout servopin, b0
pause 20
next
return

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
then that is where the power for the servo is connected to. The three pin one next to the big capacitor.

 perperials1.jpg

 

(from frits' page)

Rik

Wikipedia Affiliate Button

Whoa...

Start here...

Main:

servo 0,75

pause 500

servo 0,150

pause 500

servo 0,225

pause 500

goto main

**or**

main:

for b1=75 to 225 step 1

servo 0,b1

pause 20

next b1

for b1=225 to 75 step -1

servo 0,b1

pause 20

next b1

goto main

 

Hit me back and tell me if these codes work.

Thanks for the input but I've tried so may examples using the servo command and none of them worked. I just retried your examples (copy/paste) and same result - buzzing servo :0(

 

 

 

 

 

Are you using a 330ohm resistor or that yellow chip that comes with the upgrade pack? The resistor goes between the picaxe and the signal wire on the servo. Also make sure the ground of both power supplies (if using two) are connected.
I installed the 330R DIP package, and the second battery pack is connected to the PIXACE board (as instructed in the server upgrade pack - I haven't added any wires of my own as it lloks to my like the 0v tracks on the card are connected by a PCB trace)