Skip to main content
edited title
Link
tlfong01
  • 4.8k
  • 3
  • 11
  • 24

Rpi3B+ Control Half Duplex UART Bus Servo DynaMixel AX-1212A, HiWonder LX-224HV Problem

edited title
Link
tlfong01
  • 4.8k
  • 3
  • 11
  • 24

Raspberry Pi 3 B+ (Buster) can't control Dynamixel Rpi3B+ Control Half Duplex UART Bus Servo DynaMixel AX-12A with Raspberry Pi 3 B+ (Buster) with half duplex communication12, HiWonder LX-224HV Problem

Mod Moved Comments To Chat
Source Link

Raspberry Pi 3 B+ (Buster) can't control Dynamixel AX-12A with Raspberry Pi 3 B+ (Buster) with half duplex communication

I have a project to make mobile robot with Dynamixel AX-12A as the wheel, so i changes the AX-12A to Wheel Mode with CM-530 and it works well.

I follow the guide from http://www.oppedijk.com/robotics/control-dynamixel-with-raspberrypi

I already check my serial communication (UART) on Raspi using Terminal Minicom with only wiring up GPIO14 and GPIO15 together and it works well

Here is my /boot/config.txt at the end of code:

dtoverlay=pi3-disable-bt
hdmi_force_hotplug=1
enable_uart=1
init_uart_clock=16000000

Here is my /boot/cmdline.txt:

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait splash plymouth.ignore-serial-consoles

Here is my Python3 Code:

import serial
import time
import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.OUT)
GPIO.setwarnings(False)

port = serial.Serial("/dev/ttyAMA0", baudrate=1000000, timeout=3.0)

while True:
    GPIO.output(18, GPIO.HIGH)
    port.write(bytearray.fromhex("FF FF 00 04 03 20 FF D8"))
    time.sleep(0.1)
    GPIO.output(18, GPIO.LOW)
    time.sleep(3)

The problem is dynamixel ax-12a not responding to my hexa which should move with value 255. And there is no error feedback from program.

Btw i'm working this project with VNC through wifi in PC, did this cause problems with the communication?

If someone could help me, i thank you.

*sorry if i have bad english