Well, here we are back at the ATC panel. The ATC panel function is to identify your aircraft to the tower via secondary radar. After a quick call to Gables Engineering in Florida. I explained what I needed and why they graciously sent me a print with the connector and schematic to me. The table below is indexed by functionality not pin numbers.
The connector on the rear of the panel is:
ZZB-AC-1722-5522-55P
BTW:
I had to rout around inside to see what was going on with some of the switches, so for all of you that like to see blood and guts, I have included an interior shot showing the switch mechanism.
PIN | Connects To: | Terminal: | FUNCTION | db25 | ARDUINO MEGA |
---|---|---|---|---|---|
SQUAWK CODES | |||||
2 | S1A | B | POS 3xx | A1 | 22 |
3 | S1A | C | A2 | 23 | |
4 | S1A | D | A3 | 24 | |
5 | S1 | E | POS 4xxx | A4 | 25 |
6 | S1B | F | A5 | 26 | |
7 | S1B | G | A6 | 27 | |
9 | S2A | N | POS 2x | A7 | 28 |
10 | S2A | O | A8 | 29 | |
11 | S2A | P | A9 | 30 | |
13 | S2B | J | POS 1 (units) | 10 | 31 |
14 | S2B | K | A11 | 32 | |
15 | S2B | L | A12 | 33 | |
TRANSPONDER #1 | |||||
16 | S8A | IDENT | A13 | 34 | |
21 | S5 | LO SENS | A14 | 35 | |
22 | S3 | STBY | A15 | 36 | |
23 | S3 | ON | A16 | 37 | |
24 | S4 | MODE A | A17 | 38 | |
25 | S4 | MODE B | A18 | 39 | |
26 | S4 | MODE D | A19 | 40 | |
19 | TEST | A20 | 41 | ||
43 | S5 | ANN. LIGHT | A21 | 42 | |
TRANSPONDER #2 | |||||
18 | IDENT | B1 | 43 | ||
32 | LOW SENS | B2 | 44 | ||
33 | S3 | STBY | B3 | 45 | |
34 | ON | B4 | 46 | ||
28 | S4 | MODE A | B5 | 47 | |
29 | S4 | MODE B | B6 | 48 | |
30 | S4 | MODE D | B7 | 49 | |
42 | TEST | B14 | 50 | ||
44 | ANN. LIGHT | B115 | 51 | ||
ALTITUDE REPORTING SW | |||||
GND | S6 | AC+BC | B16 | na | |
1 | S6 | ALT REPORT | B17 | ||
45 | S6 | A1 | COMPUTER 1 | B18 | 52 |
46 | S6 | A 2 | COMPUTER 2 | B19 | 53 |
LIGHTS | |||||
38 | PANEL LAMPS | B11 | Relay #1 1NO | ||
39 | PANEL LAMPS | B23 | Power Supply Ground | ||
41 | DIAL LIGHTS | B21 | Relay #2 NO | ||
40 | DIAL LIGHTS | B9 | Power Supply Ground | ||
CHASSIS GROUNDS | |||||
8 | B13 | ||||
17 | B25 | ||||
SPARE PINS (NOT USED) | |||||
20, 27, 31, 35, 47, 48, 49, 50 51, 52, 53, 54, 55 |
Since I am using all most every digital I/O pin on the Arduino just for the ATC panel, I have to get creative. I have to deal with 4 more digital pins for the slaves' address plus COM 1 only used with the USB serial, and COM2 which handles RS-485 Full-Duplex (8bits) Traffic over RS-232.
Since I only have to read the Address Nible on startup, I can do this on startup.
There are two main loops.
1 loop is for the incoming messages and you must decide if it is for you.
Yes: parse the command and do it.
No: get the next buss message.
2 loop checks for changes on any of the switch states
Yes: update the value and send it to the controller.
No: Go back to sleep.
Message Formats
Send to A Slave from the Controller
Start Byte | Address Byte | Command Byte | Payload | End Byte |
Send to the Controller from a Slave
Start Byte | Address Byte | Command Byte | Payload | End Byte |
Notes:
- Payload Field can be of any length
- There might be times where you might have two addresses in the Address Byte such as 54 where 5 is the target (another Slave), and 4 is the Slave Sending the info.
- The SQUAWK Codes are a group of four (4) digits indicating from zero (0) to eight (8) but there are only three wires, ie S1A.B, S1A.C, S1AD. This leads me to think that they have used Octal encoding.
Decimal Code | Octal Code | ||
---|---|---|---|
MSB | LSB | ||
0 | |||
1 | |||
2 | |||
3 | |||
4 | |||
5 | |||
6 | |||
7 | |||
8 |
Keep tuned in, More to come
UPDATE 8-25-22 -- I have removed the binary codes in the above table as there are 9 digits.