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 asticher » Wed 2. Dec 2015, 13:34

Hello again!

thanks to Sirnoname all problems has been solved and the first 360° fullturn axis ist working now like a charme.
A Airrace Event with 20min max-power movments was no Problem at all.
Here
viewtopic.php?f=37&t=1890
you find all detailed Informations to this project.

Now building of the second 360° Axis (Pitch) is on going.
"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 » Wed 13. Jan 2016, 01:53

Update: Warthog FFB System with X-PID is finished.
https://dl.dropboxusercontent.com/u/110 ... og-FFB.mp4
I added a small PDF overview also.
First of all, i don´t use any existing FFB Stick/System.
I just like to "pimp" my Warthog HOTAS Stick (no FFB).
Therefor i only fasten four springs on the bottom Part of the Stick.
This springs are connected via cables to 2x Worm geared DC Motors.
There is no other way to do so, because i like to have ~13kg (130Nm) max. force on the Stick!
This would break any internal Stick solution.

Then X-Sim/X-Pid comes along witch creates the FFB Signal out of the DCS lua vectors (roll acc, pitch acc, X/Y acc, Speed, ...). Then sending the FFB Signal to Arduino Uno and from there to Sabertooth 2x15.
The 2x12Amp are more then enough to preload the Springs with the two DC Motors.
This means, that i only creat a Center Force!
So there is no manuel trim function (like in real).
However the Centerforce is very dynamic and strong and it´s already more realistic then the G940/MS Flightstick!

Just one problem is left: How to i connect two arduinos at the same time in x-sim? Both Arduino UNO have different Com-Ports and ino upload via arduion software works. But in X-Sim i got the Message "Falscher Parameter" if i connect the second Arduiono Interface. In the Interface section only 2 Interface, instead of four popping up. Thanks for any help!
Attachments
Skizze-Warthog-FFB-Forcefeedback.pdf
(304.62 KiB) Downloaded 901 times
Last edited by asticher on Mon 29. Feb 2016, 15:57, edited 1 time in total.
"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 » Sun 31. Jan 2016, 01:06

Some report about the arduinos:
With the old arduino dll (version 1.4 on page 1) it´s not possible to use two arduinos at the same time. Only the dll (test3.zip) in this thread:
viewtopic.php?f=79&t=309&start=80
works with two and more!

Update:
Pictures of Warthog Force Feedback System and completed AcesII seat replica:
viewtopic.php?f=37&t=1890&p=19339#p19339
"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 » Thu 12. May 2016, 15:26

Folks!
i´ve got a problem with the LUA Export!!!
i use this values to get the Bank rate out of DCS:

local pitch, bank, yaw = LoGetADIPitchBankYaw()
local vel = LoGetVerticalVelocity()

This works.
But if i pitch up the Aircraft 90° the Bankaxis flips suddenly to 180° and i´m turning upsidedown in my Pit!
This is the same behavior as the artificial horizont instrument in the aircraft doas.
No someone told me the i have to do this calc:
FinalBank = cosin(pitch) * Bank
But i don´t now how to to this in the X-SIM Math Section!

Help!!!
"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 sirnoname » Thu 12. May 2016, 18:35

You can write own math plugins with the source code in the other stuff directory.
Simple change the lines and use the free visual studio 2015 community edition to compile it again.
http://www.x-sim.de/manual/math_plugin.html
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 7733star » Fri 3. Jun 2016, 05:15

I have a question about my simulator function. I am having a problem where the rotation of my motor connected to my pot sometimes goes past the 0 or 5 volt position. The position pot overruns the min and max position. I built a desktop version as described in this forum and everything works fine except this situation. I am using carbon pots geared to use the full rotation of the pot. Maybe someone could give me some help with understanding why this is happening. I have searched the forums but could not find anything. Thanks the everyone for there help and understanding.
7733star
 
Posts: 17
Joined: Tue 13. Aug 2013, 05:41
Has thanked: 0 time
Been thanked: 0 time

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

Postby sirnoname » Fri 3. Jun 2016, 07:15

You must setup your PID values acording to your motor.
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 7733star » Fri 3. Jun 2016, 18:58

Thank you sirnoname. I am learning this stuff on the fly and do not have much experience with programing but I would like to understand on my own. If you could give me a few hints on setting up the PID and where to start that would really help. Thanks again.
7733star
 
Posts: 17
Joined: Tue 13. Aug 2013, 05:41
Has thanked: 0 time
Been thanked: 0 time

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

Postby sirnoname » Sat 4. Jun 2016, 12:53

PID tuning is part of this tutorial.
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 asticher » Sat 4. Jun 2016, 22:53

7733star wrote:Thank you sirnoname. I am learning this stuff on the fly and do not have much experience with programing but I would like to understand on my own. If you could give me a few hints on setting up the PID and where to start that would really help. Thanks again.


I had prob. a similar problem.
When my pot runs from +5 to 0V the accuator changes direction for very short time. No gearbox on the analogue pot, stable 4.99V on pot and arduino. I found out that it get´s better if you manualy set the min. and max. analogue value of the feedback in the xpid firmeware setup dialog. This must be done very accurate (values always jiggle a bit - take the max value) and it should only limit a small amount. Also you have to set the PID (Proportional, Integral, Derivative) Values first, because they are extending or limiting your input values in relation to the output signal.
If this is rubish please correct!
"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

PreviousNext

Return to Controllers and Drivers Projects

Who is online

Users browsing this forum: No registered users and 3 guests

cron