News:

Precision Simulator update 10.180 (14 October 2024) is now available.
Navburo update 13 (23 November 2022) is now available.
NG FMC and More is released.

Main Menu

PSX Arduino Integration

Started by John Golin, Sun, 9 Jun 2013 12:38

John Golin

#20
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.
John Golin.
www.simulatorsolutions.com.au

JP59

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 ;-)

John Golin

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!

;)
John Golin.
www.simulatorsolutions.com.au

JP59

#23
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 ?

John Golin

#24
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.
John Golin.
www.simulatorsolutions.com.au

JP59

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.

Jeroen Hoppenbrouwers

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

JP59

Very big electronics dealer in my city. He has all the Arduino cards and accessories. I'm lucky  ;)

John Golin

#28
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.
John Golin.
www.simulatorsolutions.com.au

JP59

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.

asboyd

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
Alex Boyd... Sydney, Australia

asboyd

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
Alex Boyd... Sydney, Australia

John Golin

#32
PSX doesn't have anything to do with FSUIPC... it will need its on interface to the hardware
John Golin.
www.simulatorsolutions.com.au

asboyd

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
Alex Boyd... Sydney, Australia

John Golin

Ah righto - good stuff. :)

Very satisfying when it works isn't it?!
John Golin.
www.simulatorsolutions.com.au

asboyd

It's even better when your wife stops trying to get you see a doctor.... :P


Cheers,
Alex Boyd... Sydney, Australia

JP59

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 ?

John Golin

#37
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


Hydraulics Panel interfaced to PSX.

Cheers

John
John Golin.
www.simulatorsolutions.com.au

JP59

Very impressive but it looks like a commercial solution. You spoke about releasing codes for free for the community.

Jeroen Hoppenbrouwers

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