Go Down

Topic: Arduino Mega 2560 connection with SSC-32u Controller (Read 886 times) previous topic - next topic

shelly_beck

May 03, 2018, 08:30 am Last Edit: May 03, 2018, 08:51 am by shelly_beck
Hello guys,

i have problems with the connection between the Arduino and ssc-32u Board. I need the servo Board because my Robot use 500kg Servos with min 12V Power. The connection is shown in the attachment. I try this sample code but nothing happens:

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

Serial.println("#2 P750 #4 P750 #14 P750 T500");         
delay(1000);                                                                     
Serial.println("#2 P2200 #4 P1500 #14 P2200 T500");
delay(1000);
}

PaulS

It appears that you are using the TX0 and TX1 pins, instead of the TXn and RXn pins. Why?

Why would you attach the servo controller to the same pins used to talk to the PC? That makes debugging next to impossible. Connect it to TX1 and RX1 and user Serial1 to talk to it.
The art of getting good answers lies in asking good questions.

shelly_beck

#2
May 03, 2018, 02:05 pm Last Edit: May 03, 2018, 02:10 pm by shelly_beck
Thanks PaulS,
sry i`m a noob. Can you please show me on the attachment which pins i should use for user serial1? TX1 and RX1 i have connected.

PaulS

Thanks PaulS,
sry i`m a noob. Can you please show me on the attachment which pins i should use for user serial1? TX1 and RX1 i have connected.
Not according to the picture you posted. That picture shows the orange wire connected to pin 14 (TX1) and the red wire connected to pin 1 (TX0).
The art of getting good answers lies in asking good questions.

shelly_beck

Not according to the picture you posted. That picture shows the orange wire connected to pin 14 (TX1) and the red wire connected to pin 1 (TX0).
I change the red to pin18 and the orange to pin19. But same effect. Arduino tx blink after loading sketch but the rx/tx lights on the ssc don`t blink for communication.

Is it possible that i must power the VL on the ssc too ? At the moment only VS1 is powered

PaulS

Quote
I change the red to pin18 and the orange to pin19. But same effect.
Pins 18 and 19 are the Serial1 instance's pins. Are you now using Serial1 to talk to the device?
The art of getting good answers lies in asking good questions.

shelly_beck


I load the sketch to the arduino and think i know only talk with the device using Serial1. Took a pic from the connection to the attachment. but same effekt


PaulS

You look at that picture. Can you tell anything from that perspective?

Can you see any code in the picture? I can't.
The art of getting good answers lies in asking good questions.

shelly_beck

Sorry the code is the same like in my start post:

void setup()
{
Serial.begin(9600);                             
void loop()
{
Serial.println("#2 P750 #4 P750 #14 P750 T500");         
delay(1000);                                                                     
Serial.println("#2 P2200 #4 P1500 #14 P2200 T500");
delay(1000);
}

the pic should show if the cable connection now is ok ? I put some different pics in the attachment

PaulS

You connected the TX and RX pins from the green board to the RX and TX pins for the Serial1 instance on the Mega. Thank you for the effort to take and post usable pictures.

But, you are still trying to talk to the board using Serial. That's like having a friend tell you that he got a new phone number, but you still using the old number to call him, and wondering why he doesn't answer.

Use Serial1 to talk to the device.
The art of getting good answers lies in asking good questions.

shelly_beck

I thank you for taking the time and explaining things to me.
But now I am confused. Which wire i must switch and to which pin? The TX and RX wire on the green controller ? Or omit ground ?


Sorry that I ask so stupid   

PaulS

Quote
Which wire i must switch and to which pin?
None.

Quote
Sorry that I ask so stupid 
It's not that you are asking stupid questions. The problem is that you are not listening to the answers.

Re-read reply #9, paying particular attention to the last line.
The art of getting good answers lies in asking good questions.

shelly_beck

#12
May 09, 2018, 01:40 pm Last Edit: May 09, 2018, 01:42 pm by shelly_beck
Re-read reply #9, paying particular attention to the last line.
Thats the problem i read and know what you wrote but i look in the User guide

http://www.lynxmotion.com/images/data/lynxmotion_ssc-32u_usb_user_guide.pdf

from the ssc controller to find the serial pins and the guide shows on site 12 that the wires are connected to the serial "correct" :(

Or you mean i should change the code ?

PaulS

Quote
Or you mean i should change the code ?
You need to make the code match your hardware. You connected the servo controller to the Serial1 pins, so you do NOT use Serial to talk to it. Nor do you use Serial2 or Serial3. 8)
The art of getting good answers lies in asking good questions.

shelly_beck

Thank you, will change the code and test it later

Go Up