-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
executable file
·158 lines (152 loc) · 8.36 KB
/
Copy pathREADME
File metadata and controls
executable file
·158 lines (152 loc) · 8.36 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
ledctrl
This project is currently under development.
*** Hardware block diagram ***
+---------------------------------------------------------+
| +---------+ |
+24V+-------------->+ 5V/3A | |
| |step-down| |
| +---------+ +----------------+ |
| | Raspberry Pi | |
+----+ | +-------+ | Zero | |
|LCD | | | level | +----------------+ | +----+
|1602+<-----------+->+shifter+<-+->+I2C|SPI|GPIO|USB+---------------->+Wifi|
+----+ | | +-------+ ^ +-----+--+--+----+ | +----+
| | | ^ | ^ |
| | +-------+ | | | | | +----+
| | | RTC | | | | +----------------------+rot |
| | | DS3132+<-+ | v reset | |knob|
| | +-------+ +-----|-----+ | +----+
| | |stm32|f103 | |
| | | v | |
| | | +-+-+ | |
| | | |SPI| | |
| | | +---+ | |
| | | |DMA| | |
| | | +-+-+ | |
| | | v | |
| | +-----+-----+ |
| | |DMA|DMA|DMA| |
| | +-----------+ |
| | |TIM|TIM|TIM| |
| | +-----------+ |
| | |PORTB 16Bit| |
| | +-----+-----+ |
| | | |
| |i2c bus | 16 bit parallel |
| +-----+ +---------+ |
| | | |
| +------------|--------------------------|-----------+ |
| | | 8 bit | 8 bit | |
| | +----+----+ +----+----+ | |
| | v v v v | |
| | +---+---------+---+ enable +--+---------+--+ | |
| | |PCF8574 |PCF8574 +-------->+74LS125|74LS125| | |
| | |Expander|Expander| |Buffer |Buffer | | |
| | +---+---------+---+ +--+--------+---+ | |
| | | 8 bit v 8 bit v | | |
| | +-------->+ +<-------+ | |
| | 16 channel | | 16 channel | |
| | enable | | led data | |
| | | | | |
| +-----------------|----------------|----------------+ |
| | | ledctrl |
| | | |
+--------------------|----------------|-------------------+
| | ledctrl_carrier
| v
| +---+----+
v |opto |
16x +----+----+ |coupler |
+24V+------------------>+16x | +---+----+
|isolated | | | | isolation
|relays | | | | barrier
................................|....................
. |in groups| | v |
+---+----+ 5V |of 4 | +---+----+
|24V/5V +--->+ | | MAX481 |
+24V+---->+DC-DC | +----+----+ | Tx |
|isolated| | +---+----+
+---+----+ | | | |
. | | v |
. | 16x | +-+--+ |16x
. +------------->+RJ45| |ledctrl_output
. +24V | |8p8c| |in groups of 4
. +-+-+--+-+
. | 16x patch cable
. | RS485 Signal
. | 24V Power
. v
. +-------+-+--+-----------+
. | +24V |RJ45| |
. | +---+8p8c+-------+ |
. | | +----+ | |
. | v v |
. +---+-----+ +5V +--+---+
. | 5V/3A +------>+MAX481|16x
. |step-down| | Rx |ledctrl_driver
. +---+-----+-------+--+---+
. | |
. +5V| |led data
. | |
. | +----------+ |
. +->+ WS2812 +<-+
. |LED-Stripe|
. +----------+
. 16x Stripes
. à ~50 LEDs
*** Software block diagram ***
+-----------------------------------+------------------------+
| kernel space . user space |
| . |
+----------------+ . +--------------------+
| stm32led.ko | . | server |
| | . | |
+----+ +---------+ char dev . | +---------+
|GPIO| |3*16*cols| /dev/stm32led . | |4*16*cols|
|pin | | bytes +<--------------------------------+ bytes |
+--+-+ | buffer | . | | buffer |
| | +----+----+ . | +----+----+
| | | | . | ^ |
| | v | +---------+ . +-------+ | |
| | +----+----+ |port | . | sysfs | +---+----+
| | |remap RGB| |expander +<------+ GPIO +<--+JSON-RPC|
| | +----+----+ |GPIO pins| . |control| | server |
| | | | +---+-----+ . +-------+---+--------+ +------+
| | v | | . ^ | |remote|
| | +----+----+ | . socket port +----->+client|
| | |spidev0.0| | . v | +------+
| | +----+----+ | . +--+---+
| | | | | . |local |
| | | | | . |client|
+--|--------|----+--------|---------+-----------------+------+
| | | Raspberry Pi Zero
| | | PiCore Linux
|reset |spi data | enable data
v v |
++------+-+-+-------+ |
| |SPI| | v
| +---+ |
| |DMA| |
| +-+-+ |
| | |
| v |
| +----+----+ |
| |3*16*cols| |
| | bytes | |
| | buffer | |
| +----+----+ |
| | |
| v |
| +-----+-----+ |
| |DMA|DMA|DMA| |
| +-----------+ |
| |TIM|TIM|TIM| |
| +-----------+ |
| |PORTB 16bit| | STM32F103
+---+-----+-----+---+
|
v
led data
Credits:
http://www.cnblogs.com/shangdawei/p/4762035.html
https://github.com/hmng/jsonrpc-c