Crosshairs Posted January 1, 2021 Author Share Posted January 1, 2021 Hi Sharkfin61, Thank you and a happy new year to you also, Glad to hear you have it working! Yes that is an unusual error which I never would of guessed so I really appreciate you figuring it out, it may indeed help someone with a similar problem in the future, Cheers Also, I might be wrong on this but I do remember reading somewhere that there is an error in the actual DCS export which causes the issue with the DIM/BRT rocker, so there isnt much that can be done about it yet unfortunately. Link to comment Share on other sites More sharing options...
sharkfin61 Posted January 1, 2021 Share Posted January 1, 2021 (edited) So glad, I got it working Now it's time to implement my AAP panel (to free it from the zero delay board first) and connect the two parts. Here's the promised code: Spoiler #define DCSBIOS_IRQ_SERIAL #include "DcsBios.h" #include "Adafruit_Keypad.h" const byte ROWS = 9; // rows const byte COLS = 8; // columns //define the symbols on the buttons of the keypads char keys[ROWS][COLS] = { {'a','i','1','4','7','.','[',']'}, {'b','j','2','5','8','0','o','s'}, {'c','k','3','6','9','/','p',' '}, {'d','l','A','G','M','S','q','t'}, {'e','m','B','H','N','T','r','u'}, {'f','n','C','I','O','U','Y','v'}, {'g','+','D','J','P','V','Z','w'}, {'h','-','E','K','Q','W','}','{'}, {' ',' ','F','L','R','X',' ',' '} }; byte rowPins[ROWS] = {23, 25, 27, 29, 31, 33, 35 , 37, 39, }; //connect to the row pinouts of the keypad byte colPins[COLS] = {22, 24, 26, 28, 30, 32, 34, 36}; //connect to the column pinouts of the keypad /* NOTES ON PCB: D22 VIA TOO CLOSE TO PAD (CAUSED A SHORT CIRCUIT BETWEEN COLUMN 1 AND 2), REDO ALL WIRING THE SILKSCCREEN COMPONENT TYPES ARE STILL PRINTED EVEN WHEN HIDDEN IN THE EDITOR LED LIGHTS FOR THE LINES ARE INCOMPATABLE AND CANT BE SOLDERED (NOT NEEDED ANYWAY) BIGGER COMPONENTS? CHECK DIODE POLARITIES REMOVE REDUNDANT WIRING CHANGE TO WHITE PCB Special Characters: LSK 1 - a |SYS - i |PGUP - [ |MK - s LSK 2 - b |NAV - j |PGDN - ] |BLAROCK_L - t LSK 3 - c |WP - k |BLANK1 - o |BLAROCK_R - u LSK 4 - d |OSET - l |BLANK2 - p |CLR - v LSK 5 - e |FPM - m |BCK - q |FA - w LSK 6 - f |PREV - n |SPC - r | LSK 7 - g |DIM - - |PLUS - { | LSK 8 - h |BRT - + |MINUS - } | */ //initialize an instance of class NewKeypad Adafruit_Keypad kpd = Adafruit_Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS); //DcsBios::Switch2Pos aapCdupwr("AAP_CDUPWR", 2); //DcsBios::Switch2Pos aapEgipwr("AAP_EGIPWR", 3); //const byte aapPagePins[7] = {4, 5, 6, 7}; //DcsBios::SwitchMultiPos aapPage("AAP_PAGE", aapPagePins, 7); //DcsBios::Switch3Pos aapSteerpt("AAP_STEERPT", 8, 10); //DcsBios::Switch3Pos aapSteer("AAP_STEER", 11, 12); void setup() { DcsBios::setup(); // Serial.begin(9600); kpd.begin(); } void loop() { DcsBios::loop(); kpd.tick(); keypadEvent e = kpd.read(); char key = (char)e.bit.KEY; if (e.bit.EVENT == KEY_JUST_PRESSED) { switch (key) { case 'A': sendDcsBiosMessage("CDU_A", "1"); break; case 'B': sendDcsBiosMessage("CDU_B", "1"); break; case 'C': sendDcsBiosMessage("CDU_C", "1"); break; case 'D': sendDcsBiosMessage("CDU_D", "1"); break; case 'E': sendDcsBiosMessage("CDU_E", "1"); break; case 'F': sendDcsBiosMessage("CDU_F", "1"); break; case 'G': sendDcsBiosMessage("CDU_G", "1"); break; case 'H': sendDcsBiosMessage("CDU_H", "1"); break; case 'I': sendDcsBiosMessage("CDU_I", "1"); break; case 'J': sendDcsBiosMessage("CDU_J", "1"); break; case 'K': sendDcsBiosMessage("CDU_K", "1"); break; case 'L': sendDcsBiosMessage("CDU_L", "1"); break; case 'M': sendDcsBiosMessage("CDU_M", "1"); break; case 'N': sendDcsBiosMessage("CDU_N", "1"); break; case 'O': sendDcsBiosMessage("CDU_O", "1"); break; case 'P': sendDcsBiosMessage("CDU_P", "1"); break; case 'Q': sendDcsBiosMessage("CDU_Q", "1"); break; case 'R': sendDcsBiosMessage("CDU_R", "1"); break; case 'S': sendDcsBiosMessage("CDU_S", "1"); break; case 'T': sendDcsBiosMessage("CDU_T", "1"); break; case 'U': sendDcsBiosMessage("CDU_U", "1"); break; case 'V': sendDcsBiosMessage("CDU_V", "1"); break; case 'W': sendDcsBiosMessage("CDU_W", "1"); break; case 'X': sendDcsBiosMessage("CDU_X", "1"); break; case 'Y': sendDcsBiosMessage("CDU_Y", "1"); break; case 'Z': sendDcsBiosMessage("CDU_Z", "1"); break; case '0': sendDcsBiosMessage("CDU_0", "1"); break; case '1': sendDcsBiosMessage("CDU_1", "1"); break; case '2': sendDcsBiosMessage("CDU_2", "1"); break; case '3': sendDcsBiosMessage("CDU_3", "1"); break; case '4': sendDcsBiosMessage("CDU_4", "1"); break; case '5': sendDcsBiosMessage("CDU_5", "1"); break; case '6': sendDcsBiosMessage("CDU_6", "1"); break; case '7': sendDcsBiosMessage("CDU_7", "1"); break; case '8': sendDcsBiosMessage("CDU_8", "1"); break; case '9': sendDcsBiosMessage("CDU_9", "1"); break; case '.': sendDcsBiosMessage("CDU_POINT", "1"); break; case '/': sendDcsBiosMessage("CDU_SLASH", "1"); break; case 'e': sendDcsBiosMessage("CDU_LSK_3R", "1"); break; case 'f': sendDcsBiosMessage("CDU_LSK_5R", "1"); break; case 'g': sendDcsBiosMessage("CDU_LSK_7R", "1"); break; case 'h': sendDcsBiosMessage("CDU_LSK_9R", "1"); break; case 'a': sendDcsBiosMessage("CDU_LSK_3L", "1"); break; case 'b': sendDcsBiosMessage("CDU_LSK_5L", "1"); break; case 'c': sendDcsBiosMessage("CDU_LSK_7L", "1"); break; case 'd': sendDcsBiosMessage("CDU_LSK_9L", "1"); break; case '[': sendDcsBiosMessage("CDU_PG", "2"); break; case ']': sendDcsBiosMessage("CDU_PG", "0"); break; case '}': sendDcsBiosMessage("CDU_DATA", "2"); break; case '{': sendDcsBiosMessage("CDU_DATA", "0"); break; //case '>': sendDcsBiosMessage("CDU_DATA", "2"); break; //case '<': sendDcsBiosMessage("CDU_DATA", "0"); break; case '-': sendDcsBiosMessage("CDU_BRT", "2"); break; case '+': sendDcsBiosMessage("CDU_BRT", "0"); break; case 'i': sendDcsBiosMessage("CDU_SYS", "1"); break; case 'j': sendDcsBiosMessage("CDU_NAV", "1"); break; case 'k': sendDcsBiosMessage("CDU_WP", "1"); break; case 'l': sendDcsBiosMessage("CDU_OSET", "1"); break; case 'm': sendDcsBiosMessage("CDU_FPM", "1"); break; case 'n': sendDcsBiosMessage("CDU_PREV", "1"); break; case 's': sendDcsBiosMessage("CDU_MK", "1"); break; case 'v': sendDcsBiosMessage("CDU_CLR", "1"); break; case 'q': sendDcsBiosMessage("CDU_BCK", "1"); break; case 'r': sendDcsBiosMessage("CDU_SPC", "1"); break; case 'w': sendDcsBiosMessage("CDU_FA", "1"); break; } } else if (e.bit.EVENT == KEY_JUST_RELEASED) { switch (key) { case 'A': sendDcsBiosMessage("CDU_A", "0"); break; case 'B': sendDcsBiosMessage("CDU_B", "0"); break; case 'C': sendDcsBiosMessage("CDU_C", "0"); break; case 'D': sendDcsBiosMessage("CDU_D", "0"); break; case 'E': sendDcsBiosMessage("CDU_E", "0"); break; case 'F': sendDcsBiosMessage("CDU_F", "0"); break; case 'G': sendDcsBiosMessage("CDU_G", "0"); break; case 'H': sendDcsBiosMessage("CDU_H", "0"); break; case 'I': sendDcsBiosMessage("CDU_I", "0"); break; case 'J': sendDcsBiosMessage("CDU_J", "0"); break; case 'K': sendDcsBiosMessage("CDU_K", "0"); break; case 'L': sendDcsBiosMessage("CDU_L", "0"); break; case 'M': sendDcsBiosMessage("CDU_M", "0"); break; case 'N': sendDcsBiosMessage("CDU_N", "0"); break; case 'O': sendDcsBiosMessage("CDU_O", "0"); break; case 'P': sendDcsBiosMessage("CDU_P", "0"); break; case 'Q': sendDcsBiosMessage("CDU_Q", "0"); break; case 'R': sendDcsBiosMessage("CDU_R", "0"); break; case 'S': sendDcsBiosMessage("CDU_S", "0"); break; case 'T': sendDcsBiosMessage("CDU_T", "0"); break; case 'U': sendDcsBiosMessage("CDU_U", "0"); break; case 'V': sendDcsBiosMessage("CDU_V", "0"); break; case 'W': sendDcsBiosMessage("CDU_W", "0"); break; case 'X': sendDcsBiosMessage("CDU_X", "0"); break; case 'Y': sendDcsBiosMessage("CDU_Y", "0"); break; case 'Z': sendDcsBiosMessage("CDU_Z", "0"); break; case '0': sendDcsBiosMessage("CDU_0", "0"); break; case '1': sendDcsBiosMessage("CDU_1", "0"); break; case '2': sendDcsBiosMessage("CDU_2", "0"); break; case '3': sendDcsBiosMessage("CDU_3", "0"); break; case '4': sendDcsBiosMessage("CDU_4", "0"); break; case '5': sendDcsBiosMessage("CDU_5", "0"); break; case '6': sendDcsBiosMessage("CDU_6", "0"); break; case '7': sendDcsBiosMessage("CDU_7", "0"); break; case '8': sendDcsBiosMessage("CDU_8", "0"); break; case '9': sendDcsBiosMessage("CDU_9", "0"); break; case '.': sendDcsBiosMessage("CDU_POINT", "0"); break; case '/': sendDcsBiosMessage("CDU_SLASH", "0"); break; case 'e': sendDcsBiosMessage("CDU_LSK_3R", "0"); break; case 'f': sendDcsBiosMessage("CDU_LSK_5R", "0"); break; case 'g': sendDcsBiosMessage("CDU_LSK_7R", "0"); break; case 'h': sendDcsBiosMessage("CDU_LSK_9R", "0"); break; case 'a': sendDcsBiosMessage("CDU_LSK_3L", "0"); break; case 'b': sendDcsBiosMessage("CDU_LSK_5L", "0"); break; case 'c': sendDcsBiosMessage("CDU_LSK_7L", "0"); break; case 'd': sendDcsBiosMessage("CDU_LSK_9L", "0"); break; case '[': sendDcsBiosMessage("CDU_PG", "1"); break; case ']': sendDcsBiosMessage("CDU_PG", "1"); break; case '}': sendDcsBiosMessage("CDU_DATA", "1"); break; case '{': sendDcsBiosMessage("CDU_DATA", "1"); break; //case '>': sendDcsBiosMessage("CDU_DATA", "1"); break; //case '<': sendDcsBiosMessage("CDU_DATA", "1"); break; case '-': sendDcsBiosMessage("CDU_BRT", "1"); break; case '+': sendDcsBiosMessage("CDU_BRT", "1"); break; case 'i': sendDcsBiosMessage("CDU_SYS", "0"); break; case 'j': sendDcsBiosMessage("CDU_NAV", "0"); break; case 'k': sendDcsBiosMessage("CDU_WP", "0"); break; case 'l': sendDcsBiosMessage("CDU_OSET", "0"); break; case 'm': sendDcsBiosMessage("CDU_FPM", "0"); break; case 'n': sendDcsBiosMessage("CDU_PREV", "0"); break; case 's': sendDcsBiosMessage("CDU_MK", "0"); break; case 'v': sendDcsBiosMessage("CDU_CLR", "0"); break; case 'q': sendDcsBiosMessage("CDU_BCK", "0"); break; case 'r': sendDcsBiosMessage("CDU_SPC", "0"); break; case 'w': sendDcsBiosMessage("CDU_FA", "0"); break; } } delay(10); }; cdu_Cross__alt.ino Edited January 2, 2021 by sharkfin61 att. sketch sharkfin out! Support your local AirTransportWing ! Roal Bavarian Airforce all the way NEW RIG: RYZEN 7 5800X3D~ AORUS GTX 1080Ti ~ AORUS X570S Elite AX ~64 GB Corsair Venegance DDR-4 3600 ~ BeQuiet AIO Silent loop 2 360 watercooled ~ Samsung 890 Pro M.2 (2TB) + 870 EVO (1TB) SSD ~ WIN 10 64-bit ~ AOC 31.5" Gaming 144Hz Display ~ DelanClip@TrackIR 5 ~ TM Warthog no.2 ~Saitek rudder pedals~ 2 TM MFDs on 2nd 27"display ~ Buddyfox A-10 UFC ~ CDU/AAP panel via DCSBios ~ ARC-210 (soldering WIP) Link to comment Share on other sites More sharing options...
DSoldano Posted June 4, 2021 Share Posted June 4, 2021 On 12/11/2020 at 4:57 AM, Crosshairs said: PCB 2 - Electric boogaloo I have redone the PCB traces manually. It uses substantially less vias all of which are all checked for best placement. It should be okay to solder and has passed DRC runs, though I must say that it is built at your own risk, I am no expert at PCB design! Also added/changed: - Added polygon pour to PCB top and bottom copper to make it more rigid. - Added silkscreen pinout annotations on top and bottom layer. - Changed key annotation from “SLASH” to “/“ to avoid confusion The design uses x67 1N4148WS diodes (which are SMT so will be hard to solder for beginners!), x67 6x6x7mm Green LED illuminated momentary tactile switches, as well as a dual header 20 position connector on the back of the PCB which can be cut to size or built from 2 rows of single header strips. Builders of this project should pay close attention to the polarity of both the diodes AND the tactile switches, remember, the LEDs are diodes too! Connector pinout: (NOTE: VCC is NOT 5V, it needs only about 1.8V to illuminate the panel, I am most likely going to add some resistors on the board to protect the LEDs in the not too distant future) Front: Back: The PCB and Arduino code are published to the following GitHub link: ------------------------------------------------------------------------ https://github.com/crosshairs2230/A10C-CDU-PANEL.git ------------------------------------------------------------------------ Note: The zip file provided should be able to directly import into JLCPCB fabrication service, I am unsure about other fabrication services but would imagine them to be very similar. Let me know of any issues no matter how small Crosshairs, This looks great. Anyway I can get your Eagle files? I’d like to modify it so the switch matrix operates on 5V and the LEDs operate on 12V so they can run off my dimmer circuits? Thanks Dominick Link to comment Share on other sites More sharing options...
Crosshairs Posted June 11, 2021 Author Share Posted June 11, 2021 Hi, I had been attempting to upload the schematic and board file but have been running into issues around the file size being slightly too big for github! i have opted to use google drive instead and here is the link to the .f3z file, I dont know how or if this can be imported into eagle so as a precation have uploaded the .sch and . brd files too as an alternative which should work with eagle, I hope this helps! https://drive.google.com/drive/folders/1j6Nblgo-qeFOnvCmw2uVO9uAvHit3B9d?usp=sharing Link to comment Share on other sites More sharing options...
Neodym Posted August 13, 2021 Share Posted August 13, 2021 Great Project! Can anyone create a BOM and CPL file? If so, it is possible for me to order the PCB with SMT Assembly. This would be great, because i am really bad in smt soldering. Thank you Link to comment Share on other sites More sharing options...
Apar Posted November 6, 2021 Share Posted November 6, 2021 On 11/2/2020 at 12:36 AM, Crosshairs said: Hello all, With the exciting new release/update of the new A-10c II, I have decided it is time to build a functional CDU with an AAP as a single unit to place on my desk. I have long been interested in building a home cockpit but as of now lack the time to take on such an ambitious project, maybe one day! To kick start this project, I decided to purchase a set of the brilliant acrylic backlit panels and buttons available from pcflights.com for the CDU, AAP and also the new ARC-210 radio panel (which will be a future project!). The first task was to make a sloped enclosure for the CDU and AAP which was quickly made from scraps of aluminium I had laying around and sprayed black, next was to acquire all the switches and things needed for the job. Perhaps the biggest challenge for this project is finding a way to mount all the 67 pushbuttons on the CDU to a rigid surface and then wiring it all up. after some thought I decided the best and only practical way to do this would be to have a custom PCB made for it. I took many precise measurements of the panel and made an accurate drawing for laying out the PCB and when I was happy, sent the files off to be manufactured a minimum quantity of 5 for £15 total, bargain!. It took some time but when they eventually arrived I was very impressed at the quality of manufacturing and quickly got on with the long process of soldering everything together with close observation of polarities!, the result: And a test of the lamps: (note: the V key isn't lit in this image but it turned out to be a single missed solder joint, always one!) I plan to use DCSBios to interface with the module, as for the screen.. I am still figuring that one out More updates soon!, feel free to ask questions/give suggestions! The latest redrawn PCB and Arduino code (version 66) are published to the following GitHub link: ------------------------------------------------------------------------ https://github.com/crosshairs2230/A10C-CDU-PANEL.git ------------------------------------------------------------------------ Note: The zip file provided should be able to directly import into JLCPCB fabrication service, I am unsure about other fabrication services but would imagine them to be very similar. Let me know of any issues no matter how small This is nice! Im having second thought on getting the Panel from pcflights as well or just make one myself with the 3d printer on the way. Can you share your measured drawings in CAD format? This github link have formats im not sure how to open. Link to comment Share on other sites More sharing options...
Apar Posted November 7, 2021 Share Posted November 7, 2021 On 11/2/2020 at 12:36 AM, Crosshairs said: Hello all, With the exciting new release/update of the new A-10c II, I have decided it is time to build a functional CDU with an AAP as a single unit to place on my desk. I have long been interested in building a home cockpit but as of now lack the time to take on such an ambitious project, maybe one day! To kick start this project, I decided to purchase a set of the brilliant acrylic backlit panels and buttons available from pcflights.com for the CDU, AAP and also the new ARC-210 radio panel (which will be a future project!). The first task was to make a sloped enclosure for the CDU and AAP which was quickly made from scraps of aluminium I had laying around and sprayed black, next was to acquire all the switches and things needed for the job. Perhaps the biggest challenge for this project is finding a way to mount all the 67 pushbuttons on the CDU to a rigid surface and then wiring it all up. after some thought I decided the best and only practical way to do this would be to have a custom PCB made for it. I took many precise measurements of the panel and made an accurate drawing for laying out the PCB and when I was happy, sent the files off to be manufactured a minimum quantity of 5 for £15 total, bargain!. It took some time but when they eventually arrived I was very impressed at the quality of manufacturing and quickly got on with the long process of soldering everything together with close observation of polarities!, the result: And a test of the lamps: (note: the V key isn't lit in this image but it turned out to be a single missed solder joint, always one!) I plan to use DCSBios to interface with the module, as for the screen.. I am still figuring that one out More updates soon!, feel free to ask questions/give suggestions! The latest redrawn PCB and Arduino code (version 66) are published to the following GitHub link: ------------------------------------------------------------------------ https://github.com/crosshairs2230/A10C-CDU-PANEL.git ------------------------------------------------------------------------ Note: The zip file provided should be able to directly import into JLCPCB fabrication service, I am unsure about other fabrication services but would imagine them to be very similar. Let me know of any issues no matter how small Is this possible on a 5x10cm pcb? or multiple pcb?,. what would be the best way for someone who cant do custom pcbs? Link to comment Share on other sites More sharing options...
vienuj Posted May 29, 2022 Share Posted May 29, 2022 Hi, Just found this post and as many wrote I am impressed by the quality, good job! I just hace one stupid question, how do you "glue" linear switch and touch of the CDU? Thanks Link to comment Share on other sites More sharing options...
madmoneymike5 Posted February 4 Share Posted February 4 @Crosshairs Did you ever finish this project? Link to comment Share on other sites More sharing options...
Recommended Posts