« first day (6 days earlier)      last day (41 days later) » 

4:46 AM
Well, if wiringPi and wiringSerial's operation delay is of the order of 10ms, it is too slow for your HC126 enTxD circuit. As I see, there are at least two more alternatives: (1) Use level shifter to shift Rpi's TxD, RxD to 5V and use the plain HC126 cct or BusLink Terminal Board to talk to servo, (2) My suggested TXS0102/04 level shifting and auto direction control two-in-one solution. WARNING - I have not yet tested it. I think I have only 50% chance winning. :)
BTW, I have skimmed the following: maximkulkin Enable standalone mode for terminal app (lewansoul_lx16a_terminal.py, 695 lines) - Maxim Kulkin (maximkulkin), GitHub 2019feb27
https://github.com/maximkulkin/lewansoul-lx16a/blob/master/lewansoul-lx16a-terminal/lewansoul_lx16a_terminal.py
The python library by Maxim Kulkin is well documented, but I am not interested to over simplify the 625 lines long python code to start my preliminary testing. I will just first try it in CuteCom, and then use Thonny python to test the very basic commands, (1) Read Position, (2) Read Temperature, and (3) Read Vin.
 
 
2 hours later…
7:11 AM
Hello,
So yesterday I did some more tries with the board. And I managed to control the servo from the RaspberryPI GPIO through the board.
To summarize:
- The raspberryPi Tx and Rx are converted from 3.3V to 5V, and then connected to the 5V/Tx/Rx/GND pins on the board.
- I implemented some additional logic in C++ to make it rotate and request Vin.

Both: moving the servo and requesting Vin works.
(I will push the c++ code as soon as possible)
What now?

1) Your python approach is interesting, I am excited to see if it's going to work.
2) On my side, I will reverse-engineer the board, to see if I can skip it. But probably your suggestion of TXS0102/04 is a good approach.
 
7:32 AM
Oh my goodness. (2) This is a milestone. "I implemented some additional logic in C++ to make it rotate and request Vin"
(2) Your idea of "reverse-engineer the board, to see if I can skip it." is good. I have no idea of how difficult it is. I have the feeling that it might be very difficult, as the BuskLink Terminal App is a bit complicated, as Maxim Kulkin's terminal + UI python code. Anyway, good luck.
Now I have read the "LewanSoul Bus Servo Communication Protocol". It is only 11 pages long, implying not too many commands to deal with. As said earlier, I will only test the read temp, vin, and pos commands. I have summarized the protocol guide, and upload here, in case you are interested to see what I am doing.
 
Yes, this doc has became my favorite nightstand book too :-P
BTW: what software do you use to highlight PDF? it seems very convenient
 
7:50 AM
Ah, what do you mean by "favorite night stand"? I was about to curse that the guide seemed to be written by a nerd/geek in a hurry. Geeks usually have high IQ like the uni profs and so their ordinary IQ students find the prof's lecture hard to follow.
 
Ohh! It's an expression here, to indicate that I have it close to me all the time and I spend lot of time on it. (Not really that I like it especially)
 
Ah, I used to highlight my lengthy reports to my very busy ex boss, who only has time to play golf, no time to read my rubbish. So if he is very busy, he will just read the pink sentences, and so not busy, the green stuff, and so so, read the blue stuff.
 
Pink/Green/Blue: convenient.
I am going back to work. I wish you a good after-noon and luck with your researches :-)
 
And I used to use these tools/procedures to convert pdf and actually all documents that can display in Windows (Yes, I am a Windows guy). (1) Display anything on the Windows screen, (2) Crop/Capture the interesting portion of screen into a JPG file, (3) Use the very powerful PhotoShop to edit the jpg image, (4) use the PhotoShop "TRANSPARENT" thing (I am using Chinese Windows, so I don't know the "thing" in English! :)) to highlight what you want.
Ah, I missed my afternoon tea! See you later.
 
 
2 hours later…
9:37 AM
Progress Report 2020sep10hkt1737
 
9:48 AM
I feel jealous that the other guy next Continent is making great progress today. So to catch up, I abandoned the Rpi CuteCom I am setting up, and went back to the not so stable Win Real Term to test the read temperature LeWanSoul command with my LX-224HV. I have already done the following before the test this time. (1) Use BusLink board to test servo can rotate, move to position, read temp, pos, and vin. (2) Adrian helped to decode the read Vin request as 0x55, 0x55, 0x01, 0x03, 0x1b, 0xe0.
(3) I tested Win10 RealTerm UART loopback, with TxD shorted to RxD, at logical level 3V3 (UART adapter jumper set to 3V3), (4) I ten tested Win10 RealTerm UART loopback at logical level 5V0, using TXS0104 to do level shift up, (5) Next is the fun part: (a) I power servo with 5V, (b) set RealTerm input string to readVin, (c) send readVin without connecting the signal (TxD shorted to RxD) to servo. RealTemp output displayed the readVin string and nothing else.
(d) send request again, this time, RealTerm displayed more numbers (from servo, I guess). (e) I repeated send without signal connected, and then connected to servo). The RealTerm output is displayed below.
Now I need someone kindly to decode the seemingly reply from the servo, hopefully something like a Vin value of 5V. Ah, I am missing the locking down supper, will come back later this evening, ...
 
10:09 AM
 
Thanks a lot. So I will do my always dodgy calculation after supper. Cheers.
 
x55 x55: start communication frame
x01: ID from the servo replying
x05: length of the message, including this byte and following
x1B: command: 27 is response to VIN_READ
x4E and x14: value of voltage.
x7C checksum.

continuing
x14=20, x4E=78: 5198
 
Ha, so the value is 0x4E14. I will ask the online hex to decimal converter for help.
 
4E is lower bits and 14 higher, so you have to reverse them: x14 x4E
14=20, 4E=78, so 20*256+78 = 5198
There is no description of what does that mean, but considering other parameters, it seems like mV, thus 5.198V
 
Ah, yes I first tried 4e14 returning some rubbish, then 144e gives 5198. I hope it means 5.198V.
tks bye
 
10:27 AM
>JPG
Ohh! I though you had some tool to directly highlight the PDF. Like with Okular PDF-reader
 

« first day (6 days earlier)      last day (41 days later) »