Jump to content

MIG-21 panel (test and evaluation)


BravoYankee4

Recommended Posts

Well, it isn't pretty and that was not the intention either. This serves as a temporary mockup and a proof of concept. The purpose is mainly to get me some lessons learned before I do a final build.

 

And yes, I have already made some conclusions...

First, there will be a lot of wiring and I need to figure out the best way of routing this. And I have to build some breakout adapters (shields) for the Arduino(s).

Probably I will do something with ribbon cables (similar to IDE hard drive) with quick connectors.

 

My plan is also to do some pcb's with ULN2803 drivers so I can add light bulbs and LED's with greater power. Perhaps a combined driver/break out board.

 

 

The original plan was to build a MIG-21 cockpit, but now having the AJS-37 Viggen more or less confirmed that will be my future priority.

Still, I wan't to enjoy the MIG-21 during this linger so I will continue with this "bastard panel" with some commonly used switches and indicators. Eventually I will build build a second for the right side indicators and controls.

MIG_Panel.thumb.jpg.b7adb17d34233b0a0dd083fff28c6b80.jpg

Link to comment
Share on other sites

It'd be interesting to see what solutions you come up with BY. I have been thinking about getting into a cockpit build, but I have a feeling it'll be a huge can of worms!

 

It's always good to be able to pick up on other people's experiences, so thanks for the info.

Link to comment
Share on other sites

It'd be interesting to see what solutions you come up with BY. I have been thinking about getting into a cockpit build, but I have a feeling it'll be a huge can of worms!

 

It's always good to be able to pick up on other people's experiences, so thanks for the info.

 

The PCB's will be general and the plan is to share the gerber files so anyone can order their own.

With the current low cost PCB makers in China it is plain stupid to mess around with prototype boards any more.

 

I will idle a little more and see in what direction the next version of DCS-Bios goes. It looks like Ian will go for a RS-485 bus and Arduino nanos, but I need that fully confirmed before setting my design. The second option is to go for a couple of Arduino Megas.

The obvious advantage with a bus and nano's is that you can have distribution points behind every sub panel, reducing the wires significantly.

 

Another way of doing it is to use standard RJ-45 cables and build breakout boards. Then you can have 7 in- or outputs (plus ground) per cable.


Edited by BravoYankee4
Spelling
Link to comment
Share on other sites

It looks like Ian will go for a RS-485 bus and Arduino nanos

 

Almost -- I am going for an RS-485 bus with Arduino Pro Minis, which are very similar to Nanos. The Pro Mini has two analog input pins less than the Nano, does not have a USB adapter on board, and it is slightly smaller and cheaper because you don't have to pay for a onboard USB-to-serial chip that won't see any use once the code works and the board is connected to the RS-485 bus.

 

But since the Nanos use the same ATMega328 controller, they will be just as well supported as Pro Mini boards, and at the prices below the decision between the Pro Mini and the Nano is not one driven by price -- just use whichever is more convenient for a particular panel.

 

On AliExpress, I can find:

(On eBay, the price difference between the Nano and Pro Mini is a little more, about 0.64 €.)

 

I plan to also support the Mega as an RS-485 slave device, but before I can do that I need to order a second Mega :)

 

Let's do a quick comparison between one Mega and four Pro Minis, assuming we need three pins (RX, TX, TX_ENABLE) to connect them to a RS-485 transceiver.

 

Arduino Mega 2560

Usable GPIO Pins: 67

RAM: 8K

Program Flash: 256K

Cost including one RS-485 transceiver: about 5.90 €

 

4 Arduino Pro Minis

Usable GPIO Pins: 60 (15 each), 67 if you count A6 and A7 which are analog input only

RAM: 2K each

Program Flash: 32K each

Cost including four RS-485 transceivers: about 6.24 €

 

In my opinion, unless you have special requirements (e.g. need lots of flash to store images/fonts for a graphical display), four Pro Minis are better than one Mega:

  • More processing power in total (the Mega runs at 16 MHz just like the Pro Mini). I honestly have no idea whether a Mega with lots of outputs would even work reliably.
  • Each panel can get its own microcontroller and can be built, tested and maintained independently
  • Helps to avoid Kabelsalat because you don't have to route 70 wires to one board

 

In general, I would stay away from Arduino(-compatible) boards that are not powered by either the ATMega328 or the ATMega2560 controller. DCS-BIOS will probably work with them, but only in a "compatibility mode" using the default Serial library. That means no RS-485 support and no properly interrupt-driven serial communications. They can still be a good choice for special cases, such as running a CDU display on some ARM-based board running at 80 MHz.


Edited by [FSF]Ian
Link to comment
Share on other sites

Vielen dank Ian. Your input is always welcome.

 

I got some of the micros without the usb-port, but never got the programming (with the USB-serial adapter) to work. So after some faul language they are back on the shelf doing nothing. So from my perspective it is money well spent having some extra cost for boards that can easily be hooked up directly with an USB cable for (re-)programming.

Anyway, the arduinos is one of the smaller posts in the cockpit budget anyway :music_whistling:

 

Speaking of kabelsalat this picture of the old telephone distribution tower in Stockholm comes to mind :)

 

zpCdbSo.jpg

  • Like 1
Link to comment
Share on other sites

I got some of the micros without the usb-port, but never got the programming (with the USB-serial adapter) to work.

 

The key is to either connect the Arduino's RST pin to the DTR signal from the serial adapter or to manually tap the reset button right after the Arduino IDE status switches from "Compiling..." to "Uploading...".

 

You also have to make sure the connections are correct.

 

Normally, you would expect the following:

TX (Adapter) -- RX (Arduino)

RX (Adapter) -- TX (Arduino)

DTR (Adapter) -- RST (Arduino)

 

Some adapters have RX and TX labelled the other way around, so you need to connect signals with the same name (those also tend to label the DTR signal "RST"):

RX (Adapter) -- RX (Arduino)

TX (Adapter) -- TX (Arduino)

RST (Adapter) -- RST (Arduino)

Link to comment
Share on other sites

Ian;2635303']The key is to either connect the Arduino's RST pin to the DTR signal from the serial adapter or to manually tap the reset button right after the Arduino IDE status switches from "Compiling..." to "Uploading...".

 

You also have to make sure the connections are correct.

 

Normally, you would expect the following:

TX (Adapter) -- RX (Arduino)

RX (Adapter) -- TX (Arduino)

DTR (Adapter) -- RST (Arduino)

 

Some adapters have RX and TX labelled the other way around, so you need to connect signals with the same name (those also tend to label the DTR signal "RST"):

RX (Adapter) -- RX (Arduino)

TX (Adapter) -- TX (Arduino)

RST (Adapter) -- RST (Arduino)

 

Well, the problem was more like that I never found out what settings to have in the Arduino application - I always got some communication errors... I might revisit that some day.

Link to comment
Share on other sites

It'd be great if someone with the know-how wrote an idiots guide, showing the basic process of setting up a workable solution to home cockpit wiring.

 

I'm utterly ignorant of what is required, as I am sure many others are, but I want to start a project some time.

Link to comment
Share on other sites

  • 3 weeks later...

Here's my MiG-21bis W.I.P. Main Power panel.

Leftside(red) prototype from DirtyPCBs, righthandside is hand-soldered version.

 

next version will be a Arduino Nano shield and Max-487.

 

5oZ2r4xl.jpg

 

New version, with MAX-487. please help if i do it wrong..

(design in kiCAD)

IOy8WRk.png


Edited by pappavis

met vriendelijke groet,

Михель

 

"умный, спортсмен, комсомолетс"

 

[sIGPIC]159th_pappavis.jpg[/sIGPIC]

 

[TABLE]SPECS: i9-9900K 32gigs RAM, Geforce 2070RTX, Creative XFi Fata1ity, TIR5, Valve Index & HP Reverb, HOTAS Warthog, Logitech G933 Headset, 10Tb storage.[/TABLE]

Link to comment
Share on other sites

Gettho style annunciator panels for the MIG. It is a card board mockup with the purpose to try different backlighting techniques for future builds. Meanwhile it gives that extra touch flying the MIG smile.gif

 

They look great, is that coloured acetate and what you using to control led?

Link to comment
Share on other sites

Here's my MiG-21bis W.I.P. Main Power panel.

Leftside(red) prototype from DirtyPCBs, righthandside is hand-soldered version.

 

next version will be a Arduino Nano shield and Max-487.

 

5oZ2r4xl.jpg

 

New version, with MAX-487. please help if i do it wrong..

(design in kiCAD)

IOy8WRk.png

 

There is one big mistake in your schematic - you have connected the wires to Normally Closed. It should be Normally Open.

And best practices says that you connect GND to Common. Doesn't matter with this kind of switch, but if you have a two position switch and you need two inputs it does matter.

Link to comment
Share on other sites

What program are you guys using to run this through DCS?

 

Sent from my SM-G900W8 using Tapatalk

 

We are using DCS-Bios. A great software that makes a connection between the DCS simulator and Arduino boards. It can be used for both input (analog potentiometers, switches and rotary controls) and output (led, servo).

So with this you can build a complete cockpit with "real" hardware.

 

The downside, just a few DCS modules are supported so far. Perhaps the community can step in and help adding more eventually (and let the developer focus on core functionality).

 

[ame]

[/ame]
Edited by BravoYankee4
Spelling
Link to comment
Share on other sites

They look great, is that coloured acetate and what you using to control led?

 

In top, it is a standard oh-film printed with a laser printer.

Then I have a semi transparent film* on a plexi glass sheet.

 

My initial plan was to use standard stage lighting color sheets and low voltage light bulbs (to get the different colors), but for the proof of concept I am using LED's in different colors.

 

The LED's are controlled by a Arduino MEGA via a couple ULN2803 drivers.

 

 

 

* I Have a friend working at an advertiser company and I got this film from him. It can be printed, howver I don't have that kind of printer. It is made for this purpose (backlit commercial signs, panels).

http://www.orafol.com/gp/europe/en/products/inkjet-printing-solvent-based-product-details/items/orajet-3850

MIG_Warninglights_002.thumb.jpg.fcfdf77500f1524ddf259f7b53691621.jpg

MIG_Warninglights_003.thumb.jpg.229a623bfd7efc9f0a04dbe087f78b86.jpg

Link to comment
Share on other sites

There is one big mistake in your schematic - you have connected the wires to Normally Closed. It should be Normally Open.

 

 

TX 4 the tip :):)

I use a 3-pin On-off switch. However this 'works' on my prototype.

but, definitley will correct my design schema.

 

all tips, improvements much appreciated.

 

CHANGELOG:

added Arduino Nano Shield headers.

added RS-485 serialbus communications -- would it work? :helpsmilie:

added RJ-45 ethernet to easily linkup panels to eachother -- tip from BravoYankee4.

added Pushbutton to for example use as chaff dispenser.

added I2C-port interface. Allows further extension of the panel.

added 2x mulitpurpose IO-ports with 5v-powerline.

fixed pot-meters for cabin lighting so 5V are now wired.

changed Silkscreen texts to Russian cyrrilic.

 

c4FUt3jl.png

 

[ame]

[/ame]

met vriendelijke groet,

Михель

 

"умный, спортсмен, комсомолетс"

 

[sIGPIC]159th_pappavis.jpg[/sIGPIC]

 

[TABLE]SPECS: i9-9900K 32gigs RAM, Geforce 2070RTX, Creative XFi Fata1ity, TIR5, Valve Index & HP Reverb, HOTAS Warthog, Logitech G933 Headset, 10Tb storage.[/TABLE]

Link to comment
Share on other sites

Interesting approach. Personally I'm going for a modular system having several small specialized boards. I.e one board for communication (Rs-485 interface and arduino), one board for inputs (breakout board with terminals), one board for outputs (breakout board with ULN2803 and terminals) and one board (shield for the arduino MEGA with RS-485 interaces).

DCSBIOS_Setup.png.5c93f0ec8cdea1466be9f380cc546f12.png

Link to comment
Share on other sites

  • 4 months later...

Finally got some time for this hobby again - having a second child had a serious impact on spare time I have learned ;)

 

Designed and ordered the output boards that arrived today. I'm off for vacation next week, so hopefully I can stay up some late nights and get this running.

DCS_BIOS_Output.thumb.jpg.60ea197660d5ac30dc8ccc0a96ab3cd4.jpg

Link to comment
Share on other sites

Looks like you're making good progress there BY, especially impressive with two kids to look after. I don't have any myself and still can't find any time!

 

If you'd be kind enough to share the files I'd need to order your PCBs that would be a massive help to me. I can solder OK and over the last year or so I've been buying Arduinos and switches, pots, etc. but designing PCBs is something I've never done and not having the time to teach myself how to at the moment is preventing me from moving forward, so it would be great if I could benefit from the work you've already done, rather than having to learn how to make the wheel myself so to speak (and I'm sure I'd waste a lot of time and money before getting it right).

 

If I understand correctly, sites like http://dirtypcbs.com/ require me to buy 10 of each board I want and it's about $14 for that, so I'd have to order 10 of each of the Input, Output and Slave boards at a cost of $42 but that seems OK, as I'd probably need at least that many by the time I've built all the panels for a complete cockpit.

 

The actual panels are going to be tricky for me as well but I'll probably just knock up something in foamboard or wood to start with, as they're easy for me to work with using the tools I have available and then I'll replace them with nice backlit acrylic panels when I've worked out how to make them myself or I can afford to buy some pre-made ones (which is probably going to be more practical and cost effective, considering my limited tools and abilities).

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

Link to comment
Share on other sites

Ian;2635237']In general' date=' I would stay away from Arduino(-compatible) boards that are not powered by either the ATMega328 or the ATMega2560 controller. DCS-BIOS will probably work with them, but only in a "compatibility mode" using the default Serial library. That means no RS-485 support and no properly interrupt-driven serial communications. They can still be a good choice for special cases, such as running a CDU display on some ARM-based board running at 80 MHz.[/quote']

 

I think I'll get the Nanos to have the USB just in case. The cheapest on Ali at the moment seems to be this one for $1.85 and 5 of those including shipping comes to $12.81

http://www.aliexpress.com/item/1PCS-Promotion-Funduino-Nano-3-0-Atmega328-Controller-Compatible-Board-for-Arduino-Module-PCB-Development-Board/32657880081.html

 

I also found this pack of 5 Nanos on Amazon which cost £10.99 inc. free shipping on orders over £20 (the company's based in Hong Kong but it's fulfilled by Amazon, so perhaps they're shipped from a UK warehouse and would be quicker than Ali) but the reviews suggest the QC might not be great and having the CH340 chip instead of the FTDI seems to add complications.

https://www.amazon.co.uk/XCSOURCE-ATmega328P-Controller-Arduino-TE359/dp/B015MGHH6Q/

Main rig: i5-4670k @4.4Ghz, Asus Z97-A, Scythe Kotetsu HSF, 32GB Kingston Savage 2400Mhz DDR3, 1070ti, Win 10 x64, Samsung Evo 256GB SSD (OS & Data), OCZ 480GB SSD (Games), WD 2TB and WD 3TB HDDs, 1920x1200 Dell U2412M, 1920x1080 Dell P2314T touchscreen

Link to comment
Share on other sites

The CH340 chip is no problem under Windows (IIRC Windows 10 installs the correct driver automatically without user intervention). The guy who had problems was apparently using a certain version of Mac OS. Under Linux it's recognized out of the box as well.

 

If you buy an Uno or Mega with the CH340, be aware that you can't use it as a HID device, because that's done by reprogramming the ATMega16U2 that usually does USB-to-serial on these boards. For use with DCS-BIOS, the only difference that a CH340 chip makes is that you save some money.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...