Opencm 9.04 485 확장보드 xl430 모터 인식

안녕하세요 모터 제어를 처음 해보는 초보입니다.
opencm 9.04에 485 확장보드를 연결해 xl430 모터를 제어해보려고 하는데, 어찌된 일인지 모터가 인식이 안됩니다. 예제 코드를 그대로 써서 ping 을 보내봐도 자꾸 실패를 하네요… 뭐가 문제인지 봐주실 수 있을까요?

485보드에 lipo 배터리 11.1V 를 연결했고 모터도 485 보드의 ttl 버스를 통해 연결했습니다.
opencm 에서 코드를 실행해서 핑을 보내면 확장보드가 깜빡하고 반응은 하는데 모터에는 변화가 없습니다. 그리고 모터를 연결할 때 불이 깜빡 하고 들어오는걸 보면 모터에 전원 공급도 되는 것 같습니다.

image

안녕하세요.

OpenCM9.04의 Ping 예제의 주석을 보시면 OpenCM 485 EXP 이용시 "DEVICENAME"을 "3"으로 수정 후 사용 하셔야 합니다.

또한, XL430의 기본 통신속도는 57,600Bps 입니다. 사용하시는 다이나믹셀의
통신속도에 맞게 "BAUDRATE"도 수정하여 사용해주세요.

감사합니다.

답변 감사드립니다. 혹시 다른 원인은 없을까요? 수정해서 해도 안돼서요… 확장보드에 불이 들어온다면 결국 확장보드와 모터 연결 문제일까요?

It has been many years that ping() and scan() did not work in Arduino, so I do not use them anymore. I just access the actuators directly via their IDs to write to or read from them.

업로드 후에 OpenCM 485 EXP에 다이나믹셀을 연결 및 전원 인가가 되어 있는 상태에서 OpenCM9.04의 리셋버튼 한번 눌러주세요.

업로드 후에 다이나믹셀을 연결하면 검색이 안됩니다.

혹시 해결하셨나요? 저도 9.04c보드와 485 확장보드 xl430을 이용하려 하는데 모터를 인식하지 못하네요.

Are you using the “Dynamixel2Arduino” library? i.e. regular Arduino IDE and not the old deprecated OpenCM IDE:

image

Then you need to set up the right Serial Port and Directional Pin:

Assuming your XL-430 is attached to the 485-EXP board, then you need to use
#define DXL_SERIAL Serial3
const int DXL_DIR_PIN = 22

then
Dynamixel2Arduino dxl(DXL_SERIAL, DXL_DIR_PIN);

Hope that these options work for you.

UPDATE 5/12/2025
BTW, when you are ready to move away from OpenCM IDE to the current Arduino IDE, and if you are only using X3P-TTL servos such as the XL-430s, there is another hardware/software option for users of the OpenCM-904C, that does not require the 485-EXP. See the setup below:

As you can see, there are several hardware modifications to be done:

  1. You need to solder in a small Terminal Block to the (+, -) pins on the OpenCM-904C, then you can feed 11.1-12 V DC there to the board.

  2. You need a special convertible cable that goes from the XL-320 connector on the OpenCM-904 to the standard X3P connector on the XL-430. This cable will power and control the XL-430s from Arduino.

For some strange reason, I cannot find this type of cable on the Korean Web Shop! But the USA shop carries this cable (which is “out of stock” currently).

  1. You can still use the USB port as normal to download your Arduino sketch to the 904.

  2. Software-wise, you’ll need to switch to the Arduino IDE and the Dynamixel2Arduino library, and you can use the example sketches that come with it. As an example, I cleaned up a little bit the provided example sketch named “position_mode.ino” to show the correct Serial Port and Directional Pin to be used in this case (i.e. Serial1 and 28):

An sample runtime shot is shown below:

When you use the OpenCM-904 without the 485-EXP then you free up Serial3 (Pins D24 and D25) which now can be used as an extra I2C or UART port