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



@ Mon, 2008-12-08 19:10
We have the bug too... put
We have the bug too... put servo 7,150 (for example) on a line after a servo command on output 0, like:
servo 0,150
servo 7,150
pause 1000
servo 0,225
etc..
Then it's working fine here... Yeah I know it sucks but we can live with it ;) anyway a replacement is always nice :)
@ Mon, 2008-12-01 14:32
LMR needs to know about his bug (1)
LMR needs to know about his bug!
Would Phil or Limpa (or both) please post a description of this bug on the site somehwere? May I suggest a WalkThrough page for that?
Please describe how to recognise the buggy version. Which chips are affected? What are the symptoms of this bug? How did you get your supplier to replace it?
That would help all Picaxe owners to determine if they should take the effort to get a replacement. And maybe prevent more frustrations.
Thanks in advance,
Rik
@ Tue, 2008-12-02 12:23
Picaxe 28X1 Servo Bug
rik, I'll just drop this in here for the time being so if Limpa has something to add then it can all be in the same tip/walkthrough....
I can't add much more to what I have already written but I shall rearrange it slightly
Recognising Buggy Version:
I don't use the Rev-Ed program editor so I can't give specific instructions but when your program is downloaded there is a confirmation dialogue. I'm using the command line compiler on Linux which reported "PASS - programmed PICAXE-28X1 (40X1) vA.4 successfully.", I assume that something similar is seen in the Windows Program Editor.
I suggest that if that confirmation string contains vA.4 then you have buggy firmware. I assume that any future purchase from Rev-Ed will contain a later version of the firmware, and the A.4 firmware seems fine for other things - I have successfully connected up an SRF005, switches and LEDs.
Chips Affected:
The only chip I am aware has a servo/servopos problem is the 28X1 with v A.4 of the firmware. I assume that different chips have different firmware but it is possible that, say, 28X1 and 40X1 share similar code and therefore the 40X1 might have the same problem.
Symtoms:
The servo and servopos commands move the servo clockwise and the server buzzes; however if you use the appropriate pulsout commands the servo works correctly.
Additionally, as both Limpa and I discovered, if you perform a servo command on another output then servo commands on the proper servo port work. To get port 0 to work you need to fidde with port 7, port 1 fiddle with port 0. This is not a solution in most cases and the servo port is in a funny state so if you stop issuing commands it will turn on after about 12 seconds, and stay on for over two minutes.
Getting Replacement:
I emailed Rev-Ed technical support (and posted to the picaxe forum) describing the problem and, after they investigated and fixed the problem, they shipped me replacement chips.
Hope that helps
Phil
@ Tue, 2008-12-02 22:08
thanks
If Limpa has anything to add, he's more than welkcome. I will check my own picaxes 28x1. And maybe, perhaps even soon, I will write that walkthrough myself, compiling all of our info.
Rik
@ Wed, 2008-12-03 13:50
link
Let's continue this bug talk here.
8ik
@ Sat, 2008-11-29 23:21
Just an update - Sorted
@ Sat, 2008-11-29 23:29
I had a feeling!!You are not
I had a feeling!!
You are not the only one, strange questions regarding servos in here lately :)
@ Wed, 2008-11-19 00:47
Rik got it
@ Wed, 2008-11-19 00:52
Sadly not
and the only test equipment I have is a multi-meter (so I know that the power for the servo is 6v (4 alakine cells)).
I assumed that the servo command would just to the same as pulsout but in the background and that maybe there is some magic initialisation that was needed. Apparently not.
Thanks for the help - it's my bed time now so I shall keep looking in the morning.
@ Wed, 2008-11-19 00:33
How about the jumper?