08M as a Mini-SSC?

fritz42_male

Senior Member
Hi all,

I've just built a 3 servo controller based on the 08M and proto board and it works fine and worked out at a cost of less then 5 quid!

Now, has anybody got a program that would allow it to interpret commands for a Mini-SSC?

I appreciate that I'd have to limit the baud rate etc but is it possible?

Thanks

Mike
 

slurp

Senior Member
Serial Servo Controller ?

You'll need to understand the protocol used if your matching it to an exiting system - you might be able to decode this with a Terminal Program connected to the serial control line if you do not have a specification...

Alternatively, how are you driving the signal? You could write your on simple protocal ;)

regards,
colin
 

fritz42_male

Senior Member
The SSC command set is available and not exactly horrendous but I was hoping that someone might have already done this. An example of the format is

[ SYNC ] [ SERVO ] [ POSITION ]

For example, sending "255, 1, 127" would move servo #1 to position 127 (the center point). (The SYNC option seems to be 255 every time).

The software I want to use (VSA) has built in SSC support.

My problem is that I work a 6 day week and have a family so what little time I have I guard jealously!

How reliable is the Picaxe on watching the serial port? Do I need to do an interrupt level scan or just a continuous loop?

In terms of process it is simply:

watch serial port for incoming command
convert incoming command to picaxe format
execute picaxe command
go back to watching serial port

But I'm not sure if the picaxe has a built in buffered UART so what does it do if another command comes in while it's processing the first command?
 
Last edited:

hippy

Ex-Staff (retired)
All the PICAXE-X1 and X2 chips support background receive which is the equivalent of a buffered UART.

Using two 08M's ( or other PICAXE ) and SERIN commands it is possible to have one looking for the SSC command then passing these over to PICAXE slaves which actually handle the servos. The slaves would only have their flow interrupted whenever there was data for them. An ideal setup may be an X1 or X2 receiving SSC data and a number of 20M handling the servos; that would allow 64 servos to be controlled.

Alternatively, an X1 or X2 can control a number of AXE031 21 Channel Servo controllers.
 

atharvai

Senior Member
if u use an interrupt, and it gets triggered, PICAXE will run the interrupt routine, and after completion it will go back to whatever it was doing before the interrupt got triggered.

is this what u mean?
EDIT: ignore, Hippy answered it.
 

BeanieBots

Moderator
Before you get too excited, have a read of Manual 2 Appendix 2.
Never tried serial and servo together so cannot comment from first hand.
 

Janne

Senior Member
Hserin and servo will work together ok. A while ago we built a balance board to control a ball in the board. The picaxe was there just to receive serial data from computer, and control the board by tilting it with 2 servos.

A x2 range picaxe would be preferred, as you can interface the hardware serial directly to the computer with 10k and 22k resistor, instead of requiring a max232 like the x1 parts.
 

fritz42_male

Senior Member
All the PICAXE-X1 and X2 chips support background receive which is the equivalent of a buffered UART.

Using two 08M's ( or other PICAXE ) and SERIN commands it is possible to have one looking for the SSC command then passing these over to PICAXE slaves which actually handle the servos. The slaves would only have their flow interrupted whenever there was data for them. An ideal setup may be an X1 or X2 receiving SSC data and a number of 20M handling the servos; that would allow 64 servos to be controlled.

Alternatively, an X1 or X2 can control a number of AXE031 21 Channel Servo controllers.
Thanks for the suggestion. However, can you explain why I would need 2 processors? Surely the serial communications between processor 1 and processor 2 place just as much overhead on processor 2 as if it was handling the work directly?

I'm not too worried about the number of servos - 3 would be fine for the example I'm using which is why I was hoping to use the 08M. As others have suggested, there are other controllers out there for relatively low cost - just that I'm trying to base the work on Picaxe
 

fritz42_male

Senior Member
Hserin and servo will work together ok. A while ago we built a balance board to control a ball in the board. The picaxe was there just to receive serial data from computer, and control the board by tilting it with 2 servos.

A x2 range picaxe would be preferred, as you can interface the hardware serial directly to the computer with 10k and 22k resistor, instead of requiring a max232 like the x1 parts.
Thanks for the reply Janne (& all of you).

Could I see some example code please?
 
Top