SSC03A Mirco Serial Servo Controller

Hello,

i have a problem with my SSC03A Micro Serial Servo Controller. The Controller is connect with my Mega2560-Controller.

When i first start the controller the green LED is flashing and the red LED is on. The servo does not turn. :frowning:

When i stop it and start it again within not more as about 5 seconds the yellow LED is on for about 2 seconds an then the yellow LED is out and the green LED is flashing and the servo turns. :smiley:

When i stop it and wait more as 5 seconds and start ist again the the green LED is flashing and the red LED is on. The servo does not turn. :frowning:

And sometimes, but i don´t know why, when i have start it again the red LED is flashing and the yellow LED is on. That happens only sometimes. :frowning:

What is wrong? :question:

My Bascomprogram:

' Pololu Testprogram

$regfile = "m2560def.dat"
$hwstack = 82
$framesize = 68
$swstack = 68


$crystal = 16000000                                         'Quarzfrequenz
'$baud = 19200


Config Pind.5 = Output
Led Alias Portd.5


Dim Servonumber As Byte
Dim Servodevice As Byte
Dim Servocommand As Byte
Dim Servogespeed As Byte
Dim Servodata1 As Byte


Config Com3 = 19200 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
Open "com3:" For Binary As #3                               'Servomodul


Do

' Pololu mode

   Led = 1

   Servodevice = 1                                          'Device-Number
   Servonumber = 7                                          'Servonumber
   Servocommand = 2                                         'Position
   Servodata1 = 90                                          '0 to 127

   Print #3 , Chr(128) ; Chr(servodevice) ; Chr(servocommand) ; Chr(servonumber) ; Chr(servodata1)

   Wait 2

   Led = 0

   Servodevice = 1
   Servonumber = 7
   Servocommand = 2
   Servodata1 = 70

   Print #3 , Chr(128) ; Chr(servodevice) ; Chr(servocommand) ; Chr(servonumber) ; Chr(servodata1)

   Wait 2

Loop
End

Thank you for your help.

Greetings
datatom

Hello.

It sounds like you are turning on the servo controller in the middle of sending data to it, which will result in various results like the ones you are describing. The servo controller uses the first byte to determine the baud rate, so it’s critical that it gets the correct first byte.

In general, you should get just the yellow LED on while the serial line is high and before you send anything. If you get the red LED on with green flashing or yellow flashing, that means it thought the serial rate was too fast or too slow. I recommend using the reset pin on the servo controller so that you can reset the servo controller in your program to guarantee that your data always gets sent after a reset. If you keep having trouble, you can send one byte at a time and have long pauses between them so that you can pinpoint at which byte the problem happens.

- Jan

Hello Jan,

thanks for the answer. Can you tell me how can I reset the Controller in my program?

datatom

You connect an I/O line to the reset line, make it low, and then make it high. The low part can be just a few us, but doing something like one millisecond is typical and fine. After the reset, you should wait a few ms before sending your first serial data.

- Jan

Hello Jan,

it worked. Thank you.

But there is still a small problem, every time i plug in the power plug into the socket the servo turns a bit to the right. :open_mouth:

What´s wrong?

If you’re talking about a servo twitching when you connect power and before you are sending it commands, there’s nothing you can do about it.

- Jan

Ok, thanks for your help.

Oh no, i have a problem again.

When i connect one servo on my servo controller, i have no problems.
If i connect a second servo on my servo board, i get problems.
The green and the yellow LED flash alternately and the servos rotate jerky.
If i connect the second servo alone, i get no problems.

I don’t no whats wrong :open_mouth: Please help me

Thank you.

datatom

Hi, datatom.

Probably your power supply cannot handle the current draw of two servos, so the voltage is dropping and the controller is resetting. A good rule on how much current you need to supply is 1 A per standard servo.

- Ryan

Hello Ryan,

thank you for you answer. Now i want to use a PC Power Supply from LITEON PS 5281-7VW. And i take the connection 5 V and 16 ampere. Is this ok or are 16 ampere to much?

Greetings

datatom

That should be okay. The 16A refers to the maximum current it can source, not what it does source.

- Ryan