Small servo controller dip
Special_K
Posts: 162
I need a very small servo controller to interface with the Basic stamp II. I
was going to use a picaxe 08M but it can only control 1 servo continually.
I have looked at the www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=323977
but I have not found any pBasic code for it. Does anyone have code for this product (EDEFT639)?
Has anyone used this before? And is there any servo controller even smaller.
was going to use a picaxe 08M but it can only control 1 servo continually.
I have looked at the www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=323977
but I have not found any pBasic code for it. Does anyone have code for this product (EDEFT639)?
Has anyone used this before? And is there any servo controller even smaller.
Comments
It mounts under a 24-pin DIP Stamp and could control up to 4 servos although the corresponding Stamp pins would not be usable (they're required to be inputs so they don't interfere).
And it's one-wire serial so you don't need a clock line.
Positional Commands:
To send a positional command to the individual
servos, two bytes must be sent. The first byte
sent contains the lower nibble of the position
byte and the second byte sent contains the upper
nibble of the position byte. The lower byte
command must be sent before the upper byte
command. The formats for the bytes are:
Lower Byte = 0sssxxxx
Upper Byte = 1sssyyyy
sss = Servo number:
000 = servo 1
001 = servo 2
010 = servo 3
011 = servo 4
100 = servo 5
xxxx = the lower nibble of the position
byte
yyyy = the upper nibble of the position
byte
So if you wanted to send servo channel 2 to some position, you would:
Though the baud rate for this chip is a bit low....
I would buy two or three of these if you use them -- seems like an obscure chip? And it might not be available in 5 years if you need a replacement.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
Thanks a lot for posting the code that was really my big concern. I will test it when the chips get here.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
tried this code it will not compile
what should be TX be set to. should it be the serve number?
In your code example, I don't think "pin" can be used as a constant, but not sure. Regardless, the baud needs to be set to match your desired baud rate for the given Stamp. See the manual. I think I remember that your servo chip has either 2400 or 9600 baud?
Also double check your bytes that you're sending on your serouts -- those are decimal so it's harder to tell, but I'm not sure they are quite right. What pins of the servo chip do you have the servos hooked up to (channels)?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
Should I just got for a different solution?
I think I may go back to trying to use the picaxe as a servo control. has anyone done this before?
I am really looking for a small DIP PIC or IC that will just keep sending the servo information. I would really hate to junk the custom board I made for this project.
The default for the chip is 90 degrees of servo travel. You have to send the correct config bytes to turn on 0-180 (1ms-2ms) pulse widths.
That would at least explain failure to turn as far as you want in either direction. What leads you to believe you can only use 4 preset positions? Or am I misunderstanding your post?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
You might be best served using the PICAXE... and the 18A is $4 cheaper!
it should move a servo through all the possible positions.. NO GO!!!!
man this thing is nuts.
the new code will send the servo to it's far right position and about 45% to the left (from center) but not fully there.
Post Edited (Special_K) : 2/10/2007 5:54:25 AM GMT
Does anyone have the program that I would run on a picaxe to turn it into a small dip servo controller. ohh and also the communication code for the BS2.
If not anyone know a good book on picaxe programming.
There really should be a simple one IC that can control 1-8 servos for those of us working on small bots or just want to off load the servo refreshes (is that a word?) so the BS 2 can do more important work.
If you read the documentation on the Picaxe SERVO command, you will see that it is temporarily disabled during SERIN, SEROUT, and DEBUG commands in your code, defeating your whole intent of using it as a slave processor. In addition, the SERVO command isn't very happy if you try to change the setting any faster than every 40 mSec or so...The standard PULsOUT method is better for quick changes.
a better choice, if you are going to use a Picaxe to take the load off your stamp would be to use an 08M for each servo and use the PULSIN command on the 08M
The stamp would use PULSOUT, but only once for each change of direction or speed.
The Picaxe would command the servo to hold a position (or speed) With the SERVO command operating in background while waiting for a new pulse with the PULSIN command in a loop.
Of course, the easier way is to spring for the PSC, which has a lot more flexibility for several servos.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Are either of these what you're looking for in an R/C servo controller:
http://www.awce.com/ppak8.htm
http://www.awce.com/pak8.htm
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
Steve Joblin I looked at the pololu site I have that unit on another bot i am working on..tried it out on this project but it does not fit. I checked online looks like people are using a PIC16F628A for servo control. Pololu sell one with serial 8-servo controller firmware for $17.00 any one used this?
www.pololu.com/products/pololu/0276/
I think I am a little stuck since I have soldered most of my custom-built board. I can expand the space that the EDEFT639 was going to use but I am kind of stuck with the pic/ dip format.. Unless I want to redo all the soldering.
www.kronosrobotics.com/downloads/EZServo1DS.pdf
You will note I gave you the datasheet.
READ it before you order. Make sure you understand what it does and you know how to hook it up and use it before you buy.
There's a BS2 example in the datasheet. If you don't understand how it works --Don't buy it!
You should do that with any controller you choose. That way you won't waste your money.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have used many of the Al Williams chip sets in the past and been very happy with them. However, that's not to say I've used them in the same way that you intend to use them. I also didn't go back through the existing messages here to see why these existing servo controller chips were failing to meet your needs.
If these are new chips, I can see no reason why you can't return them, and just say that they don't meet your needs or expectations. If you didn't purchase them from E-Lab then check with them both for assistance and return privledges if that becomes necessary. Any of these chips should work in ordinary R/C servo duty.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->