need advice on project
i plan to make a walking robot for a college project. an idea i had was to use one of the 24-pin·BS2 modules to control 18 servos,·while at the same time interfacing it with an rc controller so that it can operated remotely.
questions:
-·what would be·the best method for·simultaneously controlling up to 18 servos·using a Bs2? if i understand correctly, the servos would draw too much current for the stamp to handle, and they would have to be isolated from the stamp. however im not sure how to go about doing this.
- one of the fundamental things that is required in order for this project to work, is·the ability to tell the stamp to turn the servo x number of degrees. is this even possible with a bs2 stamp?
- what would be the best (and cheapest) way to interface the stamp with an rc controller?
- which BS2 module is best for this task? will it be sufficient to just go for the cheapest 24pin module i can find?
questions:
-·what would be·the best method for·simultaneously controlling up to 18 servos·using a Bs2? if i understand correctly, the servos would draw too much current for the stamp to handle, and they would have to be isolated from the stamp. however im not sure how to go about doing this.
- one of the fundamental things that is required in order for this project to work, is·the ability to tell the stamp to turn the servo x number of degrees. is this even possible with a bs2 stamp?
- what would be the best (and cheapest) way to interface the stamp with an rc controller?
- which BS2 module is best for this task? will it be sufficient to just go for the cheapest 24pin module i can find?
Comments
Servos don't feed positional information back to the microcontroller. You just assume that it goes to the desired position that you set, kind of like trusting a taxi cab driver to take you where you want. If it's vital that you know exact positioning, you'll need to put in a feedback device (pot most likely). You won't really get the choice of degrees, but you will have a movement scale.
Depends which RC controller you have. I'm working on a robot (wheeled) that the platform came from an RC car. To my joy, I found that the RC reciever output signals in a pulse width format. My reciever had only two channels, but you can get nice ones with 7 or more. You'll have to decide what you want each channel to do, and then interpret the pulse that the RC sends out to the BS2.
You'll probably want to get two BS2s. This is because you'll need both input and output at the same time (read RC signals and send Servo signals) You may be able to get by with just one, but it may be sluggish or slow. The Propeller would actually be best, but a BS2 would work just fine. I'd recomend a BS2px and a BS2e/BS2. The px is master, the other slave. Of course, you may want to use two pxs since they are at about half price right now till Sunday.
The servo is not told to move a certain number of degrees. It's given a pulse of a certain width that corresponds to a position within its range of motion. The correspondence between pulse width and position may vary a little from servo to servo because they're just not built for that sort of accuracy.
For power, servos are designed to operate with supply voltages from 4.8V to 6V which usually corresponds to 4 or 5 NiMH rechargable cells in series. I'd recommend 5. You can get R/C battery packs that provide 6V or you can make your own. You can run servos with voltages up to 7.2V and there are pre-packaged batteries with the 6 NiMH cells needed, but this higher voltage tends to put increased wear on the motor brushes in the servo. In any event, the servos have their own power connection to the battery pack and you either run the Stamp's voltage regulator off the same battery pack or you have a separate battery for the Stamp and connect all the ground wires together.
Post Edited (Mike Green) : 9/13/2008 5:18:45 PM GMT
the original plan was to have 4 of the pins get inputs from the rc controller, while using 18 of the remaining 20 to control the servos, thus i assumed·that a·24pin BS2 would be sufficient. i'll look into this servo controller board you were talking about, but im not sure i understand how it can control 18 servos with 1 pin...
SEROUT Servos, ServoBaud+$8000,[noparse][[/noparse]"!SC",Servo,Servo_Rate,Servo_Pulse.LOWBYTE,Servo_Pulse.HIGHBYTE,CR]
to the servo controller to set the motion of a servo where:
Servos is the pin number the servo controller is connected to.
ServoBaud+$8000 sets the commuication rate.
Servo is the number of the connection on the servo controller where the servo is attached with 0 to 15 on the first servo controller and 16-31 on the second servo controller.
Servo_Rate controls how fast the controller attempts to move the servo to the desired position
Servo_Pulse.LOWBYTE,Servo_Pulse.HIGHBYTE is the Word variable containg the desired position.
Serial: www.parallax.com/Store/Accessories/MotorServoControllers/tabid/160/CategoryID/35/List/0/Level/a/ProductID/376/Default.aspx?SortField=ProductName%2cProductName
USB+serial: www.parallax.com/Store/Accessories/MotorServoControllers/tabid/160/CategoryID/35/List/0/Level/a/ProductID/346/Default.aspx?SortField=ProductName%2cProductName
2) The Stamp itself will be pretty busy watching the R/C receiver outputs and doing overall control
-does the servo control unit have to be programmed separately from the stamp, or is it all the programming done through the BS2 stamp?
-is all the circuitry required to isolate the power supply for the servos already included on the servo controller board?
The motor power supply for each controller's 16 servos is provided to a pair of terminals on the controller board. On each controller board, there are 3-pin headers for each of the 16 servos that supply power, ground, and control pulses. The controller itself is powered from the Stamp board's +5V supply. The ground connections are all common (and must be common). Look at the pictures and schematics on the servo controller documentation.
any flaws with my plan?
will the servo controller be able to simultaneously move several servos at a time?
any tips on which rc controller is best for this application?
isn't this feature already built into the·servo controller?·the plan is that the bs2 will be powered·with a 9 volt battery, and·the servos will be powered·from a battery pack connected through the servo controller.
Post Edited (roman f) : 9/18/2008 3:37:39 PM GMT
The PSC uses separate logic and servo supplies, yes. I hope this helps. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
As for the design, why the wheels? I thought the project was a walking design. My guess (and that's all that it is) is that you'll be getting the worst of both worlds. Think gyrocopter. Sure the design works, but is it ideal?
doesn't the servo controller already have the necessary circuitry for isolating the servos' power supply?
i see what you're saying with the wheels, they weren't part of the original design but our prof wants it included in the design. unless i can convince him otherwise (which is not likely), this feature must stay.
will it work properly if i make the connections similar to the·diagram below (but using 16 servos)? or will i still have to make a ground connection for the servos as described in the above post?
is this a possible solution and is it better or worse than sticking to using an rc controller?
www.parallax.com/Store/Accessories/Communication/tabid/161/txtSearch/transceiver/List/1/ProductID/112/Default.aspx?SortField=ProductName%2cProductName
www.parallax.com/Store/Accessories/Communication/tabid/161/txtSearch/transceiver/List/1/ProductID/113/Default.aspx?SortField=ProductName%2cProductName
Post Edited (roman f) : 10/30/2008 4:23:27 AM GMT
A quote from the product page: "This device can be connected to a PC serial port using a MAX232 line driver. The circuit isn't supported by Parallax, but it's possible to make this connection with a few dollars of parts."
So, if you are not an EE, best to use the BS.
we will be using a 9v to power the stamp/servo controller, but we are not quite sure as to what battery to use to power the servos themselves. any help as to how battery selection is done?
My robot has 4 standard servos and 2 continuous rotation servos. I have found that a 4500 mAh 6V Ni-MH battery pack will give me about 45 minutes of running time. Your actual milage may vary.
Mike and I posted at the same time. You might also look at the pack units from the same company with the wiring already attached. They have a thermal interupt built into the pack that will cut the power if the battery overheats, which can occur on heavy discharge or charging of Ni-MH batteries. I've have this unit installed in my weather station. I don't have the heavy current draw, but I need the reserve capacity for cloudy days when the solar panels don't put out enough power to recharge the unit.
http://www.batteryspace.com/index.asp?PageAction=VIEWPROD&ProdID=1482
Post Edited (MSDTech) : 1/16/2009 11:15:55 PM GMT
The higher mAh rating just means you are going to get more operating life out of your application. Now, keep in mind this also means that you have more energy to deal with if something were to go wrong, so take adequate precautions.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Beau's comment is important. You should have a fuse in the positive lead from the battery pack (between the battery pack and the on/off switch). Estimate the peak current you want to support, add a fudge factor, and that's your fuse rating. As I mentioned, servos typically draw about 1A each at peak and you need to have some idea of how many servos could be running at the same time. Average current for a running servo is on the order of 1/4A. If your fuse is too small, you'll blow it when things are busy, but normal.
Post Edited (Mike Green) : 2/14/2009 2:54:13 AM GMT
I saw very similar batteries for sale at an electronics store nearby and the 4.2AH batteries seem to be just what I need, but they don't come with a charger. How do i choose a charger? Can i pick any 6v charger as long as its compatible with whatever type of battery it is, or do i need to consider other variables as well?
Thanks for the support guys, i really appreciate it.
Post Edited (roman f) : 2/20/2009 8:20:02 PM GMT
Post Edited (roman f) : 2/27/2009 4:05:37 AM GMT
Are you sending a sync pulse from the transmitter at the beginning of your code? Whenever you are initiating communication between RF modules, a sync pulse should be sent in order to re-establish radio communication between the modules. If you are not using a sync pulse, it could explain the random LED light-ups. Here's some code that will help sync your RF modules:
PULSOUT TxPin, 1200
Faster response time all depends on your code and how you have it structured. As a tip, you shouldn't need any PAUSE commands in your receiver code, so if you are using PAUSE's, it could slow your response time. Try looking through your code and see what could be causing any delays.
Hope this helps!
Jessica
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jessica Uelmen
Education Department
Parallax, Inc.