« first day (13 days earlier)      last day (34 days later) » 

3:07 AM
So I am now writing a python program to request the servo for its Vin value, and read its reply and print it out. Then I found a big problem: The reply string read back at the Rpi side has funny characters. I think the problem is that the servo Vin value returned at the TXS0104 output OR'ed to input point is not within an acceptable logical range of 0.5V- for Low, and 2.8V+ for High.
In other words Logical level Low of around 1V is too high. Even after converted to 3V, the Low level is still around 1V, too high for Rpi to read as a Low every time. So there are intermittent errors reading the reply string. In short, the design of TXS0104 input and output ORed at the output side has intermittent errors and is therefore NOT ACCEPTABLE!
 
3:29 AM
 
 
3 hours later…
6:10 AM
Yet another try - this time using HC03 and CD4050
 
 
1 hour later…
7:37 AM
Now that I have two servos setup, I am thinking of using two Rpi on board serial ports to separately control them. Perhaps I should use TxD #2 and RxD #2.
 
8:27 AM
@AdrianMaire I skimmed your question to SO and found it too advanced for me. (1) I forgot the the use of "auto" C/C++ keyword and I am not keen to refresh my memory on it, because I should not be using C/C++ even if I might try Cotrex M0 later for this bus motor project. (2) I have zero expereince in wiringPi and I heard that the author of WiringPi stopped supporting it for Rpi4B, so I am not motivated to start learning WiringPi now.
The guys at SO suggested to use RTS/CTS which should not fit your situation. If you give them your HC160 cct schematic with enable/disable TxD/RxD, then they might understand and help more, because your "writeMode" control bit might confuse them. (3) The suggestion of "tcdrain()" passing fd given back by serialOpen() is too difficult for me. So I gave up reading on. Good luck. Cheers.
I originally thought about suggesting you to try the TXS0104 method if you get stuck in the HX160 design and gave it up. But as you might have read my recent comments, I found the TXS0104 method problematic, because perhaps the LX-824HV output is not strong enough to drive the OR'ed TSX0104 open drain input/output pins low. So I have given up the TXS0104 method and started trying the new HC03 + CD4050 method. So far so good, but I have only 50% confidence that I won't find trouble later.
I have also searching other forums using keyword "Dynamixel" with the following results:

Rpi.org.forum = 61 matches
Robotics SE = 40 matches
SO = 27 matches
EE SE = 22 matches
Arduino SE = 12 matches
All About Circuits = 2 matches
Rpi SE = 1 match
It appears that (1) Rpi.org.forum, (2) Robotics SE, (3) EE SE, and (4) SO are the most active forums in DyanMixel and serial bus servos. I am surprised that the Adruino guys seems not active, perhaps the Arduino platform is too weak to support Dynamixel A-12A or LewanSoul LX-224HV. LX-224HV is only two years old, perhaps we should wait a year or two to find more good references. Jogging time. See you later.
 
 
1 hour later…
9:51 AM
LX-824HV Rpi Interface (HC03 + CD4050) Schematic v0.1 tlfong01 2020sep17hkt1759
Updated v0.1
 

« first day (13 days earlier)      last day (34 days later) »