Behold

The ZJTL Piano Toy Keyboard

The ZJTL Piano Toy Keyboard

Introduction

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.

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 here.

Market

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).

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.

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.

From ZJTL's storefront on Amazon: Product details on amazon

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.

Dissection

An image of the ZJTL Piano Toy Keyboard in its packaging, which was definitely not hastily taken at the end of this project after re-reviewing the rubric. Don't check the image metadata. The device in its package

For the dissection of the ZJTL Piano Toy Keyboard, I used the following tools:

  • Screwdriver
  • Silicone project mat with screw trays
  • Work lamp which ended up causing my photos to be horribly over-exposed, but working without it made the images too dark to see
  • My trusty Opinel No. 6 pocket knife
  • Digital Kitchen Scale
  • iPhone 6s for photos and frequency analysis
  • Electrical Tape
  • Digital multimeter

The keyboard, the included microphone, and the owner's manual

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.

These screws seem particularly small, so I will be using a 000 Phillips Head bit. 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.

The screw hiding in the battery compartment

The back of the keyboard with all screws removed

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.

The Reveal

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.

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. The keyboard, opened Additionally, it seems that all components are wired to this one board. I'm still wondering how this thing manages to have twenty-four 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.

The close up of the PCB inside the keyboard

The close up of the part number on the PCB Two things strike me as important from this image.
  1. What appears to be some sort of ID of the board design itself.
  2. The screenprinting on the IC

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:

MPAK
LM386
M-1

A Quick Aside: Investigation of Parts

The part number and date listed on the board itself interested me the most, so I plugged it into a search engine: Duck Duck Go finding no results for the PCB's Part number

The results were disappointing, but I chalked up this initial failure to DuckDuckGo's sometimes inferior indexing, and turned to Google. . . 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 this Youtube video 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.

Part 2: The LM386

This one was as easy to find as I had hoped. The LM386 is a Low Voltage Audio Power Amplifier manufactured by Texas Instruments (with a datasheet!)
. Screenshot of the Texas Instruments Datasheet for the LM386

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.

Further dissection

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. Screwdriver with PH0 and PH00 bits

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).

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 an answer on stack exchange, which suggests one of the two following methods:
  1. 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)
  2. 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)
I am left solutionless (ha, nitric acid). Fortunately, we have more-or-less a free pin-out if we can carefully strip parts of these ribbon cables. This sounds like a tedious process that I will hand off to future-me.

Dissection Aside: how is that PCB being held on?

From the image above, we cannot really tell how 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.

To find out, we will unscrew the four screws (one is hidden beneath the ribbon cable) holding this long PCB in place Interior of piano Indeed, the smaller PCB is simply slotted into the larger one, with some mechanical soldering points to join them. 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.

Only one electronic piece remains to be dissected.

Interior of the piano, detailing the keyboard PCB

Specifically, the long PCB that presumably holds the switches that each of the plastic keys presses down. 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. 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.

I was mistaken, there remains one final dissect-able electronic component.

Power button PCB

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. . . .

With all of the electronic components explored, we remove the remaining mechanical parts.

Keyboard completely dissected This concludes the dissection of the ZJTL Piano Toy Keyboard. We dissected all parts except for:

  1. 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)
  2. The microphone input (nothing to dissect)
  3. The speaker (plastic-welded into the body, impossible to non-destructively disassemble, and I don't have the supplies to reconstruct a speaker cone)

Operation

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.

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 before dissection rather than after for inevitable future disassemblies of the ZJTL Piano Toy Keyboard.

The Keyboard as collection of state machines

For the most part, the buttons of the keyboard operate as separate state machines, which then communicate their state to the audio processing MCU.

The Tone Button

Tone button represented as state machine

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.

The Volume Button

Volume button represented as state machine

The behavior of the volume button is equally straightforward, acting as a state machine isomorphic to that of the Tone button.

The Tempo Button

Tempo button represented as state machine

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.

The Effect Button

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.

The Lesson/Rhythm Button

Lesson/Rhythm button represented as state machine

This button cycles through the 8 available backing tracks which consist of various drum sounds.

The "Demo One", "Demo All" and "Stop" Buttons

I lump these together because of their lack of statefulness.

Demo One

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.

Demo All

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.

Stop

This button stops any audio playback that isn't a direct result of the user pressing the keys. This applies to

  • Rhythms
  • Singular Demos
  • Sequences of Demos

The Microphone

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.

Analysis

First, a look at the structure of the device from a high-level point of view. High level diagram of keyboard

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. Block-level diagram of electrical systems

The circuit diagram is equally simple. The component values are missing from this diagram, but this is explained further on in this document. Component-level view of keyboard circuit.

Operational Measurements

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.

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.

Bill of Electronic Materials

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.

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.

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.

Bill of Electronic Materials
Part Cost
LM386 $1.00
Microphone Input Jack $0.58
1.5" Diameter Speaker $1.50
Generic 8051 Microcontroller $1.50
2x Electrolytic Capacitors $0.50
4x Surface Mount Capacitors $0.25
6x Surface Mount Resistors $0.50
Through-Hole Diode $0.20
DPDT Pushbutton Switch $2.00
Total $8.03

Bill of Mechanical Materials

The ZJTL Piano Toy Keyboard claims to be made out of ABS plastic, and this appears to be true.

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 one keyboard. 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.

Weighing

In order to estimate the cost of each plastic piece, we can use the weight of each piece, and a reasonable estimate of density.

ABS plastic has a density between 0.9g/cm3 and 1.5g/cm3. This is particularly flimsy ABS, so an estimated density of 1.00g/cm3 will not only make calculations easier, but also fairly close to the actual density.

Weight of keyboard bottom, 119 grams The bottom of the body weighs 119 grams. Weight of keyboard operational buttons, 2 grams All of the operational buttons weigh 2 grams. Weight of the white keys, 22 grams The white keys of the keyboard weigh 22 grams. Weight the black keys, 12 grams The black keys of the keyboard weigh 12 grams. Weight of the top of the keyboard, 81 grams The the top of the keyboard weighs 81 grams.

Estimations of cost

From the above weights, we can reasonably estimate costs. For this, I used a Injection Molding cost estimator found on custompart.net, found here.

Let's start with the cost of the bottom part of the keyboard

Estimation of the cost of the bottom part of the keyboard, $39,022 total, $10 of material.

Aside: Labor and Capital

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. 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 Seventy-Seven Million US Dollars, 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.

With all of this in mind, we can look at the costs of the remaining parts.

Estimation of cost for top

Estimation of the cost of the top part of the keyboard, $39,026 total, $15 of material.

Estimation of cost for operational buttons

Estimation of the cost of operational buttons, $7,259 total, $0.339 of material.

Estimation of cost for white keys

Estimation of the cost of white keys, $23,535 total, $0.447 of material.

Estimation of cost for black keys

Estimation of the cost of black keys, $21,528 total, $0.283 of material.

Summarized, tabulated

All together...

Bill of Mechanical Materials
Part Cost
Bottom $10
Top $15
Buttons $0.339
White Keys $0.447
Black Keys $0.283
Total $26.069

Reassembly

The greatest challenge of all: doing what we just did in reverse but while avoiding losing parts and/or screws.

The rubicon is crossed with the first screw of the reassembly process. The first screw of the reassembly The die has been cast.

I will spare the reader the thrilling details of each screw reinserted for this piece. Reattached keys The keys themselves are reattached, and the key caps for the operational buttons are reinserted as well.

Reattached power button The power button goes on next.

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.

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.

N.B. acetone does not mix well with this type of plastic. 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. 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. 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. Reattached operational buttons PCB The operational buttons PCB is reattached successfully, and the keyboard PCB is back where it belongs.

Reattached amplification circuit Amplification circuit: online.

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. Back plate attached The back plate goes on successfully.

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.

Behold Battery compartment The ZJTL Piano Toy Keyboard v2 with improved keyboard stability.

The cardboard-shim attempt was really a hail mary, but it surprisingly improved the tactility of the keyboard greatly. Thus concludes the reassembly.

Closing Thoughts

Below are just a few closing thoughts/comments on the project as a whole and its documentation.

On accessibility of this webpage

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 this website's repository. 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.

On the simplicity of the device

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.

To be completely transparent, when I originally purchased this keyboard, I intended to modify it before reassembly, using a technique called circuit bending (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.