Forum

Notifications
Clear all

Arduino / CANopen with multiple SOLO motors communication issues

4 Posts
2 Users
1 Likes
129 Views
Forum 1
(@tbaumg)
Posts: 5
Active Member
Topic starter
 

I’m trying to run multiple SOLO’s using an Arduino MEGA over CANOpen (one SOLO MEGA and two PICO’s).  Eventually I need to control 6 motors simultaneously, I want to get deeper into CAN bus and PDO’s, but right now I can’t seem to get the basics working consistently.  Any advice or suggestions would be greatly appreciated.

I have them wired up exactly like the diagram on page 12 of the CANopen User Manual (including the termination resistors).

For troubleshooting purposes, I currently only have the Arduino MEGA (with the Seeed V2 CANbus shield)  and the SOLO Mega and one PICO connected.

I have changed the Device Addresses (a few times), but currently have the MEGA set to 0 and the PICO set to 3.

I can run many of the Examples/canopen/sdo on either of them but only on one SOLO at a time.

If I run the ‘Canopen_Reading_BusVoltage’ I can get it to read from one SOLO consistently but the other will only read for a few seconds or maybe a couple minutes and then returns -1.

If I cycle power to the SOLO’s I can get them to communicate again for a a while, but it always seems to break and return -1’s.

I modified it like this:

// Importing SOLO Arduino library

#include "SOLOMotorControllersCanopen.h"

// instanciate a SOLO object

SOLOMotorControllersCanopen *SOLO_Obj1;

SOLOMotorControllersCanopen *SOLO_Obj2;

// SOLO board Temperature

float BusVoltage = 0;

float BusVoltage2 = 0;

void setup()

{

  Serial.begin(115200);

 

  // Initialize the SOLO object

  int chipSelectPin = 9;

  SOLO_Obj1 = new SOLOMotorControllersCanopen(0, chipSelectPin);

  SOLO_Obj2 = new SOLOMotorControllersCanopen(3, chipSelectPin);

}

 

void loop()

{

  // Reading

  BusVoltage = SOLO_Obj1->GetBusVoltage();

  BusVoltage2 = SOLO_Obj2->GetBusVoltage();

 

  // Print

  Serial.print("\n Read from SOLO: ");

  Serial.println(BusVoltage, 2);

 

Serial.print("\n Read from SOLO2: ");

  Serial.println(BusVoltage2, 2);

 

  delay(1000);

}

 

**************************** ARDUINO SERIAL MONITOR OUTPUT

27:37.225 ->  Read from SOLO: -1.00

11:27:37.225 ->

11:27:37.225 ->  Read from SOLO2: 48.27

11:27:38.267 ->

11:27:38.267 ->  Read from SOLO: -1.00

11:27:38.267 ->

11:27:38.267 ->  Read from SOLO2: 48.27

11:27:39.473 ->

 

***************************  SHUT OFF 48VDC POWER SUPPLY

 

11:27:39.473 ->  Read from SOLO: -1.00

11:27:39.473 ->

11:27:39.473 ->  Read from SOLO2: -1.00

11:27:40.704 ->

11:27:40.704 ->  Read from SOLO: -1.00

***************************  TURN ON  48VDC POWER SUPPLY

1:27:47.497 ->  Read from SOLO: -1.00

11:27:47.497 ->

11:27:47.497 ->  Read from SOLO2: -1.00

*********  NOTE: BOTH START READING CORRECTLY

11:27:48.506 ->

11:27:48.506 ->  Read from SOLO: 48.44

11:27:48.506 ->

11:27:48.506 ->  Read from SOLO2: 48.24

11:27:49.488 ->

11:27:49.488 ->  Read from SOLO: 48.40

11:27:49.488 ->

11:27:49.488 ->  Read from SOLO2: 48.24

 

*******  READING BOTH SOLO'S CORRECTLY FOR ABOUT 2 MINUTES...

11:29:50.826 ->  Read from SOLO: 48.27

11:29:50.826 ->

11:29:50.826 ->  Read from SOLO2: 48.27

11:29:51.834 ->

11:29:51.834 ->  Read from SOLO: 48.27

11:29:51.834 ->

11:29:51.834 ->  Read from SOLO2: 48.27

11:29:52.807 ->

11:29:52.807 ->  Read from SOLO: 48.42

11:29:52.807 ->

11:29:52.807 ->  Read from SOLO2: 48.27

 

************  ONE OF THEM QUITS SENDING ACTUAL VALUES AND RETURNS -1

 

11:29:54.015 ->

11:29:54.015 ->  Read from SOLO: -1.00

11:29:54.015 ->

11:29:54.015 ->  Read from SOLO2: 48.27

11:29:55.215 ->

11:29:55.215 ->  Read from SOLO: -1.00

11:29:55.215 ->

11:29:55.215 ->  Read from SOLO2: 48.25

 

 

 

 

  

 
Posted : 11/04/2024 3:44 pm
SOLO Team
(@milad)
Posts: 596
Illustrious Member Admin
 

Hello @tbaumg,

Have you tried to see what happens if you reduce the bus baudrate? for instance using 250kbits/s for the CAN to see how is the effect?

I also recommend to put a small delay between the readings and see if that effects it positively.

let me know the results.

Milad

 

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.

 
Posted : 16/04/2024 7:32 am
Forum 1
(@tbaumg)
Posts: 5
Active Member
Topic starter
 

@milad Yes, that seems to be much more stable, Thank you for the suggestion!

I set it to 250k, I will try 500k next to see if it can handle that as well.  

 
Posted : 16/04/2024 7:22 pm
SOLO Team reacted
SOLO Team
(@milad)
Posts: 596
Illustrious Member Admin
 

@tbaumg

Sure, let us know if you have any other questions.

Milad

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.

 
Posted : 17/04/2024 12:54 pm
Share: