-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDiagram.tex
177 lines (154 loc) · 5.41 KB
/
Diagram.tex
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Strawberry Robot Diagram
%
%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}
\usepackage[siunitx]{circuitikz}
\usepackage{geometry}
\geometry{letterpaper, landscape, margin=1cm}
\begin{document}
\begin{circuitikz}
[pin/.style={rectangle, draw, inner sep=0pt, minimum height=1cm, minimum width=0.5cm}]
% Draw a grid
%\clip(0,-10) rectangle (15,10);
%\draw[step=1cm,gray,ultra thin] (0,-10) grid (25,12);
%\draw (0,0) circle [radius=10pt];
% Body of the Feather
\node at (8.5,7.5) [rectangle, thick, draw, minimum width=16cm, minimum height=4cm] {};
\node at (8.5,7.5) [font=\bf]{Feather Bluefruit 32u4};
% Feather Pins
% lower
\node (RST) at (1,6) [pin] {} ;
\node at (1,7) {RSW};
\node (3V) at (2,6) [pin]{} +(1,.5);
\node at (2,7) {3V};
\node (ARf) at (3,6) [pin] {} ;
\node at (3,7) {ARf};
\node (GNDF) at (4,6) [pin]{} +(1,.5);
\node at (4,7) {GND};
\node (A0) at (5,6) [pin] {} +(1,.5);
\node at (5,7) {A0};
\node (A1) at (6,6) [pin] {} +(1,.5);
\node at (6,7) {A1};
\node (A2) at (7,6) [pin] {} +(1,.5);
\node at (7,7) {A2};
\node (A3) at (8,6) [pin] {} +(1,.5);
\node at (8,7) {A3};
\node (A4) at (9,6) [pin] {} +(1,.5);
\node at (9,7) {A4};
\node (A5) at (10,6) [pin] {} +(1,.5);
\node at (10,7) {A5};
\node (SCK) at (11,6) [pin] {} +(1,.5);
\node at (11,7) {SCK};
\node (MOSI) at (12,6) [pin] {} +(1,.5);
\node at (12,7) {MOSI};
\node (MISO) at (13,6) [pin] {} +(1,.5);
\node at (13,7) {MISO};
\node (0RX) at (14,6) [pin] {} +(1,.5);
\node at (14,7) {0RX};
\node (1TX) at (15,6) [pin] {} +(1,.5);
\node at (15,7) {1TX};
\node (DFU) at (16,6) [pin] {} +(1,.5);
\node at (16,7) {DFU};
% upper
\node (BATT) at (5,9) [pin] {} +(1,.5);
\node at (5,8) {BATT};
\node (En) at (6,9) [pin] {} +(1,.5);
\node at (6,8) {En};
\node (USB) at (7,9) [pin] {} +(1,.5);
\node at (7,8) {USB};
\node (f13) at (8,9) [pin] {} +(1,.5);
\node at (8,8) {13};
\node (f12) at (9,9) [pin] {} +(1,.5);
\node at (9,8) {12};
\node (f11) at (10,9) [pin] {} +(1,.5);
\node at (10,8) {11};
\node (f10) at (11,9) [pin] {} +(1,.5);
\node at (11,8) {10};
\node (f9) at (12,9) [pin] {} +(1,.5);
\node at (12,8) {9};
\node (f6) at (13,9) [pin] {} +(1,.5);
\node at (13,8) {6};
\node (f5) at (14,9) [pin] {} +(1,.5);
\node at (14,8) {5};
\node (SCLF) at (15,9) [pin] {} +(1,.5);
\node at (15,8) {SCL};
\node (SDAF) at (16,9) [pin] {} +(1,.5);
\node at (16,8) {SDA};
% Body of the TB6612
\node at (7.5,0) [rectangle, thick, draw, minimum width=11cm, minimum height=5cm] {};
\node at (7.5,-0.25) [font=\bf]{Motor Controller (TB6612)};
% TB6612 Pins
\node (PWMA) at (3,2) [pin] {} +(1,.5);
\node at (3,0.5) {PWMA};
\node (AIN2) at (4,2) [pin] {} +(1,.5);
\node at (4,1) {AIN2};
\node (AIN1) at (5,2) [pin] {} +(1,.5);
\node at (5,1) {AIN1};
\node (STBY) at (6,2) [pin] {} +(1,.5);
\node at (6,1) {STBY};
\node (BIN1) at (7,2) [pin] {} +(1,.5);
\node at (7,1) {BIN1};
\node (BIN2) at (8,2) [pin] {} +(1,.5);
\node at (8,1) {BIN2};
\node (PWMB) at (9,2) [pin] {} +(1,.5);
\node at (9,0.5) {PWMB};
\node (GNDTB_TOP) at (10,2) [pin] {} +(1,.5);
\node at (10,1) {GND};
\node (VCCTB) at (11,2) [pin] {} +(1,.5);
\node at (11,1) {VCC};
\node (VM) at (12,2) [pin] {} +(1,.5);
\node at (12,1) {VM};
\node (MOTORA1) at (5,-2) [pin] {} +(1,.5);
\node (MOTORA2) at (6,-2) [pin] {} +(1,.5);
\node at (5.5,-1) {MOTORA};
\node (GNDTB_BOT1) at (7,-2) [pin] {} +(1,.5);
\node (GNDTB_BOT2) at (8,-2) [pin] {} +(1,.5);
\node at (7.5,-1) {GND};
\node (MOTORB1) at (9,-2) [pin] {} +(1,.5);
\node (MOTORB2) at (10,-2) [pin] {} +(1,.5);
\node at (9.5,-1) {MOTORB};
% Body of OLED Display
\node at (19.5,8) [rectangle, thick, draw, minimum width=4cm, minimum height=3cm] {};
\node at (19.5,7) [font=\bf]{OLED (SSD1306)};
% OLED Pins
\node (SDAO) at (18,9) [pin] {} +(1,.5);
\node at (18, 8) {SDA};
\node (SCLO) at (19,9) [pin] {} +(1,.5);
\node at (19, 8) {SCL};
\node (VCCO) at (20,9) [pin] {} +(1,.5);
\node at (20, 8) {VCC};
\node (GNDO) at (21,9) [pin] {} +(1,.5);
\node at (21, 8) {GND};
% Motors
% Left
\draw (5,-4) node[elmech](motor) {L};
\draw (MOTORA1.south) to (motor.north);
\draw (motor.south) -- ++(0,-0.5) -- ++(1,0) -- (MOTORA2.south);
% Right
\draw (9,-4) node[elmech](motor) {R};
\draw (MOTORB1.south) to (motor.north);
\draw (motor.south) -- ++(0,-0.5) -- ++(1,0) -- (MOTORB2.south);
% Grounds
\draw (GNDF) -- ++(0,-1) -- ++ (0,0.5) node(GROUND)[ground]{};
\draw (GNDTB_BOT1.south) -- ++(0,-1) -- ++ (0,0.5) node(GROUND)[ground]{};
\draw (GNDO) -- ++(0,1) -- ++ (1,0) -- ++ (0,-1) node(GROUND)[ground]{};
% TB6612 connections
\draw (A0.south) to[short] (AIN1.north);
\draw (A1.south) -- ++(0,-1.5) -- ++(-2,0) to[short] (AIN2.north);
\draw (A2.south) to[short] (BIN1.north);
\draw (A3.south) to[short] (BIN2.north);
% 3V3 Power connections
\draw[red] (3V.south) -- ++(0,-2.5) -- ++(1,0) -- (PWMA.north);
\draw[red] (3V.south) -- ++(0,-2.5) -- ++(4,0) -- (STBY.north);
\draw[red] (3V.south) -- ++(0,-2.5) -- ++(7,0) -- (PWMB.north);
%\draw[red] (3V.south) -- ++(0,-0.5) -- ++(-2,0) -- ++(0,5.5) -- ++(12,0)
% to[normally open push button, draw, color=black] ++(1,0) ;
% 5V Battery
\draw(12,2.5) -- ++(0,2) to[battery, v=$5V$] ++(-2,0) -- ++(0,-2) ;
% \draw (VP.north) -- ++(0,1)
% to[R=10<\kilo \ohm>,-] ++(5,0) -- ++(0,-1) node(GROUND)[ground]{};
% \draw (VP.north) -- ++(0,1) -- ++(-2,0);
\end{circuitikz}
\end{document}