PDA

View Full Version : Most simple way to control servos



debbiek
05-31-2010, 01:26 AM
Please help the newbie :-)

I'm trying to learn how to do animation on small size items. Would it be best to buy a BASIC stamp or a Propeller Chip to control approx 3-10 servos? I need to learn the mechanics, and the how to do the programming to accomplish this. Can I learn how to do this from the downloadable manuals (for either the BASIC stamp or the Propeller Chip), or if not, can someone recommend a simple starter book? I'm a long-time desktop publisher so I know my way around the computer.

Thank you SO much! Debbie

Rayman
05-31-2010, 01:33 AM
Check OBEX for Beau's "Servo32v5.spin"

Here's my first BoeBot code for the Propeller that uses that object for:

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm

Rayman
05-31-2010, 01:36 AM
Ok, well I just remembered that the BoeBot uses "modified for continuous rotation" servos, so maybe that's not a perfect example, but it does show how to use the driver.

Personally, I will never use a BASIC Stamp for anything again! The Propeller is much more powerful and just as easy, IMHO.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm

hover1
05-31-2010, 02:52 AM
Welcome Debbie,

It all depends on what you want to accomplish. I think as a newbie, the Basic Stamp might be in order. When I started out with multiple servos in a system, I went the Basic Stamp route. There was a lot of information available.

Given that, if you use the Basic Stamp, you will also need a Servo Controller. The Basic Stamp just can keep up with more the 4-5 servos at a time. This one:

·http://www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/txtSearch/servos/List/1/catpageindex/2/ProductID/595/Default.aspx?SortField=ProductName%2cProductName

will control up to sixteen servos and will do it without any need for the Basic Stamp to provide the pulses needed to move and keep the servos in position.

If you could be more specific in your final project, we may be able to point you in a specific direction.

Jim

debbiek
05-31-2010, 03:07 AM
Hi Jim and Rayman,

Thank you so much for the answers!! My project: I'm working on reproducing some 1950s Christmas store window displays with animated characters http://forums.parallax.com/images/smilies/smile.gif They aren't full size as they would have been in the store windows, but are approximately 1/6th scale. I've been trying different ideas to actually make the characters.

I really want to learn how to also program controls for other things too, such as lighting and music, with either the Stamp or Propeller too , but I guess I have to go a step at a time becuase I know nothing about this. I hope I can learn it, and eventually also teach it to others in the miniatures world.

I bought and played a little bit with a Super Cricket, but the resource literature is not very developed (at least back a year or so ago when I last looked).

I looked at the Servo Controller, and am going to download the resources. It looks fab!

For the next steps in my project, lighting and music, is there any way the Servo controller in the link (Jim) can also control them? I wish there was a class, even online, to learn some of this. Could anyone suggest anything?

Thanks a bunch, Debbie

debbiek
05-31-2010, 03:08 AM
Rayman,

Thank you for this advice "Personally, I will never use a BASIC Stamp for anything again! The Propeller is much more powerful and just as easy, IMHO." - this is what I was wondering about and had really hoped to hear!

Very appreciated,

Debbie


--------------------------------------------------------------------------------

Rayman
05-31-2010, 03:16 AM
Well, maybe I should caveat my remarks a bit...

There is probably about 100X more info around for using the Basic Stamp for servo control than for the Propeller... So, without the aid of a forum like this or friends that can answer questions, it would be easier to start with a Basic Stamp.

Also, I have a degree or two in Electrical Engineering and although this isn't my specialty, maybe things are easier for me...

Plus, I did start out years ago with the Basic Stamp, and so already had experience with that to grow from...

Anyway, I must admit that a beginner might do well to start with a Basic Stamp.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm

hover1
05-31-2010, 03:21 AM
Actually, this is a great project for 12 Blocks.

·http://12blocks.com/

It runs on the Propeller chip so all the horespower is there.

The music can run off a device like the VMusic2.

·http://www.vinculum.com/prd_vmusic1.html

Jim

Edit: I just noticed you had another post in Basic Stamp forum and Mike already responded to it. It's against forum rules to cross post, (post the same questions in two forums)





Post Edited (hover1) : 5/30/2010 7:28:46 PM GMT

JonnyMac
05-31-2010, 03:28 AM
With EFX-TEK I do a lot of work with people who create animations. 1st: Go with the Propeller; without extra help (i.e., external servo controller) you're not going to get the BS2 to handle more than a few servos. 2nd: You may consider a PC-based animation control package like VSA. It's not great, and the service is somewhat lacking, but the product has become a bit of a defacto standard for servo animatronics. A free alternative is called Vixen (we uses that a lot at EFX-TEK).

You could control a PSC with VSA/Vixen, and even reprogram the PSC (it is Propeller Powered) so you could have servo and other outputs (e.g. PWM for LED lighting).

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA

debbiek
05-31-2010, 03:28 AM
I'll give the Basic Stamp equal consideration Rayman, thanks for the follow-up comments about that.

I have a couple more very basic questions, please...

I don't want to have anything hooked up to my computer (I want the displays to be portable), so can I run either/or the Propeller Servo Controller or the Basic Stamp by plugging them directly into a wall outlet?

Can I can attach (by USB?) both the Basic Stamp and the Propeller Servo Controller to my computer to do the programming?

If I had to do tweaking once either of them weren't attached to my computer is that possible?

I'd also love your recommendations on which resource to use for doing the programming.

I'm sure newbies aren't the favorites, but please know that I sincerely appreciate your help. I've been working on and towards this project for a long time, and hope to share it with lots of folks when the scenes are all done http://forums.parallax.com/images/smilies/smile.gif

Very best, Debbie

debbiek
05-31-2010, 03:30 AM
Rayman, "Ok, well I just remembered that the BoeBot uses "modified for continuous rotation" servos, so maybe that's not a perfect example, but it does show how to use the driver." I will be using at least some servos that are modified for continuous rotation (is there a shorter name for them? - grin) - so thanks for sending this!!! Debbie

ElectricAye
05-31-2010, 03:34 AM
I suppose a lot depends on whether or not you have programming experience. Doing desktop publishing doesn't necessarily mean that you know how to program a computer or that you understand its inner workings, so if you have never programmed anything, you might want to start with the Basic Stamp. On the other hand, the Propeller is much more powerful and would allow you to use a single chip to orchestrate a large number of automated operations that could be synched, etc. lights, action, TV displays, etc. The members of this forum very often debate whether or not total newbies should start out on a Propeller, though. In my opinion it's better to start out on a Stamp, get the basics, then graduate to the Propeller. But many others on this forum believe a total newb can jump right into the Propeller with the Propeller Education Kit and go from there. In any case, I think you'll find this forum is populated by a lot of very helpful and knowledgeable people.

http://forums.parallax.com/images/smilies/smile.gif

debbiek
05-31-2010, 03:41 AM
Jon,

I'm very visual so the software ideas you sent me are great. I'm on the brookshire site right now checking this out, and will go to check out Vixen too.

My preference would be not to have a computer on site to run the programs that drive the servos, music, lights, etc. Is there a way around that?

Thanks so much, Debbie

debbiek
05-31-2010, 03:49 AM
Hi ElectricAye,

You're very right, I don't know programming! My experience in DTP, doing tech support, and training is mostly in that area. I knew how to use DOS pre-windows, but that was a long time ago. I'm very thankful that people (you included) are willing to help us newbs!

I can see that the Propeller would be the best choice for what I'm going to be doing, and maybe after reading everything I'll have a better feel for whether I can handle going that way. The software that Jon recommended, VSA, looks very cool and like something that I think may be helpful for me. I'm so much of a newb that I don't know what I need quite yet, but that's where you nice people come in. Did I say thank-you??

Debbie

JonnyMac
05-31-2010, 03:55 AM
debbiek said...
Jon,

I'm very visual so the software ideas you sent me are great. I'm on the brookshire site right now checking this out, and will go to check out Vixen too.

My preference would be not to have a computer on site to run the programs that drive the servos, music, lights, etc. Is there a way around that?

Thanks so much, Debbie


One project that I'm going to do for myself is build a Propeller-powered servo player with an SD card. With VSA you can export the show data and that could be read from an SD card with the Propeller and "played" with a servo object (I've written my own). Since the present SD card access do not support multiple open files, you would transfer you audio to a small MP3 player (my favorite is the uMP3 from Rogue Robotics). This scenario gives you PC programming with stand-alone operation.

NOT a beginners project, however; work up to it. It will be fun though, especially since you know where you're going.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA

debbiek
05-31-2010, 04:18 AM
Hi Jon,

Now if I only understood everything you said <grin>. What is an SD card? I've marked your efx-tek site and will be spending more time there trying to figure out what this is all about - thank you again! Debbie


JonnyMac said...

debbiek said...
Jon,

I'm very visual so the software ideas you sent me are great. I'm on the brookshire site right now checking this out, and will go to check out Vixen too.

My preference would be not to have a computer on site to run the programs that drive the servos, music, lights, etc. Is there a way around that?

Thanks so much, Debbie


One project that I'm going to do for myself is build a Propeller-powered servo player with an SD card. With VSA you can export the show data and that could be read from an SD card with the Propeller and "played" with a servo object (I've written my own). Since the present SD card access do not support multiple open files, you would transfer you audio to a small MP3 player (my favorite is the uMP3 from Rogue Robotics). This scenario gives you PC programming with stand-alone operation.

NOT a beginners project, however; work up to it. It will be fun though, especially since you know where you're going.

hover1
05-31-2010, 04:42 AM
I will have to yield to Jon on the selection of the MP3 player. He is the expert in this field, and he has found far more problems out in the field then I have. I only have two in operation, and he has answered dozens, if not more, questions about problems with the VMusic2 here and on the EFX-TEC forums. So uMP3 is the way to go. That will be my next choice.
Jim

JonnyMac said...
(my favorite is the uMP3 from Rogue Robotics)

JonnyMac
05-31-2010, 04:42 AM
I'm sure you've seen an SD card -- probably used them in one electronics device or another.

There is a popular object called FSRW that allows one to read from (and write to) an SD card. So... you create your show in VSA, export it, copy that file to the SD card and plug it into your Propeller project. As time allows, I will be doing this for myself. VSA can export servo position data as a 32-bit long which makes reading into the Propeller pretty easy (in theory, that is...).

My friend Nick over at Gadget Gangster created a second-generation Propeller Platform (I created the 1st) that has an SD card on it. You might look at that as a way to get started.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA

Post Edited (JonnyMac) : 5/30/2010 8:50:19 PM GMT

hover1
05-31-2010, 04:45 AM
Jon,
Would this be along the lines of a "Where's Waldo 2" ?

JonnyMac said...

One project that I'm going to do for myself is build a Propeller-powered servo player with an SD card. With VSA you can export the show data and that could be read from an SD card with the Propeller and "played" with a servo object (I've written my own). Since the present SD card access do not support multiple open files, you would transfer you audio to a small MP3 player (my favorite is the uMP3 from Rogue Robotics). This scenario gives you PC programming with stand-alone operation.

NOT a beginners project, however; work up to it. It will be fun though, especially since you know where you're going.

JonnyMac
05-31-2010, 04:46 AM
Maybe....

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA

FireHopper
05-31-2010, 05:07 AM
hover1 said...
Welcome Debbie,

It all depends on what you want to accomplish. I think as a newbie, the Basic Stamp might be in order. When I started out with multiple servos in a system, I went the Basic Stamp route. There was a lot of information available.

Given that, if you use the Basic Stamp, you will also need a Servo Controller. The Basic Stamp just can keep up with more the 4-5 servos at a time. This one:

http://www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/txtSearch/servos/List/1/catpageindex/2/ProductID/595/Default.aspx?SortField=ProductName%2cProductName

will control up to sixteen servos and will do it without any need for the Basic Stamp to provide the pulses needed to move and keep the servos in position.

If you could be more specific in your final project, we may be able to point you in a specific direction.

Jim



if you use that controller. you dont really need another micro, that controller has open source firmware, and can be hacked and modified. :) and its got a propeller already! I am using one for my animatronic wings, I just hope it works.. I have to finish rewiring things before I can test my firmware :)

Mike Green
05-31-2010, 05:15 AM
I've had experience with both the uMP3 and the VMusic2 for playing music and reading control information. I've had better luck with the VMusic2 although others have had the opposite experience. Here's the link: http://forums.parallax.com/showthread.php?p=677691. This device ran for several weeks, about 8 hours a day playing short sound pieces on two independent channels.

Each channel reads a text file off its corresponding USB memory stick into memory. This text file contains information on the order of the sound files to be played, how long it should take to play each file, and on which of 6 speakers it should be played. You could easily hook a VMusic2 to a Propeller Servo Controller and do the same sort of thing, just substituting servo positions for speaker selection.

You could use your PC to create the file with the control information, then run the whole thing without the PC attached.

hover1
05-31-2010, 05:26 AM
I was just saying, if you you a Basic Stamp, it could not handle more than 3 servos. You would need the Servo Controller.

I have modified the new Controller with may own firmware also, but I didn'd think it was a good starting point for a newbie.

But.....with 12blocks ..it could be!

Jim


FireHopper said...

hover1 said...
Welcome Debbie,

It all depends on what you want to accomplish. I think as a newbie, the Basic Stamp might be in order. When I started out with multiple servos in a system, I went the Basic Stamp route. There was a lot of information available.

Given that, if you use the Basic Stamp, you will also need a Servo Controller. The Basic Stamp just can keep up with more the 4-5 servos at a time. This one:

http://www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/txtSearch/servos/List/1/catpageindex/2/ProductID/595/Default.aspx?SortField=ProductName%2cProductName

will control up to sixteen servos and will do it without any need for the Basic Stamp to provide the pulses needed to move and keep the servos in position.

If you could be more specific in your final project, we may be able to point you in a specific direction.

Jim



if you use that controller. you dont really need another micro, that controller has open source firmware, and can be hacked and modified. :) and its got a propeller already! I am using one for my animatronic wings, I just hope it works.. I have to finish rewiring things before I can test my firmware :)

debbiek
06-01-2010, 01:14 AM
Thanks for the answer on the SD card, I wasn't thinking - I have one in my digital SLR camera, which I use all the time. There are so many initials these days to keep track of <grin>.

The Propeller Platform with the SD card slot is an amazing answer. I'm wondering what are the chances there could be problems with this setup? Would it be safer to just have a computer running the VSA show? Then if something went wonky, and I were there, I could possibly fix it? Would there be less chance of things going wrong if it were running from the computer then the Propeller Platform? Or vice versa?

Thanks again!· Debbie


JonnyMac said...
I'm sure you've seen an SD card -- probably used them in one electronics device or another.

There is a popular object called FSRW that allows one to read from (and write to) an SD card. So... you create your show in VSA, export it, copy that file to the SD card and plug it into your Propeller project. As time allows, I will be doing this for myself. VSA can export servo position data as a 32-bit long which makes reading into the Propeller pretty easy (in theory, that is...).

My friend Nick over at Gadget Gangster created a second-generation Propeller Platform (I created the 1st) that has an SD card on it. You might look at that as a way to get started.

debbiek
06-01-2010, 01:32 AM
I'm sorry about the cross post, I should have read the rules. Won't happen again!· Debbie
hover1 said...
Actually, this is a great project for 12 Blocks.

·http://12blocks.com/

It runs on the Propeller chip so all the horespower is there.

The music can run off a device like the VMusic2.

·http://www.vinculum.com/prd_vmusic1.html

Jim

Edit: I just noticed you had another post in Basic Stamp forum and Mike already responded to it. It's against forum rules to cross post, (post the same questions in two forums)