Simulator rig with ODrive

Hi,

LFS plugin:
https://www.xsimulator.net/community/marketplace/live-for-speed-plugin.29/

Think about, that xsim has no output for 6dof sims. You have to do the math!
Look at this:

Greetings / Zennix

Hi

Yes It know, my FlyPT is set up but the standard commands are [p 0 ], but you used p 0 <13>, do I need to change this?

I canā€™t download the lfs plugin

Cheers

Carelsbergh Stijn

Hi,

ODrive recongnises the end of the command with a CR sign (ASCII 13).
After receiving <13> the command will be executed.

Greetings / Zennix

You have to be logged in to xsimulators to get the LFS plugin.

Hi Zennix,

I have a question about the interaction between Simtools and Odrive. Maybe you can help ?:
How do you set that 100% travel in Simtools also corresponds to the total stroke length of the Akutators? Although I have read the manual of Simtools, I can not find a suitable way.
In my experiments with Simtools my actuator moves only about +/- 5 cm even with high driving forces. But my actuator could drive at least +/- 20 cm.
Actually, Iā€™m looking for a way to say Simtools: 100% setting should correspond with +/- 250000 counts of the actuator in Odrive.
Thank you in advance!!
Wickie

Without changing any code on the odrive, you defined how far it can move with the output - bit range drop down menu.

Odrive takes each number from simtools as an encoder pulse.
If you set the output range to 19 bit like Zennix posted above, then you have 2^19 pulses of travel or 524,288.

If youā€™re using the AMT102 at its max resolution of 8192 pulses per revolution then you can twist the ball screw 64 times. If youā€™re using 1605 ball screws thats 5mm of movement per rev. Max travel would be 32cm.

Here is a table of distance possible with different bit ranges.
image

So set your bit range to a value that exceeds your travel, then use the simtools % drop down in axis assignments to limit the travel to match your rig.

As a warning: if you need to limit the % of your axis a great deal (because you for instance have 17cm of travel and use the table above) than it might make more sense for you to change the encoder pulse per revolution (PPR) to come up with a better axis %. This is because when you reduce the % travel of an axis, you effectively reduce the resolution coming out of simtools. The AMT102 encoder has dip switches inside that allow you to change the PPR, the values are explained on its data sheet.

Hope that makes sense.

1 Like

Hi cfischer,
thank you so much for your detailed answer!
It works perfect! I just need to optimize the values a bit.
kind regards
Wickie

Hi Zennix!
I have a question regarding your PSU. You wrote you had to modify the grounds. .otherwise ā€œbang!ā€ā€¦
Now I had a kind of ā€œbangā€ with my brake resistorsā€¦ but it was more an overheating within seconds!..and now my home is smelling like I had burned some kg of electroni cā€¦ :grinning: :scream:
I tried to use two PSUs in serial to get 24V for my sim. I bought the PSUs from a person that allways used them in serial configuration. And also my voltmeter says something around 30Vā€¦
I assume you have some knowledge with PSUs and with Odriveā€¦and maybe you have a hint what was wrong or what could I try?
Wetmelon said on discord only thats strangeā€¦
Thanks
Wickie

Hi Wickie,
It s easy to measure. If your output GND is connected to your PSU housing you can t connect the PSUs serial, because you have a shortcut between the two PSUs over the protective earth line of the power cords. And it`s not a good idea to disconnect the PE Line of the power cord.

Have a look to this for further information.
https://www.rcgroups.com/forums/showthread.php?1750411-Converting-Dell-7000814-Server-Power-Supplies
Greetings / Zennix

Hi Zennix
thanks a lot for your fast response!
I was able to find the problem with help of the guy from insecta tech.
The problem was, that I switched on one PSU after another and so the firmware wasnt able to calibrate the brake resistors correctly.
Now the PSUs work.
Thanks!
What about your plans to make a 6DOF sim?
Wickie

the new Odrive firmware (0.5.1) use turns instead of encoder counters, how are you guys passing the position now?