Lynxmotion SES V2 Hexapod Robot

If I am guessing which line of STM32, it is probably something like from the line:

And then the interesting question is, about you sort of show their table without the last ones:

So wondering if there is constraints on the servo using 1mbs or even 2mbs?

Interrupts or DMA?

Now to play!

As far as I remember there was some other constraints preventing the use of higher speed comms not clear from just that table. It may have involved some errata and possibly the combination of interfaces or something like that.

The ĀµC concerns aside that rate of speed will full duplex lines was most likely problematic due to other constraints (electrical/interface). At higher speeds the cabling, traces, interfaces, etc. I think were also a problem?

A liitle bit of column A, a little bit of column B.

Showed the relevant ones, of course! :slight_smile:

Guessing out-laud wondering if there is some transitions of how the TX pins on the servo work when they are outputting a response?
For example do they switch from something like OpenDrain to something like Push Pole? Could there be a instruction or two (or more) break of when the mode is set and the proper new state for that mode is set, that if an interrupt comes in during that time frame could end up with small drops of signal?

Again just guessingā€¦ But that would be something I would look at if I were debugging the servos.

Note: I have seen on several different query functions. Like I had one run where a couple of QAR commands failed Which I would assume would be a quick query, unless potentially at times it has to read in from EEPROM or the like?

1 Like

@zenta and all,

I am thinking about doing a diversion in here, and maybe see about adapting your code to run on one or more of my PhantomX hexapods. Probably for sure the AX-12 based one, but maybe also the one built with the XL430-W250 servos.

But the main first thing I want to do is to change out your Input controller, as your controller is unique. Yes I have the earlier one from Jim Frye which I adapted to run a Teensy and XBee and displayā€¦ And I even have a partially working with with pots on topā€¦ But that makes 2 or 3 of us that have something in that ballpark.

The easiest is probably Arbotix Commander, but that has similar issues. I believe it is discontinued by Trossen Robotics. Could easily design and build a new oneā€¦ Either still as shield or simple board, with two thumb josticks


And they had 8 buttons. Should have had 10 but did not route wires to switches in thumb josticksā€¦

But instead I am planning to go USB Joystick probably start with PS3 and/or PS4.
Again I wonā€™t have as many knobs ans sliders like you were using but am thinking of a cross of your stuff with what I was doing with Commander.

That is for Knobs and sliders we have the left and right joysticks. Plus L2 and R2 buttons are more analog inputsā€¦

With the Commander I reserved one of the buttons like L1, to say if it is pressed and use that for things like setting body height and position, maybe speed, maybe back forwardā€¦

You are using the remote controls 16 button keypad for things. I am thinking to start off with, I might cheat with a 12 button keypad mounted on Robot. Again if fix my screw up of which Qwiic connector is on the board, you can simply plug in one of these:

Your code also sends strings back to remote to displayā€¦ Again I will optionally install a small QWIIC display on robot to display things: I already have the Adafruit version:

And arriving Monday I have a larger 128x128:

Again these all will be optional. The initial code can see if these devices exist and use them else notā€¦

But Zenta, again wondering if you have had thoughts on the best mapping of axis, buttons and the like that would work reasonably well for you?

Doing this exercise now makes it easier to come up with a standard setup, while we get a better understanding of how to use the LSS servos.

Also gives times for those here who wish to revise/rework/rewrite the code, to for example change the coordinate systems and the like.

Hope some of this makes some sense?
Kurt

2 Likes

Hi Kurt,

Going for a standard PS4 remote is probably the easiest way to make it available for most people. Or maybe the phone/app Madmax posted about, using bluetooth (would be fun to play and test out one day).

My preferable way to control a hex is to use 3-axis joysticks. 2 axis work to though but you loose some abilities.
By default Iā€™m using the left joystick to control walking: up/down = forward/backward, left/right = walk sideways, 3.axis top pot = turning.
At the same time I can by default use the right joystick for rotation along all 3 axis: up/down = pitch, right/left = roll, 3.axis top pot = yaw.
In an additional function I can control translation with either the left or right joystick depending on what combination of motion I want.
Iā€™m using the keypad to choose between the walking gaits 1-4, and selecting leg lift height (A-D). Iā€™m also using the keypad for other functions, but some buttons are vacant, so a 12 button keypad should be ok too. On Morphex Iā€™m using all buttons, but that is a very different beast to controlā€¦
The additional 8 knobs Iā€™m using them for selecting different modes and functions. Like Terrain mode, different balance mode, some experimental stuff, joystick functions (left stick: walking/translation, right stick: rotation/translation), select single leg mode, canā€™t recall all right now. Iā€™m using 4 slider pots with a centering lock, two for different speed/timing settings and one for setting a fixed initial body height and one for forward/backward translation.

When decided what kind of remote to go for we can then agree how to map the buttons I think.

3 Likes

Thanks @zenta

I am figuring on standardizing on PS4 with probable support for PS3.

I have one Sony PS4 that my PJRC friend and usual cohort in crime have code to work with these on T3.6 and T4.x. So far I have only tested on Sony brand ones. We have done several PS3 clones.

So I just ordered a couple of PS4 clones from Amazon, which should arrive next week. Will see if our code will connect to them or not or if I will need to do some more reverse engineering.

For sure will not have as many axis we can control simultaneously, but my guess is we will be able to do a lot with the 2 2axis ones plus the L2/R2 buttons which are more analog, plus maybe with the tilt and rotate of the controller itselfā€¦

1 Like

As far as I can remember, once the ĀµCā€™s UART is initialized it is never changed (i.e. its pins stay the same). The only change I know of would be the tri-state buffers (2, one on TX, one on RX) turning on and off its output (i.e. matching the external line and MCU pin together or not.

I think the easiest way to see if something weird is happening with that TX line would be to connect the logic analyzer on both sides of the signal (MCU<>buffer side and buffer<>bus side) and see if it is different. At a high enough sample rate I should be able to see both the issue youā€™ve seen and also the difference in transition between the two sides (maybe?)ā€¦ Not sure how Iā€™ll attach that thoughā€¦ :thinking:

What about those cheap wireless Switch controllers (act as XBox360 clones when wired) ones? Iā€™m just asking, heuā€¦ for a friend! :smiley: :sweat_smile:

About a year and a half ago, some cohorts and myself up on PJRC played some with getting a Switch clone to work. I donā€™t think we ever completed it.

More information up on the PJRC forum thread starting at: https://forum.pjrc.com/threads/49358-T3-6-USB-Host-Bluetooth?p=224767&viewfull=1#post224767

Our USB host code especially the Bluetooth stuff was done by us (mostly me) listening to the USB packets that were sent and received and then try to figure out which packets we needed to listen too and understand and which responses we needed to give backā€¦

The BT spec I have is over 2800 pages long and we only scratched as much of it as we needed to. We were able to get several BT Mike, Keyboards, joysticks to work, using mostly (HCI and L2CAP parts). However some of them, use some higher level protocols, like SDP and ā€¦ We were in the process of figuring out how much we needed to implement to get some of these to work, and then other things grabbed our attention, like T4.x development, support for plug in drivesā€¦

But sometime we will likely get back to them.

But as I mentioned I and now friend up on PJRC both ordered cheap PS4 controllers like:


Which should arrive Mid week.
I also ordered a second clone:
https://smile.amazon.com/gp/product/B08ZHFM4B5
Hopefully these will work without needing code changes But, I would not be surprised at a minimum may have to add
some detection stuff for them.
1 Like

But as I mentioned I and now friend up on PJRC both ordered cheap PS4 controllers likeā€¦

Yep - I am the other guy that ordered the TERIOS PS4 controller. Looks like it will get here tomorrow for testing.

However some of them, use some higher level protocols, like SDP and ā€¦ We were in the process of figuring out how much we needed to implement to get some of these to work, and then other things grabbed our attention, like T4.x development, support for plug in drivesā€¦

If I remember right controllers that we tested with the issue with SDP were the XBOX360 (works wired) and the Switchā€¦ but its been awhile since we played with these.

kurte - Regarding the LSS servoā€™s I have the KitchenSink board on order from PCBway and have a order in for one of the HSS servos and a couple of other parts - probably should have gotten 2 servos. DigiKey has the order for all the piece parts so hopefully by the end of next week I can start playing. Seems like I have a lot of catching up to do on the thread.

2 Likes

Hi @cyberpalin - Yep looks like we will have our hands full with the controllers again :smiley:

Kitchen sink is the one I have done but not assembled any, may make a few more changes and order new set:


It still has TTL translations for the servos, and I still have two others, which I did not setup to use with XBee as both Teensy and XBee are 3.3vā€¦ But the ones labeled 24* and 25* are the ones that were translated. For most part I probably wonā€™t use the XBee most of the timeā€¦ But USB and maybe try out the RC on those pins. I decided on those two pins as, they can be a hardware USART and likewise I2Cā€¦ So could try doing some LEDS (DotStar I think)ā€¦

On the servos, one of the main pages I refer to is:


There are also pages on the electrical, mechanical and the like you can easily navigate to as well.

@kurte - yep was just going through the wiki a little while ago. Actually printed a copy of the protocol to read over coffee.

Now just have to wait for parts to come in and then familiarize myself with the protocol. Probably start with 1 servo then go to 2 just to see the differences.

1 Like

@cyberpalin Welcome back to the community! kurte indicates youā€™re interested in the Hexapod BETA and it would be great to have you on. If youā€™d like us to add you to the BETA GitHub, you can PM me with your contact and weā€™ll add you.

1 Like

Hi @zenta and all:

First with Phone appā€¦ Not sure of what all in the bluetooth code we would need to talk to something like that.

I thought I would mention, I just pushed up a WIP non-building version of your code (actually just the part with your code builds).

What I have done so far, is to rename most of the .h files to be .cpp files. They were .h files when they were in Arduino libraries as a way to be able to be able to compile the code and have that build influenced by the contents of a header file, like hex_cfg.h But right now all files building in same directory so it makes it easier to cleanup some things (like knowing the inter-dependencies)

I so far made the Controller class to be a pure virtual class, and then created a sub-class of your version of it. So far I left that in the main header file. And most all of the globals in that source file as globalsā€¦

I then made it buildableā€¦

Then copied your controller class to a new class for USB/BT PSx Joysticks, and put the class definition in a .h file and the code into a .cpp file. I then moved most of the global variables for the controller to be member variables of that classā€¦ Had that buildingā€¦

But now I am removing the commander code and added USB/BT code plus (optional Sparkfun keypad) and I am in the process of a preliminary mapping of some of the functionality to what controls I have (buttons, Axis)ā€¦

I am not done with that part yet so compile fails where it is still mapping to your controls, but making some progress.

Then I will probably hook this up to a PhantomX and see if it moves at allā€¦

Then will do similar to Motor controller code and create sub-classes for different typesā€¦ Not hard, the code was mostly that, just you only had one sub-class and it assumed thisā€¦

Hope some of this makes some senseā€¦

Now back to playing

1 Like

Great!
What BT adapter do you use on the T4.1 or do you use USB cable from the controller directly.

Iā€™m still waiting for the board, Iā€™ll get back to see if there is some testing I can do.
Itā€™s mostly the servo library stuff I struggle with.
Looking forward to hear if it movesā€¦

1 Like

There is a list of bluetooth devices and the like we have tested in the first posting of this thread up on PJRC:


Most of the cheap ones work well.

We can also plug them in directly: Some more information is up on the thread: https://forum.pjrc.com/threads/49099-T3-6-USB-Host-Joysticks

As I mentioned, I ordered a couple of PS4 clones which are a lot cheaper. They have not arrived, but @cyberpalin ( mjs513 of PJRC forum) received one of them and looks like the two of us will be busy figuring out how to get it to bind.

Thanks, Iā€™ve ordred some of the CSR 4.0ā€™s.

I finally got the board too!
Nice board btw!
@kurte did you post the pcb file somewhere, itā€™s convenient to use Diptrace to get an overview of every connections. This thread start to get a bit overwhelming and itā€™s hard to get all info.
Also it would be nice to know how to connect everything correctly.

  1. Cut the USB trace on the T4.1 , just place a jumper on J5V if you want to power the T4.1 through USB, right?
  2. Solder 7-center on J9SEL to make XBee on the LSS board work?
  3. The 3-pos switch on the LSS board, I assume you use the Arduino position?
  4. The cell batt on bottom I assume isnā€™t necessary at the moment?
  5. Are there other jumper settings I need to be aware of on both boards?
  6. Where do I find the current test program?

Iā€™m sorry, but currently my brain is occupied with lots of other things in life so I just need it simple to start with. (Sidenote: A couple of months ago my doctor said I got a disease that will probably last for a couple of years, Iā€™m ok but sometimes not everything is as it should.)

4 Likes

Hi allā€¦

I donā€™t think it requires any extensive knowledge of the stack. The phone pairs to BT dongle and the communication happens through Serial Profile protocol so its pretty much serial communication just over BT. I still have to play with it a fair bit moreā€¦

Niceā€¦!! that is the company I used to work for (Cambridge Silicon Radio)

I agreeā€¦ I have started putting up some info on a word doc for my own reference. I think it might be worth it if we start having some shared wiki or someplace with just useful infoā€¦ guides etcā€¦ so that anyone starting off has the knowhow of necessary thingsā€¦

oohā€¦ I hope everything is fineā€¦ Do take care!! If you need any helpā€¦ feel free to ask!

I should have the break out board tomorrow or by Friday at the leastā€¦ :grinning:

2 Likes

Good idea, would certainly be easier to follow the most important steps. And what to do and notā€¦

Cool.

Thanks! No worries. It just make it a bit hard to concentrate sometimes.

:+1: Great!

2 Likes