Allthough I do all tests using USB connection, in future I plan to use TCP/IP communication between all hardware.
Ethernet connection has some significant advantages in comparsion with USB:
1. It’s more stable.
2. It’s faster and TCP/IP manages data integrity.
3. Device identity (IP address) is hard-coded (or stored in EEPROM memory) so there’s no need to change serial port name every time device is reconnected.
Being now away from home (and all my hardware) I’ve decided to intergrate ethernet support into Arduino firmware and router.
The few things I’d like (and still don’t know how to) figure out are:
1. Detecting when ethernet shield is connected to arduino. Now there’s a variable telling firmware to initialize TCP/IP server and it’s required to set it to TRUE before uploading firmware.
2. Setting up IP address. The same as above – now it’s hard coded. IP address must be somehow definded at the first connection between PC and arduino (assuming there’s no access to source code or no skills to change it).
I’ve started routing software project when decided to use Arduino’s as IO. The main goal is to make software/firmware bunch as flexible as it’s possible.
When I’ve finished MCP it became easier to brush up software as I got huge testing facility.
It has four standart types for variables: IN (hardware input), OUT (hardware output), ANALOG (analog input) and PWM (analog output). It also has (at the moment) four predefined configurations for hardware modules: ENCODERS, SHIFTOUT, MAX7219 and MCP23S17 (all of them are used in my MCP and will be used in further cockpit hardware).
New hardware module configurations may be added as simple XML files. But also they must be supported by Arduino firmware.
For hardware link is now supported serial communication only. Later I plan to add TCP/IP support.
For software IOCP (fully) and FSUIPC (partly) are supported.
The above scenario takes value from 10K pot and converts it to PWM value which range is 0..255 and 7-segment display dimming value which range is 0..15.
The software is now in deep alpha stage. However do not hesitate to contact me if you’d like to test it for you application.
MCP is almost finished now. The only few things not installed yet are smoked display filters, MA covers and A/P disengage switch. Later I will also replace knobs – current are 3D-printed with my old Solidoodle in poor resolution. And screws will be painted offcourse.
Front panel was ordered from Simworld. It happened before I bough own CNC machine. Probably, panel quality is the best available on the market, but not perfect at all. Paint quality is poor (it can be clearly seen when backlight is on), engraving is displaced relatively to holes. 7-segment display screens are of different thikness and translucency!
On the other hand metal back panel is awesome.
MCP is being driven by Arduino. I’m currently working on custom firmware and routing software. The idea is to build universal hardware/software interface to use cheap Arduino board (Mega2560 for as low as $10 on eBay).
There are 3 PCB’s connected to arduino:
1. 7-segment driver board based on MAX7219 drivers
2. OUTPUT board using 74HC595 shift registers and ULN2803 transistor arrays. All lights on MCP are powered by 12V. OUTPUT board also has PWM input, that allows to control lights intensity (not backlight). Output board also contains transistor-diode 28V circuit for A/T disarm solenoid.
3. INPUT board using MCP23S17 IO expanders. That’s perfect solution with price just above 1 Euro. It supports up to 16 input (or outputs) with pullup’s so it’s not required to add any resistors outside and simplifies overall circuit. INPUT board also contains ATTINY2313 with custom firmware alowing to operate 6 rotary encoders. Encoder type (incremental or gray-codeed) can be definded in router software.
A/T disarm is original (and in new condition!) switch I found on eBay for US$100.
Korrys are of very simple construction: pushbutton with lights is mounted on PCB. Faceplate is attached to 3D-printed button case. It’s divided inside allowing separate backlight for title and status indication.
With PROSIM:737 it works almost perfect. The only problem I found is small delay between any input and getting result on display or light indication. It seems, that delay is result of communication between MCP and main PROSIM modules.
It can also be connected to iFly and NGX, but FSUIPC support is not fully implemented yet in routing software.
A/T disarm video:
Brightness control using 2 PWM outputs and native dimming support in MAX7219 and routed to analog input on different Arduino by software.