6DOF motion platform using ODrive

Hi Peter,
thats really great that you made it. :+1:
You are now half the way up the “software mountain” :smile:

The master brunch has some issues if you try to use the serial command interface like we have to. Also it didn’t support end switches.
The branch with end switch support comes from wetmelon and is located here:

How to use it:

I downloaded the latest version and did the fixes for you.
https://drive.google.com/open?id=1b2WYRTOQo2q_YkLEMp9Keae1whARR3hz

Greetings / Zennix

1 Like

Hi Zennix!
thank you so much for your help and efforts! I appreciate this very much!
I imediately flashed your custom made firmware and it works so far, but I have some errors codes I have to check for the next days.

I am not sure how to connect the end switches to the Odrive. I think the connection has to be made from GPIO Pin 8 to GPIO Ground or any voltage pin?

Do I need the switches for the startup procedure or can I test your firmware without switches (maybe temporary disable the switch in via the config?
best greetings!
Peter W.

Hi Peter,
there are a lot of additional settings through the ODrive Tool. Please have a look to the thread I have shown in my last answer.
You have two switches per axis. So you will need 4 GPIs for two axis. You have to enable the endswitches otherwise it’s like a normal branch firmware.
I have my switches active low, means switches GND to the GPI but you can define it in the settings too. I had some debouncing, therefore I connected some caps between the GPIs and GND. Described all in the upper thread.
Greetings / Zennix

Hi Zennix,

Today I studied the Odrive-commands that are given in the Odrive documentation and I made a summary In order to get a better understanding for building of the commands:
please have a look (still in progress…):

But I found that a lot of commands and settings shown in the firmware are not explained or shown in the Odrive documentation. So its difficult for me to optimise the firmware for my system without having a detailed understanding of the commands !
what to do!!!

I changed some settings in your firmware, but I am not able to get the Odrive running with the firmware. Now there is an error shown, that I can´t find in the troubleshooting. It is error = 0x0040
please have a look:
Fehler%200x0040

Kind regards
Peter W.

1 Like

Hi Peter, nice job with the spreadsheet, for us with little experience in this stuff, maybe it will make using and experimenting a bit clearer.

“I’m having a stab here” do you think it could be related to an encoder error?

  • ERROR_NO_RESPONSE = 0x04

Confirm that your encoder is plugged into the right pins on the odrive board.

However, You’ve probably checked that already.

Regards Jerry.

Hi Peter,
I gave you the latest build of the endstop firmware. I have a version running from september last year.
https://drive.google.com/open?id=1lOZ5YWdu3BavNJusFNKw6GGAO-fryOhN
You can try this. But I have made some settings inside the firmware, so I didn’t have to make it after every flash progress.
The changes are as follow:

axis config:
startup_motor_calibration = true; //<! run motor calibration at startup, skip otherwise
startup_encoder_index_search = true; //<! run encoder index search after startup, skip otherwise
// this only has an effect if encoder.config.use_index is also true
startup_encoder_offset_calibration = true; //<! run encoder offset calibration after startup, skip otherwise
startup_closed_loop_control = false; //<! enable closed loop control after calibration/startup
startup_sensorless_control = false; //<! enable sensorless control after calibration/startup
startup_homing = false; //<! enable homing after calibration/startup
enable_step_dir = false; //<! enable step/dir input after calibration

encoder config
use_index = true;

motor config
current_lim = 30.0f; //[A]

controller config
vel_limit = 50000.0f; // [counts/s]
homing_speed = 4000.0f; // [counts/s]

As we have the same config, so you can use it as it is. Maybe the current and the vel_limit is to high for testing. With your encoder you can use index search as well.
Normally your settings are kept after a flash but you should know that the default settings has changed.

Thanks for your spreadsheet.
You should add the vel_limit. It limits the rotation speed of your motor.
And save_config.

Greetings / Zennix

Hi Jerry,
nice to see you here in the thread and thank you for your hint.

Because I didnt change the connection between the encoder and the Odrive and it was running before, the source for the error had to come from anything other .
greetings
Peter W.

Hi Zennix!
Thanks again for your great support!!
Today I flashed the new firmware you gave me today. I changed the configurations acording to your proposal, but nothing worked…
But I allways set my counts per revolution “cpr” to 800 and the encorder.switches to 200 PPR (I thought it is ok) and now I changed it to 8192 (odrv0.axis1.encoder.config.cpr = 8192).

And…Bang!! :bomb::boom:…now everything is working (nearly) perfect!
Maybe this was the issue.
My Odrive now follows the pos_setpoint command and if I want to turn the motor by hand he resists…really cool :sunglasses:

Regarding the spreadsheet: It is only a draft and I did´nt test all commands. My aim is to make an easy to use and common understandable spreadsheet with all the main commands. When it is finished I want to share the file with the community in order to help other newbie like me.

greetings
Peter W.

Hi Zennix!

Now I made the “interface settings” in the Sim Tools Game Engine:

And my Odrive is connected to COM 5:
Ger%C3%A4te-Manager

I tried to sent commands from Sim Tools to the Ordive with help of the “Output Testing” - but the Motor doesn´t respond.

What I dont understand is:
Do I have to set the output type to

  • DOF Output,
  • (a) axis output, or
  • (b) axis output?
    I Tryed them all, but no response of the Motor (note: my Motor is connected to the M1 side of the Odrive)

You wrote about an issue with the ASCII protocol, but I dont really understand what you say and where to find the ascii_protocoll.cpp

Now at the end of the day……I honestly wonder if controlling my simulator with Odrive is not too difficult for me as a Software-beginner.
Every time I solve one problem, a new one emerges that I can not solve myself.
Please be honest … does that make sense?
I also have a bad conscience to have to ask you over and over again how it goes on.

Hmmmm……

greetings
Peter W.

Good morning Peter,

you are really close to the end of the tunnel. You wrote that you use M1, why do you drive M0 with game engine? :grin:
Try: p 1 32767<13>

If you want to see movements only for one axis, try LFS.
You can see, that sway is connected to Axis1a, so you have to write in the second line of game engine:
p 1 <Axis1a> <13>.

If you are not sure where your problem is, try this:

I clicked a little app together to get a better test. You need dot net 4.6.1 to run it.
https://drive.google.com/open?id=1kKuIi_Zo5Npc25uD6jVV-5sX5PyVmX6X
grafik

To your ASCII issue. In the firmware I sent you, I removed the bug. To this, you cannot use parameter w and r in ODrive tool anymore, but as sim rig user you will not need it.

As I told you before, ODrive is not a out of the box product. You can go and buy a ready build sim rig for thousands and thousands of €. Or you can go the stoney way and do it by yourself. We are the first people who build a sim rig with ODrive. I found nobody doing this before. So its a development process with up and downs.
During my project, I often come to a point that I thought there is no solution for my problem. But after digging and help of the community, it goes further and further, sometimes in small steps but it moves. I wait 6 weeks for the endstop firmware, without any progress.
You are in the lucky situation that somebody (me :laughing:) allready has a running configuration. You can be sure, that your project will be supported to 100%.

Greetings / Zennix

1 Like

Hi Zennix,

Thank you for your nice words and your help !!!
I changed the settings in Sim Tools and it worked at the first try.!!!
Now I’m confident again :smiley:

You asked:"…why do you drive M0…"? …… thats because I dont understand chinese :rofl:
…but every day I get a little closer to mount midoriyama :rofl:

I think time has come now shaping that crazy actuator out from the lump of metal

warm regards

Peter W.

Hi all!
After some weeks of silence I want to share some news about my Project.
Yesterday I finished the last main parts for the prototype and did a
first assembly for first tests - and what can I say…so far
everything is working like expected.
The internal pneumatik-cylinder-System is tight and can be pressurised
by a simple bike-pump. So later the permanent load of the platform plus
person can be compensated to zero.
I did some first runs with my extremely weak 12V, 4 A power suply and
the actuator is running. Of course not as fast as with the future 36 V
supply.
The next steps will be to add the end-switches and to buy 3
car-batteries (connected in series) that will be my future power-supply.
Then I will push the actuator to its limits :smiley:
Here are some impressions….

warm regards Peter

2 Likes

Hi Wicki,

nice to hear and see your progress. Thats a really good idea to use it like an air spring.
Are the two bearings tight enough that you don’t lose the pressure?

Greetings / Zennix

Hi Zennix !
The bearings would not be airtight enough. I use a special radial shaft seal. Please see:

Kind regards
Peter W.

Hi all!
I just linked a short video of the first test of my actuator prototype running with the simtools game engine.
regards Peter

Hi Wickie, great work, and like no other.

This is fantastic!!!

Regards Jerry. :star_struck:

Hi all!
Because yesterday the speed of the actuator was verry low, today I changed from my 4A, 12V Power supply to a small Lipo-Battery with 11,1V. It can provide much more Amps.
So I set the vel_limit to 120000 and…look at this:

I also tryed a vel_limit of 200000, but its so crazy fast and too dangerous without endswitches.

Just imagine how it will work with 36V and high Amp Batteries !!! so crazy :scream::scream::scream:

@Jerry and Zennix: Thanks for your nice words

warm regards
Peter

Hi all!

Here is a small actuator-test, I made together with my son. It ended verry funny…, so please dont take it too serious and make sound on for the AC-DC-test :rofl:

The serious part of the information: We made it with my two 1000mAh , 11,1V lipos in series (to get aprox. 22V). The vel_limit was set to 250000. The internal air spring was pressurized a little.

It was amazing to see, the speed didnt change no matter how hard he tried to get load on it.

kind regards

Peter

1 Like

Hi all!

The next video shows the effect of the internal air spring after switching off the Odrive. The force of the airspring turnes the motor back:

But later in the 6DOF motion-platform the forces will be balanced by the weight of the platform and the actuator will not move much after switching off.

regards

Peter

hi

first of all, great work!

I tought you wrote some kind of plan on what steps you needed to do to get the system working, but I can’t find it, can you send the link or something?

Have you measured the force of one actuator?

keep up the good work!

cheers

Carelsbergh Stijn