Lynxmotion SES V2 Hexapod Robot

Was trying to play with the LSS to check some of the observations done here. I have an Arduino mega. I am still waiting for the Teensy break out board. Nevertheless I wanted to check if I could communicate with higher baud rate. I couldn’t find any command in the library to configure the baud rate ? Or have I over looked something.

I tried something like this over the serial port to first query what baud rate is used… (I know there is an API but just wanted to check) … Will such a thing work ? May be I am doing something silly…

 Serial.write("#0QB\r");
 int val = Serial.read();

I get -1 as the output.

I have my own test sketch I setup to do do this:

Which you set the from and to baud rates and it first loops through the old baud rate trying to find servos and then asks you to hit any key to continue…

@madmax

I meant to mention again on Teensy boards Serial is for the USB port, which is not shared with pins 0 and 1 like on the AVR boards like the UNO. Instead Pins 0 and 1 are Serial1

Hi @kurte

Yes Thanks for that. I have still not switched to Teensy as I am still waiting for the break out board. I am using Arduino Mega for now. It allows me to play with the servos and understand the LSS API a bit better.

Thanks for your test sketch! I realised I was missing the delay… Foolish of me to assume the LSS is going to respond instantaneously…

This hacky snippet works for me …to try out certain query commands…

Serial.write("#0QB\r");
delay(250);
if ( Serial.available())
{
while( ch != ‘\r’)
{
ch = Serial.read();
Serial.print(ch);
}
}

I do get the response now…

#0QN
*0QN000000000000000000
However, I do get the serial as all 0’s … is that correct ?

#0QB
*0QB115200
This seems fine !

As a mostly “non-programmer”, from what I skim here, is the objective of the tests is to know the limitations of the communication of the servos before adapting or creating walking code (perhaps to better understand issues which may arise in the future)?

For me, I am doing some of the testing for a variety of reasons, including:

a) When I first got them, to see if I can actually talk to them and make them respond… Can I receive data back…

b) I then did an initial porting of a version of the Phoenix fixed point code to try to use these servos… I am assuming there are lots of bugs in my first attempt back then, But not all of the servos were responding correctly all of the time, so then I start to try to figure out why… Things like, I would turn the controller off (in this case the Arbotix Commander), which then should tell all of the legs to move back to their default positions… But often times while sitting there one leg would act sort of spastic and keep moving around randomly… Why?

Which is what most of these tests are for. Wondering if all of the packets are getting through and received without errors.

c) Understanding limitations. Example realistically how fast can we update the servos… Example I believe the first ROS hexapod by KevinOchs with I believe MX servos, I believe he was outputting new positions to all of the servos something like 80 times per second. Can we do that? Likewise how many cycles per second can we do if we also want to receive data back from servos, like actual position or temperature…

Which is also part of my testing right now. It has been suggested you can speed up query of multiple values by outputting all of the requests to a servo at once and wait for it’s responses, versus ask for one, receive value ask for next…

So was curious… If it is/was significantly faster was going to suggest we add more support in library. But my initial testing does not really show significant improvements.


Again not sure if that answers your question?

2 Likes

a) Kurte sends a command to the servo requesting its status… servo replies “私は快適です、あなたはどうですか?” :laughing:

b) Good question and good hypothesis

c) Perfect and as suspected!

Muchos gracias.

2 Likes

:rofl: :rofl:

It is! But I am not saying it’s the servos yet. I have to make sure my ports are in low-latency mode and a few other things. I am also running at 500k baud. I dont recall which firmware I ran before unfortunately, I think it was around January timeframe.

1 Like

Hmm, we’re talking Jan 2020, I assume? :smiley: :rofl::thinking: @cbenson can you look at what was available then?

Have been busy working on Lawn mower so not much done today…

I will probably rerun some of these tests minus looking at the Serial number, as the ID is reasonably consistently screwing up.
The reading and causing the signal to drop for a moment, usually always at the same point. So someone may want to check to see if there is something different that happens…

But since I almost never actually use the Serial number… Will be curious to try with out it and see if I get any other drop outs…

2 Likes

There definitely seems to be some issue with the QN command using the API getSerialNumber

I am running a single servo at 500000 baud and I do get some errors like this…

below it seems to report the firmware number

#0D1200#0LED5#0QD#0QWR#0QC#0QV#0QT#0QN#0QF
1200,1100,0,57,10876,386,368,368

in the next increment it is blank

#0D1300#0LED5#0QD#0QWR#0QC#0QV#0QT#0QN#0QF
1300,0,1,59,10876,386,368

then in the next one it has errors…

#0D1400#0LED5#0QD#0QWR#0QC#0QV#0QT#0QN#0QF
1400,1300,0,62,10876,386,000L⸮⸮⸮⸮⸮000000000,0

Also very rarely the QN reports back the serial as all 0’s but then the QF command fails

#0D500#0QD#0QWR#0QC#0QV#0QT#0QN#0QF
500,601,0,55,10873,386,000000000000000000,0

then it goes back to reporting 368.
#0D400#0QD#0QWR#0QC#0QV#0QT#0QN#0QF
400,500,0,52,10875,387,368,368

I am running the simple position increments in 100 form 0 - 1800 and back and after each increment i read the position, current , voltage… temperature serial and the firmware version.

But then instead of using the API if I run my snippet below to get the Serial number it happily runs everytime…

Serial.write("#0QN\r");
delay(250);
if ( Serial.available())
{
while( ch != ‘\r’)
{
ch = Serial.read();
Serial.print(ch);
}
}

Althought still says the serial number is all 0’s :smiley:

#0QN
*0QN000000000000000000

is it possible the underlying genericread_blocking_str function is slow for specifically the QN commands response or does not block the next command’s response to overwrite the data in the serial buffer ? Jut thinking out loud… because I see the data for the FW in the QN’s response…

1 Like

@madmax
A few questions:

  1. What firmware is your LSS using? (get from #[id]QF3\r or LSS Config scan)
  2. What hardware are you using now? Still an Arduino Mega (which one)?
  3. What electronics between LSS bus and Arduino/microcontroller?
  4. Which library are you using? Default LSS Arduino Library? With @kurte’s modifications?

I can’t comment on that at this time since if I remember correctly @kurte modified the outputs and inputs (serial).

Once I receive my adapter boards and power supply I’ll definitely be running some test on my logic analyzer! :smiley:

As for what you saw over there:
image
That one feels like an issue with the library or how you are using it, since we know from @kurte’s scans that the QN issue only mangles that packet, not the actual transmission (i.e.: the LSS does not send stuff like this multiple times).

1 Like

#0QF3
*0QF368.29.14

Arduino Mega 2560

It is the LSS Adapter board with the switch set to Arduino position

Default Library from Arduino version 1.4

I thought so… However i do get this consistently… may be worth testing with the QN and QF swapped around… :thinking:

1 Like

As I have mentioned in forum and sets of PMs, the QN commands appears to have interesting repeatable times where it screws up the output. The short 0 pulse which both Logic Analyzer as well as my sketches get garbage back on this about one third to one half of the time.

For example my test sketch:

I just removed where I commented out the QN on the all query… Also this version if I type in:
9 -1
It will iterate through all the servos I found…
Sample Output:

Cmd: 9 -1

Servo 1 values
  Q(-1) - 1 t:679
  QO(-1) - 0 t:781
  QAR(-1) - 1800 t:993
  QP(-1) - 1493 t:880
  QD(-1) - -7 t:816
  QWD(-1) - -2 t:890
  QWR(-1) - 0 t:954
  QS(-1) - 1 t:759
  QSD(-1) - 360 t:955
  QSR(-1) - 60 t:918
  QLED(-1) - 0 t:1000
  QG(-1) - 1 t:810
  QID(-1) - 1 t:867
  QB(-1) - -12144 t:1410
  QFD(-1) - DIS t:1635
  QMS(-1) - LSS-HS1 t:1313
  QN(-1) - (null) failed(2) t:100703
  QF(-1) - 368 t:862
  QV(-1) - 12040 t:1106
  QT(-1) - 316 t:1004
  QC(-1) - 0 t:873
  QAS(-1) - 0 t:842
  QAH(-1) - 4 t:845
  QAA(-1) - 100 t:952
  QAD(-1) - 100 t:1009
  QEM(-1) - 1 t:870
  QF(1) - 29 t:934
  QF(2) - 18 t:953
  QF(3) - 368.29.18 t:1174
Total Time: 127914

Servo 2 values
  Q(-1) - 1 t:650
  QO(-1) - 0 t:783
  QAR(-1) - 1800 t:1013
  QP(-1) - 1661 t:873
  QD(-1) - 145 t:873
  QWD(-1) - 0 t:847
  QWR(-1) - 0 t:860
  QS(-1) - 0 t:759
  QSD(-1) - 600 t:955
  QSR(-1) - 100 t:954
  QLED(-1) - 0 t:980
  QG(-1) - 1 t:809
  QID(-1) - 2 t:867
  QB(-1) - -12144 t:1410
  QFD(-1) - DIS t:1632
  QMS(-1) - LSS-HS1 t:1099
  QN(-1) - (null) failed(2) t:101078
  QF(-1) - 368 t:887
  QV(-1) - 12122 t:1120
  QT(-1) - 332 t:1227
  QC(-1) - 0 t:910
  QAS(-1) - 0 t:845
  QAH(-1) - 2 t:867
  QAA(-1) - 100 t:945
  QAD(-1) - 100 t:942
  QEM(-1) - 1 t:836
  QF(1) - 29 t:883
  QF(2) - 18 t:863
  QF(3) - 368.29.18 t:1166
Total Time: 255982

Servo 3 values
  Q(-1) - 1 t:678
  QO(-1) - 0 t:781
  QAR(-1) - 1800 t:991
  QP(-1) - 1648 t:898
  QD(-1) - 134 t:840
  QWD(-1) - 0 t:841
  QWR(-1) - 0 t:922
  QS(-1) - 0 t:760
  QSD(-1) - 360 t:953
  QSR(-1) - 60 t:913
  QLED(-1) - 0 t:983
  QG(-1) - 1 t:826
  QID(-1) - 3 t:866
  QB(-1) - -12144 t:1408
  QFD(-1) - DIS t:1637
  QMS(-1) - LSS-ST1 t:1279
  QN(-1) - (null) failed(2) t:100803
  QF(-1) - 368 t:887
  QV(-1) - 11965 t:1093
  QT(-1) - 302 t:1003
  QC(-1) - 0 t:889
  QAS(-1) - 0 t:842
  QAH(-1) - 4 t:859
  QAA(-1) - 100 t:917
  QAD(-1) - 100 t:919
  QEM(-1) - 1 t:876
  QF(1) - 29 t:922
  QF(2) - 18 t:954
  QF(3) - 368.29.18 t:1154
Total Time: 383805

Servo 4 values
  Q(-1) - 1 t:716
  QO(-1) - 0 t:786
  QAR(-1) - 1800 t:1011
  QP(-1) - 1664 t:895
  QD(-1) - 148 t:836
  QWD(-1) - 0 t:1054
  QWR(-1) - 0 t:858
  QS(-1) - 0 t:767
  QSD(-1) - 360 t:974
  QSR(-1) - 60 t:955
  QLED(-1) - 0 t:1014
  QG(-1) - 1 t:778
  QID(-1) - 4 t:885
  QB(-1) - -12144 t:1407
  QFD(-1) - DIS t:1605
  QMS(-1) - LSS-ST1 t:1120
  QN(-1) - (null) failed(2) t:100893
  QF(-1) - 368 t:854
  QV(-1) - 12091 t:1111
  QT(-1) - 281 t:1009
  QC(-1) - 0 t:916
  QAS(-1) - 0 t:847
  QAH(-1) - 4 t:866
  QAA(-1) - 100 t:944
  QAD(-1) - 100 t:946
  QEM(-1) - 1 t:1043
  QF(1) - 29 t:883
  QF(2) - 14 t:861
  QF(3) - 368.29.14 t:1161
Total Time: 511931

Servo 5 values
  Q(-1) - 1 t:674
  QO(-1) - 0 t:757
  QAR(-1) - 1800 t:991
  QP(-1) - 1663 t:875
  QD(-1) - 147 t:906
  QWD(-1) - 0 t:909
  QWR(-1) - 0 t:929
  QS(-1) - 0 t:781
  QSD(-1) - 360 t:954
  QSR(-1) - 60 t:919
  QLED(-1) - 0 t:1139
  QG(-1) - 1 t:809
  QID(-1) - 5 t:864
  QB(-1) - -12144 t:1411
  QFD(-1) - DIS t:1631
  QMS(-1) - LSS-ST1 t:1099
  QN(-1) - (null) failed(2) t:100779
  QF(-1) - 368 t:877
  QV(-1) - 12104 t:1117
  QT(-1) - 277 t:1030
  QC(-1) - 0 t:899
  QAS(-1) - 0 t:841
  QAH(-1) - 4 t:843
  QAA(-1) - 100 t:963
  QAD(-1) - 100 t:1003
  QEM(-1) - 1 t:898
  QF(1) - 29 t:925
  QF(2) - 18 t:953
  QF(3) - 368.29.18 t:1175
Total Time: 640013

Servo 6 values
  Q(-1) - 1 t:670
  QO(-1) - 0 t:754
  QAR(-1) - 1800 t:1055
  QP(-1) - 1661 t:946
  QD(-1) - 145 t:830
  QWD(-1) - 0 t:1068
  QWR(-1) - 0 t:864
  QS(-1) - 0 t:790
  QSD(-1) - 360 t:954
  QSR(-1) - 60 t:916
  QLED(-1) - 0 t:978
  QG(-1) - 1 t:803
  QID(-1) - 6 t:863
  QB(-1) - -12144 t:1411
  QFD(-1) - DIS t:1610
  QMS(-1) - LSS-ST1 t:1117
  QN(-1) - (null) failed(2) t:100717
  QF(-1) - 368 t:866
  QV(-1) - 12051 t:1141
  QT(-1) - 303 t:996
  QC(-1) - 0 t:879
  QAS(-1) - 0 t:844
  QAH(-1) - 4 t:906
  QAA(-1) - 100 t:911
  QAD(-1) - 100 t:945
  QEM(-1) - 1 t:1044
  QF(1) - 29 t:885
  QF(2) - 18 t:887
  QF(3) - 368.29.18 t:1167
Total Time: 767961

Servo 7 values
  Q(-1) - 1 t:649
  QO(-1) - 0 t:771
  QAR(-1) - 1800 t:1022
  QP(-1) - 1864 t:1075
  QD(-1) - 329 t:860
  QWD(-1) - 4 t:867
  QWR(-1) - 1 t:886
  QS(-1) - 4 t:767
  QSD(-1) - 600 t:932
  QSR(-1) - 100 t:962
  QLED(-1) - 0 t:975
  QG(-1) - 1 t:777
  QID(-1) - 7 t:887
  QB(-1) - -12144 t:1408
  QFD(-1) - DIS t:1609
  QMS(-1) - LSS-HS1 t:1126
  QN(-1) - (null) failed(2) t:100826
  QF(-1) - 368 t:856
  QV(-1) - 12023 t:1125
  QT(-1) - 307 t:1009
  QC(-1) - 0 t:870
  QAS(-1) - 0 t:867
  QAH(-1) - 2 t:873
  QAA(-1) - 100 t:1098
  QAD(-1) - 100 t:945
  QEM(-1) - 1 t:858
  QF(1) - 29 t:864
  QF(2) - 14 t:885
  QF(3) - 368.29.14 t:1160
Total Time: 895902

Servo 8 values
  Q(-1) - 1 t:673
  QO(-1) - 0 t:755
  QAR(-1) - 1800 t:994
  QP(-1) - 1660 t:917
  QD(-1) - 144 t:828
  QWD(-1) - 0 t:945
  QWR(-1) - 0 t:887
  QS(-1) - 0 t:787
  QSD(-1) - 600 t:932
  QSR(-1) - 100 t:927
  QLED(-1) - 0 t:973
  QG(-1) - 1 t:786
  QID(-1) - 8 t:865
  QB(-1) - -12144 t:1400
  QFD(-1) - DIS t:1578
  QMS(-1) - LSS-HS1 t:1100
  QN(-1) - (null) failed(2) t:101111
  QF(-1) - 368 t:870
  QV(-1) - 12022 t:1306
  QT(-1) - 324 t:994
  QC(-1) - 0 t:869
  QAS(-1) - 0 t:866
  QAH(-1) - 2 t:842
  QAA(-1) - 100 t:915
  QAD(-1) - 100 t:918
  QEM(-1) - 1 t:834
  QF(1) - 29 t:925
  QF(2) - 14 t:925
  QF(3) - 368.29.14 t:1171
Total Time: 1023927

Servo 9 values
  Q(-1) - 1 t:660
  QO(-1) - 0 t:769
  QAR(-1) - 1800 t:1013
  QP(-1) - 1672 t:917
  QD(-1) - 155 t:840
  QWD(-1) - 0 t:843
  QWR(-1) - 0 t:857
  QS(-1) - 0 t:788
  QSD(-1) - 360 t:923
  QSR(-1) - 60 t:913
  QLED(-1) - 0 t:982
  QG(-1) - 1 t:809
  QID(-1) - 9 t:892
  QB(-1) - -12144 t:1406
  QFD(-1) - DIS t:1630
  QMS(-1) - LSS-ST1 t:1098
  QN(-1) - (null) failed(2) t:101095
  QF(-1) - 368 t:911
  QV(-1) - 12049 t:1313
  QT(-1) - 274 t:1004
  QC(-1) - 0 t:879
  QAS(-1) - 0 t:903
  QAH(-1) - 4 t:926
  QAA(-1) - 100 t:932
  QAD(-1) - 100 t:944
  QEM(-1) - 1 t:860
  QF(1) - 29 t:883
  QF(2) - 14 t:865
  QF(3) - 368.29.14 t:1162
Total Time: 1152071

Servo 10 values
  Q(-1) - 1 t:729
  QO(-1) - 0 t:839
  QAR(-1) - 1800 t:1071
  QP(-1) - 1661 t:954
  QD(-1) - 145 t:919
  QWD(-1) - 0 t:955
  QWR(-1) - 0 t:984
  QS(-1) - 0 t:918
  QSD(-1) - 360 t:1276
  QSR(-1) - 60 t:970
  QLED(-1) - 0 t:1039
  QG(-1) - 1 t:867
  QID(-1) - 10 t:985
  QB(-1) - -12144 t:1511
  QFD(-1) - DIS t:1711
  QMS(-1) - LSS-ST1 t:1182
  QN(-1) - (null) failed(2) t:101377
  QF(-1) - 368 t:972
  QV(-1) - 12051 t:1195
  QT(-1) - 277 t:1064
  QC(-1) - 0 t:973
  QAS(-1) - 0 t:922
  QAH(-1) - 4 t:1006
  QAA(-1) - 100 t:1041
  QAD(-1) - 100 t:1045
  QEM(-1) - 1 t:941
  QF(1) - 29 t:1190
  QF(2) - 14 t:942
  QF(3) - 368.29.14 t:1244
Total Time: 1283026

Servo 11 values
  Q(-1) - 1 t:737
  QO(-1) - 0 t:910
  QAR(-1) - 1800 t:1068
  QP(-1) - 1662 t:961
  QD(-1) - 146 t:940
  QWD(-1) - 0 t:930
  QWR(-1) - 0 t:963
  QS(-1) - 0 t:873
  QSD(-1) - 360 t:1031
  QSR(-1) - 60 t:997
  QLED(-1) - 0 t:1064
  QG(-1) - 1 t:888
  QID(-1) - 11 t:1007
  QB(-1) - -12144 t:1495
  QFD(-1) - DIS t:1860
  QMS(-1) - LSS-ST1 t:1264
  QN(-1) - (null) failed(2) t:101344
  QF(-1) - 368 t:969
  QV(-1) - 12093 t:1185
  QT(-1) - 277 t:1090
  QC(-1) - 0 t:983
  QAS(-1) - 0 t:930
  QAH(-1) - 4 t:950
  QAA(-1) - 100 t:1022
  QAD(-1) - 100 t:1024
  QEM(-1) - 1 t:936
  QF(1) - 29 t:965
  QF(2) - 14 t:965
  QF(3) - 368.29.14 t:1246
Total Time: 1413754

Servo 12 values
  Q(-1) - 1 t:766
  QO(-1) - 0 t:840
  QAR(-1) - 1800 t:1088
  QP(-1) - 1654 t:978
  QD(-1) - 139 t:937
  QWD(-1) - 0 t:923
  QWR(-1) - 0 t:942
  QS(-1) - 0 t:1006
  QSD(-1) - 360 t:1010
  QSR(-1) - 60 t:970
  QLED(-1) - 0 t:1041
  QG(-1) - 1 t:867
  QID(-1) - 12 t:989
  QB(-1) - -12144 t:1495
  QFD(-1) - DIS t:1712
  QMS(-1) - LSS-ST1 t:1182
  QN(-1) - (null) failed(2) t:100861
  QF(-1) - 368 t:964
  QV(-1) - 12033 t:1196
  QT(-1) - 307 t:1066
  QC(-1) - 0 t:951
  QAS(-1) - 0 t:948
  QAH(-1) - 4 t:924
  QAA(-1) - 100 t:1000
  QAD(-1) - 100 t:999
  QEM(-1) - 1 t:916
  QF(1) - 29 t:1080
  QF(2) - 14 t:942
  QF(3) - 368.29.14 t:1241
Total Time: 1543719

Servo 13 values
  Q(-1) - 1 t:736
  QO(-1) - 0 t:909
  QAR(-1) - 1800 t:1160
  QP(-1) - 1882 t:1014
  QD(-1) - 344 t:954
  QWD(-1) - -2 t:1007
  QWR(-1) - 0 t:1009
  QS(-1) - 4 t:911
  QSD(-1) - 600 t:1047
  QSR(-1) - 100 t:1053
  QLED(-1) - 0 t:1038
  QG(-1) - 1 t:866
  QID(-1) - 13 t:1039
  QB(-1) - -12144 t:1522
  QFD(-1) - DIS t:1706
  QMS(-1) - LSS-HS1 t:1179
  QN(-1) - 141522593483005648 t:1729
  QF(-1) - 368 t:941
  QV(-1) - 12132 t:1189
  QT(-1) - 324 t:1086
  QC(-1) - 0 t:923
  QAS(-1) - 0 t:921
  QAH(-1) - 2 t:940
  QAA(-1) - 100 t:1017
  QAD(-1) - 100 t:1018
  QEM(-1) - 1 t:929
  QF(1) - 29 t:944
  QF(2) - 14 t:940
  QF(3) - 368.29.14 t:1239
Total Time: 1574817

Servo 14 values
  Q(-1) - 1 t:735
  QO(-1) - 0 t:865
  QAR(-1) - 1800 t:1103
  QP(-1) - 1662 t:984
  QD(-1) - 146 t:945
  QWD(-1) - 0 t:951
  QWR(-1) - 0 t:965
  QS(-1) - 0 t:874
  QSD(-1) - 600 t:1013
  QSR(-1) - 100 t:1038
  QLED(-1) - 0 t:1063
  QG(-1) - 1 t:892
  QID(-1) - 14 t:1013
  QB(-1) - -12144 t:1472
  QFD(-1) - DIS t:1980
  QMS(-1) - LSS-HS1 t:1267
  QN(-1) - (null) failed(2) t:101382
  QF(-1) - 368 t:944
  QV(-1) - 12143 t:1188
  QT(-1) - 338 t:1087
  QC(-1) - 0 t:960
  QAS(-1) - 0 t:925
  QAH(-1) - 2 t:931
  QAA(-1) - 100 t:1018
  QAD(-1) - 100 t:1018
  QEM(-1) - 1 t:934
  QF(1) - 29 t:948
  QF(2) - 14 t:947
  QF(3) - 368.29.14 t:1244
Total Time: 1705636

Servo 15 values
  Q(-1) - 1 t:737
  QO(-1) - 0 t:1032
  QAR(-1) - 1800 t:1070
  QP(-1) - 1663 t:957
  QD(-1) - 147 t:915
  QWD(-1) - 0 t:925
  QWR(-1) - 0 t:980
  QS(-1) - 0 t:892
  QSD(-1) - 360 t:1053
  QSR(-1) - 60 t:1004
  QLED(-1) - 0 t:1061
  QG(-1) - 1 t:914
  QID(-1) - 15 t:1027
  QB(-1) - -12144 t:1558
  QFD(-1) - DIS t:1707
  QMS(-1) - LSS-ST1 t:1177
  QN(-1) - (null) failed(2) t:100713
  QF(-1) - 368 t:957
  QV(-1) - 12028 t:1197
  QT(-1) - 292 t:1082
  QC(-1) - 0 t:1171
  QAS(-1) - 0 t:946
  QAH(-1) - 4 t:950
  QAA(-1) - 100 t:1020
  QAD(-1) - 100 t:1023
  QEM(-1) - 1 t:938
  QF(1) - 29 t:962
  QF(2) - 14 t:966
  QF(3) - 368.29.14 t:1245
Total Time: 1835947

Servo 16 values
  Q(-1) - 1 t:751
  QO(-1) - 0 t:1038
  QAR(-1) - 1800 t:1093
  QP(-1) - 1667 t:977
  QD(-1) - 151 t:938
  QWD(-1) - 0 t:945
  QWR(-1) - 0 t:960
  QS(-1) - 0 t:870
  QSD(-1) - 360 t:1029
  QSR(-1) - 60 t:992
  QLED(-1) - 0 t:1061
  QG(-1) - 1 t:884
  QID(-1) - 16 t:1005
  QB(-1) - -12144 t:1463
  QFD(-1) - DIS t:1768
  QMS(-1) - LSS-ST1 t:1203
  QN(-1) - 140901369648193397 t:1576
  QF(-1) - 368 t:968
  QV(-1) - 12052 t:1153
  QT(-1) - 276 t:1274
  QC(-1) - 0 t:964
  QAS(-1) - 0 t:1004
  QAH(-1) - 4 t:968
  QAA(-1) - 100 t:1058
  QAD(-1) - 100 t:1040
  QEM(-1) - 1 t:956
  QF(1) - 29 t:975
  QF(2) - 14 t:982
  QF(3) - 368.29.14 t:1297
Total Time: 1867271

Servo 17 values
  Q(-1) - 1 t:749
  QO(-1) - 0 t:862
  QAR(-1) - 1800 t:1095
  QP(-1) - 1662 t:979
  QD(-1) - 146 t:938
  QWD(-1) - 0 t:946
  QWR(-1) - 0 t:938
  QS(-1) - 0 t:845
  QSD(-1) - 360 t:1032
  QSR(-1) - 60 t:986
  QLED(-1) - 0 t:1038
  QG(-1) - 1 t:881
  QID(-1) - 17 t:987
  QB(-1) - -12144 t:1489
  QFD(-1) - DIS t:1708
  QMS(-1) - LSS-ST1 t:1180
  QN(-1) - 141010771055155503 t:1570
  QF(-1) - 368 t:1120
  QV(-1) - 12065 t:1181
  QT(-1) - 301 t:1056
  QC(-1) - 0 t:954
  QAS(-1) - 0 t:947
  QAH(-1) - 4 t:921
  QAA(-1) - 100 t:998
  QAD(-1) - 100 t:999
  QEM(-1) - 1 t:913
  QF(1) - 29 t:965
  QF(2) - 14 t:962
  QF(3) - 368.29.14 t:1223
Total Time: 1897861

Servo 18 values
  Q(-1) - 1 t:733
  QO(-1) - 0 t:829
  QAR(-1) - 1800 t:1094
  QP(-1) - 1661 t:976
  QD(-1) - 145 t:941
  QWD(-1) - 0 t:948
  QWR(-1) - 0 t:963
  QS(-1) - 0 t:872
  QSD(-1) - 360 t:1035
  QSR(-1) - 60 t:994
  QLED(-1) - 0 t:1062
  QG(-1) - 1 t:894
  QID(-1) - 18 t:1199
  QB(-1) - -12144 t:1487
  QFD(-1) - DIS t:1691
  QMS(-1) - LSS-ST1 t:1279
  QN(-1) - (null) failed(2) t:101501
  QF(-1) - 368 t:964
  QV(-1) - 12137 t:1196
  QT(-1) - 299 t:1064
  QC(-1) - 0 t:982
  QAS(-1) - 0 t:1005
  QAH(-1) - 4 t:970
  QAA(-1) - 100 t:1044
  QAD(-1) - 100 t:1058
  QEM(-1) - 1 t:958
  QF(1) - 29 t:985
  QF(2) - 14 t:987
  QF(3) - 368.29.14 t:1283
Total Time: 2028986
0 - All Servos off
1 - All Servos center
2 - Set Servo position [<Servo>] <Position> [<Time>]
3 - Set Servo Angle
4 - Get Servo Positions
5 - Find All Servos
9 - Print Servo Values
9 - Print Servo Values fill tx
b - Baud <new baud>
t - Toggle track Servos
h - hold [<sn>]
f - free [<sn>]
m - move all servos
r - Reboot [<sn>]

Actually in this run it only succeeded 3 out of 18 servos. Sorry I know the output is cryptic.

Follow on to the above, if I remove the query for the serial number I get far fewer query failures.

Example I ran the 9 -1 command 3 times
And in total probably 2 failures, which is obvious from the Logic Analyzer capture:

Notice the first area is solid, it had no failures. The other two both had a failure as the query commands wait for 10ms for a valid packet returned…

Now if I zoom in on the failures:
You see things like:


Which also registered with my test program:

Servo 7 values
  Q(-1) - 1 t:669
  QO(-1) - 0 t:759
  QAR(-1) - 1800 t:1056
  QP(-1) - 1864 t:944
  QD(-1) - 328 t:829
  QWD(-1) - 0 t:849
  QWR(-1) - 0 t:882
  QS(-1) - 0 t:790
  QSD(-1) - 600 t:949
  QSR(-1) - 100 t:1089
  QLED(-1) - 0 t:982
  QG(-1) - 1 t:806
  QID(-1) - 7 t:867
  QB(-1) - -12144 t:1410
  QFD(-1) - DIS t:1604
  QMS(-1) - LSS-HS1 t:1101
  QF(-1) - 368 t:864
  QV(-1) - 12030 t:1094
  QT(-1) - 404 t:1004
  QC(-1) - 0 t:847
  QAS(-1) - 0 t:842
  QAH(-1) - 2 t:908
  QAA(-1) - 100 t:1029
  QAD(-1) - 100 t:912
  QEM(-1) - 1 t:855
  QF(1) - 29 t:887
  QF(2) - 14 t:887
  QF(3) - (null) failed(2) t:100660
Total Time: 289218

The other one:

Data shows it again:
Servo 5 values

QG(-1) - 0 failed(2) t:100458

Most all of the failures I have seen again show the response then some minor glitch which throws off the rest of the response.

It really feels like the internal TX buffer (as I doubt the actual UART periph of the µC is randomly messing up its output and unless you forcibly turn the whole periph off [pretty sure that’s not happening] it’ll go back to idle [high in this case] when not transmitting) is doing something wonky in that case, maybe triggering when it is not supposed to? I feel like this is something worth probing, actually… :thinking:

1 Like

That would be with @kurte’s update then! I’ll get to test it soon (waiting on parts).

Yes, QN is clearly broken for some mysterious reason. My point was more about the output @madmax had after the QN mess up:
image
That does not look right either (3x 368 from one QF command), but for a different reason. As you’ve shown in your logic analyzer scans, the LSS seems to always return to a stop bit (idle UART bus) after each reply packet, even if malformed (i.e.: the QN replies), thus the QF one should still show up correctly after a QN. That’s what I was curious about.

Like with the QN issue it seems like the TX buffer goes into a tri-state right before sending the next characters, causing the following sequence to be off timing wise enough to make it seem invalid (the drop in signal triggers the start of a read from the receiving UART peripheral).

This makes me think, is there any pull-up on the RX end of the Aruidno/Teensy part (or the level converter, if one’s involved?). I seem to remember a discussion about this a while ago… I don’t remember any of the details though!
Maybe @dialfonzo or @cbenson can enlighten me here?

Anyway, as before, I’ll be running some tests too once I have all the parts to get started…

1 Like

Thanks @scharette and @cbenson @dialfonzo

Again this appears to reproduce reasonably easily for me. At some point I may run my update sketch and move the servos back to 500000 and see if it reproduces even more.

Again it appears to be something on query commands right after it echos the command back. Often times then a gap of time and then results…

I would think it would also shop up on a scope as well. Again maybe you did not see it as often or have it as obvious when running slower processors.

Again if it were me, I would probably run something like my test on multiple servos (again not sure if that impacts it or not).
at all of the baud rates you show in the LSS_CONFIG program.

I have not done much with STM32 processors…
Was wondering what is the BUS speed that is passed into the baud rate calculations? And is that top value < 1mbs the top speed for it?

Note: the top speed for T4.x is currently 6mbs where we are passing 24mhz clock so 250K is even multiple so we should be dead on…

1 Like

:+1:

And from what we saw, seems intermittent on all responses except QN, which is very much messed up all the time!

:+1: agreed

If I remember correctly, the exact baud rate is passed to STM32’s StdPeriph library that handles matching the peripheral clock with the desired baud rate as accurately as possible. As far as I can remember, the on-board clock main system clock is set to 48 MHz and the peripheral bus for the UART is, too. From the reference manual, you can see it should be pretty accurate (far more than what you measured, anyway):


I suspect there are more things at play here… Including the TX buffer and other electrical reasons to look at.

Hmm, I agree with the “dead on” in theory. In practice that 24 MHz (external crystal or internal RC osci?) clock might not be as precise as we’d like and then all other steps from there add error until it gets to the UART output. Of course, it shouldn’t be much though… if we didn’t have wires & etc. changing the characteristics of the signal.

1 Like