Basic stamp project running PSCU on a hexapod
Britannicus
Posts: 98
in BASIC Stamp
Hi - I'm coming back to Stamp after quite a while away, and obviously a lot has changed! - but what has not is my being an ignoramus !
I'm working with an old Propeller Servo control unit (PSCU), which I'm just starting to find my way around coupled to my trusty stamp board of education (Incidental to my question does anyone know how I can get another? - looks like this little chap is discontinued )
I can happily make my servo controller pick up commands to move a servo, but what I really want to do is to control a 12 servo hexapod of my own devising. this means sending a lot of specific servo sequences. each of 12 servos needs to be controlled in one of 3 states (back forward centre) for each stage of the walk. potentially this makes for a string of subroutines and a lot of messy coding.
Is there a way to control variables according to some sort of data string ? - my thought is to define 12 variables for each servo corresponding to each of the 3 states. In this way I could control each servo using the same loop of code, by simply reading a string of data which sets variables.
e.g. if the numeric is the servo and the letter is B-back f-forward c - ctr. then 1,b,2,f etc. would be read to set servo one back and servo 2, but the next time the string is modified 1,f,2,b which would be read to reverse the process. Sample code would be brilliant !
The hexapod is half built at the moment, but looking good - see the picture - my intent for later phases is to expand to a 3DOF leg with 18 servos hence my desire for another PSCU - the alternative is to use the arduino equivalent I guess, but not sure how to drive that from my Stamp.
I'm working with an old Propeller Servo control unit (PSCU), which I'm just starting to find my way around coupled to my trusty stamp board of education (Incidental to my question does anyone know how I can get another? - looks like this little chap is discontinued )
I can happily make my servo controller pick up commands to move a servo, but what I really want to do is to control a 12 servo hexapod of my own devising. this means sending a lot of specific servo sequences. each of 12 servos needs to be controlled in one of 3 states (back forward centre) for each stage of the walk. potentially this makes for a string of subroutines and a lot of messy coding.
Is there a way to control variables according to some sort of data string ? - my thought is to define 12 variables for each servo corresponding to each of the 3 states. In this way I could control each servo using the same loop of code, by simply reading a string of data which sets variables.
e.g. if the numeric is the servo and the letter is B-back f-forward c - ctr. then 1,b,2,f etc. would be read to set servo one back and servo 2, but the next time the string is modified 1,f,2,b which would be read to reverse the process. Sample code would be brilliant !
The hexapod is half built at the moment, but looking good - see the picture - my intent for later phases is to expand to a 3DOF leg with 18 servos hence my desire for another PSCU - the alternative is to use the arduino equivalent I guess, but not sure how to drive that from my Stamp.
Comments
Before you go the Ardy route, take a look at Pololu's Maestro line of controllers. They have a really nice GUI which can handle 6, 12,18 or 24 servos. That GUI and sliders for position & speed would be great when scripting motions for a hex. Unused servo pins can have switches & sensors hooked up.
I just program the Maestro straight from my laptop and this would then run my servos independently, sounds OK, but I want to make my hexapod respond to instructions via RC and other inputs (like ultrasonic proximity detector) - what format can I give the maestro instructions in ? - would this be in the form of serial output I can use the stamp for ?
You could duplicate one using a Proto Board, (which is one sale), or a Project Board. Then download the firmware from this page:
https://www.parallax.com/downloads/psc-propeller-firmware
I just checked, and it is the lastest firmware. There were a couple of revisions to make it better and add 256 bytes of scratch ram. The firmware will allow you to run up to 32 servos.
Never done anything with Prop, - is there a design I can build it from as well as the firmware ?
Looking at the board I have to solder in at least the pins for the servos, so I need to understand how to connect up all the bits - I'm a bit of a dummy here :-(
http://forums.parallax.com/discussion/160137/connecting-servos-to-a-propeller