This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
820 lines (669 loc) · 40.9 KB
/
index.html
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
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Dissection of the ZJTL Piano Toy Keyboard</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/scrolling-nav.css" rel="stylesheet">
</head>
<body id="page-top">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top" id="mainNav">
<div class="container">
<a class="navbar-brand js-scroll-trigger" href="#page-top">Dissection Journal</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#intro">Introduction</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#market">Market</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#dissection">Dissection</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#operation">Operation</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#analysis">Analysis</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#reassembly">Reassembly</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#closing">Closing Thoughts</a>
</li>
</ul>
</div>
</div>
</nav>
<header class="bg-primary text-white">
<div class="container text-center">
<h1>Behold</h1>
<img src="img/piano.png" class="rounded img-fluid" alt="The ZJTL Piano Toy Keyboard">
<h1>The ZJTL Piano Toy Keyboard</h1>
</div>
</header>
<section id="intro">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<h2>Introduction</h2>
<p class="lead"> My name is Garrett Smith. I am a senior pursuing a degree in Computer
Engineering, minors in Math and Global Engineering Leadership, and a
certification in Information Assurance.</p>
<p>This website serves as a record of work performed during the
dissection and analysis of a small, electronic piano. The dissection
and analysis—as well as the creation of this website—were performed
according to the project requirements listed
<a href="https://courses.ece.msstate.edu/ece4723/dissect/">here</a>.
</p>
</div>
</div>
</div>
</section>
<section id="market" class="bg-light">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<h2>Market</h2>
<p class="lead"> The ZJTL Piano Toy Keyboard is manufactured by Zhejiang Tianlong Optoelectronics Technology Co. Ltd., located
in the Zhejiang province of China. At the time of listing, it was sold as a direct-from-manufacturer product
on Amazon for the price of $9.99 USD. Interestingly, this price point was not recorded by price-tracking applications (see below).
</p>
<img src="img/price-history.png" class="rounded img-fluid" alt="A line graph depicting the price history of the keyboard.">
This product was not found in the second-hand market, has no market history to speak of, and has no whitelabel, rebranded, or OEM versions.
<p>
On a more personal-history note (as opposed to the history of the product itself),
this is actually the second keyboard I ordered from Zhejiang Tianlong Optoelectronics Technology;
The first one arrived as a box of plastic shards and scattered electronics, which made dissection difficult.
</p>
<p class="lead">
From ZJTL's storefront on Amazon:
<img src="img/marketdetails.PNG" class="rounded img-fluid" alt="Product details on amazon">
</p>
<p>
I'm hesitant to trust this information, as the number of tones, rhythms, and demo songs available are
inaccurate, and no mention of the mysterious SAOCOOL is made outside of these product details.
Finally, the picture displayed on amazon isn't even of the keyboard I purchased. It seems to change occasionally.
</p>
</div>
</div>
</div>
</section>
<section id="dissection">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<h2>Dissection</h2>
<p class="lead">
An image of the ZJTL Piano Toy Keyboard in its packaging, which was definitely <em>not</em>
hastily taken at the end of this project after re-reviewing the rubric. Don't check the image metadata.
<img src="img/journal/000.jpg" class="rounded img-fluid" alt="The device in its package">
</p>
<p class="lead">For the dissection of the ZJTL Piano Toy Keyboard, I used the following tools:
<ul>
<li>Screwdriver</li>
<li>Silicone project mat with screw trays</li>
<li>Work lamp which ended up causing my photos to be horribly over-exposed, but working without it made the images too dark to see</li>
<li>My trusty Opinel No. 6 pocket knife</li>
<li>Digital Kitchen Scale</li>
<li>iPhone 6s for photos and frequency analysis</li>
<li>Electrical Tape</li>
<li>Digital multimeter</li>
</ul>
</p>
<img src="img/journal/001.jpg" class="rounded img-fluid" alt="The keyboard, the included microphone, and the owner's manual">
<p>
We begin the dissection of this "Musical Information System" by removing the nine screws in the back of the piano's body, as well as the screw
holding the battery compartment closed. I anticipate that the manufacturer has hidden a screw beneath it.
</p>
<p>
These screws seem particularly small, so I will be using a 000 Phillips Head bit.
<img src="img/journal/002.jpg" class="rounded img-fluid" alt="The back of the keyboard">
My previous suspicion confirmed. This brings the screw count up to 10, or 11 if you include the battery compartment cover's.
<p></p>
<img src="img/journal/003.jpg" class="rounded img-fluid" alt="The screw hiding in the battery compartment">
<p></p>
<img src="img/journal/004.jpg" class="rounded img-fluid" alt="The back of the keyboard with all screws removed">
<p></p>
Unscrewing these placed a concerning amount of mechanical strain on the body of the keyboard; All screws on
the edge of the body caused a considerable amount of bowing of the plastic, as well as some creaking sounds.
This may go without saying, but judging by the use of screws with pointed tips, I don't think the manufacturer
intended for this keyboard to be disassembled. Additionally, the screws themselves were extremely soft—I stripped one with minimal torque.
</p>
<h3>The Reveal</h3>
<p class="lead">
I'm not sure what I was expecting, but it wasn't this. I understood that this would likely be a very simple system, not this simple.
</p>
<p>
Immediately, I notice that one of the speakers. . . well. . . does not actually exist; one of the sets of holes made for sound to pass through was included only for aesthetic purposes.
<img src="img/journal/005.jpg" class="rounded img-fluid" alt="The keyboard, opened">
Additionally, it seems that all components are wired to this <em>one</em> board. I'm still wondering how this
thing manages to have <em>twenty-four</em> demo songs stored on it, not to mention (what I assume at this stage of my understanding of this product) all the wave-tables for each instrument.
<p></p>
<img src="img/journal/006.jpg" class="rounded img-fluid" alt="The close up of the PCB inside the keyboard">
<p></p>
<img src="img/journal/007.jpg" class="rounded img-fluid" alt="The close up of the part number on the PCB">
Two things strike me as important from this image.
<ol>
<li>What appears to be some sort of ID of the board design itself.</li>
<li>The screenprinting on the IC</li>
</ol>
</p>
<p>
My camera phone is only capable of so much (and I have misplaced every free clip-on camera phone lens I have received from recruiters at job fairs), so you will have to trust me when I say that it reads:
<p class="text-monospace">
MPAK<br/>
LM386<br/>
M-1<br/>
</p>
</p>
<h3>A Quick Aside: Investigation of Parts</h3>
<p class="lead">
The part number and date listed on the board itself interested me the most, so I plugged it into a search engine:
<img src="img/journal/008.jpg" class="rounded img-fluid" alt="Duck Duck Go finding no results for the PCB's Part number">
</p>
<p>
The results were disappointing, but I chalked up this initial failure to DuckDuckGo's sometimes inferior indexing, and turned to Google. . .
<img src="img/journal/009.jpg" class="rounded img-fluid" alt="Google finding no results for the PCB's Part number">
. . . which gave equally disappointing results. I decided to loosen up the search parameters by removing the
quotation marks, and was presented with <a href="https://www.youtube.com/watch?v=yqphxjTINkw">this Youtube video</a> of a review of a children's synthesizer.
Neither the description nor the comments contained the string in question, but the relevance to the dissection was interesting.
</p>
<h4>Part 2: The LM386</h4>
<p class="lead">
This one was as easy to find as I had hoped. The LM386 is a Low Voltage Audio Power Amplifier manufactured by Texas Instruments (<a href="http://www.ti.com/lit/ds/symlink/lm386.pdf">with a datasheet!</a>)<br/>.
<img src="img/journal/010.jpg" class="rounded img-fluid" alt="Screenshot of the Texas Instruments Datasheet for the LM386">
</p>
<p>
I would fully expect this keyboard to contain an amplifier, seeing that it is an audio device, but the fact
that this chip isn't "the brains of this operation," so to speak, leaves me worried that the chip doing the
audio processing is hidden under a blob of black epoxy as is so annoyingly common with these devices.
</p>
<h3>Further dissection</h3>
<p class="lead">
The details concerning the audio amplifier and its supporting
components are interesting, but can be analyzed later. Let's continue dissecting the piano.
The screw holding the amplification circuit board in place is a little bit bigger, so I'm switching to a PH0 bit.
<img src="img/journal/011.jpg" class="rounded img-fluid" alt="Screwdriver with PH0 and PH00 bits">
</p>
<p>
<img src="img/journal/012.jpg" class="rounded img-fluid" alt="Underside of amplification circuit">
The audio-processing chip is nowhere to be found, and my fear of the inevitable IC-under-a-black-blob grows.
After some more thorough searching, I find it. The audio processing chip, hiding in plain sight (bringing our circuit-count up to two).
<p></p>
<img src="img/journal/013.jpg" class="rounded img-fluid" alt="Audio processing circuit">
My fears are once again confirmed; the chip is encased in black epoxy. I'm almost certain that this is the chip we are looking for,
as the keyboard buttons, the mic input, and the amplification circuit all connect to it.
My disappointment turns me back to looking up solutions to this problem.
I find <a href="https://electronics.stackexchange.com/questions/108940/reverse-engineer-how-do-i-remove-the-black-plastic-that-hides-the-ics">an answer on stack exchange</a>,
which suggests one of the two following methods:
<ol>
<li>Use a hotplate, a solution of nitric acid and distilled water , and a rotary tool to remove the epoxy (all of which I am in short supply of and can neither reasonably acquire nor set up a safe environment in which to use them)</li>
<li>Use a heat-gun and an X-acto knife. I have both of these, but it destroys the chip's bonding wires (we need those)</li>
</ol>
I am left solutionless (ha, nitric acid). Fortunately, we have more-or-less a free pin-out if we can
<em><u>carefully</u></em> strip parts of these ribbon cables. This sounds like a tedious
process that I will hand off to future-me.
</p>
<h3>Dissection Aside: how is that PCB being held on?</h3>
<p class="lead">
From the image above, we cannot really tell <em>how</em> the circuit board holding the apparent audio
processing chip is being held in place; there aren't any screws, any 90-degree brackets, or any other
mechanical feature. In fact, it seems like this chip has just been placed in a slot.
</p>
<p>
To find out, we will unscrew the four screws (one is hidden beneath the ribbon cable) holding this long PCB in place
<img src="img/journal/014.jpg" class="rounded img-fluid" alt="Interior of piano">
Indeed, the smaller PCB is simply slotted into the larger one, with some mechanical soldering points to join them.
<img src="img/journal/015.jpg" class="rounded img-fluid" alt="Underside of button PCB and audio processing PCB">
It seems like that this is the PCB that holds all of the non-key buttons of the keyboard (other than the power button).
As far as I can tell, these are capacitive switches, which are very cheap and easy to manufacture, and are fairly durable
and long-lasting, depending on the operation environment.
</p>
<p class="lead">Only one electronic piece remains to be dissected.</p>
<img src="img/journal/016.jpg" class="rounded img-fluid" alt="Interior of the piano, detailing the keyboard PCB">
<p>
Specifically, the long PCB that presumably holds the switches that each of the plastic keys presses down.
<img src="img/journal/017.jpg" class="rounded img-fluid" alt="Interior of the piano, detailing the keyboard PCB with switches exposed">
Indeed, capacitive switches similar to those found underneath the operation buttons are housed on this PCB.
Interestingly enough, this PCB has some sort of part number, as well as a date.
<img src="img/journal/018.jpg" class="rounded img-fluid" alt="Part number and date on keyboard PCB">
I'll spare the reader the details, but searches performed on this part number were equally as fruitless as
previous attempts to do so for other parts analyzed in this dissection.
</p>
<p class="lead">
I was mistaken, there remains one final dissect-able electronic component.
</p>
<p>
<img src="img/journal/019.jpg" class="rounded img-fluid" alt="Power button PCB">
</p>
<p>
The power button for this keyboard, funnily enough, is soldered onto its own PCB—by two of its six connections.
From the number of leads coming off of this switch, I have to assume that this is a Double-Pole Double-Throw
switch. . . being used as. . . a Single-Pole Single-Throw switch. . . .
</p>
<p class="lead">With all of the electronic components explored, we remove the remaining mechanical parts.</p>
<p>
<img src="img/journal/020.jpg" class="rounded img-fluid" alt="Keyboard completely dissected">
This concludes the dissection of the ZJTL Piano Toy Keyboard. We dissected all parts except for:
<ol>
<li>The microphone (not part of the keyboard, difficult to non-destructively disassemble, and I would be willing to bet money that it's just a Piezo-electric sensor inside)</li>
<li>The microphone input (nothing to dissect)</li>
<li>The speaker (plastic-welded into the body, impossible to non-destructively disassemble, and I don't have the supplies to reconstruct a speaker cone)</li>
</ol>
</p>
</div>
</div>
</div>
</section>
<section id="operation" class="bg-light">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<h2>Operation</h2>
<p class="lead">
Unfortunately, I made the error of deciding to record the operation of the keyboard after
the reassembly stage of this dissection. Although the keyboard was fully functional immediately after reassembly,
at the time of writing, the keyboard operational buttons (Tone, Volume, Tempo, and Effect) do not work, and the
piano keys only work somewhat.
</p>
<p>
Fortunately, I am able to remember a good deal of how each button behaves,
and the product details give us enough information to fill in the blanks.
At the very least, I will know to record such information <em>before</em> dissection rather than after for
inevitable future disassemblies of the ZJTL Piano Toy Keyboard.
</p>
<h3>The Keyboard as collection of state machines</h3>
For the most part, the buttons of the keyboard operate as separate state machines, which then communicate
their state to the audio processing MCU.
<h4>The Tone Button</h4>
<img src="img/ops/tone.png" class="rounded img-fluid" alt="Tone button represented as state machine">
<p>
The keyboard is capable of playing notes in three different tones. One of which is a classic piano type sound,
another being a string instrument, and a third being something that I can only describe as a saw wave of some sort.
</p>
<h4>The Volume Button</h4>
<img src="img/ops/volume.png" class="rounded img-fluid" alt="Volume button represented as state machine">
<p>
The behavior of the volume button is equally straightforward, acting as a state machine isomorphic to that of the Tone button.
</p>
<h4>The Tempo Button</h4>
<img src="img/ops/tempo.png" class="rounded img-fluid" alt="Tempo button represented as state machine">
<p>
The tempo button is yet another case of Same State Machine, Different Day. I would have like to have recorded
the exact BPM of each tempo setting but I am unable due to reasons previously mentioned.
</p>
<h4>The Effect Button</h4>
<p>
I cannot remember for the life of me what this button does. Then again, I was equally confused as to its
affect on the keyboard sound when it was still usable.
</p>
<h4>The Lesson/Rhythm Button</h4>
<img src="img/ops/rhythm.png" class="rounded img-fluid" alt="Lesson/Rhythm button represented as state machine">
<p>
This button cycles through the 8 available backing tracks which consist of various drum sounds.
</p>
<h4>The "Demo One", "Demo All" and "Stop" Buttons</h4>
<p class="lead">I lump these together because of their lack of statefulness.</p>
<h5>Demo One</h5>
<p>
This button picks one of the keyboard's built-in Demos at random and plays it. A demo is defined here as one of the
8 rhythms in combination with a pre-recorded piano melody, using any combination of tone, tempo and effect. In
total, there are 24 different Demos.
</p>
<h5>Demo All</h5>
<p>
This button plays all demos in the manner previously described, but sequentially, rather than at random.
If interrupted the sequence does not continue where it left off, but rather at the beginning.
</p>
<h5>Stop</h5>
<p>
This button stops any audio playback that isn't a direct result of the user pressing the keys. This applies to
<ul>
<li>Rhythms</li>
<li>Singular Demos</li>
<li>Sequences of Demos</li>
</ul>
</p>
<h3>The Microphone</h3>
<p>The microphone is actually fairly simple in operation. Any input from a plugged in microphone is
passed through the speakers at whatever volume is currently selected.
This does not interfere with played notes, rhythms, or demos.
</p>
</div>
</div>
</div>
</section>
<section id="analysis">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<h2>Analysis</h2>
<p class="lead">
First, a look at the structure of the device from a high-level point of view.
<img src="img/diagrams/hl.png" class="rounded img-fluid" alt="High level diagram of keyboard">
</p>
<p>
As for a block-level diagram of the keyboard operation, the above high-level diagram would also map pretty
well, but we should include the batteries.
<img src="img/diagrams/bl.png" class="rounded img-fluid" alt="Block-level diagram of electrical systems">
</p>
<p>
The circuit diagram is equally simple. The component values are missing from this diagram, but this is
explained further on in this document.
<object data="img/schematic/circuit.svg" type="image/svg+xml" alt="Component-level view of keyboard circuit.">
<img src="img/schematic/circuit.png" class="rounded img-fluid" alt="Component-level view of keyboard circuit."/>
</object>
</p>
<h3>Operational Measurements</h3>
<p class="lead">
Theoretically, with 4 AA batteries in series, we should be pulling roughly 6V.
This seems to be the case as my multimeter reads 5.84V fairly consistently, and the
most common setups of the audio amplification circuit according to LM386 datasheet
show a 5V source being used.
</p>
<p>
An oscilloscope from the laboratory would be ideal for measuring frequencies, but due to shelter-in-place, I'll make do with an iPhone
piano tuning app (I would take pictures of this process if I weren't using this app on the only camera device that I own).
The piano tuning app recorded the lowest possible frequency produced by the keyboard as 145Hz, and the highest as 1160Hz.
</p>
<h3>Bill of Electronic Materials</h3>
<p class="lead">
Unfortunately, yet another curveball from Zhejiang Tianlong Optoelectronics Technology Co. Ltd. impedes our dissection and analysis.
For some reason—I have been wracking my brain for a sensible one—the manufacturer has chosen to coat the PCB in a thin
layer of plastic or similarly non-conductive material. My multimeter worked fine on bare metal for measuring the voltage of the
battery cells and the impedance of the speaker (4 ohms), otherwise I would chalk all of this up to user error.
In context with my general inability to identify components (other than the LM386), then maybe this isn't so bad.
</p>
<p>
With all of that out of the way, let's look at an approximate bill of materials. All prices are based off of Digikey estimates.
In situations where there are multiple suitable options, the price of the cheapest option with a minimum order of 1 unit is used.
If nothing fitting this criteria exists, then a straight average of the cost of all viable substitutes is taken.
</p>
<p>
The MCU is where the guesstimation gets tricky. From previous experience and interest in the "circuit bending" or modification of
toy electronic instruments, I know that the Intel 8051 microcontrollers and its clones (especially its clones) are extremely
common in these devices.
</p>
<table class="table">
<caption>Bill of Electronic Materials</caption>
<tr>
<th scope="col">Part</th>
<th scope="col">Cost</th>
</tr>
<tr>
<td>LM386</td>
<td>$1.00</td>
</tr>
<tr>
<td>Microphone Input Jack</td>
<td>$0.58</td>
</tr>
<tr>
<td>1.5" Diameter Speaker</td>
<td>$1.50</td>
</tr>
<tr>
<td>Generic 8051 Microcontroller</td>
<td>$1.50</td>
</tr>
<tr>
<td>2x Electrolytic Capacitors</td>
<td>$0.50</td>
</tr>
<tr>
<td>4x Surface Mount Capacitors</td>
<td>$0.25</td>
</tr>
<tr>
<td>6x Surface Mount Resistors</td>
<td>$0.50</td>
</tr>
<tr>
<td>Through-Hole Diode</td>
<td>$0.20</td>
</tr>
<tr>
<td>DPDT Pushbutton Switch</td>
<td>$2.00</td>
</tr>
<tr>
<th scope="row">Total</th>
<td><b>$8.03</b></td>
</tr>
</table>
</p>
<h2>Bill of Mechanical Materials</h2>
<p class="lead"> The ZJTL Piano Toy Keyboard claims to be made out of ABS plastic, and this appears to be true.</p>
<p>A good deal of the keyboard body bears the pockmarks of injection molding,
especially on the plastic standoffs and small buttons. These are included but not limited to small, thin
"tags" of plastic hanging off of small or precise parts of plastic, and welds or knit lines on large pieces.
With this in mind, I'll use the pricing of ABS plastic for the mechanical BoM. Additionally, I will list the
price of materials for <em>one keyboard</em>. Its very likely that the scale at which Zhejiang Tianlong
Optoelectronics Technology Co. Ltd. manufactures these keyboards makes the material costs literally cheaper
than dirt, and listing prices in tenths of a cent probably isn't very relatable to the reader.
</p>
<h3>Weighing</h3>
<p class="lead">In order to estimate the cost of each plastic piece, we can use the weight of each piece,
and a reasonable estimate of density.
</p>
<p>
ABS plastic has a density between 0.9g/cm<sup>3</sup> and 1.5g/cm<sup>3</sup>.
This is particularly flimsy ABS, so an estimated density of 1.00g/cm<sup>3</sup> will not only make calculations easier, but
also fairly close to the actual density.
</p>
<img src="img/bill-of-materials/bottom.jpg" class="rounded img-fluid" alt="Weight of keyboard bottom, 119 grams">
The bottom of the body weighs 119 grams.
<img src="img/bill-of-materials/buttons.jpg" class="rounded img-fluid" alt="Weight of keyboard operational buttons, 2 grams">
All of the operational buttons weigh 2 grams.
<img src="img/bill-of-materials/keys.jpg" class="rounded img-fluid" alt="Weight of the white keys, 22 grams">
The white keys of the keyboard weigh 22 grams.
<img src="img/bill-of-materials/keys2.jpg" class="rounded img-fluid" alt="Weight the black keys, 12 grams">
The black keys of the keyboard weigh 12 grams.
<img src="img/bill-of-materials/top.jpg" class="rounded img-fluid" alt="Weight of the top of the keyboard, 81 grams">
The the top of the keyboard weighs 81 grams.
<h3>Estimations of cost</h3>
<p class="lead">
From the above weights, we can reasonably estimate costs.
For this, I used a Injection Molding cost estimator found on custompart.net,
found <a href="https://www.custompartnet.com/estimate/injection-molding/">here</a>.
</p>
<p class="lead">Let's start with the cost of the bottom part of the keyboard</p>
<img src="img/bill-of-materials/bottom_estimate.png" class="rounded img-fluid" alt="Estimation of the cost of the bottom part of the keyboard, $39,022 total, $10 of material.">
<h4>Aside: Labor and Capital</h4>
<p>
Although it may be blindingly obvious to the reader, it was not at all to me on first glance: the reason for such a high cost estimate was the
inclusion of machinery, tooling, design, and labor costs. The material itself only costs $10, but the total cost is a staggering $40,000 USD.
An important thing to note, however, are the mystical powers of economies of scale.
<img src="img/bill-of-materials/scale-example.png" class="rounded img-fluid" alt="Demonstration of economy of scale, in which overall costs are increased in exchange of a drastic decrease of cost per part.">
As we can see above, it pays in dividends to have pre-existing capital.
With a small investment of <em>Seventy-Seven Million US Dollars</em>, the cost per part plummets.
Although the cost of the raw material decreases very little, but the labor and tooling cost per part decrease by orders of magnitude.
</p>
<p>
With all of this in mind, we can look at the costs of the remaining parts.
<h4>Estimation of cost for top</h4>
<img src="img/bill-of-materials/top_estimate.PNG" class="rounded img-fluid" alt="Estimation of the cost of the top part of the keyboard, $39,026 total, $15 of material.">
<h4>Estimation of cost for operational buttons</h4>
<img src="img/bill-of-materials/buttons_estimate.PNG" class="rounded img-fluid" alt="Estimation of the cost of operational buttons, $7,259 total, $0.339 of material.">
<h4>Estimation of cost for white keys</h4>
<img src="img/bill-of-materials/keys_estimate.PNG" class="rounded img-fluid" alt="Estimation of the cost of white keys, $23,535 total, $0.447 of material.">
<h4>Estimation of cost for black keys</h4>
<img src="img/bill-of-materials/keys2_estimate.PNG" class="rounded img-fluid" alt="Estimation of the cost of black keys, $21,528 total, $0.283 of material.">
</p>
<h3>Summarized, tabulated</h3>
<p class="lead">All together...</p>
<table class="table">
<caption>Bill of Mechanical Materials</caption>
<tr>
<th scope="col">Part</th>
<th scope="col">Cost</th>
</tr>
<tr>
<td>Bottom</td>
<td>$10</td>
</tr>
<tr>
<td>Top</td>
<td>$15</td>
</tr>
<tr>
<td>Buttons</td>
<td>$0.339</td>
</tr>
<tr>
<td>White Keys</td>
<td>$0.447</td>
</tr>
<tr>
<td>Black Keys</td>
<td>$0.283</td>
</tr>
<tr>
<th scope="row">Total</th>
<td><b>$26.069</b></td>
</tr>
</table>
</div>
</div>
</div>
</section>
<section id="reassembly" class="bg-light">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<h2>Reassembly</h2>
<p class="lead">
The greatest challenge of all: doing what we just did in reverse <em>but while avoiding losing parts and/or screws</em>.
</p>
<p>
The rubicon is crossed with the first screw of the reassembly process.
<img src="img/reassembly/000.jpg" class="rounded img-fluid" alt="The first screw of the reassembly">
The die has been cast.
<p></p>
I will spare the reader the thrilling details of each screw reinserted for this piece.
<img src="img/reassembly/001.jpg" class="rounded img-fluid" alt="Reattached keys">
The keys themselves are reattached, and the key caps for the operational buttons are reinserted as well.
<p></p>
<img src="img/reassembly/002.jpg" class="rounded img-fluid" alt="Reattached power button">
The power button goes on next.
<p></p>
<img src="img/reassembly/003.jpg" class="rounded img-fluid" alt="Error in reattaching keyboard PCB">
I make a slight error in re-attaching the keyboard PCB here, and immediately assume something has gone catastrophically wrong (i.e. losing a screw or another piece).
It turns out I just had these on the wrong standoffs. This is corrected and the keyboard PCB is attached as shown in later pictures.
</p>
<p>
At this point, I decided to improve perhaps the most glaring issue with this product: the overall flimsiness.
Ideally, I would like to attach some plastic bracket that holds the keyboard PCB in place,
or even affix some kind of spacer between the keys and the capacitive switches themselves.
Unfortunately, I have neither the materials nor the tools to do so. Astonishingly, the only thing I own
analogous to an adhesive is nail-polish, which proved ineffective.
</p>
<p>
N.B. acetone does not mix well with this type of plastic.
<img src="img/reassembly/004.jpg" class="rounded img-fluid" alt="Cardboard shim to reinforce keys">
The solution I settled on given the tools and resources available to me under shelter-in-place orders
was a cardboard shim reinforced with electrical tape. I initially planned on using the pictured zipties to
further reinforce this, but the width and irregularity would introduce too much play between keys.
<img src="img/reassembly/005.jpg" class="rounded img-fluid" alt="Existing supports for keyboard">
I decided to place this shim on what appear to be the existing supports for the keyboard.
I assume that is what these cylinders' purpose is, as they aren't machined for screws,
and have no plastic dust inside or around them, as the other screwholes did after initial dissection.
<img src="img/reassembly/006.jpg" class="rounded img-fluid" alt="Test fit of the shim">
The test fit leads me to conclude that this should work, so I remove it for now and continue with the de-dissection.
<img src="img/reassembly/007.jpg" class="rounded img-fluid" alt="Reattached operational buttons PCB">
The operational buttons PCB is reattached successfully, and the keyboard PCB is back where it belongs.
<p></p>
<img src="img/reassembly/008.jpg" class="rounded img-fluid" alt="Reattached amplification circuit">
Amplification circuit: online.
<p></p>
<img src="img/reassembly/009.jpg" class="rounded img-fluid" alt="Final part placement">
A final check of the parts, as well as the insertion of the cardboard shim brings this re-assembly close to its conclusion.
<img src="img/reassembly/010.jpg" class="rounded img-fluid" alt="Back plate attached">
The back plate goes on successfully.
<p></p>
<img src="img/reassembly/010.jpg" class="rounded img-fluid" alt="Battery compartment">
The classic screw-hidden-behind-the-batteries trick that the designers have decided to torture me with
comes into play once more, so the batteries are removed and the screw is re-screwed.
I'll, once again, opt to spare the reader the exciting process of screwing in the remaining screws.
Surprisingly, a screw that was one stripped is seemingly not stripped any more.
I have photographic evidence proving that I didn't lose a screw, so I'll assume that the gods of Zhejiang
Tianlong Optoelectronics Technology Co. Limited have decided to smile upon me in these trying times.
</p>
<p class="lead">
Behold
<img src="img/reassembly/012.jpg" class="rounded img-fluid" alt="Battery compartment">
The ZJTL Piano Toy Keyboard v2 with improved keyboard stability.
</p>
<p>
The cardboard-shim attempt was really a hail mary, but it surprisingly improved the tactility of the keyboard greatly.
Thus concludes the reassembly.
</p>
</div>
</div>
</div>
</section>
<section id="closing">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<h2>Closing Thoughts</h2>
<p class="lead">
Below are just a few closing thoughts/comments on the project as a whole and its documentation.
</p>
<h3>On accessibility of this webpage</h3>
<p>
Web developers have a moral imperative to make their content accessible to all users.
While I'm far from a web developer, I have run this website through W3-compliant accessibility checkers and
made changes where I can. In the highly likely event that I missed something, please open an issue ticket or
submit a pull request at <a href="https://github.com/ggasmithh/keyboard-dissection-journal">this website's repository</a>.
While the site hosted by Mississippi State likely will not reflect these changes, I will have a link to an up-to-date
mirror in the repository's description field should changes be made.
</p>
<h3>On the simplicity of the device</h3>
<p>
While the extreme simplicity (in addition to other limitations of the project) of the device made the dissection
and analysis process lack "meat," it turned out to be a blessing in disguise. Had the keyboard had been as simple as I had
anticipated when I ordered it (or even more complex), the analysis, dissection, and partial identification of parts would
have been even worse off. Between these things, lack of access to laboratory equipment, and a wrist strain injury flaring up
during this project, the complexity of this device ended up being the exact right amount.
</p>
<p>
To be completely transparent, when I originally purchased this keyboard, I intended to modify it before reassembly, using a technique
called <a href="https://en.wikipedia.org/wiki/Circuit_bending">circuit bending</a> (as I briefly mentioned during the analysis section).
I certainly had enough time to do so, but the only components exposed were that of the amplification circuit.
I may revisit this in the future when I can safely expose the presumed 8051 MCU.
</p>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="py-5 bg-dark">
<div class="container">
<p class="m-0 text-center text-white">ECE 4723, Spring 2020</p>
<p class="m-0 text-center text-white">Mississippi State University</p>
<p class="m-0 text-center text-white">Theme provided under <a href="https://github.com/BlackrockDigital/startbootstrap-scrolling-nav/blob/master/LICENSE">The MIT License</a></p>
</div>
<!-- /.container -->
</footer>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Plugin JavaScript -->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom JavaScript for this theme -->
<script src="js/scrolling-nav.js"></script>
</body>
</html>