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 oppedijk.com/robotics/… I already check my serial communication (UART) on Raspi usin…pi-3b+serialpython-3uartraspbian-bustertlfong013807Hi @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. Ryan Fikri11@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 tlfong013807Questions: (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. Ryan Fikri@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 tlfong01(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. Ryan Fikri11Nov 22, 21:53@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 tlfong013807Good. (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. Ryan Fikri@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 tlfong013807Many 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.htmlAnd 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 luckI 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. 15 hours later… tlfong013807Nov 23, 12:27Now I have read the manuals to figure out how to use Rpi miniCom to send an instruction to AX-12A. From now on we no longer use CM530, or any python program. We only use Rpi miniCom to send AX-12A commands (instruction packets), an hopefully receive replies from AX-12A.Now the manuals: (1) CM530 Manaul
emanual.robotis.com/docs/en/…
(2) Robotis eManual
emanual.robotis.com
(3) Dynamix instruction packet
support.robotis.com/en/…(4) AX-12A Manual
emanual.robotis.com/docs/en/… 3 hours later… tlfong013807Nov 23, 15:41Now what you can try is the foillowing:(1) Connect Rpi to AX-12A in full duplex mode,(2) Use Rpi miniCOM to send an instruction packet, eg. Reset,(3) miniCOM to read status packet.(4) If 1 ~ 3 is OK. Then use the python loopback program (of course no chorting TxD and Rxd, but connect Ri to AX-12A in deuplex mode) to do 1 ~ 3.Good luck and cheers. 3 days later… Ryan FikriNov 26, 15:43@tlfong01 sorry for late replay. (1) How i connect in full duplex mode, do you have the wiring diagram picture? (2) How to read status packet from ax-12a?, i googled about it but hard to find the way. tlfong013807Nov 26, 16:19@RyanFikri (1) Ah, the original wiring diagram you posted is already the full duplex mode, ie, TxD is used to send instruction packets, and RxD are use to receive status packets. (2) For half duplex, only TxD is used, RxD is NOT used,ie, only send, no receive. (3) You can use any python loopback program to send and receive, just disconnect the jumper wire shorting TxD and RxD. Instead TxD and RxD connected to the AX-12A. 7 days later… Ryan FikriDec 3, 19:08@tlfong01 i’m still didnt get about read status packet, can u remote session from my raspi and debug about that for me? i’m trying to figure it out for the last whole week and still i’m stuck :” tlfong01Dec 3, 19:45@RyanFikri OK. Perhaps you can setup Win10 RealTerm and test loopback OK. Then I will show you in details the steps sending something to the digi servo and getting back a status packet. Ryan FikriDec 3, 19:58(removed) 8 hours later… Ryan FikriDec 4, 4:13@tlfong01 ya i already install RealTerm in my windows, but how do i choose the port? cause i’m using vnc *sorry, i’m really new about this Ryan FikriDec 4, 4:30@tlfong01 oh i already connected, is that look like this? 2 days later… tlfong013807Dec 6, 15:45@RyanFikri Ah, let me see. You don’t seem to understand the meaning of loopback. Now let me give the steps in more details. (1) Put away Rpi, (2) Put away servo, (3) Only use Win10 RealTerm, (4) Connect USB to serial cable to WinPC USB socket, (5) Connect the cable’s TxD to RxD (This way output to TxD will input to RxD, that is the meaning of loop back or echo), (5) Type/send “abc123” + <newline> at RealTerm. You should see “abc123” echoing back to RealTerm. 2 days later… Ryan Fikri11Dec 8, 19:09@tlfong01 ya i think i’m not really understand that but i’ve done that before, and yes i get the same message as i typed@tlfong01 i think what i’ve done in minicom on raspi is a loopback, isn’t it? i’ve sent the screenshoot above (connect the GPIO14 and 15 together) 2 hours later… tlfong013807Dec 8, 20:51@RyanFikri Yes, you did it for minicom, But I am not sure if you just followed the tutorial blindly. I would suggest to repeat your loopback using (1) RealTerm, and show me the screen capture, with input say “abc123”, and output echoing the same thing. i show the screen capture in at least two of the posts I referred. So this is an assignment. 18 hours later… Ryan FikriDec 9, 14:22(removed) 2 hours later… Ryan Fikri11Dec 9, 16:04@tlfong01 (1) I really want to do the assignment you give me so i can understand step by step and more details, but i have no USB to serial cable in my home, the cable is only available in the lab on my campus and i’m out of town now, so i’ll do it later when i’m back.
(2) Meanwhile, i try to reconfigure my AX12A with joint mode [here’s the picture](imgur.com/fCyjAxd), i just click the set default button and click the joint mode. After that i really copy all the script from [oppedijk](oppedijk.com/robotics/…), look like [this](img…(see full text)(removed)(removed)(removed)(removed) tlfong013807Dec 9, 16:39Well, if you don’t have any USB to serial cable for Win RealTerm, then you can forget RealTerm for now and try Rpi CuteCom instead. The assignment is still the same: Use CuteCom to show that if you connect/short Rpi TxD pin to RxD pin, what is typed at CuteCom output Rpi TxD will be looped/echoed back to Rpi RxD. After this assignment, we can then look at the instruction and status packets. Ryan FikriDec 9, 17:02(removed) Ryan Fikri11Dec 9, 17:23Example Joint Mode of AX-12A Motor► 1 day later… Ryan Fikri11Dec 10, 22:34thanks a lot sir for the help, now i can control the motor, the problem is i sent the wrong instruction packet FF FF 00 04 03 20 FF D8
, it should be FF FF 00 05 03 20 FF 00 D8
(removed)once again, really thanks for all your help ^^ 14 days later… FeedsDec 25, 8:01This room has been automatically frozen for inactivity The last message was posted 251 days ago.
Categories: Uncategorized