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. 

 

PINConnects To:Terminal: FUNCTIONdb25ARDUINO MEGA
SQUAWK CODES
2S1ABPOS 3xxA122
3S1ACA223
4S1ADA324
5S1EPOS 4xxxA425
6S1BFA526
7S1BGA627
9S2ANPOS 2xA728
10S2AOA829
11S2APA930
13S2BJPOS 1 (units)1031
14S2BKA1132
15S2BLA1233
TRANSPONDER #1
16S8AIDENTA1334
21S5LO SENSA1435
22S3STBYA1536
23S3ONA1637
24S4MODE AA1738
25S4MODE BA1839
26S4MODE DA1940
19TESTA2041
43S5ANN.  LIGHTA2142
TRANSPONDER #2
18IDENTB143
32LOW SENSB244
33S3STBYB345
34ONB446
28S4MODE AB547
29S4MODE BB648
30S4MODE DB749
42TESTB1450
44ANN. LIGHTB11551
ALTITUDE REPORTING SW
GNDS6AC+BCB16na
1S6ALT REPORTB17
45S6A1COMPUTER 1B1852
46S6A 2COMPUTER 2B1953
LIGHTS
38PANEL LAMPSB11Relay #1 1NO
39PANEL LAMPSB23Power Supply Ground
41DIAL LIGHTSB21Relay #2 NO
40DIAL LIGHTSB9Power Supply Ground
CHASSIS GROUNDS
8B13
17B25
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 ByteAddress ByteCommand BytePayloadEnd Byte

 

Send to the Controller from a Slave

Start ByteAddress ByteCommand BytePayloadEnd 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 CodeOctal Code
MSBLSB
0000
1001
2010
3011
4100
5101
6110
7111

 

Keep tuned in, More to come