-
Posts
303 -
Joined
-
Last visited
-
The Tornado cockpit still exists. As mentioned I reactivated the swimming pool the cockpit was placed in for my two sons. The cockpit is now in a storage building to be reactivated when I get retired Here some pics of "the last Flight" I just reused throttle and stick an will probably take out the ejection seat.
-
-
Hi Ulukaii, great job with the WinWing integration! Think, I will change my current setup for your files. Looks really great!
-
yes the wooden parts are all made on my cnc. The open Hornet project has very detailed Fusion 3d models. You can export all parts for 3d printing, cnc cutting or laser engraving. The three front mfds and the ufc are bought from winwing. All usb and backlit. I am very happy with the quality for the moderate price. Throttle and stick are from my A-10 cockpit (Thrustmaster) The PCBs for the backlighting I had to order at a minimum of 5 pieces per panel, so I now have 4 complete sets that I don't need. If anybody wants to buy them for small money, please contact me.
-
-
Hi Folks, perhaps some of you know me from 10 years ago when I have build an A-10 cockpit with a real Tornado shell. (Gremlin's A-10 here in the forum) Now my kids are a bit grown up and the indoor pool my cockpit was sitting in is now guess.... a swimmingpool for the kids. But at the end of 2024 I had a bit of free time so my older son (6 years) I decided to return to the hobby of cockpit building. We wanted to go a bit smaler with a F-18 cockpit from The Open Hornet Project, a faboulus project from some real amazing enthusiasts. The cockpit fits in a normal room and in combination with the great VR options and the passthrough abbility of the quest 3 it is getting quite immersive. Actually the wooden frame is finished, all panels with included backlighting are lasered. Everything is hammered together so I think now its time to bring you some pictures. So stay tuned!! Happy to be back again, Gremlin
-
Wow these instruments are super impressive! I like the 3d relief of your front panels. Mine are all quite flat....
-
Okay, lets talk about pricing. The tornado cockpit was totally empty and so it was not so expensive ( think it was about 3000 to 4000€). It was from a company that restores planes for museums, and the shell was the rest. An expensive thing was transportation with about 1000€ and the ejection seat with about 2000 €. But think about buying all separate parts of a seat, would be much more expensive and you wont find them all..... The two projectors are about 450€ each, the projection surface is a simple kind of cotton. The pc, dcs runs on is an i7 with a modern graphic card an 24 gb memory i think. Another old pc for instrument panels projection. The whole electronic stuff was without counting the try and error versions perhaps about 300€. And thats all. The rest is spending a lot of my free time, but this is also the beautifull thing about its
-
okay received three arduino pro minis and three Rs485 today and hooked them together. I tried simple send and receive programs but get lots of transmission errors (missing or changed bytes) in the setup. Also, I think managing a multiple master setup with the RS485 seems quite complicated. Using tokens may work, don't know. For me, my I2C solutions is the simplier way to get to success more quickly and in an easier way. Never came accross with transmission errors in my I2C setup. Maybe because I keep the cable length short and frequency quite low.
-
you're surely right. I solved the problem of long cables by dividing the pit into quadrants. In every quadrant i installed a knot directly in the middle next to the arduino, where i plug in all mcp modules. So the cable lenght is 40cm at max. The cables from mcp to panels are not critical, so they take the "long distance" This setup works fine for me. But i ordered three arduino pro minis and the bridges to try out your suggestions. I am curious about how it will work.
-
Thanks a lot. Happy that you like it as i do!
-
Software-Side okay lets just try to implement an arduino sketch that pushes an switch in DCS using DCS-Bios and I2c: To use the Program, please make shure DCS-Bios library and MCPExpander library are installed correctly in Arduino IDE and that your MCP23016 is found by I2CScanner on adress 0x20 (a0-a2 connected to ground) To make sure, that your DCS-BIOS is connected correctly to DCS just use the MasterCaution example of DCS-BIOS connecting a switch to Pin 10 of your arduino: #include <DcsBios.h> #include <Servo.h> /* Instantiate a ProtocolParser object to parse the DCS-BIOS export stream */ DcsBios::ProtocolParser parser; /* Declare a Master Caution Reset button on pin 10 */ DcsBios::Switch2Pos masterCautionBtn("UFC_MASTER_CAUTION", 10); /* Make the LED connected to pin 13 into a Master Caution Light */ DcsBios::LED mcLed(0x1012, 0x0800, 13); void setup() { Serial.begin(500000); } /* Your main loop needs to pass data from the DCS-BIOS export stream to the parser object you instantiated above. It also needs to call DcsBios::PollingInput::pollInputs() to detect changes in the state of connected controls and pass them on to DCS. */ void loop() { // feed incoming data to the parser while (Serial.available()) { parser.processChar(Serial.read()); } // poll inputs DcsBios::PollingInput::pollInputs(); } /* You need to define void sendDcsBiosMessage(const char* msg, const char* arg) so that the string msg, followed by a space, the string arg and a newline gets sent to the DCS-BIOS import stream. In this example we send it to the serial port, so you need to run socat to read the data from the serial port and send it over UDP to DCS-BIOS. If you are using an Ethernet Shield, you would probably want to send a UDP packet from this subroutine. */ void sendDcsBiosMessage(const char* msg, const char* arg) { Serial.write(msg); Serial.write(' '); Serial.write(arg); Serial.write('\n'); } /* This subroutine gets called every time a write access is received from the export stream (you need to define it even if it does nothing). Use this to handle outputs which are not covered by the DcsBios Arduino library (e.g. displays). */ void onDcsBiosWrite(unsigned int address, unsigned int value) { } Now we change the Program a bit to use an I2C Input instead of an arduino input: Connect your button now to MCP23016 GP0.0 (Pin 21) and Ground. #include <DcsBios.h> #include <Servo.h> #include <Wire.h> #include <SPI.h> #include "IOexpander.h" /* Instantiate a ProtocolParser object to parse the DCS-BIOS export stream */ DcsBios::ProtocolParser parser; /* Declare a Master Caution Reset button on pin 10 */ /* Make the LED connected to pin 13 into a Master Caution Light */ DcsBios::LED mcLed(0x1012, 0x0800, 13); IOexpander MCP[8]; // Define one MCP int lastState[8][2][8]; // Store the "old" state of the Input pins, (MCP)(Bank)(Pin) void setup() { Serial.begin(500000); MCP[0].init(0x20,MCP23016); // Define adress of MCP23016 MCP[0].pinModePort(0, INPUT); // Define Bank 0 (GP0) as input MCP[0].pinModePort(1, INPUT); // Define Bank 1 (GP1) as input } void loop() { // feed incoming data to the parser while (Serial.available()) { parser.processChar(Serial.read()); } // poll inputs DcsBios::PollingInput::pollInputs(); Switch2Pos ("UFC_MASTER_CAUTION","TOGGLE", 0, 0, 0); // Here we define A 2 Position switch on MCP 0, Bank 0, Pin 0 } void sendDcsBiosMessage(const char* msg, const char* arg) { Serial.write(msg); Serial.write(' '); Serial.write(arg); Serial.write('\n'); } void onDcsBiosWrite(unsigned int address, unsigned int value) { } // Define our I2C version of Switch2Pos void Switch2Pos(char* msg, char* arg, int chip, int bank, int pin) { char state = MCP[chip].digitalRead(bank, pin); // reads the Pin of the MCP if (state != lastState[chip][bank][pin]) { sendDcsBiosMessage(msg, state == 1 ? "0" : "1"); } lastState[chip][bank][pin] = state; } Okay here we go: First we include the necesary Files for I2C communication: #include <Wire.h> #include <SPI.h> #include "IOexpander.h" Then define one MCPDevice of Class IOExpander: IOexpander MCP[8]; // Define an array of 8 MCPs Then we generate an array to store the Input values we've read the last cycle: int lastState[8][2][8]; // Store the "old" state of the Input pins, (MCP)(Bank)(Pin) In the setup() function we define the type of PortExpander we use and what funfionallity we want (in our case all inputs): MCP[0].init(0x20,MCP23016); // Define adress of MCP23016 MCP[0].pinModePort(0, INPUT); // Define Bank 0 (GP0) as input MCP[0].pinModePort(1, INPUT); // Define Bank 1 (GP1) as input In the main loop we call our function defined at the end of the program to ask if the switch connected on MCP23016 GP0.0 is pressed. If yes we send a message to DCS: Switch2Pos ("UFC_MASTER_CAUTION","TOGGLE", 0, 0, 0); // Here we define A 2 Position switch on MCP 0, Bank 0, Pin 0 and the function definition after the main function: void Switch2Pos(char* msg, char* arg, int chip, int bank, int pin) { char state = MCP[chip].digitalRead(bank, pin); // reads the Pin of the MCP if (state != lastState[chip][bank][pin]) { sendDcsBiosMessage(msg, state == 1 ? "0" : "1"); } lastState[chip][bank][pin] = state; } Hope I could explain the software part a bit understandable:cry:
-
Hadware side - Inputs okay lets have a look at the MCP 23016 chip: the pins you have to use for minimal: VSS (Pins 1,8,19): connect to -5V of arduino board VDD (Pin 20): connects to +5V of arduino board SDA (Pin 15): connects to arduino SDA SCL (Pin 14): connects to arduino SCL A0-A2(Pins 16-18): connect to either ground or +5V to set the chip adress now you can just use the GP pins to connect your switches etc. by pulling them on turned on switch to ground. And thats all. the software side: to test, if your circuit works just use the I2C Scanner arduino sketch: // -------------------------------------- // i2c_scanner // // Version 1 // This program (or code that looks like it) // can be found in many places. // For example on the Arduino.cc forum. // The original author is not know. // Version 2, Juni 2012, Using Arduino 1.0.1 // Adapted to be as simple as possible by Arduino.cc user Krodal // Version 3, Feb 26 2013 // V3 by louarnold // Version 4, March 3, 2013, Using Arduino 1.0.3 // by Arduino.cc user Krodal. // Changes by louarnold removed. // Scanning addresses changed from 0...127 to 1...119, // according to the i2c scanner by Nick Gammon // [url]http://www.gammon.com.au/forum/?id=10896[/url] // Version 5, March 28, 2013 // As version 4, but address scans now to 127. // A sensor seems to use address 120. // // // This sketch tests the standard 7-bit addresses // Devices with higher bit address might not be seen properly. // #include <Wire.h> void setup() { Wire.begin(); Serial.begin(9600); Serial.println("\nI2C Scanner"); } void loop() { byte error, address; int nDevices; Serial.println("Scanning..."); nDevices = 0; for(address = 1; address < 127; address++ ) { // The i2c_scanner uses the return value of // the Write.endTransmisstion to see if // a device did acknowledge to the address. Wire.beginTransmission(address); error = Wire.endTransmission(); if (error == 0) { Serial.print("I2C device found at address 0x"); if (address<16) Serial.print("0"); Serial.print(address,HEX); Serial.println(" !"); nDevices++; } else if (error==4) { Serial.print("Unknow error at address 0x"); if (address<16) Serial.print("0"); Serial.println(address,HEX); } } if (nDevices == 0) Serial.println("No I2C devices found\n"); else Serial.println("done\n"); delay(1000); // wait 5 seconds for next scan } If you have set all A0-A2 Pins to ground the scanner should find an I2C device at adress 0x20.
-
Hi all, in this thread, I will try to explain how to use the Arduino based software DCS-BIOS with I2C devices. The biggest advantage of I2C (from my point of view): Large number of diffenet devices Easy to configure in arduino code very stable interface if you stay in the limitations Devices are very low-cost no cable mess in your cockpit So what is I2C I2C was designed to interconnect chip devices in a very convinient way. You just have two cables connecting the devices. SDA and SCL. These lines are connected from device to device. Thats quite all you have to know. In detail, its a bit meore complicated as you have masters and clients and so on. But you just have to know one thing. In our usage, the arduino is always the master and the added chips are the clients. So its the work of the arduino to do all the communication stuff. So what devices are usefüll for a homecockpit? The things you need most are inputs and outputs to connect all your switches, buttons and LEDs to your simulator. So the I2C device I use most in my setup is the MCP23016. This chip is called an Input/Output expander. The work it does is quite simple: Connect one chip to your I2C network and gain 16 Inputs/Outputs. Each MCP23016 has 3 adress bits, so one I2C network can have up to 8 MCP23016 chips. This makes an overall off 128 Inputs / Outputs. And this is exactly what we need. To get all functions of the A-10 working, I use 4 arduinos each with 8 MCP23016 having 512 Inputs / Outputs. I devided the A-10 cockpit in main parts: left console right console front console "the rest" In future posts I will send some details about how to set up the hardware side correctly. Or u just google for the MCP 23016 datasheet. Now the problem was how to use the great DCS-BIOS software, which is designed to use the standard Arduino ports, communicating with the I2C devices. First I tried to implement the I2C functions directly into the .cpp and .h files of DCS-BIOS. It worked, but not quite well. I'm just not a good programmer to deal with virtual funktions and so on. So I went the more simple way and added the funktions directly into the arduino code. The biggest advantage for me was, that if you need a new kind of Switch, you just add a funktion in arduino code without changing the DCS-Bios library. Here is an example: void Switch2Pos(char* msg, char* arg, int chip, int bank, int pin) { char state = State[chip][bank][pin]; if (state != lastState[chip][bank][pin]) { sendDcsBiosMessage(msg, state == 1 ? "0" : "1"); } lastState[chip][bank][pin] = State[chip][bank][pin]; } This function is called when one state of an I2C device has changed. Time by time the different kinds of switches I used in my cockpit raised to about 10. and it's very easy to add more. In the next chapter I will try to explain how you get your program to communicate with your MCP's
-
Finally some pics of my current setup: Sorry for not having a perfect fit between the two projections in the middle. Have to readjust it in immersive.