An Electronic Keyboard using an Integrated Circuit

In this laboratory project a simple electronic keyboard will be constructed using an integrated circuit. Most modern consumer electronics use a wide variety of integrated circuits (also called ICs or chips). Integrated circuits are electronic components in which a large number of discrete devices such as transistors, diodes, and resistors are miniaturized and combined into a single compact package. Each integrated circuit is designed to perform a function which the individual discrete devices could not do alone. The integrated circuits then form the building blocks of more complicated products. In this lab we will be using the LM324 integrated circuit, produced by National Semiconductor Incorporated.

While ICs contain a great deal of internal components they still require some external circuitry to operate. Often the IC provides a general capability, and the external circuitry customizes the operation to a specific situation. This is the case for our keyboard project. Starting with the basic chip we will add some external components to create the specific circuit we desire.

In building the keyboard we will use a printed circuit board. A printed circuit board is used as the base for the mounting and interconnection of electronic components in all commercial electronics devices. All manufactured electronics from the personal computer to the TV remote control use this technology. The circuit board is made by drawing the connections between desired points in the circuit and then removing unwanted copper by a chemical etching process. In a manufacturing setting the production of circuit boards is a highly automated process. In our case the circuit boards will be hand-made, but the same procedures will be used as in a manufactured circuit board.

After making the circuit boards, we will solder the components into place. Soldering is a humble yet important aspect of electronics. Solder itself is a mixture of the metals tin and lead. It has the property that it melts at a relatively low temperature compared to other metals. Solder is used to make permanent electrical connections.

This project has three parts. The circuit board is made in Part I. Part II involves building the base for the keyboard. The base is a wooden platform that contains the "keys" or switches that activate various tones, and provides a mounting surface for the circuit board, speaker, and battery. In Part III circuit board is attached to the base and the keyboard is assembled and tested.
 
 
Collection of graphics used

 

Part I: THE CIRCUIT BOARD

Part IA: Drawing the pattern:

  1. Obtain a piece of copper-clad circuit board.
  2. Use sandpaper to smooth out burrs (rough edges) around holes on the copper side of the board. In the next step we will be drawing on the board and it is important that there are not rough edges to catch on the marking pen. Sand until the board is smooth but, since the copper is very thin, use care not to sand down so far that all of the copper is removed. .
  3. The next step is to draw the pattern of connection between the holes. This is done in several steps. First the appropriate holes will be connected in dot-to-dot fashion, then the connections will be made wider. The holes will be connected with a permanent marker. The marker ink is resistant to the chemical etchant used to remove the copper.

  4.  

     
     
     

    Position the circuit board as shown in Figure 1. For easier reference remove the pages of the lab containing Figures 1 to 5. Turn the board so the copper side is facing up. Make sure your board is oriented in the same way as the one in Figure 1.

    Using the permanent marker, connect the holes as shown in Figure 2. Follow the pattern carefully if the wrong points are connected, the circuit will not work. . First start by drawing a small circle around each hole. Be careful to keep adjacent lines from touching.

    In the last part of this step the lines are made wider. Continue to make sure that adjacent lines do not touch. This may be difficult to do in some places. If you have an accidental overlap, the easiest way to fix it is to let the ink dry and then scrape the unwanted ink away with a knife blade. After this step, the ink should cover as much of the board as possible to reduce the amount of copper that has to be etched away (except of course for the space needed to keep the connections separate.) Refer to Figure 3 for an example of how you board should look after this step. The ink should be thick, avoid thin spots with copper showing through. Write your name or other identifying mark in the open space to aid in later identification.
     
     

Part IB: Etching away the unwanted copper:
  1. Now the board is ready to be etched. The etching is done in a different room which will be marked on the board. In the etch room go to one of the small plastic dishes near the sink. Pour in some etchant. The etchant is a solution of Ferric Chloride (iron and chlorine). It is a good idea to keep it off your hands and clothes. It will not burn a hole through you but it will stain. Once the board is submerged in the etchant use the string or wooden stick to keep the board moving in the Ferric Chloride. Keeping the board moving greatly speeds up the etching process. However, avoid scraping the top of the board. This may scrape off the marker and cause your board to be ruined beyond repair. Push along the edges only. In an industrial setting, spray nozzles are used to spray the boards with the etchant.

  2.  

     
     
     

    Etching will take 20 minutes. It will be obvious when the copper has been removed. The plastic will be visible on the marked side of the board.
     

  3. Remove from the etchant and rinse the board thoroughly with water.
  4. Using the isopropyl alcohol wash off the ink. Smooth the copper surface with the fine sandpaper and rinse.
Part I C: Soldering in the components:
In this part, the electronic components will be installed on the circuit board. All components go on the side opposite the copper. A note on terminology: The side without the copper is called the "component side" of the board. The components such as the resistors are mounted on this side. The component wires (called "leads") stick through the holes and are soldered on the copper side. The locations of the various components are shown in Figure 4. The zig-zag lines represent resistors.
  1. The first step is to identify the components.
  2. Figure 5 lists the components. The majority of the components are resistors. These are the small brownish cylindrical objects with colored stripes. Identify the resistors using the corresponding color bands. Remove the Figure 5 sheet and tape the resistors to the sheet. This will be useful for later identification.

  3.  

     
     
     

    There are a few additional components: A 14-pin socket to hold the integrated circuit, a 0.1mfd capacitor (small green, orange, or burgundy object, looks like a tic-tac or cough drop with two wires) and a photocell (flat orange and white disk with two wires). It will be useful to tape these to the Figure 5 sheet. There are also 8 black and white variable resistors (also called potentiometers, a black disk on top with 3 wires). The potentiometers do not need to be taped to the sheet.

    Note on how to read resistor colors. The majority of the components are resistors. These are the small brownish cylindrical objects with colored stripes. The resistors are used to control either the voltage or the amount of current flowing in a particular part of a circuit. Resistance is measured in ohms. Typical resistors are several thousand ohms. A thousand ohms is abbreviated using the symbol K. For example a 1000 ohm resistor is often written as 1K. Resistors are coded with bands of color to identify their resistance. There are usually 4 bands. In all of the resistors used the last band is gold colored for our purposes this last gold band can be ignored. This is used to indicate the quality of the resistor and can be ignored for our purposes. It is only the first three bands that we have to worry about. The colors are assigned the following numbers:
     
     

    Black
    Brown
    Red
    Orange
    Yellow
    Green
    Blue
    Violet
    Gray
    White
    0
    1
    2
    3
    4
    5
    6
    7
    8
    9

    The first two colors are used to find the first two digits in the value, and the last is used to determine the number of zeros following those digits. For example: Green, Brown, Red is: 5, 1, and 2 zeros or 5100 ohms.
     

  4. Install and solder the battery connector:

  5. Use Figure 4 to locate the holes for the battery connector. Make sure you put the red and black wires in the proper holes. Bend the wires down to touch the copper. All components go on the side opposite the copper. Use a piece of tape on the component side if needed to hold the component in place.

    How to solder: To solder touch the tip of the iron to both the wire and the copper. Wait about 5 to 10 seconds for both pieces of metal to heat up. Touch the solder to the copper and the pin. Remove the tip of the soldering iron and let cool. The solder should flow smoothly and make contact with both metals being joined.
     

  6. Install the 100K resistors and solder into place. To install it is helpful to first pre-bend the wires so the resistor slips easily into place. The component wires (called "leads") stick through the holes and are soldered on the copper side. Resistors can be installed in either direction. Once, through the holes, bend the wires to make contact with the copper. Solder into place.Clip off the excess wire after soldering. When clipping the wires hold the board face down or let the wire cool and hold while clipping. The flying wires could hurt you or someone else.
  7. Next solder in the IC socket. Be very careful of the pins. To solder touch the iron the both the socket pin and the copper. Make sure the solder connects to both the socket pin and the copper. It is not necessary to solder to those pins that do not contact the copper.
  8. Install the capacitor and solder in place. For green or orange capacitors, the longer wire should be closest to the integrated circuit. For dark red or burgundy capacitors, the wires can go in either direction.
  9. The next step is to install the row of resistors and potentiometers that determine the tone of each note and the corresponding wire from the keyboard. This is most easily done by installing a resistor, a potentiometer and a wire, and then soldering one at a time until all the keys have been connected. Follow the pattern shown in Figure 4. The potentiometers must be installed in the proper direction. Install in the direction that does NOT block the hole above or below the three holes for the potentiometer. Each potentiometer has 3 wires but only 2 are to be soldered.
    Attach the photoresistor and the white wire.
     
  1. Locate two 6 inch pieces of gray, these will be used for the speaker. Use the wire stripper to remove the insulation from the ends of the gray wires. Solder the wires into place on the circuit board. Note that it does not matter which wire goes into which hole.
  2. Use the additional piece of gray wire about 6 inches in length and solder this in to the position that is called: "common of all keys."
  3. Obtain a speaker. Solder the speaker wires to the speaker. Be careful not to puncture the speaker paper with the wire.
Part II: THE BASE
  1. Obtain a wooden base. Smooth any splinters along the edges with a piece of sandpaper. Put the base aside for later use.
  2. Marking location for keys and connecting wire:

  3. The board measures 7 1/4 inches by 8 inches. With the 8 inch side facing you mark the spots for the tacks that hold the keys and the connecting wire. If possible try to avoid "knots" in the wood as it is difficult to drive nails or tacks into these "knots." Draw a line along the 8 inch side at a distance of 1/2 inch from the edge. This will be the location of the connecting wire. Draw another line at a distance of 2 and 1/8 inches from the edge. This line will be used to locate the tacks holding the keys. Refer to the sample keyboard photograph on the first page if you are unsure about this step.
     
  4. Preparing in the brass "keys"

  5. Obtain 9 brass strips. BE CAREFUL THE EDGES ARE SHARP. Use sandpaper to smooth out the edges. This step is very important. An efficient way to do this is to put the sandpaper down flat on the bench top rough side up. Then hold the brass and rub the edges against the sandpaper. When done set the keys aside.
     
  6. Wire connecting all keys:

  7. Locate a 15 inch piece of gray wire remove all of the insulation from the wire. This will be used to connect all of the keys together. To remove the insulation, try removing some of the insulation from one end of the wire, hold this end with a pair of pliers, then slide off the rest of the insulation.
     
  8. Installing the blued tacks:

  9. Turn the base on the side and mark a spot 1/2 inch from the edge on the side of the board. Using the hammer, nail a blued tack part of the way in at this spot. The blued tack looks like a small nail. DO NOT bang it all of the way in yet. Turn to the other side of the board and do the same. Again DO NOT bang the blued tack all of the way in yet.
     
  10. Installing the wire:

  11. Wrap one end of the bare wire three times around one of the tacks. Carefully pull the wire tightly across the board to the other side and wrap it around the other tack. It is extremely important that the wire lay flat against the surface of the board. Now pound the blued tacks the rest of the way in. This should secure the wire into place. Leave the excess wire hanging off the second tack for now. See the sample photograph if you have questions.
     
  12. Installing the "keys" on the wooden base.

  13. First mark the location for the nail in each of the 9 brass strips. This will be in the middle of the strip 1/4 inch from the end. Position the strips evenly along the length of the base. There should be about 3/4 inch between the centers of each strip.

    Use a hammer and the large nail to make a small dent in the strip and wood at the proper location on the base. Do not pound the large nail all of the way in, just use it to pierce the brass strip and then remove the large nail. The dent made in the brass strip and the wood will make it easier to put the blued tack through the strip.

    Install the keys by pounding blued tacks into the brass strips. DO NOT PUT THE TACK IN ALL THE WAY. LEAVE PART STICKING UP FOR LATER USE. This is easier to do if you use a pair of pliers to hold the tack while you attempt to pound it in. Leave about 1/8 to 1/4 of the tack exposed. Later wires will be wrapped around the tacks. The keys are now complete.
     

  14. Installing the battery holder:

  15. Find the aluminum u-shaped battery holder. The holder itself will be used to mark the position of the mounting holes. Position the battery holder on the upper right side of the board, about 2 inches from the top and 1.5 inches from the side. Mark the spot of the two mounting holes. Remove the holder. Drill holes in the board at these two spots. Obtain two silver-colored screws and install the holder.  
Part III: FINAL ASSEMBLY
  1. Attaching circuit board and speaker to wooden base:
    • The next step is to drill the holes for mounting the circuit board and speaker. Position the circuit board near the center of the base above the keys. Mark the location of the two mounting holes. Mark the location of the mounting holes for the speaker. Drill the holes.
    • Obtain two plastic supports and two long screws (1 1/2 inches long) . Attach the circuit board to the base. Do not attach the speaker yet.
  1. Connecting the wires:

  2. Connect the wires from the circuit board to the keys. Some of the wires may need to be trimmed for a neater appearance. Remove the insulation from the end of the wire. Form a hook on the end of the and place it around the tack or wrap the wire twice around the corresponding tack. Pound the tack the remainder of the way into the board. Repeat for each wire. It may be more convenient to wrap all of the wires first and then pound in all of the tacks.
     
  3. Adjusting the keys:

  4. If necessary bend the keys slightly so they do not touch the wire running across the bottom of the wooden base.
     
  5. Connecting the common wire:

  6. Trim the bare wire connecting all of the keys and solder this to the gray wire from the common of all keys on circuit board. If needed, use tacks to hold this into place neatly along the wooden base. Refer to the sample keyboard.
     
  7. Installation of the speaker:

  8. Install the three long screws (1 1/2 inches long) that will hold the speaker. Be careful not to extend the screws through the bottom of the board. Locate the speaker and use a rubber band to hold the speaker in place.
     
  9. Verify that the keyboard still works.

 

Part IV Tuning
Each note is tuned by adjusting the potentiometer.
 
 
 

Part V On/Off Switch
The keyboard in its present condition does not include an on/off switch. The objective of this final section is to install an on/off switch. You will have to determine for yourself where the switch can be connected in the circuit and where you would like to attach the switch to your wooden base. .

  1. Locate a small switch and a brass mounting plate.
  2. Pick a suitable location on the base to attach the brass mounting plate.
  3. Identify the location in the circuit where the switch should be installed. The switch should be installed in the positive wire from the battery. When in the off position, the switch should stop any current from the battery from reaching the circuit. NOTE: The sample keyboards do not have switches, so you have to think this one through for yourself. You may also need some extra wire to carry out the installation. This may be obtained from the front of the room.
  4. Install the switch and verify that it operates properly.

 

Part VI Final Check
 The keyboard is complete.
 


© 2001 John J. Krupczak, Jr.
All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of the author is prohibited.