32 servo controller / arduino sample code

32_Servo_Controller_Manual.pdf (1080555Bytes)

mini_USB_motor_C.jpg

I wonder if any LMRtians use this servo board before. Got this one long time ago but haven't use it since SSC-32 works pretty good and I thought this board probably works the same way. Unfortunately, it's not. I have connect RX/TX to Arduino but the code doesn't work at all. The manual doesn't provide any sample code for Arduino but someting like:

\ n \ r = Binary number 0x0d, 0x0a (carriage return), the command terminator
# 8P600T1000 \ n \ r

I have no idea how this works for Arduino. Maybe a special library needed for this servo board? BTW, I am not hardcore programmer or Technician so if anyone could help on this one with simple code? Much much appreciated in advance.

http://www.elechouse.com/elechouse/index.php?main_page=product_info&cPath=100_146&products_id=1883

The manual attached.

Basically, you’d have to

Basically, you’d have to establish serial communication from the Arduino to the controller board, and then send the controller board commands like your example.

#8P600T1000 /n/r

Translates to

Move servo number 8 to position 600 (rougly a quarter of its arc) over the course of  one second.  the /n/r is the way you tell the board where the command ends.

It’s an intelligent controller, so you can program it to repeat a command multiple times.

If you’ve got a sketch that works with another controller, you might be able to set the comm section to whatever parameters, (probably baud rate, word length and stop bit.)  and change whatever lines the arduino sketch sends to the other controller to this one.  The only problem with that is I didn’t see any pin out information for the UART, so you’re on your own for a cable.

Going by the GUI at the end of the instruction manual, it can be connected to a PC and programmed over the USB port. If you’re already using an Arduino, it’s probably overkill.

Edit–I just went to the page you posted.  PC software is there.  Maybe you could program routines into the controllers flash, and then call them up with an Arduino?  Still have to figure out the cable unfortunately.

 

Thanks for reply. This is

Thanks for reply. This is kinda tricky for me. The program and driver is not compatible with win7 I am running, keep poping up some weird error message. I don’t really know how to program in Arduino to control this board. Have you use this board before?

I’ve never used this board,

I’ve never used this board, but, I’ve been in plenty of situations where I’ve had to go into some device or other and send it commands over a terminal.

Have you tried installing/running the software in compatibility mode?

I have this board

Hi HardMouse

I have this board, and it works under win7.   You have to install it under "compatability mode/ and admin "  for it to work correctly.  if the driver fails to install, go to hardware and install manualy

The softare in the package works, neat little program for programing simple movement sequences, but thats about it.  just a basic interface to allow you to do simple movements.

fairly easy to use,  I used a terminal program to test it, and seemed to work fine.  I have 20 servos connected, all move according to the software, but sometimes it seems to get caught up when moving all servos at once. Its like a record skipping, now whether its a glitch or not is the other question could be a simple power brown out issue, or tommany commands.  Still playing with it.

Im using it on my micro-hexapod, using a bluetooth connection to my computer.  I plan on using an arduino for second interface when computer is not connected, but still have to find time to play with that.

 I belive the command line differes slightly from the SSC-32.  This unit uses \ n \ r  at the end of the command, and the SSC-32 uses just a <CR>   thats why it didn’t work witht he SSC-32 software

Ex

SSC-32 uses the command   "#5 P1600 S750 <cr>"

ElecHouse SSC-32 uses the command    “#5 P1600 S750 \n\r”

 you might be able to program arduino sketch to parse the SSC-32 command, and strip the <CR> and insert teh “\n\r” to get it to work. 

Sweet! Finallly someone

Sweet! Finallly someone using this board. I am not good in programming, these command actually confused me. Wondering if you have sample code just to move servo 0~180 etc?

When moving all 20 servos at once you might have voltage issue. You might need 30C+ battery to provide enough current.

Following code from RobotGrrl:

void setup() {
Serial.begin(9600);
}

void loop() {
move(1, 2000, 100);
move(1, 1000, 100);
}

void move(int servo, int position, int time) {
Serial.print("#");
Serial.print(servo);
Serial.print(" P");
Serial.print(position);
Serial.print(" T");
Serial.println(time);
delay(time);
}

How do you apply on this servo board? Thanks for help~

This is how i would go about

This is how i would go about it…

void setup() {
Serial.begin(9600);
}

void loop() {
move(1, 2000, 100);
move(1, 1000, 100);
}

void move(int servo, int position, int time) {
Serial.print("#");
Serial.print(servo);
Serial.print(“P”);
Serial.print(position);
Serial.print(“S”);
Serial.println(time);
Serial.print(0x0d); Serial.print(0x0a);