744 Forum

Apron => Accessories => Topic started by: John Golin on Sun, 9 Jun 2013 13:38

Title: PSX Arduino Integration
Post by: John Golin on Sun, 9 Jun 2013 13:38
G'day;

With the detailed systems information available from the PSX interface, I thought we might be able to take advantage of off the shelf microcontrollers such as Arduino, and make them work with PSX.

I've been playing with this for a while, trying to get things working - and here is a vid of the Hydraulics panel lights: (see notes below the video in Youtube for more info).

http://youtu.be/W_INKWPZ5oc

The hardware behind this is;
- an Arduino Uno
- an Ethernet Sheild
- MCP23S17 chips (for inputs)
- TLC5940 (for outputs)

The software is:
- A HEAP of custom libraries and code!


Note - there is NO PC between the 'panel' and PSX.  The Arduino+Ethernet connects direct to PSX over the network.

Still in the early stages and lots to get done, but very promising so far and it shows what sort of stuff is possible with the amazing systems detail and incredible 3rd party interface PSX provides!

Apologies for the terrible quality - initially this was posted internally for Hardy, but he suggested I post it here as well.
Title: PSX Arduino Integration
Post by: Roel Raeven on Mon, 10 Jun 2013 22:52
Thx John,

Well done. I have an Arduino over here, but never found time, beside from the standard Arduino stuff to test it in a simulator environment. Looks promising. Are you willing to share the code in a later stadium? I'm willing to help you developing the code, but I'm not on the fast track now because my daily business costs me a lot of time and energy.
Title: PSX Arduino Integration
Post by: John Golin on Tue, 11 Jun 2013 02:21
Yes, the intention is to make it all available to others - however it will still be a while before it is in a suitable state.

Through the use of custom libraries and functions, only relatively simple changes are required to customise for particular solutions (e.g. Hydraulics panel, *Circuit breakers, etc).

As the Arduino is so open there are a lot of options available - much of the process has been finding the right mix of hardware, configuration and software to get the job done AND work together.  (e.g. you can't get a TLC5940 working with an Ethernet shield 'out of the box').  There are also a lot of caveats and gotchas with the Arduino chip itself - which is fine, as long as you are aware of them! Another challenge has been performance optimisation - the Arduino is single threaded, so the code must be very efficient and avoid blocking as much as possible - e.g. 'raw' scanning of inputs (the traditional way people program Arduinos) is not suitable for low latency code, we need to use interrupts extensively.

And lets not even talk about the restricted RAM - 32k program and only 2k working!

We'll have to document this to explain why things are designed the way they are, which is a major exercise in itself.  :)  There are a lot of other components to the solution that are not immediately apparent - automatic Lexicon handling, basic web server for on-the-fly tweaking of some settings (including storage of settings in EEPROM for persistence on power down), etc.

All this means it's actually easier for me to develop on my own at the moment... the dependencies across hardware and software are quite significant!  There is already  an unnamed elf looking at tidying up the hardware circuits with more dilligence than my prototyping (decoupling capacitors etc!).

Anyhow, more to come. :)

* The Circuit breaker panels were the main driver for this implementation.  I wanted to be able to wire them all up simply and cheaply - which is now possible. All other types of switches, gauges, lights etc flowed from that initial goal.
Title: PSX Arduino Integration
Post by: John Golin on Wed, 12 Jun 2013 02:09
Here are some additional hardware interface examples - again apologies for the quality - they are Alpha Proof-of-concept videos!

Circuit Breakers: http://youtu.be/ohUj2xsGhg8

Crew Comms Display: http://youtu.be/MLT-A1mDE5Y

Servo / button / switch (Outflow Control Panel): http://youtu.be/rksMIbi35wY
Title: PSX Arduino Integration
Post by: Hardy Heinlin on Wed, 12 Jun 2013 12:24
Quote from: John GolinServo / button / switch (Outflow Control Panel): http://youtu.be/rksMIbi35wY
John, have you worked in an animation studio before? I think you've done a nice choreography here with  these black feathered ducks and their white heads. They are probably married. At 00:40 the left duck is turning his head over to her asking, "Will you give me a kiss?". Alas, at 00:47 she's turning her head away.

The funny music matches this animation very well :-)


/-|
Title: PSX Arduino Integration
Post by: John Golin on Wed, 12 Jun 2013 13:04
Hehe... definitely not... the music is the free stuff you can put on in Youtube, and was something I chucked on there to cover up the background noise and mobile phone buzzing.  Any appearance of deliberation is purely coincidental!
Title: PSX Arduino Integration
Post by: martin on Wed, 12 Jun 2013 19:50
Quote from: Hardy Heinlinthese black feathered ducks
My immediate association on seeing the video: some rather sinister birds in dialog (was thinking more of vultures, though, or possibly some avian wraiths from the Tolkienian Universe...)
 :shock:
Title: PSX Arduino Integration
Post by: frumpy on Wed, 24 Jul 2013 09:34
I'm trying to make a simple MCP too. It's supposed to work
with X-Plane (Teensy board). Hardware part is mostly done,
now comes the programming.  :?

(http://www.bilder-upload.eu/upload/405335-1374654345.jpg)
Title: PSX Arduino Integration
Post by: falconeye on Sun, 18 Aug 2013 14:19
Hello Frumpy,

could you pleae tell me which switches you use or
where you have bought them? When PSX is out I plan to make
something similar. If I have enough time then :-)

Greetings
Title: PSX Arduino Integration
Post by: frumpy on Sun, 18 Aug 2013 17:57
If you mean the LED-buttons, they are a little hard to find:

http://www.conrad.de/ce/de/product/701157/Miniatur-Anreih-Print-Drucktaster-125-VAC-1-A-mit-integrierter-LED-Schwarz-LED-Art-Gruen-Drucktaster-1polig-Ein

Qualitywise they are "okay", do not expect anything too fancy here.

Encoders are cheap ALPS. Next time I would go for a more distinctive click,
they are too soft.

If I have the time, I will do a little tutorial how to build and integrate
into X-Plane. Right now I am trapped with the Pareto-principle.   :o
Title: PSX Arduino Integration
Post by: falconeye on Sun, 18 Aug 2013 22:04
Aha Conrad. Thank you for the hint.
And yes, a tutorial would be great.
Good luck with the programming.

Cheers
Title: PSX Arduino Integration
Post by: John Golin on Mon, 19 Aug 2013 22:59
Quote from: frumpyI'm trying to make a simple MCP too. It's supposed to work
with X-Plane (Teensy board). Hardware part is mostly done,
now comes the programming.  :?


Ah the fun bit! :)
Title: PSX Arduino Integration
Post by: the mad hatter on Wed, 25 Dec 2013 07:19
Hi John

Is it still your intent to make this code available if so is it going to carry any $$$  to it ? Looking at various options Arduino is certainly the way to go.

If you are going to make this available when do you think this will happen? Are you prepared to make available what you have achieved thus far ? No doubt this has been mammoth task!
Title: PSX Arduino Integration
Post by: John Golin on Thu, 26 Dec 2013 00:57
G'day!

Yes, the intention at this state is to make it all available for free for non-commercial use...

We've still got some 'tuning' and refining to do of the various libraries and code which  allow us to do things faster and utilise less memory - making one set of libraries compatible across a variety of cockpit interfaces with such stringent memory and speed restrictions can sometimes require redesign across several different libraries, so it will be a little while until it is in a settled state suitable for release.

For example, at the moment I have been working to greatly increase the speed of reading the Ethernet traffic - the default way described on the Arduino site is okay, but digging into the code reveals there are other ways to read the data with much less overhead.  I don't want to run the risk of ever hearing anyone complain that there was a delay or a missed button press so am recoding some sections to use this new technique.

I think my  (internal) technical background doco has reached around 90 pages of information on specific techniques, tricks and design decisions - I'm sure it will get longer!

e.g. did you know that division on the Arduino is a very slow process? And 'floats' are very, very bad performance wise. Also, switching between the multiple analog inputs and taking a reading takes a big chunk of time... And if you scan a heap of digital inputs to see if a switch has changed state, this time adds up and you might miss something else.

Each of these things in themselves may not be a big deal, but when you try to do quite a few things at once with the board, you need to look for smarter ways of doing each.  This can include specific addon hardware (e.g. chips that provide an interrupt on change so you don't constantly scan inputs), or using smarter lower level coding in the software libraries (write directly to all the inputs at once, rather than one at a time).
Title: PSX Arduino Integration
Post by: the mad hatter on Thu, 26 Dec 2013 03:07
HI John

thank you for the very quick and full reply ... Yes I fully understand what you are saying the libraries and the contents thereof is both time time consuming and complex

may I also ask do you have say something one can play with in the interium that is not dependant on such complex issues that I can play with with help get me used to the processes involved that would give me a happy face

I look forward to your release in the not too distant future

thanks
Title: PSX Arduino Integration
Post by: the mad hatter on Thu, 2 Jan 2014 17:47
Its okay good sir have since resolved my issue thanks and I will not be going that route although Arduino is user friendly:  As you said the libraries are just way to complex and require unique coding
Title: PSX Arduino Integration
Post by: John Golin on Mon, 13 Jan 2014 21:19
MCP 7 Segment Displays:

Another quick update - I'm still working my way around the various inputs and displays on the flightdeck writing libraries# for them...

One recent creation was libraries to handle all the 7 Segment type displays in the cockpit (MCP, RCP, XPDR),

You can get a simple led display set on eBay, connect it up to the Arduino on 3 pins, and add a few lines of code to check for updates from PSX and update the displays (using the new libraries).

Here is a vid of some of the cool things PSX lets you do:

Video: http://youtu.be/U9rvGrWunyE

Note - Turning the physical encoder does not directly update the seven segment displays!  This is a HUGE change for software and hardware integrators to get their head around.

Turning the rotary encoder sends the rotary encoder information to PSX (i.e. 'Alt knob turned +1').  PSX then updates the Altitude window display and I read this on the network and display the value PSX provides.  PSX is God.

e.g.

* MCP alt is set at 22000
* Rotary encoder turned clockwise 1 unit
* I send to PSX Qh80=1  (Qh80 is the MCP Alt knob).
* PSX turns it's MCP Altitude knob 1 unit clockwise
* PSX now has the MCP Alt Window displaying 22100

Any changes are sent over the network, so:

* PSX sends Qi35=22100 (Qi35 is the MCP Altitude Window display)
* I am listening for Qi35 - I parse the string
* I send 22100 to the display

Rinse, repeat.


___________________________________________________________________

# libraries are just a bunch of code that takes all the hard work out of the main program, and provides you a couple of simple commands to do things.  e.g. 'Print' would have a bunch of code behind it, but you don't need to see that, you just type 'Print(hello)' and some library somewhere has a function 'Print' that does all the hard work.

In this case, there are a couple of libraries - PSXLedControl and PSXLedWindow

- PSXLedControl is the chip and all it's attached digits.
- PSXLedWindow is the specific display item - e.g. heading or altitude

Below is a simplified example of what these libraries allow you to do


tell the Arduino what is attached: (the two variables are the logical aircraft power circuit for this display, and the number of actual hardware chips I have attached)


PSXLedControl myLedControl(gT137, 2);                            // set up the hardware



how you want to use it: (the variables are the hardware we are displaying on, the type of the display, the chip this will display on, and the number of the rightmost  digit on that chip for the item)


PSXLedWindow myAlt(&myLedControl, ALT, 0, 0);                       // chip 0 digit 0 - Create object for the Alt characters
PSXLedWindow mySpd(&myLedControl, SPD, 1, 4);                       // chip 1, right char is at digit 4 (reading right to left)
PSXLedWindow myHdg(&myLedControl, HDG, 1, 0);                       //  chip 1, pos 0



Then in the running loop, and when we detect the variable from PSX, update that Output: (qIndex is the code we are waiting for, qChars is the data from PSX).


else if (qIndex==McpWdoAlt)  {myAlt.updateOutput(atoi(qChars));}  
else if (qIndex==McpWdoHdg)  {myHdg.updateOutput(atoi(qChars));}  
else if (qIndex==McpWdoSpd)  {mySpd.updateOutput(atoi(qChars));}  


[/i]
Title: PSX Arduino Integration
Post by: JP59 on Tue, 14 Jan 2014 00:18
I'm really interested about your investigations to create an interface for our cockpit hardware, thank you very much to make it accessible to the whole community for free. Witch software do you use to create libraries / program the arduino ? Is it the software from Arduino ?

Edit : What about the 14 I/O of the Arduino Uno ? Do you plan to use an expansion module in order to handle the hundreds of switches we have in our cockpits ? And do you think you can store all the lines of code and libraries of a complete cockpit in the 32Kb of an Uno ? Sorry for these many and maybe stupid newie questions but I just try to understand.
Title: PSX Arduino Integration
Post by: John Golin on Tue, 14 Jan 2014 03:55
We have thrown out the old way of thinking and moved to an entirely new philosophy :)

Basically, each sub panel or small collection of panels will have it's own Arduino / breakout card and ethernet connection to PSX.  So, for example, the Hydraulics Panel has a power connector (say 12V or 28V) and an ethernet connector to the outside world, and that is it.   There may be one or two small panels where we link them together (the IRS,  the EEC etc) but generally each panel will have it's own hardware.

To keep costs down we look at purchasing Arduino clones such as the ProMini and connecting to a clone Ethernet shield.  

Addon chips are essential to a fast, accurate and flexible solution.  A LOT of work has gone into finding various chips that are flexible, 'common' in the Arduino world, cheap / reasonably priced, and can work together.... and then crafting the code to make it so!

The general chips used are MCP23S17 for inputs and TLC5940NT for outputs.

Oh and I use the Arduino IDE for the specific 'sketches' for a panel, but the libraries are written in C++ in Notepad++
Title: PSX Arduino Integration
Post by: JP59 on Tue, 14 Jan 2014 04:07
Thank you John for this very detailed brieffing. I have some difficulties to understand physically what is wired with what, through witch technology (USB, Serial or Ethernet). I just try to immagine how many Arduino a complete cockpit will contain, may be 40-50 ! How do you connect physicaly your Arduino Uno to the computer, USB (direct) or Ethernet (via Arduino Ethernet Shield) ? How do you expect to make the connexions to the outside world ? With a giant USB/Ethernet hub ? I do not understand the concept of clone Ethernet Shield, maybe it is the key for understanding.

Edit : One more question : why do you work with one Arduino Uno plus one Arduino Ethernet Shield and not consider to get the Arduino Ethernet card directly ? Is it a question of "talking" with the I/O Microcontrolers ?
Title: PSX Arduino Integration
Post by: John Golin on Tue, 14 Jan 2014 05:18
The Ethernet 'shield' (or daughter card) allows your Arduino to plug directly into a network switch.  PSX communications are over the network, so we don't need the USB or any intermediary PCs to talk to PSX.  A normal network switch behind each bulkhead will allow the panels to talk back to PSX.

This can be seen in all my videos - the Arduino is talking directly to PSX over the ethernet network.

USB is required to initially load the relevant 'sketch' for your hardware onto the Arduino before you install the panel, but from then on it only needs powering up it resumes it's identity and will constantly try to connect to PSX over the network whenever it is turned on.  

The Arduino with built in ethernet is not suitable for a couple of reasons, the main one being it will conflict with some of the other hardware.  It is also much cheaper to use the addon shields.
Title: PSX Arduino Integration
Post by: JP59 on Tue, 14 Jan 2014 13:27
This is what you call "Ethernet Shield" ?

http://arduino.cc/en/Main/ArduinoEthernetShield

Aren't you affraid about the huge amount of cards a complete cockpit will have to plug into the Ethernet Switch ?

I'm looking actually the datasheets of components and wiring documentations and I start to understand (I had to dust out my old university electronics knowledge ;-)
Title: PSX Arduino Integration
Post by: John Golin on Tue, 14 Jan 2014 22:18
Quote from: JP59This is what you call "Ethernet Shield" ?

Yep!

QuoteAren't you affraid about the huge amount of cards a complete cockpit will have to plug into the Ethernet Switch ?


Nope!

;)
Title: PSX Arduino Integration
Post by: JP59 on Wed, 15 Jan 2014 01:16
I you're not affraid, so I'll not be also  :D

Thanks to this forum, your help and vidéos I begin to understand the interfacing of PSX. I would like to test this also but unfortunately I do not have Beta of PSX as you. I would just be able to watch the traffic with PSX Router.

From the Hardware side, you have the Arduino Uno connected to the network via the Ethernet Shield. The Arduino is connected with the I/O Expanders via SPI Bus.

From the Software side, the Arduino contains the Ethernet sketches for talking / listening PSX.

Am I right with this ?

I still have problems to understand why you use I/O expanders. Arduino Uno do not have 14 built-in I/O ?
Title: PSX Arduino Integration
Post by: John Golin on Wed, 15 Jan 2014 02:10
If you count up the number of buttons on, say, the fuel panel in the overhead, then count up the number of discrete light bulbs - well you run out quickly.  With PSX, you don't hardwire a light to illuminate just because the button is pressed - you wait for PSX to tell you the light should go on.  Who knows - maybe the bulbs have failed? Or the power circuit might be off? :)

You don't HAVE to use addon chips, but your options will be extremely limited if you don't.

Imagine doing the circuit breaker panel!  

More importantly, It is critical to understand the microcontroller in the Arduino is single threaded and can only do one thing at a time - e.g. while it is processing Ethernet traffic it can't detect button presses.  The addon chips solve these sort of problems.

The chip on the Arduino is designed to have a little bit of everything - we looked at other options and decided that no matter what we did, we would have to have expanders of some sort, so settled on the cheaper, more generic platform to build on.
Title: PSX Arduino Integration
Post by: JP59 on Wed, 15 Jan 2014 03:01
Thank you very much John for all these explanations. I'll go to my Electronics supplier this week-end to buy the hardware and start to make tests and learn. I hope PSX Router will be enough to watch / create traffic and "simulate" PSX.
Title: PSX Arduino Integration
Post by: Jeroen Hoppenbrouwers on Wed, 15 Jan 2014 11:32
For Arduino stuff, consider shopping online -- it is not sure your local supplier has the materials. But this can be a good opportunity for him to start stocking up   :mrgreen:


Hoppie
Altera Cyclone V for breakfast, hmmm
Title: PSX Arduino Integration
Post by: JP59 on Wed, 15 Jan 2014 13:04
Very big electronics dealer in my city. He has all the Arduino cards and accessories. I'm lucky  ;)
Title: PSX Arduino Integration
Post by: John Golin on Wed, 15 Jan 2014 21:12
Clones from ebay are much cheaper...  and, unusually, legal (as the platform is open).

I wouldn't get too carried away until after PSX is released and you've had the chance to evaluate both PSX and hardware solutions. With FDS providing many excellent turnkey products ready to 'plug and play' with PSX, that will probably be a better solution for many people.  It is also probable someone will work to interface Opencockpits, and I'm sure other vendors will jump in as well.

There are a variety of reasons we have developed this interface - basically because it suits us.  It is not 'dirt cheap' or 'plug and play', it still requires a little work, but it might be useful to others as well.
Title: PSX Arduino Integration
Post by: JP59 on Wed, 15 Jan 2014 23:53
The FDS solution is not for me because I use encoders and 7 segment displays in my cockpit that FDS cards can't drive. That's why I need a solution for this specific hardware. For the rest of "classic" switches and LED's FDS plates are certainly the best solution. My cockpit will be a mix of 2. I want to start learning and working now in order to be ready for the PSX release.
Title: PSX Arduino Integration
Post by: asboyd on Sun, 23 Feb 2014 23:57
Guys,
I am currently building an MCP using opencockpits in/out master cards.
They can detect switches and output lamp control, they alsowork with encoders and 7 segment displays.
I know the whole thing works with SIOC but can also work with FSUIPC, so I think it should be possible to get them to work with PSX (although I am too late on the scene to have had a chance to get PS1).
So I will continue to build it as per the boeing manual for looks/feel and then wait for PSX...

Opencockpits also can supply the parts including the switches with LED's...

Cheers,
asboyd
Title: PSX Arduino Integration
Post by: asboyd on Sun, 23 Feb 2014 23:58
Also forgot to mention Jim's page in NZ
He has been working on interface software for Arduino to FSX...

Might be worth while checking out his site (just google Jim's page and Link2FXS...

Cheers,

AB
Title: PSX Arduino Integration
Post by: John Golin on Mon, 24 Feb 2014 07:22
PSX doesn't have anything to do with FSUIPC... it will need its on interface to the hardware
Title: PSX Arduino Integration
Post by: asboyd on Tue, 25 Feb 2014 23:37
I understand, but at least you can see what has been done.
I figure changing from one type of language and interface to another should not be that difficult as the arduino was developed for students to get back into software....

I have been playing with VB to make the switches activate a window (for example the MCDU in the PMDG 747) and then deliver a keypress, that way you do not need to have direct access to the back end software, you just need to emulate normal HID....

Cheers,

asboyd
Title: PSX Arduino Integration
Post by: John Golin on Wed, 26 Feb 2014 02:21
Ah righto - good stuff. :)

Very satisfying when it works isn't it?!
Title: PSX Arduino Integration
Post by: asboyd on Wed, 26 Feb 2014 07:20
It's even better when your wife stops trying to get you see a doctor.... :P


Cheers,
Title: PSX Arduino Integration
Post by: JP59 on Wed, 9 Jul 2014 10:33
John, I'd like to know if the development of the Arduino interface for PSX continues. Are you ready to release some source codes and libraries ?
Title: PSX Arduino Integration
Post by: John Golin on Fri, 11 Jul 2014 03:45
Hi there!

We're beavering away here trying to get a hardware solution in place for real aircraft parts - a 'plug and play' for such panels as we have a couple of Sim owners who are interested in this solution.  These have a heap of additional challenges with different voltages, switching supply or earth, and high current, all in one panel.

I've had to do some changes to the code to accommodate this approach and integrate it more tightly with the hardware - as a result it's not as flexible as it once was and would need a lot of deep understanding of both the hardware and software.

So the short answer is no - not yet. :)

Once we have the pressure of these particular sims off our back I can go back and look at the libraries.

We've got some info and pics of what we have been doing in a blog at

www.simulatorsolutions.com.au

(http://www.simulatorsolutions.com.au/wp-content/uploads/2014/07/IMAG0779-900x508.jpg)
Hydraulics Panel interfaced to PSX.

Cheers

John
Title: PSX Arduino Integration
Post by: JP59 on Fri, 11 Jul 2014 07:59
Very impressive but it looks like a commercial solution. You spoke about releasing codes for free for the community.
Title: PSX Arduino Integration
Post by: Jeroen Hoppenbrouwers on Fri, 11 Jul 2014 10:32
John meant that nobody would understand the code or could use it for anything but this particular panel. Free for the community is useless if it isn't usable by the community, which it isn't at this moment.


Hoppie
Title: PSX Arduino Integration
Post by: John Golin on Fri, 11 Jul 2014 11:01
Thanks hoppie - you have it correct. We were diverted from the original course to providing a particular solution for some sim owners - the website is a blog of the features and progress so they stop asking questions and let us get on with it :)

There are a couple of bits of software that will be out soon (with the PSX release) as they are complete, or nearly complete - SimSwitch and AdaptPSX... but the standalone general Arduino stuff is unfortunately delayed.  In a few weeks I hope to have some free time to help provide some info here and via the website even if I can't get everything out... whether that be libraries or parts of code will depend on how much is 'generally useful'...

For example there is some info already there on the Watchdog timer...

http://www.simulatorsolutions.com.au/?p=143


Cheers!

John
Title: PSX Arduino Integration
Post by: JP59 on Fri, 11 Jul 2014 11:58
Thank you John. I was just looking for some codes and libraries examples. I can adapt to my setup if I have the "core" already.
Title: PSX Arduino Integration
Post by: Kurt on Mon, 14 Jul 2014 10:19
Hi John.

Am i correct in assuming that it will be possible to buy the simstack hardware at some time in the future? If so it is very very good news indeed  :D

My own arduino project is stalled until I have PSX in my hands, - I will for sure be interested to take the "easy" way and buy all electronics if it comes available.

BR

Kurt
Title: PSX Arduino Integration
Post by: Jeroen Hoppenbrouwers on Mon, 14 Jul 2014 11:08
Quote from: FlygenringI will for sure be interested to take the "easy" way
Pfffffffrt

... mops coffee off keyboard ...
Title: PSX Arduino Integration
Post by: Kurt on Mon, 14 Jul 2014 12:15
Quote from: Jeroen Hoppenbrouwers
Quote from: FlygenringI will for sure be interested to take the "easy" way
Pfffffffrt

... mops coffee off keyboard ...

Hehe Hoppie, - I know its no way easy, - hence the ""'s :)

Sorry for the coffesplash  :mrgreen:

Kurt
Title: PSX Arduino Integration
Post by: John Golin on Tue, 15 Jul 2014 04:25
Quote from: FlygenringHi John.

Am I correct in assuming that it will be possible to buy the simstack hardware at some time in the future? If so it is very very good news indeed  :D


G'day - I can't answer that question... because I actually don't have an answer :)

We set out to do this for ourselves and the simulator crews we have been associating with - we know them and their setup, they know us (and where we live and the names of our children!).

We're focused on getting the right technical solution for the Sim guys we have right now and making sure it's sustainable moving forward... we're deep in final testing of the protoype hardware to lock down the design, so we don't have the mental bandwidth at the moment to consider anything wider - we'll see how things look down the track.  

We think the solution is a good one, but the proof will be in the pudding(s).  And kheer!
Title: PSX Arduino Integration
Post by: Kurt on Wed, 16 Jul 2014 10:23
Thanks for the honest reply John, - I for sure will be interested in buying if it becomes a possibility.

Keep up the good work  :D

Kurt
Title: PSX Arduino Integration
Post by: Mark on Fri, 2 Jan 2015 13:39
Hi John,

As you know I've been tinkering with RCPs and ACPs (and more, soon), so was very happy to read through your SimStack blog; your basic IO platform is superb and it's good to know that I won't have to cover this particular need!

I'm also using similar hardware (32-bit arduino supported micro and w5200) so if you'd like another pair of eyes on the code then get in touch.

If you were planning to release your source code with a permissive license, I would like to use some of the same enum definitions (e.g. the Q codes) and class naming/inheritance to increase cross-compatibility.

Are you planning an IO board that can not only read the state of a real CB, but trip it on demand? This is an idea I have floating at the back of my mind.

Hope you are well,
Mark
Title: Re: PSX Arduino Integration
Post by: asboyd on Mon, 9 Jul 2018 05:33
Just wondering where the arduino integration is at. I have several boards and can see a great use of using them for the audio control panels (multiple analog pots in use.)

Just wondering if any of the basic code is available for the ethernet connection via the shield.

Cheers,
Alex B
Title: Re: PSX Arduino Integration
Post by: John Golin on Thu, 12 Jul 2018 23:12
Wow - old thread!  G'day Alex!

We have moved on from the basic Arduino hardware and now use the same chipsets but custom bootloaders, libraries and pin configurations as part of our hardware solution.  While our stuff is designed to work like the basic Arduino and be forward compatible (Arduino code works on our hardware)  the reverse is not the case.

This is the result of a conscious decision to standardise on one suite of interface options that will be flexible enough for real hardware, rather than a lot of individual bespoke solutions.

Cheers!

John
Title: Re: PSX Arduino Integration
Post by: asboyd on Fri, 13 Jul 2018 00:48
Fair enough John,
Ron has told me as much in some emails.
I am trying to find a cheap way to create ACP's using some arduinos I bought several years ago when I was still in work and getting an income.

Just in case you still have it. Would you have the original sketch to talk to PSX.....(too cheeky perhaps?)

Cheers,
Alex B
Title: Re: PSX Arduino Integration
Post by: RogerH on Wed, 26 Aug 2020 20:46
+1 for any Arduino sketch to interface to PSX - I've just had my PC automatically update to Windows 10 1909 and SIOC has stopped working.

I've done a search but despite quite a few enquiries to the Opencockpits team, no response has been forthcoming about this.

So I'm stuck with no interface right now.

Any suggestions? Prior to the 1909 update I'd just bougfht another two Mega Arduinos!
Title: Re: PSX Arduino Integration
Post by: asboyd on Wed, 26 Aug 2020 23:04
Roger I have Windows 10 1909 and 2004 running on two of my machines and SIOC 7.03B2 works with both. Make sure UAC is completely off and you have installed SIOC in the C:\SIOC\ directory.(I also turn off my firewall).

I do know that security changed with 1909 which is why I updated one of my machines to 2004 and tested with it as well.

Cheers,
AlexB
Title: Re: PSX Arduino Integration
Post by: petdocvmd on Thu, 27 Aug 2020 00:41
I made an inquiry to the MobiFlight people offering to code a branch for direct PSX interfacing, but they appear to have little interest. I'm going to work on my own solution to try to eliminate all of the intermediate steps in the current workarounds, just in case one of them does break for good.  Was hoping to get a head start by leveraging the Arduino-side work already established by Mobi, but looks like the PSX contingency is not mainstream enough for them.  I'll let you know if I manage to put together something worth testing over the next several months.

Scott
Title: Re: PSX Arduino Integration
Post by: RogerH on Thu, 27 Aug 2020 08:44
Alex - thanks I'll check all of that.

Scott - not sure if there's anything I can do to help - I'm a very amateur programmer and there are some real brains elsewhere on here, but let me know if there is!

Cheers all,

Roger.

EDIT: Alex - how did you update to 2004? I have automatic updates turned on and it's reporting 1909?
Title: Re: PSX Arduino Integration
Post by: asboyd on Thu, 27 Aug 2020 09:33
Some of my machines where compliant with 2004 and so the update showed up in windows update. AS you need to accept the update I left a couple of machines without it.
One of my machines has hardware onboard that still have issues with the update so Microsoft are holding back on the update until the issues are resolved. Some of the issues are with 3rd party drivers...

Cheers,
Alex B
Title: Re: PSX Arduino Integration
Post by: RogerH on Thu, 27 Aug 2020 22:49
Still no luck with SIOC - it seems to load up ok but then freezes. It's in the directory you suggested Alex, UAC is turned off, Windows Defender turned off and I'm running it as Administrator. Frustrating!
Title: Re: PSX Arduino Integration
Post by: asboyd on Fri, 28 Aug 2020 00:40
Try loading SIOC with a single basic script and see how you go. I started with a basic script for the CDU's, then added in as I went. SIOC freezes every so often as it seems a little unstable at the best of times, but I have less freezes by assigning static var to all items... I keep an excel spreadsheet of my variables and OC ports to keep me on track.

Cheers,

PS I forgot to let you know the MS Firewall was also causing weird things, as I use PSXseecon as well and even using localhost I was getting freezes until I disabled it.....
Title: Re: PSX Arduino Integration
Post by: RogerH on Sat, 29 Aug 2020 11:15
Thanks for the hints Alex - I'll give them a try.

Is there a difference between the firewall and defender?

If I turn off the firewall, with defender also turned off, am I making myself vulnerable to outside virus attacks - or will Smartscan give enough warning (along with Firefox's built-in defences)?

Thanks for any advice :-)
Title: Re: PSX Arduino Integration
Post by: asboyd on Sat, 29 Aug 2020 23:52
My "Smart modem" has a built in configurable firewall, but I also have a stateful firewall in my Internet proxy server. I do not rely on windows firewall, although on some machines I run it with custom settings just to stop the annoying notifications coming up. So the firewall is on without any blocking setup.

Cheers,
Alex B

You could try turning all off and checking SIOC to verify if the firewall is the problem.

:)
Title: Re: PSX Arduino Integration
Post by: RogerH on Sun, 30 Aug 2020 23:57
Hm, sorry for delay in reporting back - I seem to be having toruble turning things off!

I keep getting messages about needing administrator rights to do things - I am the admin on the PC and I htought I'd tunred UAC off altogether.

I am not the biggest fan of Windows 10 right now...
Title: Re: PSX Arduino Integration
Post by: asboyd on Mon, 31 Aug 2020 00:56
I sometimes find firewalls and UAC get turned back on after windows updates...
I think it is an MS conspiracy to make people think they have dementia.... ;)

Cheers,

Alex B
Title: Re: PSX Arduino Integration
Post by: Jeroen Hoppenbrouwers on Mon, 31 Aug 2020 12:05
I am not sure about 10, but in 7 there was this issue with the Base Filtering Engine.

The Base Filtering Engine is a low-level packet filter that is essentially the same as netfilter ("iptables") on Linux. It does the hard work of actually filtering the network packts while the Windows Firewall sets it up, simply stated.

When you switch the Firewall off, the Base Filtering Engine gets confused. It no longer gets direction. It thinks this is not possible, Firewall must have crashed, and goes independent "I Will Save The World". And promptly inserts its own default filtering rules, for security.

So... hunt for the Base Filtering Engine process in the services and disable it. See what that does for you.

If this leads to all kinds of oil filter bypass cautions, it's not my fault!



Hoppie
Title: Re: PSX Arduino Integration
Post by: RogerH on Mon, 31 Aug 2020 19:12
Thanks guys - been HDAU sorting out LuaMacros to work with P3D the last couple of days, due to the demise of HIDMacros with Windows 7. Finally got it working today and have been doggedly re-programming all my special keys - only, now I have to do it in 3 different programs, rather than have HIDMacros send a Simconnect command to P3D. Grrrrr.... I hate progress!
Title: Re: PSX Arduino Integration
Post by: RogerH on Mon, 31 Aug 2020 22:07
Hm.

Found "Base Filtering Engine" in services, but even though (afaik) I'm an administrator it won't let me turn it off! Maybe it's a Windows 10 thing.
Title: Re: PSX Arduino Integration
Post by: RogerH on Mon, 31 Aug 2020 22:28
Nope,

I cannot for the life of me get SIOC running. I've tried all of the suggestions above but to no avail.

This is such a disastrous outcome for me - I can't understand why it will work on other peoples' machines but not on  mine. My whole cockpit is built around SIOc and the thought of changing to something else makes me want to give up!

Frustrated of Pevensey Bay.
Title: Re: PSX Arduino Integration
Post by: Jeroen Hoppenbrouwers on Mon, 31 Aug 2020 23:50
I have that faint idea that you are NOT logged in as an Administrator.
Title: Re: PSX Arduino Integration
Post by: RogerH on Tue, 1 Sep 2020 00:18
I keep getting the same suspicion, but other than changing my User Account, I don't know how to ensure I am.
Title: Re: PSX Arduino Integration
Post by: asboyd on Tue, 1 Sep 2020 07:54
If you go to user accounts, click on change account type... it should show you as a local administrator.

If you right click on SIOC.exe you can set it to run as administrator under the compatibility tab.

Cheers,

AlexB

PS, when you installed SIOC did you run the setup "as administrator".... right click setpu and choose run as....

Title: Re: PSX Arduino Integration
Post by: RogerH on Tue, 1 Sep 2020 10:47
Hi Guys,

Thanks, as ever, for the input and help - and apologies for my tantrum last night! I'd been installing stuff on the new machine and had spent literally hours re-defining buttons and axes in P3D/FSUIPC?AHK?LuaMacros for my training setup - I guess I was kinda knackered! Not the best time to start troubleshooting... lol.

I will go over it all again, as I think Hoppie is right - somehow I'm not being seen as an admin, even though I have set my User Account to be administrator, and have modified the SIOC.exe to run as admin.

I also installed SIOC as admin and installed it into C:\SIOC rather than the default path.

I'm at a loss, but I think you're both onto the right thing - it has to do with admin rights and permissions.

I have another Windows 10 machine which runs it fine - it's just the new machine which is causing issues - but the new machine is the most powerful so I kinda need it running on that!

When I first got the machine (second hand, but from a trusted source), it absolutely insisted that I have a PIN to start up each time. I could not find a way to disable this. I'm sure it has something to do with this.

I've always run my machines without admin passowrds as it makes life much easier when file and folder sharing over networks - maybe this has something to do with it?

Anyway - thanks for the help and we'll see what occurs!

Cheers,

Roger.

EDIT: "When I first got the machine (second hand, but from a trusted source), it absolutely insisted that I have a PIN to xxx start up xxx each time." Should be "_log on_ each time"
Title: Re: PSX Arduino Integration
Post by: simbro on Tue, 1 Sep 2020 11:15
Quote from: RogerH on Tue,  1 Sep 2020 10:47
When I first got the machine (second hand, but from a trusted source), it absolutely insisted that I have a PIN to start up each time. I could not find a way to disable this.

Hi Roger,

Must you enter the PIN before it even boots?  If so, this sounds like there may be some form of HD encryption installed (often the case with second-hands originating from 'secure environments') - in which case you need to contact your trusted source to see if/how this can be de-installed. Sometimes this can be removed by a low-level format but is a real PITA...
But maybe you have now solved the problem as you say 'When I FIRST got the machine'!  ;D

OTOH, I may be barking up the wrong tree!!  ;)

Cheers
Simon
Title: Re: PSX Arduino Integration
Post by: RogerH on Tue, 1 Sep 2020 12:19
Hi Simon - thanks for your input here and elsewhere!

I mean it requires a PIN at logon in the usual way if you have set a password on your profile - except that I never do, so it was confusing and irritating to be told I _had_ to do it. I changed it to password, but i couldn't get it to disappear altogether. For ease, I changed it back to PIN so I only have 4 digits to remember, lol!

I wasa a 'trusted' source (rather than 'secure') in that I got it second hand from a known fellow-simmer, so I have no worries about systemic issues otherwise they wouldn't have let me have it.

Cheers,

Roger.
Title: Re: PSX Arduino Integration
Post by: RogerH on Tue, 1 Sep 2020 16:58
Alex, if you see this,

I wonder if you'd be OK to share your exact SIOC setup? Where it's installed, sioc.ini file, what version of W10 you're running etc?

There must be something I'm missing - but I've tried to set mine up as you suggested - still no joy :-(

By all means feel free to email me at fatcharlie - at - btopenworld - dot - com

Cheers,

Roger.
Title: Re: PSX Arduino Integration
Post by: asboyd on Tue, 1 Sep 2020 21:47
Roger will do.
I will fire up my Win 10 2004 machine as well. I can then send info on both 1909 and 2004..
Watch for my email soon...
Cheers,
Title: Re: PSX Arduino Integration
Post by: RogerH on Tue, 1 Sep 2020 22:57
Thanks Alex :-)
Title: Re: PSX Arduino Integration
Post by: asboyd on Fri, 4 Sep 2020 07:28
Email sent Roger :)

Cheers,
Title: Re: PSX Arduino Integration
Post by: RogerH on Fri, 4 Sep 2020 22:26
Thanks Alex.

received - just got a couple of P5 lessons tomorrow and Monday so  concentrating on those. But will have a look Monday pm I hope.

Cheers,

Roger.