AK60-6 control with Arduino

Hi,

I’m trying to control a AK60-6 V1.1 actuator from Cubemars with an Arduino code.
I am using a MCP2515 connected to Arduino Nano.
Here is the code I use : Testing Cubemars AK60-6 motor using arduino - #3 by Akim

Unfortunately, the motor does not move and the green light (the one for CAN communication) does not light up.

Below is a simple sketch of the setup :

I tried with and without the resistors and the result is the same : it dosen’t move.

Could someone please help me on this project?

Best regards,
Axel

Dear Axel,

thanks for your topic.

  • May you could send us an image of your wiring?
  • Do you have used the Code from Zainroid for testing, or a modified version?
  • Could you please measure if you find any kind of short circuit in your CAN Interface?
  • When you have purchased the motor?

@Zainroid, @Darrell, @Joy may you could assist him as well?

Thank you for your reply,

  1. Here are the pictures :

    And a list of the connections :
    INT <-> D2
    SCK <-> D13
    SI <-> D11
    SO <-> D12
    CS <-> D10
    GND <-> GND
    VCC <-> VIN
    CANH <-> CANH
    CANL <-> CANL

I also tried with an Arduino Uno and a Seeed Studio Can bus shield :

  1. I have tried the exact code from Zainroïd and also tried changing the Bitrate to 500 kpbs since this is the rate of the motor :

  2. I just measured the pins and there is no short-circuit

  3. I purchased this motor about a month ago

Also I would like to add that I succesfully ran the motor with the upper computer software from Cubemars, so I know it works.

Thank you,
Axel

Hi Axel
Thanks for your mail. As you said that the motor is OK under CM tool. But you need to run is under Uno.
Here is one velocity demo for your reference. Velocity_Demo.ino - Google Drive

This is what we can show you.
We are sure this demo is workable.

Thank you @Darrell
Indeed it worked, the problem was the CS pin and I also added two 120 Ohm termination resistors between CAN H and CAN L.
Now it works so it’s perfect.

Would you by any chance have a code for controlling it in Servo mode please?

Thank you,
Axel

We are sorry that we do not have the sample code for servo mode. As our engineer is too busy to have it ready.
I can not get an estimated time when the code is ready.

OK, I understand. If I need to make more than 4 turns with the motors, is there a way I can disable this limit in MIT mode?
I’m also curious about why there is that limit.

The limited is from the position loop. our float setting is from -12.5 rad to 12.5 rad, as MIT setting.
If you want to run the motor in more turn, you should choose torque loop or velocity loop.

Hello! I’ve downloaded and used the velocity_demo.ino correctly with the Arduino. I’m just having a hard time understanding the values of the cw() and ccw() routines in the Arduino code - what each of the hex values are supposed to be, in relation to the cubemars guide. If you could just break down those two, that would help me a lot. Thank you!