last day (33 days later) » 

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

Ryan FikriI 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 usin...

 
Hi @Ryan Fikri, Welcome and nice to meet you. (1) Your use of English is better than mine. Your question is clear and gives all the necessary info and references. Your procedure is described detailed enough for me to follow, and convinced that I am following your direction. (2) Rpi miniCom is not a good choice. I would suggest to use Rpi CuteCom (need to install yourself), or Win10 RealTerm (google SparkFun for more details) (3) Not sure what does the clock 16MHz mean. I would suggest to make sure, or set to 9600 baud, N81, and set the same for Rpi TxD, RxD, / to continue, ...
(4) I have been playing with more than 20+ UART interfaced devices for more than 10 hobbyist years. I do use Arduino C++ and Rpi python, BUT I NEVER START with poython. I always suggest newbies to start with the following: (a) Use the terminal emulator RealTerm, CuteTerm (or TeraTerm, or if you insist, miniTerm, miniCom) to do "loop back" test, to make sure the hardware wiring is OK, (5) please reply if you are reading my comments, before I move on, ...
If you are not too sure what I am talking about, you might like to skim the following Q&A, especially the CHAT record, to get a rough idea: raspberrypi.stackexchange.com/questions/105223/…. Nice UART learning and cheers.
One more thing: Your config procedure seems a bit out of date. There is no need to mess around the newbie scary /boot/cmdline.txt file. Instead, use the newbie friendly Rpi GUI desktop Rpi Config menu to do the job: imgur.com/gallery/wNGTxyy.
 
@tlfong01 Hi, nice to meet u too. (1) I can't use 9600 baud cause i set up my AX-12A with 1000000 baud, i look in their manual pdf file. (2) i will try your suggestion for UART example ASAP. (3) i've been following all guide about UART communication problem in every website and mostly they're using out of date procedure, so i just following with the old ones. But yeah i've tried it like in your image. (3) sorry for late replay i'm kinda tired and take a rest before.
@tlfong01 the problem is many people followed guide from oppedijk.com/robotics/control-dynamixel-with-raspberrypi and succeeded. I think that's a simple guide but i don't know what mistake i made
 
Questions: (1) Were they using 2015 Rpi2 wheezy, and you 2019 Rpi4 buster? (2) Are you sure your LS241 wiring is OK?
I read the manual which says you can set 9600 baud: AX-12A User Manual emanual.robotis.com/docs/en/dxl/ax/ax-12a, 7843 bps ~ 1 Mbps, Value 207 = 9600 (-0.160%). 9.6kbps is usually the standard for testing. Your 1M baud ~= 1,000kbaud is 10 times too fast for Rpi testing. If you find 9.6k baud good, then you can speed up to 1MHz or higher.
 
@tlfong01 (1) yes i'm sure the wiring of LS241 works well. (2) But how i send the hex code for changes the baud in AX-12A? Cause the default baud of AX-12A after i calibrating with CM-530 is 1M
 
(1) I think you can use a terminal emulator such as Win10RealTerm, Rpi CuteCom or MiniCom to send the change baudrate command. (2) You better test loopback first: medium.com/@amitasinghchauhan/…
So, first thing first is to do miniTerm or cuteCom loopback: imgur.com/gallery/ePADqZV.
 
1:53 PM
@tlfong01 (1) as i mention first, i already checked my uart with minicom and i've follow the guide from the website you mentioned (medium.com/@amitasinghchauhan/…). (2) so the next step maybe i can check my wiring with 74HC241N and Raspi, but how do i do this?
@tlfong01 here is my minicom loopback, here is another information in case i need to show
 
Good. (1) Now confirm if my wiring diagram matches your actual wiring: imgur.com/gallery/iK8yyir,. (2) Show me your hardware wiring photo, just to make sure no misunderstanding both sides.
(1) I read the manuals but could not find the default uart speed. If it is 1000kHz (1MHz) then we have a problem, because MiniCom/MiniTerm/CuteCom/RealTerm can only set to highest 115.2kHz. (2) So the problem is you need to first set DynaMixel to 9.6k or 115.2k first. (3) Unless Dynamix can "AutoDetect" baudrate then there is not problem. (4) I could not find any python program for DynaMixel Half Duplex. Please let know any user guide that explain the use of Half Duplex. It is my jogging time, so see you late this evening or tomorrow. Cheers.
 
@tlfong01 here is my schematic and here is my hardware, that's a robot from my senior in college, he's using labview before and works well but my lecturer want me to use python
 
Many thanks for your schematics and hardware photo. (1) I fully agree with your lecturer of using Python instead of LabView. (2) I am glad to see that you are using HC241 instead of LS241. My image shows LS241 but also HC241 because LS is outdated and nowadays HC and HCT are always preferred. (3) I googled and found that the reason of DanaMixel using HalfDuplex is for daisy chaining many servos at the same time. (4) I think you should try duplex to play with one servo first, at low speed of 9k6 baud. Only if you find everything OK for one motor, then scale up 4 servos and 15k2 baud.
Now the remaining problems for your to search your manuals now are (1) What is default DynaMixel UART speed, and (2) Can DyanMixel auto detect and adjust speed of other side? (3) If yes, you can use minicom to send full duplex commands now to servo (To repeat, forget the following now; (a) python, (b) duplex. Good luck and cheers.
And later (NOT NOW!) when you are ready to play half-duplex, you may like to consider "SeeedStudio USB2AX", seeedstudio.com/USB2AX-v3-2a-p-1816.html
And when you search for AX12A stuff, you might like to also search AX18A which is better than AX12A, which is phasing out, I think. Dynamixel AX-18A Actuator - €99 generationrobots.com/en/…
Just now I did a casual google search and found one guy saying that AX12's default 57.6k baud. So I would suggest you to set miniCom to 57.6k baud and try to say Hello to your AX12A: Re: Dynamixel Servo Library #4 Sep 23, 2012, 10:56 pm forum.arduino.cc/index.php?topic=116011.0 changing my baud rate to 57600 read that it's the default for a brand new the MX-28. AX12::init (57600); Instead of using Pablo's autoDetect function, hard coding the servo ID to 1, but no luck
I also googled that (1) both AX-12A and AX-18A are good for newbies, (2) All the knowledge and skills acquired from AX-12A can readily transfer to AX-18A. In other words, if AX-12A is cheaper, or your already have AX-12A in hand, then it is a good idea to start with AX-12A: imgur.com/gallery/Ye8ct5O.
 

  last day (33 days later) »