Pin use of microprocessors and messages exchanged in the system.
Table 1: Pin use on the cable between the Control Amplifier and the loudspeakers
I use a standard unscreened ethernet cable (UTP).
Pin |
Wire color |
Function |
Remark |
2 |
or | + audio signal | |
1 |
or/wt | - audiosignal | |
6 |
gn | +5V | switches mains power. Initially feeds the Arduino on the FLT board. |
3 |
gn/wt | 0V, GND |
|
4 |
bl | TX+ from control
amplifier to loudspeaker, RS422. |
A.o. adjustment of Bass and
Mid-range volume. |
5 |
bl/wt | TX-, RS422. | |
8 |
bn | RX+ from loudspeaker to control amplifier, RS422. | A.o. error messages from
power amplifiers. |
7 |
bn/wt | RX-, RS422. |
Table 2: Pin / port use Arduino Mega 2560 with Ethernet Shield in the Control Amplifier.
Port |
Pin ,
Function |
type |
Remark |
PA0 .. PA7 |
pin 22 .. 29 to
Selector PCB |
out |
Low = select, 1 bit at a time |
PC0 .. PC3 |
pin 37 .. 34 via SN 74441
to Nixie |
out |
digits 1 .. 8 |
PC4 .. PC7 |
pin 33 .. 30 Input from IR
receiver |
in |
0 .. 10 |
PG0 |
pin 41 SCL for PGA print |
out |
|
PG1 |
pin 40 SDA for PGA pcb |
out |
PGA's are daisy-chained |
PG2 |
pin 39 /CS voor PGA
pcb |
out |
|
PD0, PD1 |
pin 21, 20: interrupts from
channel selection switch |
in |
Quadrature switch |
PJ0 |
pin RX3: 50 Hz input mainsOK detection |
in |
100 Hz interrupts |
PJ1 | pin TXD3 SpeakerSwitch |
in |
low = on, internal pullup |
PK6 |
pin A14: Speaker Power |
out |
low =on, via PNP |
PK7 |
pin A15: Interrupt from IR |
in |
|
PK0 |
pin A8: potmeter Volume
Loudspeakers |
analog in |
|
PK1 |
pin A9: potmeter Volume
Headphone |
analog in |
|
PD2 |
pin 19: RXD1 from right
loudspeaker |
in |
|
PD3 |
pin 18: TXD1 to right
loudspeaker |
out |
|
PH0 |
pin 17: RXD2 from left loudspeaker | in |
|
PH1 |
pin 16: TXD2 to left loudspeaker | out |
|
PL0, 2, 4 |
pin 45, 47, 49: motor
Volume potmeter |
out, parallel |
motor takes ca. 50 mA |
PL1, 3, 5 |
pin 44, 46, 48: motor
Volume potmeter |
out, parallel |
motor takes ca. 50 mA |
PL6 |
pin 43: Led Error indicator
Left loudspeaker |
out |
active low |
PL7 |
pin 42: Led Error indicator
Right loudspeaker |
out |
active low |
Table 3: Pin / port use Arduino Nano on FLT board
Port |
Pin ,
Doel |
type |
Remark |
PD0 |
TXD to Control Amplifier |
out |
|
PD1 |
RXD from Control Amplifier |
in |
|
PD2 |
pin D2 MainsOK, 50 Hz
squarewave |
in | internal pullup |
PD3 |
pin D3 Crydom +5V from
Control Amplifier |
in | |
PD4 |
pin D4 determine FLT or
TestTool |
out | low = FLT, internal pullup |
PD5 |
pin D5 ERR led active low |
out | |
PD6 |
pin D6 COM led active low | out | blinks at message rate |
PD7 |
pin D7 CPU led active low |
out | slow blink = ok |
PB0 |
pin D8 Fault from TPA-Bass |
in |
active low |
PB1 |
pin D9 Clip-OTW from
TPA-Bass |
in, intr |
clip counter, OTW= perm low |
PB2 |
pin D10 Fault from TPA
Mid-Tweeter |
in |
active low |
PB3 |
pin D11 Clip-OTW from TPA
Mid-Tweeter |
in, intr |
clip counter, OTW = perm
low |
PB4 |
pin D12 RST to both TPA's |
out | low = reset |
PB5 |
pin Led on board Arduina
Nano |
NC | |
PC0 | pin A0 SCL for PGA |
out | |
PC1 |
pin A1 SDA for PGA |
out | |
PC2 |
pin A2 CS for PGA |
out | |
PC3 |
pin A3 2.5 Volt reference |
in, analog | |
PC4 |
pin A4 V50 |
in, analog |
|
PC5 |
pin A5 V5 |
in, analog |
|
PC6 |
pin A6 V12 |
in, analog |
|
PC7 |
pin A7 Vmin5 |
in, analog |
Messages between GUI, Control Amplifier and Loudspeakers (FLT board).
Table 4: Message from Control Amplifier to Loudspeaker (FLT), 3 bytes:
This message is sent only when enabled in the GUI
Type: Serial. In the Control Amplifier TX2 for left, TX1 for right.
Remark: When communication stops for more than 2 seconds the arduino on the FLT board goes in Local mode.
Remark: In Pascal (GUI) the bytes are numbered from 1 up, in C (Arduino) bytes are numbered from 0 up.
Remark: 2-byte integers are in little endian.
Byte C |
Byte Pascal |
Name |
Range /
meaning |
Remark |
0 |
1 |
Command |
bit 0: not used bit 1: not used bit 2: Write values to EEPROM bit 3: not used bit 4: Power ON bit 5: Clear Clipcounter B bit 6: Clear Clipcounter MT bit 7: Reset TPA chips |
TestTool only |
1 |
2 |
Code Bass |
Code for PGA. 192 = 0dB
gain |
|
2 |
3 |
Code Middden |
Code for PGA. 192 = 0dB gain |
Table 5: Message from Loadspeaker (FLT) to Control Amplifier, 13 bytes.
This message is sent as a reaction on an incoming message and / or when the error code <> 0, 2 times per second.
Type: serial. In Control Amplifier via Rx2 for left, Rx1 for right.
Byte C |
Byte Pascal |
Name |
Range / meaning | Remark |
0 |
1 |
Status |
Bit 0: Mains Fail Bit 1: Supply out of range Bit 2: Fault B Bit 3: Fault MT Bit 4: OTW B Bit 5: OTW MT Bit 6: Spontaneous message Bit 7: TPA is in Reset |
|
1, 2 |
2, 3 |
VRef raw |
ADC value |
|
3, 4 |
4, 5 |
V50 raw |
ADC value | |
5, 6 |
6, 7 |
V12 raw |
ADC value | |
7, 8 | 8, 9 |
V5 raw |
ADC value |
|
9, 10 |
10, 11 |
Vmin5 raw |
ADC value |
|
11 |
12 |
ClipCount B |
byte |
|
12 |
13 |
ClipCount MT |
byte |
Table 6: Message from GUI_ConfigTool (PC program) to Control Amplifier, 15 bytes:
Type: UDP over ETH.
Byte C |
Byte Pascal |
Naam |
Range / meaning | Remark |
0 |
1 |
Command |
bit 0: Talk to the Speakers bit 1: Enable Speaker Power bit 2: not used bit 3: not used bit 4: not used bit 5: not used bit 6: Reset Left Loudspeaker bit 7: Reset Right Loudspeaker |
|
1 |
2 |
channel 1 |
code for PGA 192 = 0dB gain | |
2 |
3 |
channel 2 | code for PGA | |
3 |
4 |
channel 3 | code for PGA | |
4 |
5 |
channel 4 | code for PGA | |
5 |
6 |
channel 5 | code for PGA | |
6 |
7 |
channel 6 | code for PGA | |
7 |
8 |
channel 7 | code for PGA | |
8 |
9 |
channel 8 | code for PGA | |
9 |
10 |
Effect | code for PGA correctionop Effect left and right | |
10 |
11 |
Centrum | code for PGA correction on Centrum | |
11 |
12 |
Extra | code for PGA correction on
extra channel |
|
12 |
13 |
Command Spkr Left |
See table 4 |
|
13 |
14 |
Command Spkr Right |
See table 4 | |
14 |
15 |
FLT Bass | code for PGA | |
15 |
16 |
FLT Mid-range | code for PGA |
Table 7: Message from Control Amplifier to GUI_ConfigTool (PC program)
This message is sent as reaction on an incoming message.
Type: UDP over ETH.
Remark: The messages from the loudspeakers (FLT) go as-is into this message.
Byte C |
Byte Pascal |
Name |
Range / meaning | Remark |
0 |
1 |
Firmware Version number |
byte |
|
1 |
2 |
Actual selected channel |
||
2 |
3 |
Latest IR code |
||
3 |
4 |
Volume potmeter
Loudspeakers |
raw ADC value |
|
4 |
5 |
Volume potmeter Headphone |
raw ADC value |
|
5 |
6 |
Status Loudspeaker Left |
See table 5 |
Message from spkr is copied
as is |
6, 7 |
7, 8 |
Vref | See table 5 | |
8, 9 |
9, 10 |
V50 |
See table 5 | |
10, 11 |
11, 12 |
V12 |
See table 5 | |
12, 13 |
13, 14 |
V+5A | See table 5 | |
14, 15 |
15, 16 |
V-5A | See table 5 | |
16 |
17 |
ClipCountB |
See table 5 | |
17 |
18 |
ClipCountMT |
See table 5 | |
18 |
19 |
Status Loudspeaker Right |
See table 5 | Message from spkr is copied as is |
19, 20 |
20, 21 |
Vref | See table 5 | |
21, 22 |
22, 23 |
V50 |
See table 5 | |
23, 24 |
24, 25 |
V12 |
See table 5 | |
25, 26 |
26, 27 |
V+5A |
See table 5 | |
27, 28 |
28, 29 |
V-5A |
See table 5 | |
29 |
30 |
ClipCountB |
See table 5 | |
30 |
31 |
ClipCountMT |
See table 5 |
Table 8: Leds on the FLT-board.
Error |
Blue (mainsOK) |
Yellow (Communication) |
Red (Error) |
Reset TPA |
None |
slow blink |
off |
off |
off |
Fault Bass |
slow blink | slow blink |
slow blink |
reset |
Fault Midrange |
slow blink | slow blink | fast blink |
reset |
OTW Bass |
slow blink | slow blink | off |
off |
OTW MT |
slow blink | slow blink | off |
off |
Mains Fail |
fast blink | slow blink | off |
reset |
Supply fail |
slow blink | slow blink | on |
reset |
Clip Bass |
slow blink | slow blink | off |
off |
Clip MT |
slow blink | slow blink | off |
off |
Control Amplifier Talks |
slow blink | fast blink |
off |
off |