Arduino Open Source X-PID firmware incl.360°option

AMC, H-Bridge projects etc.
Please use the image gallery for your pictures, a short tutorial can be found here.
The first image in the first post will be shown in the project gallery.

Re: Arduino Open Source X-PID firmware incl.360°option

Postby Bergison » Tue 11. Dec 2018, 11:29

Hi sirnoname + everyone!

I use your great X-PID script with 2x Arduino r3 and 2x Sabertooth 2X32 to control 3 brushed DC motors, 120W each. Everything works fine with one exeption: Sometimes the motors follow the input exactly and sometimes, they just freeze in their current position (don't follow input signal any more) for some time, then suddenly start moving again:

4678

Can anybody PLEASE help me with this issue?
User avatar
Bergison
 
Posts: 39
Images: 20
Joined: Wed 6. Nov 2013, 20:37
Location: Austria
Has thanked: 0 time
Been thanked: 9 times

Re: Arduino Open Source X-PID firmware incl.360°option

Postby sirnoname » Tue 11. Dec 2018, 19:36

Hi, I can only tell you that this is uncommon and shall not happen. Maybe the signals do not reach your bridge. So check it with a osci.
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times

Re: Arduino Open Source X-PID firmware incl.360°option

Postby Bergison » Tue 11. Dec 2018, 21:23

Thank you for your quick reply sirnoname, your help is much appreciated!
I don't have an osci, oscilloscope I suppose? (And if I had, I would'nt know how too use it, sorry :oops: ).

The strange thing is that everything works perfectly for some minutes, then this "stops" happen. Like as if something was overheating...? The Sabertooths (fan cooled) don't even get warm, neither do the motors. Cables from batteries are short and thick enough. I also tried different PID and power-offset settings - no change.

Could it be some wrong USB settings on the PC side maybe? (baud or something?)

Many thanks in advance for any suggestion - I'm really stuck!
User avatar
Bergison
 
Posts: 39
Images: 20
Joined: Wed 6. Nov 2013, 20:37
Location: Austria
Has thanked: 0 time
Been thanked: 9 times

Re: Arduino Open Source X-PID firmware incl.360°option

Postby asticher » Mon 1. Apr 2019, 00:33

Heads UP Pilots!
This Export.lua for DCS World works!
No more invertation @Pitch +/-90°! Also no Flip in Rollaxis while doing a Loop or so!

https://drive.google.com/open?id=1aEOug ... -S1ZP7Obx0

You can make forward / backward / inverted loops as you like,
For example, you can cancel the climb at 80° PitchUp,
You can even roll up at 90° pitch,
You can go up to 5 degrees off the track through the vertical,

And it works!

So now the Position Values should usable again for Motion Sim.
Have Fun!
"No Brain, No Pain"

3DOF 360° Full Motion Simulator with Valve Index, AMD Ryzen 7, 32GB mem; Gigabyte Board UHD; GTX2080; Samsung M.2 SSD; Thrustmaster Warthog with FFB; Saitek Pro Pedals, Lilliputs & TM MFDs, Body Shaker + 5.1,
User avatar
asticher
 
Posts: 102
Images: 20
Joined: Wed 5. Sep 2012, 20:18
Location: Germany near Munich
Has thanked: 6 times
Been thanked: 1 time

Re: Arduino Open Source X-PID firmware incl.360°option

Postby asticher » Tue 14. May 2019, 21:26

Bergison wrote:Thank you for your quick reply sirnoname, your help is much appreciated!
I don't have an osci, oscilloscope I suppose? (And if I had, I would'nt know how too use it, sorry :oops: ).

The strange thing is that everything works perfectly for some minutes, then this "stops" happen. Like as if something was overheating...? The Sabertooths (fan cooled) don't even get warm, neither do the motors. Cables from batteries are short and thick enough. I also tried different PID and power-offset settings - no change.

Could it be some wrong USB settings on the PC side maybe? (baud or something?)

Many thanks in advance for any suggestion - I'm really stuck!


Do you see a red or yellow Led on the sabertooth flashing (very short) ? If yes, too much Amps are drawn by the Actuators and the saber cuts off for a few seconds. But this doas not mean that the saber is getting hot!
"No Brain, No Pain"

3DOF 360° Full Motion Simulator with Valve Index, AMD Ryzen 7, 32GB mem; Gigabyte Board UHD; GTX2080; Samsung M.2 SSD; Thrustmaster Warthog with FFB; Saitek Pro Pedals, Lilliputs & TM MFDs, Body Shaker + 5.1,
User avatar
asticher
 
Posts: 102
Images: 20
Joined: Wed 5. Sep 2012, 20:18
Location: Germany near Munich
Has thanked: 6 times
Been thanked: 1 time

Re: Arduino Open Source X-PID firmware incl.360°option

Postby asticher » Tue 21. May 2019, 00:00

Hello Folks,

I have installed the latest XPID Sabertooth Firmeware with 360° option and use the dcs-plugin.
If the signal goas from 360° to 0°, there is a jerk: the motor stops for about 0.5sec,
then there is a spike in the opposite direction, then the motor follows the target signal normally again.

I can rule out that this is not caused by power supply, Sabertooth, Arduino, Poti, Motor/Gear,
X-Sim axis settings, game values or x-sim dcs plugin.
Here is a video (Com3, position 1):

https://drive.google.com/open?id=1gTqcD ... m4n0ZUgE1G

The error is hardly visible here, i.e. it is lowest with the standard PID values (4.5, 0.4, .04).
and only noticeable as a short pause.

- The error is not recognizable in dcs plugin...values are smooth and steady while going from 360 to 0 and back.
- Also i can´t see an delay in the blue target from the xpid software.

But with other PID values, e.g. 6.0, 1, 0, the spike in the opposite direction becomes so strong that the sabertooth switches off (LED flashes red).
Here at sec 21 you can see the error clearly:

https://youtu.be/KlALa_obfkc

When the axle is loaded with 220kg the effect squares and eveb with low PID values the whole system becomes unstable (runaways)!

- The error is only present in the transition if the signal is slow. At a roll rate of 30°/sec the error is nearly not present.

- The error occurs only in one signal direction! So from 360° to 0° everything is smooth. But not from 0° to 360°.


A simple solution would be to integrate a spike filter into the axis,
but then the 360° option will not work anymore (motor turns in opposite direction).
Same effect with smooth.

So i´m totally stuck. The Bug must be in the xpid software somewhere.
I´m really glad for any hint or help or maybe somebody who has the same problem.

Thank you all!
"No Brain, No Pain"

3DOF 360° Full Motion Simulator with Valve Index, AMD Ryzen 7, 32GB mem; Gigabyte Board UHD; GTX2080; Samsung M.2 SSD; Thrustmaster Warthog with FFB; Saitek Pro Pedals, Lilliputs & TM MFDs, Body Shaker + 5.1,
User avatar
asticher
 
Posts: 102
Images: 20
Joined: Wed 5. Sep 2012, 20:18
Location: Germany near Munich
Has thanked: 6 times
Been thanked: 1 time

Re: Arduino Open Source X-PID firmware incl.360°option

Postby asticher » Tue 21. May 2019, 00:01

double post
"No Brain, No Pain"

3DOF 360° Full Motion Simulator with Valve Index, AMD Ryzen 7, 32GB mem; Gigabyte Board UHD; GTX2080; Samsung M.2 SSD; Thrustmaster Warthog with FFB; Saitek Pro Pedals, Lilliputs & TM MFDs, Body Shaker + 5.1,
User avatar
asticher
 
Posts: 102
Images: 20
Joined: Wed 5. Sep 2012, 20:18
Location: Germany near Munich
Has thanked: 6 times
Been thanked: 1 time

Re: Arduino Open Source X-PID firmware incl.360°option

Postby wenfuyuan » Mon 12. Aug 2019, 09:38

i want to do this in this year
wenfuyuan
 
Posts: 4
Joined: Mon 12. Aug 2019, 07:58
Has thanked: 1 time
Been thanked: 0 time

Re: Arduino Open Source X-PID firmware incl.360°option

Postby AdolarRax » Fri 1. Apr 2022, 16:31

Greetings!
Nice project, I really like it! Althought I have a question about the whole project. Is it possible to add a third motor to the whole setup by writing an extra session for the third motor in the arduino programmer software. In that case, it would be possible to make the simulator fully turnable in any direction. :roll:
AdolarRax
 
Posts: 6
Joined: Thu 13. May 2021, 10:08
Has thanked: 0 time
Been thanked: 0 time

Re: Arduino Open Source X-PID firmware incl.360°option

Postby AdolarRax » Fri 1. Apr 2022, 16:33

Greetings!
Nice project, I really like it! Althought I have a question about the whole project. Is it possible to add a third motor to the whole setup by writing an extra session for the third motor in the arduino programmer software. In that case, it would be possible to make the simulator fully turnable in any direction. :roll:
AdolarRax
 
Posts: 6
Joined: Thu 13. May 2021, 10:08
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to Controllers and Drivers Projects

Who is online

Users browsing this forum: No registered users and 2 guests