summaryrefslogtreecommitdiff
path: root/notes
blob: ff42c1e52a0355e99a03507ebde374ff7a1b8cd2 (plain)
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
Input power supply needs to be reasonable and we'll buck that down to 5v.

Anything based on the MC34063 seems plausible, they're cheap and require only a
few external components.  Also there is already a schematic symbol in KiCAD.
http://www.farnell.com/datasheets/1723944.pdf is a possible datasheet for this.

The 5v rail shall be considered the primary supply rail, we want to provide for
the chromecast audio and also all the 3.3v logic.  The logic alone totals
almost 100mA and then we need some spare for other things, so we should assume
we want around 750mA at 5v if we're to offer a full 500mA to the USB.

The CCA only draws a characterised 200mA at 5v, so we could get away with 500mA
at 5v total buck output.  An MC34063 based system should be capable of up to
1.5A though, so we can arrange for a reasonable output current.

GIven we in theory want 750mA max output, and the peak current in step down is
twice the desired current, we need a 1.5A to 3A capable schottky diode for the
output and so perhaps http://www.farnell.com/datasheets/1915575.pdf might do
though we chose a 1212 sized component (see below) which was 550mV instead of
500mV forward drop

Working through the calculations in table 12 of the sheet above, with the
following goal parameters:

Vout         = 5v
Iout(max)    = 1.5A
Vripple(p-p) = 50mV
Vin(min)     = 9v
Vsat         = 1v (darlington configuration since step down)
Vf           = 600mV  (From the diode above)
Fmin         = 100KHz (theoretical maximum of the device)

Ton/Toff     = (5 + 0.6) / (9 - 1 - 5) = 5.6 / 3 = 1.87
(Ton+Toff)max = 1/100000 = 10uS
Ton          = 6.515uS
Ct = 4.5e-5 * Ton = 293pF
Ipk(switch)  = 2*Iout(max) = 1.5A
Rsc          = 0.3 / Ipk = 0.13 ohms
Co           = (Ipk(switch) * (Ton+Toff)) / (8 * Vripple(p-p))
             = (1.5 * 10uS) / (8 * 50mV)
	     = 0.000015 / 0.4 = 0.0000375 = 37.5 uF
L(min)       = (Vin(min) - Vsat - Vout) / Ipk(sw) * Ton(min)
             = (9 - 1 - 5) / 1.5 * 6.515uS
             = 2 * 6.515
	     = 13 uH

In addition, we need to calculate the divider ratio, we want 5v out
and the reference is 1.25v meaning we need a 1.25 : 3.75 divider

Vout = 1.25 (1 + R2/R1)
5v = 1.25 (1 + R2/R1)

R2/R1 = 3

As such, perhaps a 10K below 3 10Ks in series?

A useful appnote sheet on this DCDC is:
    http://www.onsemi.com/pub_link/Collateral/AN920-D.PDF

---

An alternative DC-DC option could be:

http://www.linear.com/product/LTC3600

This needs many fewer external components and pairs nicely with the LT3080
linear regulator (though we'll skip that for this board)

This DC-DC however must be paste soldered due to DFN with center pad nature.

For now, I am going to skip DC-DC and accept 5V input since a 1A regulated
supply is fairly easy and I can stuff a bunch of capacitors on it.

---


We're going to split the board into a number of 3.3v domains.

FP_VDD - Front panel (likely 80mA to 100mA needed)
DAC_DVDD - DAC digital power (naff all needed)
DAC_AVDD - DAC analogue power (20mA or so needed I think)
STM_VDD - STM32 power (a few tens of mA)
RX_VDD - S/PDIF receiver circuitry (20mA or so needed)

http://uk.farnell.com/microchip/mcp1700t-3302e-tt/ic-v-reg-ldo-250ma-smd-sot-23/dp/1296592

is a reasonable LDO, in SOT23-3 format it should be pretty easy to fit plenty
of them onto the board.

Alternatively we could use: http://www.ti.com/lit/ds/symlink/tps788.pdf which
would give us the ability to perhaps control the power wells independently
which might be fun.  We could have the STM32 power up first, set up its IOs and
then bring up each part in turn.  Specifically we'd use the TPS78833 which is
the 3.3v option.

http://uk.farnell.com/microchip/mic5504-3-3ym5-tr/ldo-volt-reg-0-3a-3-3v-sot-23/dp/2510377
might be cheaper, but its EN pin is the opposite way around.  Floating is
disabled which makes life a little easier than with the TI part because we
won't need external pulls for disabling the other domains.

We need to find some suitable low-ESR (but not ultra-low ESR) surface-mount
capacitors suitable for use for the LDOs. F920J475MPA will do at 7.4p each
from Mouser.  It's worth noting that these tants are polarised and 0805.

---

The display board we're looking at from acme systems is:

http://www.acmesystems.it/DAISY-24

Based on datasheets I think it's around 80mA @ 3.3v It has a 10 way 0.1" pitch
connector.  The connector is not fully connected, so we can possibly put other
stuff onto the same pin header on our board.

3.3v  1     2
      3     4
      5     6
SDA   7     8  SCL
      9    10  GND

In theory we could put all sorts on 2-6 and 9.  My gut feeling is that I'll
put 3.3v on 2 and GND on 9, leaving 3,4,5,6 as possible other signals.

There are no pullups on the board for the I2C, so that needs to be taken into
account when we put the I2C bus around the board.

Sadly it turns out the Daisy-24 has 0.05" pitch pins, but I found a digikey
entry for that for 30p shrouded, so yay! (or 45p unshrouded which may be safer
in case I get it the wrong way around)

---

We're using https://www.cirrus.com/en/pubs/proDatasheet/WM8804_v4.5.pdf
(WM8804) as the S/PDIF receiver/decoder.  It only has 1 input so if we're to
have coax *and* optical inputs then we need to work out how to arrange for
those to be combined into the receiver.  Some kind of 2-to-1 mux will be
necessary.

We're using http://www.ti.com/lit/ds/symlink/pcm5102a-q1.pdf (PCM5102A) as the
DAC.  It takes I2S in (from the S/PDIF receiver) and generates direct line level
analogue outputs.  Nice and simple to cad for.

We're using an STM32F103CB(T6) which is the LQFP48 stm32 we used on the ekey.
We're used to it, we know how it works, I'm confident I can lay out for it to
run successfully (perhaps even on 2 layers) and it has enough features for what
we need it to do. (Ditto, there's already a symbol for it in KiCAD)

---

The Input (toslink / s/pdif) connector is FC684206R and is a CLIFF connector
which incorporates the TOSLINK and S/PDIF COAX connectors.

It's going to take a lot of work to get the footprint done properly because the
sodding thing has awful scans as datasheets.

The datasheet from datasheetlib.com is probably the best copy.  We're going to
need NPTH and PTH holes, some pins, some mechanical.

The COAX pins are at the "back" of the device, one is centered the other
offset.  The centered pin is the signal, the offset is the ground for the COAX.

Someone did a device using this which included schematics:

http://www.yo3ggx.ro/DAselector/Coax&ToslinkSelector_v1.0.pdf

In order to MUX this effectively, we need to take the COAX input and the
TOSLINK input and be able to select between them.  To do this, a quad 2-input
NAND chip will work.  A 74AC110000 from TI would be good if we can get it:
    http://www.ti.com/lit/ds/symlink/74ac11000.pdf

In brief, use one as a NOT gate for SEL, feed COAX and SEL into one, giving
nCOAX/1, feed TOSLINK and nSEL into the other, giving nTOSLINK/1.  Feed nCOAX/1
and nTOSLINK/1 into the final NAND gate, getting COAX/TOSLINK.

Mouser cheaper than Digikey for low volume for the TI part.

---

The soft-mute on the DAC is meant to be fail-safe.  As such it will be pulled
up to 3.3v by a divider on the 5v rail since that will collapse before the AVDD
well.  A diode to allow that to be grounded by the GPIO on the STM32 will then
allow us to mute on demand.  By pulling the STM32 side of that diode *down*,
we will hold the DAC in mute until the STM32 chooses to unmute it by driving
that GPIO pin high to halt the drain via the diode.

See Page 30 of the PCM5102A datasheet for an example circuit.

Also, depending on the way that GEN_FLAG is implemented, it may be worth
directly ORing in that output into the mute line so that if the receiver says
that there's nothing to play, we mute the DAC.

---

Signals needed from the STM32 include:

Full JTAG
Programming serial port incl. boot pin control.
Front panel connector (I2C)
GPIOs to the DAC including: DEMP, FLT, FMT, XSMT-via-diode
WM8804 needs an I2C link and a reset and config line control.

---

Required pin-strapping for the WM8804 include enough that we should likely link
all the relevant lines to the STM32 and then we can hold it in reset, set the
pins up, release reset, and then reset those pins into high-Z and/or I2C as
appropriate.  As such, it might be best if we can have independent I2C lines to
the front panel so that we don't confuse that panel by our WM8804 startup
strapping since it may include SCL/SDA.

---

The capacitors to put on the crystal need to be of value:

2 * (Cload - Cstray)

Cload of the chosen crystal is 18pF and Cstray will be in the 2-5pF range.

This gives us a 26 to 32 picofarad external load capacitor.

Also the crystal defines, at 12MHz, a maximum of 80 Ohms ESR

Since this is all fairly bleh, anywhere in that range will likely suffice, and
as such, I have chosen 27pF.

---

Since we're using LQFP48 for the STM32, 10mil trck and gap is likely the
minimum possible.  We could then thicken up once we get out from the STM32.

Normal trace width should be 16 or 20 mils.

Power traces should ideally be 30 mils or so.

---

Primary IC selections

The MC34063 is MC34063ADR (39.6p Mouser)
The WM8804 is WM8804GEDS/V (5.85 GBP Mouser)
The PCM5102-A is PCM5102APWR (3.31 GBP Mouser)
The STM32 is STM32F103CBT6 (4.46 GBP Mouser)

---

Connector selections

The RCA outputs are PJRAS1X2S01AUX (1.43 GBP ea. Mouser)
    Note: this is a dual output, so only need one.
The RCA/TOSlink input is FC684206R (3.27 GBP Farnell)




---

Other component selections (passives etc)

I have chosen 0805 for the most part here, though 0603 exist for many

EMI Bead (0805) BK2125HS102-T (6.6p Mouser)

1uF Ceramic capacitor (0805) VJ0805Y105KXQTW1BC  (3.3p Mouser)
10uF Ceramic capacitor (0805) VJ0805G106KXQTW1BC (6.6p Mouser)
100nF Ceramic capacitor (0805) VJ0805V104ZXQCW1BC (6.6p Mouser)

27pF Ceramic capacitor (0805) 08055A270JAT2A (6.6p Mouser)

0R13 resistor (0805) for DCDC RL0805FR-070R13L (36.1p Mouser)
Diode (SOD-123) for DCDC PMEG3015EH,115 (25.9p Mouser)
300pF Ceramic capacitor (0805) for DCDC 0805YC301JAT2A (3.8p Mouser)
22uF Ceramic capacitor (0805) for DCDC GRM21BR61A226ME51L (17.2p Mouser)
(Reuse 10uF from above for DCDC)
(Reuse 5x1uF from above for DCDC)
15uH wire wound inductor (1212) for DCDC LQH3NPN150NJ0L (28.4p Mouser)


10k resistor (0805) AS08J1002ET (3.9p Mouser)
33R resistor (0805)  CRCW080533R0FKEA (6.6p Mouser)
390R resistor (0805) CRCW0805390RFKEA (6.6p Mouser)
Zero resistor (0805) CRCW08050000Z0EA (6.6p Mouser) (in case of need)

USB protection device (SOT23-6) USBUF01W6 (41.6p Mouser)

12MHz Crystal 10ppm 18pF (HC49) 9C-12.000MEEJ-T (44.9p Mouser)

---

At this point we re-thought things slightly and chose to go with a 5v input
rather than a 9v input, and switched around to a TI asynchronous sample rate
converter rather than the mux built of NAND gates and the wolfson part.

This means we need different sourced parts:

---

Possible oscillators

http://www.digikey.co.uk/product-detail/en/FXO-HC736R-22.5792/631-1277-1-ND/3189602
http://www.digikey.co.uk/product-detail/en/FXO-HC736R-24.576/631-1186-1-ND/2074713

---

Digikey sourcing for other parts

SRC: http://www.digikey.co.uk/product-detail/en/SRC4392IPFB/296-26676-ND/1594326
DAC: http://www.digikey.co.uk/product-detail/en/PCM5102APWR/296-36707-1-ND/4341334
STM: http://www.digikey.co.uk/product-detail/en/STM32F103CBT6/497-6288-ND/1754420
RCA: http://www.digikey.co.uk/product-detail/en/PJRAS2X1S01AUX/SC1858-ND/1832415
TOS: --- Still needs to be farnell ---
D24: http://www.digikey.co.uk/product-detail/en/cnc-tech/3220-10-0100-00/1175-1627-ND/3883661
D24: http://www.digikey.co.uk/product-detail/en/amphenol-fci/20021111-00010T4LF/609-3712-ND/2209072 (unshrouded)
µAB: http://www.digikey.co.uk/product-detail/en/amphenol-fci/10118194-0001LF/609-4618-2-ND/2785389
LED? http://www.digikey.co.uk/product-detail/en/kingbright/APT2012LZGCK/754-1939-1-ND/5177469