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.

I had a feeling!!

You are not the only one, strange questions regarding servos in here lately :)

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

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 

 

 

 

 

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

Let's continue this bug talk here.

8ik

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 :)