안녕하세요 모터 제어를 처음 해보는 초보입니다.
opencm 9.04에 485 확장보드를 연결해 xl430 모터를 제어해보려고 하는데, 어찌된 일인지 모터가 인식이 안됩니다. 예제 코드를 그대로 써서 ping 을 보내봐도 자꾸 실패를 하네요… 뭐가 문제인지 봐주실 수 있을까요?
485보드에 lipo 배터리 11.1V 를 연결했고 모터도 485 보드의 ttl 버스를 통해 연결했습니다.
opencm 에서 코드를 실행해서 핑을 보내면 확장보드가 깜빡하고 반응은 하는데 모터에는 변화가 없습니다. 그리고 모터를 연결할 때 불이 깜빡 하고 들어오는걸 보면 모터에 전원 공급도 되는 것 같습니다.
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.
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:
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.
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).
You can still use the USB port as normal to download your Arduino sketch to the 904.
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):