Jump to content

Oakes combined cockpit build thread


Oakes

Recommended Posts

  • Replies 214
  • Created
  • Last Reply

Top Posters In This Topic

I am awfully jealous on that machine!

 

Hope you will get a good result with the OpenCockpits cards. The update-rate are far from perfect in our simulators, but it could be due to SIOC running on a different computer and talking to FSX over WideFS.

 

One thing to think about regarding the servo cards is that they output a pulse that goes from almost 0 ms up to 2 ms in width. That menas that a lot of the available resolution is lost in a region that most servos can't use. See if you can find out what pulse-widths the servos use before buying, or else you can forget about that 10-bit resolution because most servos use a pulse-width from 1 ms for one direction to 2 ms for the other direction.

Digital-to-Synchro converter for interfacing real aircraft instruments - Thread

 

Check out my High Input Count Joystick Controller for cockpit builders, with support for 248 switches, 2 POV hats and 13 analog axes. Over 60 units sold. - B256A13

 

www.novelair.com - The world's most realistic flight simulators of the J35J Draken and the AJS37 Viggen.

Link to comment
Share on other sites

export.lua debugging and optimising ... continuing

 

some more results from frog eaters country

 

tNext = tNext + 0.1 give him 20 fps

tNext = tNext + 0.2 give him 36 fps

tNext = tNext + 0.3 give him 40 fps,

for delta tNext = 0.2 and 0.3, response time after first clic is very long, but after that it is ok, therefore 0.2 seems to be a good compromise on a rig with not the best CPU

 

@ Gadroc : the comment / uncommented lines for debug output don't interfere with fps.

 

And Happy Christmas to all the people here : switch off your PC, forgot your pit and codes, and go to your families for some times... the web will stay there while you are out lol... that is what I will do...


Edited by C6_Hellfrog
Link to comment
Share on other sites

For what it's worth google around there are more than enough sites to give you DIY CNC design ideas, you could probly bring a project like that home minus the motors for the stages for around $100 USD.

 

How can you make DIY CNC parts for $100 when the CNC costs $20,000? Id certainly be interested.

Intel i7 990X, 6GB DDR3, Nvidia GTX 470 x2 SLI, Win 7 x64

http://picasaweb.google.com/sweinhart

Link to comment
Share on other sites

How can you make DIY CNC parts for $100 when the CNC costs $20,000? Id certainly be interested.

 

He means that you can build your own CNC-machine for $100 :-)

Digital-to-Synchro converter for interfacing real aircraft instruments - Thread

 

Check out my High Input Count Joystick Controller for cockpit builders, with support for 248 switches, 2 POV hats and 13 analog axes. Over 60 units sold. - B256A13

 

www.novelair.com - The world's most realistic flight simulators of the J35J Draken and the AJS37 Viggen.

Link to comment
Share on other sites

I'm building a CNC now (to later be used to make an A-10C pit). $100 is a low estimate to build your own, but the cost is still not unreachable and a world away from buying a commercial machine. The driver board alone will cost you $60-80 assuming you get a 3-axis board like the ones available through HobbyCNC. The 3 stepper motors will cost you $25 to 40 each. An 8x4 sheet of MDF goes for 25 bucks at lowes. The aluminum angle is the most expensive material on my machine, about 18 to 30 bucks for each piece, and I needed 5. You'll need a bunch of skate bearings, about 20 to 30 bucks. The hardware will probably add up to another 25 to 30 bucks (1/4"-20 screws, nuts, washers, 5/16" bolts, nuts, etc.). Then you need to consider that you will NOT want to use your main computer as your CNC machine, and many of us don't have a second machine. Even if you did, many of us no longer have a motherboard with an LPT port, which you will need. You can use EMC2 and free or trial CADCAM software, but if you want to run Mach3 and solidworks, for example, there's another $150 to $300 for software alone.

 

Long story short, unless you already have a lot of the materials, or are frugal in your purchases to the point of significantly sacrificing quality in your build, you should budget closer to $500 with the expectation that you probably won't need to use it all. But, at least you won't be shocked when you blow through that first $100 VERY quickly. Still a lot better than a $7,000 machine pre-built :-), and it will pay for itself many times over with the things you can make (and sell).

 

Disclaimer: I'm NOT saying that a machine can't be built for $100, as I'm sure someone will say "I did it", I'm just relaying my experiences in my current build. Also, I'm a beginner to CNC, not an expert - this will be my first machine.

Link to comment
Share on other sites

Hi,

may I ask which card do you plan to use to drive instruments/gauges servomotors? You likes to use Futaba servos?

Or is just a LUA interface enough?

THX

cmeliak


Edited by cmeliak

Steel Hotas Warthog + Hoffmans F16 rudders, Oculus Rift S, EVGA RTX3090, Core i7 4790K

Hangar: Ka50, A10C, A10A, A10CII, SU27, SU33, SU25, Av8BNA, Bf109K4, F16C, F86, FA18C, FW190D9, i-16, L39C, Mi8, MiG15, MiG19P, MiG21, P51D, Spitfire, SuperCarrier, Yak52, P47, F14, Mi24P, Me262?

Flying over CAU, NEV, NORM, SYR, CHNL, PER, ATL

Link to comment
Share on other sites

  • 2 weeks later...

question about export.lua upgrading for touchPAL and SIOC

 

hi to all working people here, and happy new year !

 

has anyone be able to do something with that part of clickabledata.lua ?

 

about levers and rotators

 

LOCALIZE("ABRIS Brightness"),

elements["ABRIS_BRIGHTNESS_PTR"]

{class_type.LEV}

action = {device_commands.Button_8},

arg = {517}, arg_value = {0.05}, arg_lim = {{0,1}}

.

and the lever part of this one :

LOCALIZE("ABRIS Cursor control (rot/push)"),

elements["ABRIS_SHUNT_PTR"]

{class_type.LEV, class_type.BTN}

action = {device_commands.Button_6,device_commands.Button_7},stop_action = {0,device_commands.Button_7} ,is_repeatable = {},

arg = {518,523},arg_value = {0.04,1},arg_lim = {{0,1},{0,1}},

relative = {true,false},gain = {1,0}

.

or do we still have to wait some time more ?


Edited by C6_Hellfrog
Link to comment
Share on other sites

LOCALIZE("ABRIS Brightness"),        
   elements["ABRIS_BRIGHTNESS_PTR"]
   {class_type.LEV}
   action = {device_commands.Button_8},
   arg = {517}, arg_value = {0.05}, arg_lim = {{0,1}}

I've successfully set ABRIS brightness via lua. Whenever you see class_type.LEV and do not see a relative=true you can send this command button an absolute value between it's arg_lim values. The arg_value is the increment that the naitive ui will use to increment and decrement.

 

For example this code will set the ABRIS brightness to half.

local dev = GetDevice(9)
dev:performClickableAction(3008,0.5)

The cursor control is a little bit more complicated.

 

LOCALIZE("ABRIS Cursor control (rot/push)"), 
   elements["ABRIS_SHUNT_PTR"]
   {class_type.LEV, class_type.BTN}
action = {device_commands.Button_6,device_commands.Button_7 },stop_action = {0,device_commands.Button_7} ,is_repeatable = {},
   arg = {518,523},arg_value = {0.04,1},arg_lim = {{0,1},{0,1}},
   relative = {true,false},gain = {1,0}

When you see two class_type this means that item does different things with right and left clicks. As far as I've been able to tell the first class_type is the left button / mouse wheel and the second is the right mouse button.

 

In this case the left button is also class_type.LEV but note the the relative = {true ,false} that signifies the left button mode does not accept absolute values. Instead it expects the amount to add to the current value for the control. The arg_value is the amount to pass into the performClickableAction.

 

For example this increments the cursor:

local dev = GetDevice(9)
dev:performClickableAction(3006,0.04)

And this one sends it the other way:

local dev = GetDevice(9)
dev:performClickableAction(3006,-0.04)

Now the right click is a standard button. The arg_value tells you the value used to depress the button. 0.0 releases it.

 

This code presses the cursor button

local dev = GetDevice(9)
dev:performClickableAction(3007,1.0)

and this releases it

local dev = GetDevice(9)
 dev:performClickableAction(3007,0.0)

Link to comment
Share on other sites

I am planning on programming a PIC18F2550 to replace the 16C745 on the servo cards and use it to output a pulse that goes from 1.0 ms - 2.0 ms instead of the almost 0.0 ms - 2.0 ms interval on the stock version. The crystal will have to be replaced too, but that's an easy job. Sounds interesting?


Edited by brydling

Digital-to-Synchro converter for interfacing real aircraft instruments - Thread

 

Check out my High Input Count Joystick Controller for cockpit builders, with support for 248 switches, 2 POV hats and 13 analog axes. Over 60 units sold. - B256A13

 

www.novelair.com - The world's most realistic flight simulators of the J35J Draken and the AJS37 Viggen.

Link to comment
Share on other sites

The point with the modified card is that it will still work with SIOC, otherwise I would have made my own servo card that also included a serial number so that it didn't rely on the way Windows names the cards. With opencockpits solutions you have to change in the config-files if you for example move a card to another USB-port or if Windows for some other reason decides to change the identification string, because the cards doesn't have any other way to identify themselves. Extremely annoying when you notice that the instruments are not working anymore and after 30 min of testing the usual SIOC-maintenance things (reload code, restart SIOC, restart computer etc.) find out that Windows decided to change the name of the card so that you have to change all the references in the SIOC code. But in the absence of other I/O-solutions with scripting capability, it's nice if the card works with SIOC.

 

Edit:

 

The exact timings of the stock cards are from 0,25 ms to 2,5 ms. A Futaba S3003 uses 0,4 ms to 2,5 ms. The result is that the servos doesn't move when you write lower values than 100 to the servo cards. With a total span of 0 - 1023, the mod should yield almost 11% of resolution improvement.

 

Edit:

 

I have started blogging about my development now. I don't feel that this belongs in your thread, so check out brydling.blogdns.com instead and message me if you are interested. I will make a clone of the stepper card too, since these cards REALLY suck.


Edited by brydling

Digital-to-Synchro converter for interfacing real aircraft instruments - Thread

 

Check out my High Input Count Joystick Controller for cockpit builders, with support for 248 switches, 2 POV hats and 13 analog axes. Over 60 units sold. - B256A13

 

www.novelair.com - The world's most realistic flight simulators of the J35J Draken and the AJS37 Viggen.

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

USB Card

 

Hi Oakes,

 

I've followed your SIOC instructions on other threads and have been able to get some switches and Led's working. Thanks for that!

 

I got them working using the Opencockpits Mastercard inputs and outputs. But to get the Opencockpits USB Output card working, do you know how to setup Sioc to send the signal to the USB Output card and not the Mastercard Output?

 

Thanks.

Link to comment
Share on other sites

Well, I haven't tried this myself yet (still trying to get the variometer done) but I think you need to do the following:

 

Add a line in your SIOC.ini

MASTER=X,6,1,Y

where X is the next available number (for me this would be 1 since my (single) USBExpansion card is number 0 - probably yours as well).

 

Y is the device number which I think should be shown on the SIOC software page (under devices) when you have connected the card. Otherwise it should be available in the test program for the USBoutput card see this link -> http://www.opencockpits.com/modules.php?name=Downloads&d_op=getit&lid=320.

 

Example (and yes I made up the number 36 below, this differs from system to system)

[MASTERS]

MASTER=0,4,1,13 <- USB Expansion card

MASTER=1,6,1,36 <- USB Output card

 

btw the second number defines the type of card (4 for a USB Expansion card and 6 for an USB Output card)

 

Now, to link a variable to a the USBOutput card instead of the Mastercard you need to add the X number at the end of the Link IOCARD_OUT statement in your file.

 

Var 123, name USBOUTTEST, Link IOCARD_OUT, Output 1, device X

 

With my example above:

Var 123, name USBOUTTEST, Link IOCARD_OUT, Output 1, device 1

 

btw, If you leave the "device X" out of the IOCARD_OUT line it defaults to device 0 <- which is why everything has been working so far

 

I.e.

Var 123, name USBOUTTEST, Link IOCARD_OUT, Output 1, device 0

=

Var 123, name USBOUTTEST, Link IOCARD_OUT, Output 1

 

Also, please note that the USBOutput card is electrically inverted from the Master card.

Master => Common Ground & Individual "+V"

USBOutput => Common "+V" & Individual Ground

 

/Oakes

Link to comment
Share on other sites

  • 3 weeks later...

Nice! Are you using a stepper motor?

Digital-to-Synchro converter for interfacing real aircraft instruments - Thread

 

Check out my High Input Count Joystick Controller for cockpit builders, with support for 248 switches, 2 POV hats and 13 analog axes. Over 60 units sold. - B256A13

 

www.novelair.com - The world's most realistic flight simulators of the J35J Draken and the AJS37 Viggen.

Link to comment
Share on other sites

Nope, futaba servo.

 

And on that note, I've got two problems with the OC servo card:

1. I have to plug/unplug it 10-20-30 times:huh: with Win 7 for it to be properly recognized, then I can reboot the computer etc without any problems as long as I don't remove the external +5VDC from the card. As soon as I do remove the +5VDC I need to do the plug/unplug thing again. Win XP has the same problem although it seems that I don't need quite as many plug/unplugs to get it to work. Anybody else have the same problem?

 

2. The Pulse length problem, I remember that you Brydling managed to solve this, can I buy a modified OC card/chip from you?

 

/Oakes

Link to comment
Share on other sites

Nice Oakes, thanks for posting. For 360 deg. range of movement, are you using a modified servo, or standard with gears? I thought I read somewhere that for a modified servo, you have to pass start/stop pulses instead of absolute position, so then the problem becomes sync errors over time just like a stepper. Any truth to this in your experience?

Also, where did you get your end mills?

Link to comment
Share on other sites

Nope, futaba servo.

1. I have to plug/unplug it 10-20-30 times:huh: with Win 7 for it to be properly recognized, then I can reboot the computer etc without any problems as long as I don't remove the external +5VDC from the card. As soon as I do remove the +5VDC I need to do the plug/unplug thing again. Win XP has the same problem although it seems that I don't need quite as many plug/unplugs to get it to work. Anybody else have the same problem?

 

We have never experienced this exact problem. Have you tried it on a different computer and confirmed the same behaviour?

 

2. The Pulse length problem, I remember that you Brydling managed to solve this, can I buy a modified OC card/chip from you?

 

I changed one thing in my code two days ago, and haven't tested it yet. I will test it right after dinner and report back. For what interval does your servo respond?

Digital-to-Synchro converter for interfacing real aircraft instruments - Thread

 

Check out my High Input Count Joystick Controller for cockpit builders, with support for 248 switches, 2 POV hats and 13 analog axes. Over 60 units sold. - B256A13

 

www.novelair.com - The world's most realistic flight simulators of the J35J Draken and the AJS37 Viggen.

Link to comment
Share on other sites

Nice Oakes, thanks for posting. For 360 deg. range of movement, are you using a modified servo, or standard with gears? I thought I read somewhere that for a modified servo, you have to pass start/stop pulses instead of absolute position, so then the problem becomes sync errors over time just like a stepper. Any truth to this in your experience?

Also, where did you get your end mills?

 

I use a 1:2 belt transmission. You can check out the CAD files here:

http://forums.eagle.ru/showpost.php?p=776610&postcount=154

 

/brds

Oakes

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...