Minor modifications to revision C.
[challenge-bot] / pcb / index.html
CommitLineData
468dbff9
WG
1 <HTML>
2 <Head>
3 <Title>
4MBino (Rev. C)
5 </Title>
6 </Head>
7 <Body>
8 <H1>
9MBino (Rev. C)
10 </H1>
11 <P>
12 </P>
13 <H2>
14Table of Contents
15 </H2>
16 <P>
17 <UL><LI>
18 <A HRef="#Schematic">
19 1.0 Schematic</A>
20 </LI><LI>
21 <A HRef="#Design_Files">
22 2.0 Design Files</A>
23 </LI><LI>
24 <A HRef="#Errata_and_Notes">
25 3.0 Errata and Notes</A>
26 </LI><LI>
27 <A HRef="#Bootloader">
28 4.0 Bootloader</A>
29 </LI><LI>
30 <A HRef="#IDE">
31 5.0 IDE</A>
32 </LI></UL>
33 </P>
34 <H2>
35 <A Name="Schematic">
361.0 Schematic</A>
37 </H2>
38 <P>
39The schematic is available as either a
40 <A HRef="busduino.pdf">
41.pdf</A> file or as a
42 <A HRef="busduino.svg">
43.svg</A> (Scalable Vector Graphics) file.
44The .pdf file should print reasonably well on a black
45and white printer. The .svg file is embedded below:
46 </P>
47
48 <Img Src="busduino.svg">
49 <P>
50There are two 2.1mm power jacks , N1 and N3.
51N1 feeds power through protection diode D1 and
52protection resettable polyfuse F2 to the LPWR1
53and LWPR2 pins of MakeBus connector N2. D1 protects
54everthing if the power accidentally comes in with
55reverse polarity on N1. (Connector N2 is labeled as
56"Robus" which is the previous bus name to "MakerBus".)
57The ground line of N1 is also connected to LGND1
58and LGND2 of N2. The same thing happens with N3,
59F1, and D2 with BPWR1, BPWR2, BGND1, and BGND2 on N2.
60 </P><P>
61The LPWR1 and LPWR1 lines from N2 are further connected
62to the 5V linear regulator U1 and the 3.3V linear
63regulator U2 to provide 5 volts and 3.3 volts respectively.
64 </P><P>
65CANH and CANL of N2 or connected to the 5V CAN bus
66transceiver chip U3. The 1 &times; 3 jumper J1 can
67be jumpered to connect a 124 ohm termination resistor R6.
68The 24K resistor R9 enables slope control for U3.
69The TXD and RXD pins are connected to the microcontroller
70U4 pins PD3 (TXD1) and PD2 (RXD1). Capacitors C5-C10
71are .1&micro;F bypass capacitors for U4 and U3.
7216MHz crystal X1 and crystal 22pF capactiors C4 and C5
73provide the 16MHz frequency reference for U4.
74 </P><P>
75Connector N4 is a 2&times;8 pin combined JTAG and
76serial download connector that connects to the
77various JTAG pins on the microcontroller (U4).
78The serial debug lines from N4 are also connected
79to the 1&times;6 serial cable pin N5 before
80connecting to PD1 (TXD0) and PD0 (RXD0) on U4
81through 1K ohm resistors R2 and R3. R2 and R3
82pins D0 (N9) and D1 (N9) to have priority over
83over both N4 and N5 is voltage sources are connected
84to both at the same time. It is a really bad idea
85to attempt to use both N4 and N5 for serial downloading
86at the same time. 10K ohm resistor R1 and 1&micro;F
87capacitor C12 provide a simple reset circuit to trigger
88RESET on U4. The reset button SW1 can also be used
89to manually reset U4.
90 </P><P>
91470 Ohm resistor R8 and LED D4 are connected to D13
92(N8) to provide an on-board LED. 470 ohm resistor R7
93and bicolor LED D3 are only meant to be used for
94debugging; they are not installed in the final product.
95Connectors N6 (Power/Reset pins), N7 (ISP header),
96N8 (D0-D13, GND, AREF), N9 (D0-D7) and N10 (A0-A5)
97are used used to connect to Arduino compatible shields.
98 </P><P>
994.7K ohm resistors R4 and R5 are available to be used
100as pull up resistors for the I<Sup>2</Sup>C bus pins
101connected to D13 (SCK) and D12 (MISO) pins on U4.
102 </P>
103 <H2>
104 <A Name="Design_Files">
1052.0 Design Files</A>
106 </H2>
107 <P>
108This board was designed using KiCAD. A complete KiCAD
109archive of board is found in
110 <A HRef="busduino.zip">
111busduino.zip</A>. ("BusDuino" was the original name
112of the board before it was renamed to "MBino".)
113When this file is unzipped, the KiCad project file
114can be found down in
115<Code>robus/busdino/rev_b/busdino.pro</Code>. Various
116shared <Code>.mod</Code> and <Code>.lib</Code> files
117are kept in the <Code>robus</Code> directory. All
118Gerber and drill files are generated using KiCad.
119 </P>
120 <H2>
121 <A Name="Errata_and_Notes">
1223.0 Errata and Notes</A>
123 </H2>
124 <P>
125The following errors and issues are noted:
126 <UL><LI>
127 U1 Vin/Vout pins are swapped
128 </LI><LI>
129 A reset circuit from MakerBus is needed.
130 </LI></UL>
131 </P><P>
132The design notes for the reset circuit are:
133 <UL><LI>
134Use a SNLVC2G06 (dual open collector inverter):
135 </LI><LI>
136At VCC = 5V:
137 <UL><LI>
138 V<Sub>IH</Sub> = .7 * V<Sub>CC</Sub> = 3.5V
139 </LI><LI>
140 V<Sub>IL</Sub> = .3 * V<Sub>CC</Sub> = 1.5V
141 </LI><LI>
142 V<Sub>OL</Sub> = .55V
143 </LI><LI>
144 I<Sub>OL</Sub> = 32mA
145 </LI></UL>
146 </LI><LI>
147Assuming that the capacitor is clamped to VOL most
148of the time, the R*C that corresponds to charging
149from VOL to VIH in T seconds is the
150the basic capacitor charging equation:
151 </LI><UL><LI>
152 V(t) = V<Sub>OL</Sub> + (V<Sub>CC</Sub> -
153 V<Sub>OL</Sub>) * (1 - e<Sup>-t/R*C</Sup>)
154 </LI></UL><LI>
155Replacing V(t) with V<Sub>IH</Sub> and T:
156 <UL><LI>
157 V<Sub>IH</Sub> = V<Sub>OL</Sub> + (V<Sub>CC</Sub> -
158 V<Sub>OL</Sub>) * (1 - e<Sup>-T/R*C</Sup>)
159 </LI></UL>
160 </LI><LI>
161Solving for RC:
162 <UL><LI>
163 (V<Sub>IH</Sub> - V<Sub>OL</Sub>)/(V<Sub>CC</Sub> - V<Sub>L</Sub>) =
164 1 - e<Sup>-T/R*C</Sup>
165 </LI><LI>
166 e<Sup>-T/R*C</Sup> = 1 - (V<Sub>IH</Sub> -
167 V<Sub>OL</Sub>)/(V<Sub>CC</Sub> - V<Sub>OL</Sub>)
168 </LI><LI>
169 -T/R*C = ln(1 - (V<Sub>IH</Sub> -
170 V<Sub>OL</Sub>)/(V<Sub>CC</Sub> - V<Sub>OL</Sub>))
171 </LI><LI>
172 R*C = -T/ln(1 - (V<Sub>IH</Sub> -
173 V<Sub>OL</Sub>)/(V<Sub>CC</Sub> - V<Sub>OL</Sub>))
174 </LI></UL>
175 </LI><LI>
176Substituting in for T=1mS, V<Sub>IH</Sub>,
177V<Sub>OL</Sub>, and V<Sub>CC</Sub>:
178 <UL><LI>
179 R*C = -.001/ln(1 - (3.5 - .55)/(5 - .55))
180 </LI><LI>
181 R*C = -.001/-1.08744
182 </LI><LI>
183 R*C = .009196
184 </LI></UL>
185 </LI><LI>
186Setting C = .1&micro;F
187 <UL><LI>
188 R = .009196 / .0000001 = 9196
189 </LI></UL>
190Using an R near 10K should do the trick.
191 </LI><LI>
192The maximum discharge current is I<Sub>OL</Sub>. Use Ohm's law
193to determine determine discharge resistor:
194 <UL><LI>
195 V = I * R
196 </LI><LI>
197 R = V / I
198 = 5 / .032
199 = 156.25
200 </LI></UL>
201Setting R<Sub>discharge</Sub> = 180 should be good enough.
202 </LI><LI>
203The charge/discharge ratio is:
204 <UL><LI>
205 R<Sub>charge</Sub>/R<Sub>discharge</Sub> = 10K/180 = 55.5
206 </LI></UL>
207 </LI></UL>
208 <P>
209 <H2>
210 <A Name="Bootloader">
2114.0 Bootloader</A>
212 </H2>
213 <P>
214{Bootloader discussion goes here!}
215 </P>
216 <H2>
217 <A Name="IDE">
2185.0 IDE</A> </H2>
219 <P>
220The following URL specifies how to add a new board:
221 <BlockQuote>
222
223 <A HRef="http://www.avr-developers.com/corefiles/index.html">
224 http://www.avr-developers.com/corefiles/index.html</A>
225 </BlockQuote>
226 </P><P>
227The short answer is:
228 <Pre>
229 cd .../hardware
230 (cd arduino; tar cvf /tmp/arduino.tar .)
231 (mkdir {your_board_dir}; tar xvf /tmp/arduino.tar)
232 # now edit {your_board_dir}/boards.txt to configure your board
233 # now edit {your_board_dir}/programmers.txt
234 </Pre>
235The problem with this strategy is that you get a snap-shot of
236all the files and everything becomes out of date when the next
237release of the Arduino IDE comes out. A better way is probably
238to have a shell script that make a copy of arduino files followed
239by a file that unzips the stuff that needs to be changed. That
240may be just a few files.
241 </P><P>
242Here are the files that have been edited so far:
243 <DL><DT>
244 .../MBino/variants/standard/pins_arduino.h: </DT><DD>
245 <Pre>
246 // Add 4 pins to the vector for I2C SDA, SCL, and external pull-ups
247 SDA = 20
248 SCL = 21
249
250 port_to_mode_PGM = {
251 // Add &DDRA, // ATmega324 has a Port A
252
253 port_to_output_PGM = {
254 // Add &PORTA, // ATmega324 has a Port A
255
256 port_to_input_PGM = {
257 // Add &PINA, // ATmega324 has a Port A
258
259 digital_pin_to_port_PGM = {
260 // Remap digital pin ports
261
262 digital_pin_to_bit_mask_PGM = {
263 // Remap bit masks
264 </Pre>
265Obviously thes is pretty minor changes.
266 </DD></DL>
267 </P><P>
268{Create a .zip file that creates the various MBino
269sub-directories for the Arduino IDE.}
270 </P>
271 <HR>
272 <Address>
273 <A HRef="http://gramlich.net/copyright.html">
274Copyright</A> 2013 by
275 <A HRef="http://gramlich.net/index.html">
276Wayne C. Gramlich</A>.
277All rights reserved.
278 </Address>
279 </Body>
280 </HTML>