Board index FlightGear Development

Cockpit in a box with arduino

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

Re: Cockpit in a box with arduino

Postby ludomotico » Fri Dec 13, 2013 1:33 am

My design is pretty similar, but much simpler: not as many 7-segments, not as many buttons and less rotatory encoders. The switch panel will be a 5x5 matrix with its 25 diodes, and I'm not planning to use any 8-to-3 encoder for them.

I also believe serial USB communications to a "driver" in the PC will be simpler, at least during the first iteration. In fact, if we configure the panels as USB HID, I'm not sure if FlightGear could send data directly to the panels through the USB cable. I find easier coding a "proxy driver" in the PC that connects to FlightGear using the usual channels, telnet or IO protocols, and to our panels using the serial port.
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Cockpit in a box with arduino

Postby pommesschranke » Sat Dec 14, 2013 1:45 pm

I did not try it yet, but I was reading examples without such a "middleware" on the PC, like this:

Code: Select all
fgfs  --generic=serial,in,25,/dev/ttyUSB0,9600,mySerial


https://gitorious.org/arduinocockpit/

http://wiki.flightgear.org/Generic_protocol
If you're using a serial port ...
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: Cockpit in a box with arduino

Postby Hooray » Sat Dec 14, 2013 1:50 pm

ludomotico wrote in Fri Dec 13, 2013 1:33 am:I also believe serial USB communications to a "driver" in the PC will be simpler, at least during the first iteration. In fact, if we configure the panels as USB HID, I'm not sure if FlightGear could send data directly to the panels through the USB cable.

right, FlightGear does not currently have native USB/HID support (yet), but there's a pending feature request related to add this, and it's been accepted by core developers - so any feedback related to this would surely be useful and appreciated: http://wiki.flightgear.org/USB_HID_Support

https://code.google.com/p/flightgear-bu ... ail?id=619
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Cockpit in a box with arduino

Postby pommesschranke » Tue Dec 24, 2013 2:50 pm

some new pictures of the build progress...
http://www.23hq.com/laserman/album/5532124

using shift-registers I can now control the whole 32x2 Display with only 5 pins on the micro controller.
The display is very useful as a debug-output.
2 of the 6 rotary encoders are working since yesterday.
next: build the 7x7 matrix for the switches & buttons with some diodes and one 7442.
Diodes only for the switches. buttons don't need diodes, I guess. Iwill try that.
Last edited by pommesschranke on Thu Dec 26, 2013 2:01 pm, edited 1 time in total.
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: Cockpit in a box with arduino

Postby ludomotico » Thu Dec 26, 2013 11:08 am

Amazing. Really.

Which material did you use for the cockpit? Is it transparent PMMA on a printed paper? I'm afraid I don't have the tools to work with PMMA, and my cockpit won't have the amazingly professional look yours has.

I believe buttons DO need diodes to prevent miss-reading OTHER switches. Unless one of your rows/columns only includes buttons and you are not planning to push two of them at the same time :)
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Cockpit in a box with arduino

Postby Hooray » Thu Dec 26, 2013 12:55 pm

agreed, looking really good!

until we have a dedicated sub forum for these things, I'd suggest to use the wiki (or at least the newsletter) to post updates - this is definitely interesting and applies to FlightGear obviously, and we do have quite a few people interested in this sort of stuff - also, our newsletter is still a bit thin on content currently :lol:
Let me know if you need help adding things to the newsletter, and please feel free to also add screen shots, photographs or youtube videos !
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Cockpit in a box with arduino

Postby pommesschranke » Thu Dec 26, 2013 1:30 pm

Thank you both for your friendly words.

ludomotico:
It's 4mm hard cardboard - similar to MDF wood. That material is very cheap and very easy to cut, mill, drill and file.

I have 5mm PMMA on stock but I did not dare to use it because I'm a beginner on the CNC mill.
It will need some experiments to find the right speed and cooling for that material.

I used white self adhesive inkjet film (Folex, Arkwright,..)
It did look nice, but then I noticed that the smallest drop of water removes the ink from the film (HP inkjet printer) :(
So I needed another transparent protective film. I did not manage to apply that second layer without wrinkles. if you zoom into this pictures then you can see it:
http://www.23hq.com/laserman/photo/15028305/original

Another better option might be to laminate that film or laminate normal paper.
Or buy professional printed vinyl film which is water-proof.

Only the switches have diodes. I will not press 2 buttons at the same time. It works o.k. so far.
I will do some more testing later when I work on the de-bouncing part of the software.

Did you already write some python code to transport/convert the data from USB-serial to FlightGear UDP-sockets ?
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: Cockpit in a box with arduino

Postby ludomotico » Thu Dec 26, 2013 2:00 pm

Not yet. I'm out of home enjoying a few days with the family... and dying to get my hands dirty on the project!

I will use MDF for the panel structure, and I din't think about the paper yet.
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Cockpit in a box with arduino

Postby pommesschranke » Thu Dec 26, 2013 3:57 pm

you are right: I don't have enough diodes, and I have them partly on the wrong (useless) places.
I have to re-think about that...

UPDATE:
after some more testing: there is only one (unimportant) switch that causes ghosting.
I will put him in a different row and everything will be fine.
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: Cockpit in a box with arduino

Postby pommesschranke » Sun Dec 29, 2013 1:25 am

The hardware is mostly finished.
The firmware on the atmeag32 microcontroller looks very messy but it works good so far.
The python "glue code" (USB serial in, FG telnet out) is maybe 30% finished.
Later I will write a interface-file and try to use UDP.

Some properties I can not find in the tree, or I think I found it, but changing it shows no effect. e.g. the QNH value, the scale(zoom) knob on the EFIS, and the push buttons on the FCU panel (FD, ILS, AP1, A/THR, ...)

First aircraft that I tried was the A330. (see video)
In the A320 and 777 the instruments in the virtual cockpit don't get updated, but I can see my values in the http-Server property-tree.

http://youtu.be/_st-qdq4yco
Last edited by pommesschranke on Sun Dec 29, 2013 9:43 pm, edited 1 time in total.
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: Cockpit in a box with arduino

Postby pommesschranke » Sun Dec 29, 2013 2:18 pm

found a nice way to set the com/nav freq:
http://www.youtube.com/watch?v=dWHcjeJKOoQ
pommesschranke
 
Posts: 1117
Joined: Sat Apr 27, 2013 8:58 pm
Location: EDLM & LJCE
Callsign: d-laser
IRC name: laserman
Version: git
OS: Linux Kubuntu 22.04

Re: Cockpit in a box with arduino

Postby ludomotico » Sun Dec 29, 2013 8:19 pm

My encoders also have a push button, and I was planning to do exactly the same thing :)
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Cockpit in a box with arduino

Postby javiertecteos » Wed Dec 26, 2018 11:30 pm

Acabo de iniciarme en el uso de Flightgear y hace varios años uso arduino, encontre esta pagina

http://playground.arduino.cc/Main/FlightGear

Por ahora he encontrado estos dos ejemplos:

Del 2011
Este foro

Del 2013
http://embaranger.free.fr/viewtopic.php?id=920

Estaré realizando pruebas con estas dos plataformas de código abierto, si tienen ejemplos o sugerencias de lo que se puede hacer integrando estas tecnologías se las recomiendo.
javiertecteos
 
Posts: 1
Joined: Tue Dec 11, 2018 4:42 pm

Previous

Return to Development

Who is online

Users browsing this forum: No registered users and 13 guests