-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwiring.txt
89 lines (74 loc) · 2.94 KB
/
wiring.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
The panel of doom has the following input devices:
Three on/off switches
Six rotary potentiometers
One slide potentiometer
The following output devices:
Nine LEDs (Three red, Three green, Three red in the switches).
The LEDs are connected in three banks of three LEDs each, with common anodes
inside the bank and controlled cathodes across (i.e. one red, one green, one
switch all share the same cathode.)
The switches furthermore share their anode with the switch LEDs and are therefore
only available when that LED bank is switched on.
The potentiometers (10Kohm linear) each deliver a voltage between 0 and 5 volts
as they are connected as voltage dividers across the main +5v feed.
The voltage outputs of the potentiometer are connected to a CD4051 analog multiplexer
(due to the DIP AVR328 only having 6 analog inputs).
This makes a total of 20 connections between the panel and the motherboard:
# Cable Ziptie Function
1 Black White USB GND
2 Red White USB +5V
3 Black Green Pot 1 (col 1)
4 Brown Green Pot 2 (col 1)
5 White Green Pot 3 (col 1)
6 Yellow Blue Pot 4 (col 2)
7 Blue Blue Pot 5 (col 2)
8 Purple Blue Pot 6 (col 2)
9 Gray Blue Pot 7 (slide)
10 Orange Red Switch/LED bank anode
11 Red Red Red LED bank anode
12 Green Red Green LED bank anode
13 Black Red LED 1 cathode (top/left)
14 White Red LED 2 cathode (middle)
15 Brown Red LED 3 cathode (bottom/right)
16 Yellow Yellow Switch 1
17 Blue Yellow Switch 2
18 Purple Yellow Switch 3
19 Orange White USB D+
20 Green White USB D-
This means the following connections are necessary:
# AVR MUX Function
1 ------ Power rail GND
2 ------ Power rail +5v
3 ------ 13 CD4051 input 0
4 ------ 14 CD4051 input 1
5 ------ 15 CD4051 input 2
6 ------ 12 CD4051 input 3
7 ------ 1 CD4051 input 4
8 ------ 5 CD4051 input 5
9 ------ 2 CD4051 input 6
10 14 PB0 GPO-controlled transistor (Potential draw: 60mA + pins 12-14)
11 15 PB1 GPO-controlled transistor (Potential draw: 60mA)
12 16 PB2 GPO-controlled transistor (Potential draw: 60mA)
13 17 PB3 GPO via 150 ohm resistor (20 mA @ 3V)
14 18 PB4 GPO via 150 ohm resistor
15 19 PB5 GPO via 150 ohm resistor
16 11 PD5 GPI + pull-down
17 12 PD6 GPI + pull-down
18 13 PD7 GPI + pull-down
-- 27 ADC4 3 CD4051 output
-- 23 PC0 11 GPO CD4051 Sel 0
-- 24 PC1 10 GPO CD4051 Sel 1
-- 25 PC2 9 GPO CD4051 Sel 2
The USB leads D+ and D- are connected as follows:
GND-------------------+
|
3.6v zener v
|
PD2---[68 ohm]--+-----+----USB D+
PD3---[68 ohm]--+-----+----USB D-
| |
PD4---[1.5kohm]-+ |
|
3.6v zener ^
|
GND-------------------+