summaryrefslogtreecommitdiff
path: root/docs/projects/reflow-workshop.md
blob: 98a2cf33f4783575d66aa95c0641e2c7d3a0b2e4 (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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
# Reflow Workshop: A Journal

Status: updating

## 2023-03-15, Wednesday

Today I took a group interview for assistants of a new hackerspace. Five
students were present, in a room with Mr. Xiao, the manager.

My prior work experience bought me some credibility, and I shared with
Xiao my frustration not being able to properly do electronic engineering
for lack of resources.

We then took a walk in the empty hackerspace. The proper name is actually
Tang Junyuan Student Innovation and Entrepreneurship Center, but I prefer
hackerspace. 

![A two-story hackerspace. Empty save for workbenches, chairs and
cabinets.](img/reflow-workshop/empty_tjy.jpg)

▲ This is only half of the hackerspace.

We had a heck of a time discussing what this space is potential of.
Four-wheelers. LaTeX and vim workshop up the stairs. And of course
— reflow soldering.

Reflow soldering is on my [list of life goals](../random/life_goals/), but
it's in my dream since 2019. At that time I was a nobody in high school.
All I could solder was through-holes. Kliment, my IRC friend (though we've
met IRL once) kindly mailed me one of his works: [an electronic
kitten](https://github.com/kliment/catws). It is 5cm×5cm.

![Picture of cat on black PCB. The eyes are glowing
blue](img/reflow-workshop/electronic_cat.jpg)

▲ It purrs when you stroke it right; otherwise, it hisses.

## 2023-03-16, Thursday

So I revealed my plans to Kliment, who was very supportive as usual. He
forwarded me an email listing the things I need.

One crucial thing is that I have to program the <abbr
title="microcontroller unit">MCU</abbr> before soldering, so I need
a <abbr title="Quad-Flat No-leads with 32 pads">QFN32</abbr> test socket.
Kliment estimated it to cost 800 RMB, but in China it seems to only be
~200. I bought one for 180.

## 2023-03-17, Friday

Just ordered the two parts from LCSC with specific numbers: Murata
PKMCS0909E4000-R1 and Meihua MHS110FRGBCT. LCSC gave me a 20 RMB coupon.

After that I went to look for the MCUs (ATtiny88-MU) and found them in
a random Taobao store that sells them at 7 RMB apiece. I think I might
need other chips later, so I also added some ATtiny48 and ATmega328PB to
my shopping cart. I asked customer service if they got any in stock. They
said I could just place my order, so I did.

Then I went to hunt for the PCB and stencils. Kliment forewarned me that
factories use only one stencil per assembly line, so my use case is
extremely rare. I will have to consult the manufacturer for a quote.

## 2023-03-19, Sunday

Talked to the sales rep of JDBPCB, they were confused for a good minute,
then realized what I was asking for. They told me to just place my order.
They claim they had seen this kind of thing before. Kliment suggests it
might have been [Honza Mrazek](https://honzamrazek.cz/).

Sent <abbr title="basically a zip file of everything the factory needs to
produce PCBs and stencils">Gerbers</abbr> to them, along with my requests
in the notes. They PCBs are approved.

## 2023-03-20, Monday

I received the piezo speaker and RGB LEDs from LCSC today.

To my surprise JDB approved my stencil request, and priced it at an
unexpectedly low 80 RMB.

Later the customer service approached me to confirm once again that
I wanted 10 copies of the same stencil. Upon hearing yes, they revealed
that the 80 RMB was actually the price for *one* stencil, but for me they
could do 216 RMB for 10, tax included, with the implication that I do not
do this kind of shit to them again. They fear me.

Kliment helped shave off 46 RMB off my budget. I was looking for
a hotplate which he said will not cost more than 80 RMB. When I told him
best I could find is 135, he said I was looking for the wrong thing; what
I need is not a hotplate advertised for solder work, but a consumer grade
for heating food and beakers. I changed the keyword and found one at 89.

## 2023-03-21, Tuesday

Cell batteries, holders, and the QFN32 socket have arrived.

![QFN32 socket with lid open](img/reflow-workshop/qfn32_socket.jpg)

▲ \*Kneels on floor\* \*Unlids socket\* \*Presents brand new ATtiny88-MU\*
Will you marry me?

The socket is a delicate piece of hardware. You would place the MCU in
a 5mm×5mm slot where two adjacent pins are 0.5 mm apart, and access them
from a <abbr title="Dual In-line Package">DIP</abbr> interface where that
distance (also known as the lead pitch) is 2.54 mm.

The microcontrollers on the other hand haven't even begun shipping yet.
I asked them what's wrong, and their answer was: "we don't have them."

…Then don't sell them?

I then asked when they will be back on stock. They read my messages but
remained silent. Chances are they will never ship, says Kliment. This is
just a scam on a chain of fake distributors. The evening they finally gave
in, offering a refund.

At the same time I'm looking for more trustworthy vendors. Kliment
referred me to Winsource. Although a Shenzhen company, they don't seem to
ship to China under that brand. So I reverse engineered a bit to find that
its Chinese trademark is 聚源鑫. Small company, not super well-known, not
even a store on Taobao. I'll talk to them in working hours tomorrow.

I am currently inside an episode of self-doubt. What if I fail to learn
reflow myself? Even if I can barely manage, what qualification do I have
to teach other people? Perhaps I should have picked my battles and went
for a simple SMD hand soldering workshop instead. That's much much easier,
and I have done this three times.

## 2023-03-22, Wednesday

As I rose from bed I realize I could have ordered 5 stencils, and
organized two or more sessions in series. But I guess 10 is ok. Especially
when imbursement is possible.

Was busy most of the day, and I forgot to contact that shady vendor.

After dinner I moved what I have got so far to the hackerspace with my
bicycle.

![Three boxes in my front basket and one big box mounted on the rack with
tape](img/reflow-workshop/bicycle.jpg)

▲ It was a 2.5 km ride.

In the empty hackerspace I unboxed the hotplate:

![A black circular pad on top of a yellow metal base. On the side is
a knob](img/reflow-workshop/hotplate.jpg)

▲ They sent along a *physical* invoice, a rare item these days

## 2023-03-23, Thursday

I rang 聚源鑫 to ask about the availability of ATtiny48-MU, the cheaper
alternative to 88. They don't have any.

Now that the hope of getting chips from shady sources has vanished,
I returned to LCSC to check out their offers. They are able to act as
a broker between me and Mouser, charging 12.87 RMB apiece. Sounds good.
I ordered 20.

## 2023-03-24, Friday

The much awaited stencils are here! They were sandwiched between two
pieces of pretty rigid cardboard. The PCBs are in the same box.

![Shiny stencils taped on cardboard, with black PCBs placed on
top](img/reflow-workshop/stencils.jpg)

▲ For scale, each stencil is 5cm×5cm

## 2023-03-25, Saturday

The major chunk of my BOM is taken care of. Now we shall focus on the
nitty bitty discrete parts, such as capacitors and resistor packs. As
always they are extremely cheap.

Last time I forgot to give LCSC the invoice info eligible for
reimbursement, so this time I ordered 20 more piezo speakers with the
info. Totally necessary and not abusing the hackerspace funding.

## 2023-03-26, Sunday

The discrete parts have arrived.

Also I brought all the tools I have from home: multimeter, soldering iron,
solder, flux, etc.

## 2023-03-27, Monday

Mouser seems to have shipped the MCUs.

In other news, I found this beautiful graphic that would make a great
poster background:

![Microscopic anime girls placing SMD parts on a blue
PCB](img/reflow-workshop/anime.jpg)

▲ Credits: [Shapo on pixiv](https://www.pixiv.net/en/artworks/91199411)

I made a mistake. On Saturday I thought a friend had spare LEDs from
a keyboard workshop last year so I didn't order any. But turns out I got
the size (monumentally) wrong, they're actually 3528 instead of the 0603
I want. (Makes sense though; we soldered them for backlight and 0603's
would be barely visible.) So I ordered 100 along with 10 pairs of
tweezers.

## 2023-03-29, Wednesday

The tweezers are here.

## 2023-03-30, Thursday

So are the LEDs.

## 2023-04-01, Saturday

I ordered 10 tin scrapers. Fun fact: in German they're called
["Japanspachtel"](https://de.wikipedia.org/wiki/Japanspachtel) (der
Japanspachtel, plural is die Japanspachtel) to distinguish from regular
[Spachtel](https://de.wikipedia.org/wiki/Spachtel_(Werkzeug)).

Also, I almost ended up buying the wrong kind of chemical. What I need is
isopropyl alcohol, but "industrial alcohol" on the marketplace refers to
methanol. The customer service kindly suggests I look for "industrial
ethanol". I ordered 500 mL.

## 2023-04-03, Monday

The Japanspachtel are here. I headed to the hackerspace and did a partial
test run. I attached the stencil and, with the most sloppy skills
possible, literally smeared solder paste wherever there are holes.

![Stencil and PCB held together with bolts and
nuts](img/reflow-workshop/bolted_stencil.jpg)

▲ Before applying the paste.

Upon removal, there were quite a lot of shorts, but easily fixable with
the sharp edge of the Japanspachtel.

![Grey gooey solder paste over
pads](img/reflow-workshop/partial_test_run_paste.jpg)

▲ Most of the tiny displacements will fix themselves once heated.

Then I placed all the capacitors, resistor packs and LEDs with tweezers.
Finally it's time to heat it. I cranked up the hotplate, but _boy_ how
does it get hot _so_ fast. A minute and it's already 250 C. Way too high
than needed. I cooled it down to ~180 C and shoved down the PCB.

![PCB on the hotplate](img/reflow-workshop/partial_test_run_hotplate.jpg)

▲ I forgot to place D3. Whoops.

I forgot to bring this up, but the solder paste I bought is not the
regular kind. Instead, it's Sn42Bi58 (42% tin and 58% bismuth), the same
kind Kliment used for his workshop. The bismuth makes the melting point
really low, as low as 138 C.

It only took moments for the fume to come out, and here we have our solder
joints.

![Silver solder joints on pads connecting parts to PCB. A QFN32 footprint
is left unpopulated](img/reflow-workshop/partial_test_run_joints.jpg)

▲ These joints look solid, or so I hope? At least they don't jiggle.

I'm surprised it went so well. I mean, not up to my finest standard, but
it's really more than I expected from so little effort.

In the evening, I received the ethanol.

## 2023-04-04, Tuesday

With the ethanol I got yesterday I wiped the stencil and Japanspachtel
I was using. Good as new.

## 2023-04-05, Wednesday

Apparently my ATtiny's arrived in Shenzhen yesterday! Any day now…

## 2023-04-08, Saturday

They're here! Sadly I don't have time to play with them, I need to go to
a barbecue…

## 2023-04-09, Sunday

Guess whose dream four years ago came true today!

I can hardly contain my excitement, but I'll try my best to describe what
I did just now:

### 20:00

I arrived at the hackerspace and set everything up. I was alone so there's
no pressure. I think I might be able to finish this by ten.

### 20:10

I carefully picked up one (1) ATtiny48-MU chip and placed it inside the
QFN socket. It looks like this:

![Loaded QFN socket](img/reflow-workshop/qfn32_socket_loaded.jpg)

▲ Finally, I can propose to my cyberfiancé(e)

I closed the lid and taped it shut. I don't want to lose it!

### 20:25

The chip must be programmed before going onto the PCB. For this I'm using
a [USBasp](https://www.fischl.de/usbasp/).

![QFN socket on a breadboard, connected to a USBasp with jumper
wires](img/reflow-workshop/usbasp.jpg)

▲ Actually there are mistakes in this photo. Three consecutive pins are
off-by-one.

After that, I connected the USBasp to my computer and attempted to
communicate with the chip, but failed. By continuous trial-and-error,
I found and fixed three problems:

- the MOSI, MISO and SCK pins are off-by-one
- I didn't pull `~RESET` low
- The baud rate is too high

![Screenshot of avrdude in interactive mode](img/reflow-workshop/avrdude.png)

▲ Finally, we have established diplomatic relationship with the Silicon
World.

I then set the fuses so that it runs at 8 MHz. And… it's done I guess?

### 21:10

Then comes the exciting part. I need to repeat what I did on
[2023-04-03](#2023-04-03-monday), but now we're going full throttle. I now
have a chance to capture photos I forgot by then.

![A Japanspachtel on top of a stencil and PCB](img/reflow-workshop/japanspachtel.jpg)

![Stencil with paste scraped all over it](img/reflow-workshop/solder_paste_scraped.jpg)

### 21:30

Doing the QFN32 is harder than I thought. There's always too much paste.
At first I thought it was my recklessness, so I kept reworking with
increasing care. It took me three tries to realize it is not. Actually, it
was the tiny displacements of the stencil as I scraped the other parts.

![Close-up of the QFN32 footprint with too much
paste](img/reflow-workshop/qfn32_paste_short.jpg)

▲ All the pads make one single blob. Not ideal.

So, instead of scraping the QFN32 footprint first, in my fourth run
I scraped it _last_. But upon removal there was too little. Time was
running out, so in a risky move I re-attached the stencil and scraped
a little more paste.

![Close-up of the QFN32 footprint with a reasonable amount of
paste](img/reflow-workshop/qfn32_paste_success.jpg)

▲ It worked!

So after manually separating a few shorts on the discrete components, it's
time to pick & place!

### 22:00

![All the parts placed on respective
footprints](img/reflow-workshop/pick_and_place.jpg)

▲ Didn't lose D3 this time

Onto the hotplate!

### 22:10

Watch C2 fall in place as the solder heats up.

<video controls>
    <source src="../img/reflow-workshop/cap_reflow.mp4" type="video/mp4">
</video>

▲ MP4, 4.1 MiB, no sound

The only problem was two shorted leads, which are easily fixed with flux
and the soldering iron.

![Two leads are shorted on the MCU](img/reflow-workshop/qfn32_joint_short.jpg)

### 22:20

BEHOLD

THE FIRST PROTOTYPE

![Completely populated PCB, LED is on](img/reflow-workshop/first_prototype.jpg)

▲ Everything works as intended

![Two PCBs, cat side up](img/reflow-workshop/kliments_vs_mine.jpg)

▲ Kliment's electronic kitten on the left, mine on the right

I spent another ~20 min cleaning up the workbench, then left.