JCook Posted June 25, 2015 Posted June 25, 2015 Does it make a difference to DCS BIOS / Arduino if an ON-OFF switch is used as opposed to an ON-ON switch configuration?
Boltz Posted June 25, 2015 Posted June 25, 2015 No because you can assume that if the switch is not in the "on" then it must be in the "off" position. Using on-on will only waste inputs, it will make no difference to the operation of the switch. A-10C Cockpit Build Thread My YouTube Channel
JCook Posted June 25, 2015 Author Posted June 25, 2015 Ok - if I understand you then ON-ON and ON-OFF are functionally the same to DCS-BIOS and Arduino as long as they are wired the same. And my question really is about using ON-ON functionally as ON-OFF. The ON-OFF switch has one pole and ground, and each are wired. The ON-ON has two poles and ground and you only wire one of the poles and ground, when used in ON-OFF functionality. Do I have that right?
Boltz Posted June 25, 2015 Posted June 25, 2015 Yes that is exactly how it works A-10C Cockpit Build Thread My YouTube Channel
JCook Posted June 25, 2015 Author Posted June 25, 2015 Thanks Boltz. As I understand it, right now the way to connect an Arduino (and its panel) to DCS-BIOS is via a USB connection. This could require a good number of USB connections - in addition to the regular USB ports required for the HOTAS, pedals, MFDs, etc. For the other options being explored Ethernet, I2C and RS-485. What is going to be the best solution - or what do I need to consider to determine the best solution. Thanks
FSFIan Posted June 25, 2015 Posted June 25, 2015 Thanks Boltz. As I understand it, right now the way to connect an Arduino (and its panel) to DCS-BIOS is via a USB connection. This could require a good number of USB connections - in addition to the regular USB ports required for the HOTAS, pedals, MFDs, etc. For the other options being explored Ethernet, I2C and RS-485. What is going to be the best solution - or what do I need to consider to determine the best solution. Thanks RS-485 will be the way to go. Ethernet is several times more expensive in hardware, and some insightful discussion in the original DCS-BIOS announcement thread has convinced me that I2C is too error-prone, especially considering the low price of MAX487 chips. RS-485 was designed for bus lengths that far exceed anything you will ever need in a simpit and the differential signalling makes it robust against interference (e.g. from PWM-dimmed backlights). I have started working on the RS-485 implementation. Early tests have shown that I won't get the accurate timing I want (5 millisecond timeout) with a USB-to-RS-485 adapter connected to a desktop PC, so I plan to make a sketch that turns an Arduino Mega 2560 into an adapter that connects three RS-485 buses to the computer. The Mega 2560 has four hardware UARTs, one to talk to the PC and three for the RS-485 buses. I am waiting for my Mega to be delivered. It should arrive in time for me to start tinkering this weekend, but it may be delayed due to a strike of the german postal service. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
JCook Posted June 25, 2015 Author Posted June 25, 2015 Thanks for the update. RS-485 it is then. I'll plan around your progress. Much thanks for your ground breaking work. I connected my Arduino UNO up to DCS BIOS the other day and had the Master Caution example working within minutes and I also managed to connect up the battery switch. If I can do this then anyone can. I am looking forward to learning more about electronics as I connect up my cockpit with DCS BIOS. - this is really cool stuff.
JCook Posted June 28, 2015 Author Posted June 28, 2015 Is the serial port identified in the Arduino IDE used for any Arduino I connect? In other words if I have multiple Arduinos of various models they are all programmed (uploading sketch) one at a time from the IDE. So does the serial port remain the same?
FSFIan Posted June 29, 2015 Posted June 29, 2015 If you have several Arduino boards connected at the same time, you need to make sure that the Arduino software is set to the correct port before clicking "Upload". The currently selected board and serial port appear in the status bar in the bottom right corner. The setting applies to all open IDE windows, so if you change it in one, it changes in all the others too. If you connect an Arduino, program it, disconnect it, and connect another board, it may or may not appear on the same COM port number as the first one. Depends on whether the board supplies a serial number, whether you use the same USB port or not, and on the phase of the moon. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
JCook Posted June 30, 2015 Author Posted June 30, 2015 The Arduino digital and analog sockets are setup for easy configuration changes - pushing in or pulling out a wire. Since we're using the Arduino in a more permanent way (panel connectivity) is there a better or preferred way to connect the wires to the sockets and hold them in place?
agrasyuk Posted June 30, 2015 Posted June 30, 2015 I'm using the usual female header connectors with housings. I dont own a molex crimper so i solder wires . Auction with dual connector shown , but you can get them in many configurations. http://m.ebay.com/itm/131431474365 http://m.ebay.com/itm/131431474365 Anton. My pit build thread . Simple and cheap UFC project
rocketeer Posted June 30, 2015 Posted June 30, 2015 I started with using these type of female pins as I had a bunch of them. https://buildyourcnc.com/item/3d-printer-component-connector-female-2!54-pitch-newbiehack-connectors-female-2!54pitch-wrcon then plug them into a pin strip, then into the arduino board. But one side of the pin strip is always too short to hold securely. Then I use the male pins from pololu. They go all the way into the sockets and hold better. https://www.pololu.com/product/1931 and use them with the female header connector to prevent the body of the male pins from touching each other. Else you have to use rubber heat shrink tubes to wrap each pin's body. My A10C cockpit thread
JCook Posted July 5, 2015 Author Posted July 5, 2015 (edited) Thanks guys for the good information. Is there a standard gauge wire we should use for the DCS BIOS - Arduino builds? Looking for a gauge recommendation that can be used with all connections, toggle switches, rotaries, LEDs, servos, etc. Another Question - What is the best way to wire up the ground (GND) connections for a panel? For example the A10's Electric panel has six toggle switches so there will be six GNDs that come from the switches. These need to be "tied" together - what is the best way of doing this so they can all go to the same GND connection on the Arduino. Even though there are several GND sockets on the Arduino I am assuming one GND can be used for all. Thanks Edited July 5, 2015 by JCook
agrasyuk Posted July 5, 2015 Posted July 5, 2015 Don't stress to much about gauge. Its important when you hooking up high amp device like stove or AC. But for signalling any gauge will do without danger of fire. I used a lot of phone and network cables, that's #22. Or old IDE HDD cables , those are even finer. Just daisy chain the common terminal of the switches between each other before connecting to ground with one lead. Anton. My pit build thread . Simple and cheap UFC project
JCook Posted July 5, 2015 Author Posted July 5, 2015 Thanks Anton. For daisy chaining is there a "clean" way to tie all these wires together - like some type of block? Without knowing better what I would do is strip off a 1/2 inch on each wire, wind them together, solder the bundle and them wrap it in electrical tape. But that's kind of ugly and since this is new to me I thought maybe there is a preferred method. Got any pictures of what it should look like? Also - use solid wire or stranded?
raus Posted July 6, 2015 Posted July 6, 2015 Just for the looks, you could try something like this: http://www.adafruit.com/search?q=splice Anyway, I tend to prefer soldered joints, based on past experience. Just use heat-shrink tubing instead of electrical tape ;) GV5Js DATACARD GENERATOR
G00dnight Posted July 6, 2015 Posted July 6, 2015 I plug them in then after testing hot glue them in place so they can be undone if needed. AMD A8-5600K @ 4GHz, Radeon 7970 6Gig, 16 Gig Ram, Win 10 , 250 gig SSD, 40" Screen + 22 inch below, Track Ir, TMWH, Saitek combat pedals & a loose nut behind the stick :thumbup:
agrasyuk Posted July 6, 2015 Posted July 6, 2015 (edited) Bundle will work. But By daisy chain i meant that common you connect com terminal of first switch to com terminal of the second, then to third and so on . At the end you have just one lead from last switch so nothing to bundle and tape. Picture below doesn't really meet your requirement of "good looking" but that's how I did on my pre laser paneling attempt: all the wires are terminated (solderwd) at pin headers on the perfboard. From there connected to input electronic board of choice via ribbon cable. . For most of new panels I intend to have arduino mini right there on board. But again there are so many ways to wire. ADD: and since you don't need to be in compliance with any industry Standart your only requirement is function + whatever level of aesthetics you desire. Edited July 6, 2015 by agrasyuk Anton. My pit build thread . Simple and cheap UFC project
JCook Posted July 17, 2015 Author Posted July 17, 2015 COM questions Thanks guys for your input. I've been doing some experimenting and I did my preliminary testing with an Arduino Duo which was recognized on COM4. I bought an Arduino Mega2560 to use for the UFC and it was recognized by Windows on COM6. Then I needed to change the type of Arduino and the port in the Arduino IDE. When things didn't work I realized I also needed to change the COM port in the connect-serial-port.cmd file as well. Now the Arduino Mega works. Now the question is when I start building my panels and am connecting multiple Arduinos how does the connect-serial-port.com read all the different COM ports from the boards? Do I run multiple versions of the program or do I change the settings in the program? Also, I will be building a DCS World PC and will be attaching all of these Arduinos to the new PC - So they will potentially have different COM ports assigned on the new machine as opposed to my testing PC. Correct?
FSFIan Posted July 17, 2015 Posted July 17, 2015 Yes, each different Arduino will need a separate copy of the batch file. You can also try ArthurDCS's ComHandler program, although with my Mega I had the problem that the board would reset when the program opened the serial port and then would be stuck in the bootloader because it was immediately bombarded with data -- workaround: pause the simulation when you click the button to connect the serial port. The official solution to connect multiple board will be an RS-485 bus. I got the first prototype working about two hours ago, but error handling still needs a significant amount of work. On the new machine, the boards will probably get assigned different COM port numbers. You can change the COM port that is assigned to a serial interface in the Windows device manager, but whether that change persists depends on whether Windows can recognize the device again later (a lot of Arduino boards and serial-to-USB adapters don't bother to specify a unique serial number). DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
Kelevra9987 Posted July 20, 2015 Posted July 20, 2015 Is it possible to take data from a gauge in the Cockpit, let's say the lEngineFuelFlow and instead send it to a servo, translating it into a number to display it on a LCD? Modules: Well... all of 'em ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Motherboard: ASUS Maximus VIII Hero | CPU: i7-6700K @ 4.6GHz | RAM: 32GB Corsair Vengance LPX DDR4 | GPU: GTX TITAN X (Maxwell) | SSD1: 256GB NVMe SSD System | SSD2: 250GB Games | HDD 4TB WD Red
FSFIan Posted July 20, 2015 Posted July 20, 2015 Is it possible to take data from a gauge in the Cockpit, let's say the lEngineFuelFlow and instead send it to a servo, translating it into a number to display it on a LCD? Yes. You can program your Arduino to do whatever you want it to with the data that it receives. You will probably have to write some code to convert the angle that we get out of DCS to the value you would read from the instrument's scale, though. For some instruments, this will be as easy as calling the map() function that is supplied with the Arduino IDE. Other instuments require a bit more complex code because the angle of the pointer is not proportional to the numeric value or because you have to evaluate multiple export values to get the numeric value (e.g. the altitude as displayed on the altimeter). DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
Kelevra9987 Posted July 21, 2015 Posted July 21, 2015 In the next few days my First Arduino and a 16x1 LCD will arrive. So I am fairly new to the Arduino world. However I have some old rusty C/C++ knowledge if that helps :) I also watched all your Videos on Youtube so a little foundation is allready placed. If you could help me or at least give me some hints how to convert the Data i'll get from DCS-BIOS especially for the EngineFuelFlow gauges because they are planned to be build into my Custom Cockpit. Cheers :) Modules: Well... all of 'em ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Motherboard: ASUS Maximus VIII Hero | CPU: i7-6700K @ 4.6GHz | RAM: 32GB Corsair Vengance LPX DDR4 | GPU: GTX TITAN X (Maxwell) | SSD1: 256GB NVMe SSD System | SSD2: 250GB Games | HDD 4TB WD Red
Recommended Posts