Silicon ChipBuild A MIDI Drum Kit; Pt.2 - December 2005 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Encouraging excellence in schools and universities
  4. Project: Building The Ultimate Jukebox; Pt.1 by Ross Tester
  5. Feature: Car Sound On The Cheap; Pt.2 by Julian Edgar
  6. Project: Universal High-Energy Ignition System; Pt.1 by John Clarke
  7. Feature: The Microbric Viper by Ross Tester
  8. Feature: Excellence In Education Technology Awards by Silicon Chip
  9. Project: Remote LED Annunciator For Queue Control by Jim Rowe
  10. Project: Build A MIDI Drum Kit; Pt.2 by John Clarke
  11. Salvage It: So you’ve scrounged a VCR? Let’s salvage the good bits by Julian Edgar
  12. Project: 433MHz Wireless Data Communication by Stan Swan
  13. Project: PIC In-Circuit Programming Add-On Adaptor by Keith Anderson
  14. Vintage Radio: Ray Kelly and the Historical Radio Society of Aust. by Rodney Champness
  15. Back Issues
  16. Advertising Index
  17. Outer Back Cover

This is only a preview of the December 2005 issue of Silicon Chip.

You can view 37 of the 112 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "Building The Ultimate Jukebox; Pt.1":
  • Ultimate Jukebox front panel artwork (PDF download) (Free)
Articles in this series:
  • Building The Ultimate Jukebox; Pt.1 (December 2005)
  • Building The Ultimate Jukebox; Pt.1 (December 2005)
  • Building The Ultimate Jukebox; Pt.2 (January 2006)
  • Building The Ultimate Jukebox; Pt.2 (January 2006)
  • Building The Ultimate Jukebox; Pt.3 (February 2006)
  • Building The Ultimate Jukebox; Pt.3 (February 2006)
Articles in this series:
  • Car Sound On The Cheap; Pt.1 (November 2005)
  • Car Sound On The Cheap; Pt.1 (November 2005)
  • Car Sound On The Cheap; Pt.2 (December 2005)
  • Car Sound On The Cheap; Pt.2 (December 2005)
Items relevant to "Universal High-Energy Ignition System; Pt.1":
  • (2005 Version) PIC16F88-E/P programmed for the Universal High Energy Electronic Ignition System [ignition.hex] (Programmed Microcontroller, AUD $15.00)
  • PCB pattern for the Universal High-Energy Ignition System (PDF download) [05112051] (Free)
  • Universal High-Energy Ignition System front panel artwork (PDF download) (Free)
Articles in this series:
  • Universal High-Energy Ignition System; Pt.1 (December 2005)
  • Universal High-Energy Ignition System; Pt.1 (December 2005)
  • Universal High-Energy Ignition System; Pt.2 (January 2006)
  • Universal High-Energy Ignition System; Pt.2 (January 2006)
Items relevant to "Build A MIDI Drum Kit; Pt.2":
  • PIC16F88-I/P programmed for the MIDI Drum Kit [drumkit16.hex] (Programmed Microcontroller, AUD $15.00)
  • PIC16F88 firmware and source code for the MIDI Drum Kit [drumkit16.hex] (Software, Free)
  • PCB patterns for the MIDI Drum Kit (PDF download) [01211051/2/3] (Free)
  • MIDI Drum Kit front panel artwork (PDF download) (Free)
Articles in this series:
  • Build A MIDI Drum Kit (November 2005)
  • Build A MIDI Drum Kit (November 2005)
  • Build A MIDI Drum Kit; Pt.2 (December 2005)
  • Build A MIDI Drum Kit; Pt.2 (December 2005)
  • Build A MIDI Drum Kit; Pt.3 (January 2006)
  • Build A MIDI Drum Kit; Pt.3 (January 2006)
  • Build A MIDI Drum Kit; Pt.4 (February 2006)
  • Build A MIDI Drum Kit; Pt.4 (February 2006)
Items relevant to "433MHz Wireless Data Communication":
  • PICAXE-08M BASIC source code for 433MHz Wireless Data Communication (Software, Free)
Items relevant to "PIC In-Circuit Programming Add-On Adaptor":
  • PCB pattern for the PIC In-Circuit Programming Add-On Adaptor (PDF download) [07112051] (Free)

Purchase a printed copy of this issue for $10.00.

SILICON CHIP MIDI DRUM KIT by JOHN CLARKE 72  D 2005 72  Secember ilicon Chip PART 2: PUTTING IT TOGETHER siliconchip.com.au siliconchip.com.au Last month we introduced our latest MIDI instrument, the MIDI Drum Kit offering a staggering 546 drum sounds and not a stretched skin in sight! Here’s all you need to know to put the control unit together – and it’s not that difficult . . . A RE YOU HOT TO TROT, wanting to start playing with your new MIDI Drum Kit? Let’s get started with building it. Following on from the circuit description of the SILICON CHIP MIDI Drum Kit in the first article last month, we shall now describe the construction of both the main unit and the different types of sensors. The unit itself is constructed using two PC boards, the main PC board (coded 01211051 and measuring 187 x 104mm) and the display PC board (coded 01211052 and measuring 140 x 100mm). The assembled PC boards are fitted, one on top of the other, into a plastic box measuring 197 x 113 x 63mm. The box is actually used upside-down; that is, the normal lid of the box becomes the base and the display board sits in what would normally be the bottom of the box – turned upside down, it becomes the top! Confused? It will all become clearer as we proceed . . . Before starting construction, check the PC boards for correct hole sizes and that there are no breaks in the copper or shorts between tracks or pads. Hole sizes for the corner mounts on the display PC board and for the LCD module should be 3mm diameter (~1/8”). Check that the mounting holes for the external jack socket, the DC power socket, the DB9F serial connector and the MIDI output socket are all correct. Finally, the main board has four corner cut-outs, which you can clearly see in our photos, to enable it to fit snugly inside the box mounting pillars. Assuming that the Drum Kit is built from a commercial kit, all the holes in the box should have been drilled and milled out to the correct size and a front panel label should be supplied. If not, now is the time to carefully drill and cut out the various holes in the box, as per the photo below and the front panel artwork. It is vital that the display cutout, switch holes and mounting holes in what will become the front panel (ie, the bottom of the box) are absolutely This shot clearly shows (a) how the two PC boards are piggy-backed together, and (b) the many holes in the box which will have to be drilled very accurately. The cutout for the display will differ according to the brand of display. siliconchip.com.au D 2005  73 December ecember 2005  73 heatsink using an M3 x 10mm screw and nut. Next, insert and solder in the upright 26-way IDC header, taking care to orient it with the locating tab to the outside of the PC board. Then insert and attach the MIDI out socket, the DB9 connector, the right-angle 16-pin header, the DC sockets and the 4-way stereo RCA sockets. LED1 is mounted with the shown orientation, with the longer (anode) lead to the left and as high on its leads as possible. Leave just a millimetre of cathode lead under the PC board for soldering (naturally the anode lead, being longer, will have a bit more poking through). The LED is later bent over to fit into the hole in the side of the box. Fig.1: the 26-way IDC cable connects the two PC boards together and the 16-way cable is for games port connection. Note that each end is different – on the 26way, one suits a vertical IDC socket and the other a horizontal while the 16-way has a DB15 plug on one end. The easiest way to fasten the IDC sockets onto the cables without the special IDC tool is to squeeze the assembly together in a bench vice. perfectly placed, otherwise the various components won’t fit through. Similarly, the various connector holes and cutouts along one side and one end are also quite critical, as the connector positions are fixed by their location on the PC board. The only latitude you have is the cutout for the power switch, as it is on flying leads. The display board Start assembly with the display PC board, mainly because there are less components. Insert the links first so you do not forget to do this. The board has provision for three commonly available LCD modules – the Jaycar QP-5515 (or the backlit model QP-5516), the DSE Z-4170 and the Altronics Z-7001. If using the Jaycar LCD module, mount it using a dual 7-pin header to connect from the LCD module to the PC board. The Altronics/DSE modules use a 14-pin SIL header instead. Solder the pins on the topside of the LCD and on the underside of the display PC board. The two opposite corner mounting holes on the LCD module are held down using two M3 x 10mm screws and M3 nuts, with some Nylon washers placed in between the display PC board and LCD PC board. Trimpot VR8 and the 10mF capacitor can now be mounted. Note that the 10mF capacitor should lie on its side to provide clearance when the display assembly is secured to the lid. Next is IC4, taking care to orient it correctly. Insert and solder in the 26-way rightangle header plug. The switches are mounted as shown, 74  Silicon Chip with the flat side of the larger switches oriented to the side of the PC board. Switch S5 is mounted with the wider spaced pins mounted in the horizontal plane. The main board Begin assembly of the main PC board by installing the links and resistors. In a kit, a length of tinned copper wire is normally supplied for links. Otherwise, use the offcut resistor leads. The resistor colour code table will help you select each resistor but if in any doubt, measure the values using a digital multimeter (some resistor colour bands can be very similar to other colours – brown and red for example – and mistakes are easily made, especially in low light). Now we move on to installing the semiconductors – the diodes first of all, taking care to orient them as shown. Again, take care with the orientation of the ICs. IC1, IC2, IC5 and IC6 can be soldered directly to the PC board, while IC3 is mounted using a socket. The capacitors and crystal can be mounted next. Note that the electrolytic capacitors are polarised and must be oriented as shown on the overlay. Neither the crystal nor other capacitors are polarised. Now mount the PC stakes and trimpots VR1-VR7. REG1 is mounted horizontally, with a heatsink sandwiched between it and the PC board. Bend its leads by holding them in a pair of fine pliers at the correct position, so they fit into the holes while allowing the tab to be secured to the PC board and Wiring The photo overleaf shows the connection between the two boards using a short 26-way IDC cable and the two IDC connectors. The boards are oriented with their connectors at opposite ends – when completed, the two boards and cable make a “Z” shape. You will probably have to make the IDC cables yourself as they are nonstandard. Follow the diagrams (Fig.1) carefully. Orient the tabs on the side of the connectors as shown and clip in the back of the connector with the cable in place. The easiest way to press the parts together is to carefully use a vice. Some people use a hammer but this is not recommended for a beginner! Plug the cable in to both the main PC board and display PC board to make the connections. The games port wiring is similar to the 26-way wiring except that we use 16-way cable, of which only 15 wires are used (all 16 wires connect to the 16-way plug but the wire connecting to pin 16 is cut before terminating the cable into the 15-pin DB-15 plug. Both the 16-pin IDC plug and the 15-pin DB-15 plug clamp onto the 16-way cable using a vice, as before. The wires connecting power switch S7 have crimp connectors for the switch lugs, with the opposite ends soldered to the appropriate stakes on the PC board. Clip the connectors onto the switch lugs (polarity is unimportant). Your MIDI Drum Kit is now completed and ready for testing. You may have siliconchip.com.au The display board photo (above) and component overlay (Fig.2, below) are reproduced here very close to full size so you can compare your component placement with the prototype. Note the flat sides on the switches – they must be inserted this way or they won’t work – and also the laid-over 10mF electrolytic capacitor! noted that you have one IC (IC3) left over. This is deliberate – do not insert it in its socket just yet! Also, for the moment, remove the IDC cable which connects the two PC boards. siliconchip.com.au Testing The Drum Kit is now ready for testing but before you do, give it a careful check-over, looking for dry joints, solder bridges and splashes (especially around IC pins) and of course wrongly placed components. A few minutes now can save hours of frustration (if not damage) later. If you are satisfied with your conDecember 2005  75 Once again reproduced very close to life size, this is the main PC board, together with its component overlay (Fig.3) below. The only IC socket is for the PIC chip and this is not plugged in until after initial checking. 76  Silicon Chip siliconchip.com.au The main PC board is quite a bit larger than the display board, even though this photo doesn’t show it. Note the bent-over LED at the back of the board. struction, plug in the plugpack into the DC socket. Connect your multimeter common (black) lead to pin 11 of IC1 and the positive lead to pin 4. Switch on the plugpack at the mains and switch on S7. If you get a reading of about 9V, great. If the reading is zero, check that the DC plug for the plugpack has the right polarity – it should be +ve to the centre and –ve to the body. If it is wrong, and your plugpack has a polarity reversing plug and socket, separate the two halves and put back in the other way. If it is now +ve to the centre, plug it back in and check again. If OK, you’re on your way. Otherwise, there is some form of major problem with either the plugpack (a broken wire?), REG1 (a solder bridge or unsoldered joint?), or perhaps the diode is soldered in back to front. Measure the output of REG1 by probing the centre and right terminals. The voltage should be about 5V – at least between 4.75 and 5.25V. If this is not correct, check the PC board for a short circuit. You should also be able to measure the nominal 5V between pins 5 and 14 of IC3’s socket and about 9V between pins 4 and 11 of IC2. On IC6, check for 5V at pin 16, -9V at pin 6 and 9V at pin 2. These 9V readings may be anywhere up to 9.6V. If the voltages are OK, you can install IC3 after switching off power again. Connect the 26-way IDC connection cable between the display PC board and the main PC board. The display should be showing characters – it doesn’t matter what just yet. If you cannot see anything on the display, adjust VR8 for best contrast. Now you can check the operation of all switches by going through the switch usage description as detailed last month. (Note that we have not yet installed the PC boards in the box). Setting up At this stage you can calibrate the unit by pressing the Ports/Cal switch and then pressing the ^ switch to set the calibration sequence. Changing the port settings can be done now too. Use the < or > switches RESISTOR COLOUR CODES q q q q q q q No. Value 22 100kW 1 22kW 1 10kW 8 2.2kW 1 1kW 1 470W 4 220W siliconchip.com.au 4-Band Code (1%) brown black yellow brown red red black orange brown brown black orange brown red red red brown brown black red brown yellow violet brown brown red red brown brown 5-Band Code (1%) brown black black orange brown red red black red brown brown black black red brown red red black brown brown brown black black brown brown yellow violet black black brown red red black black brown to select for the serial or MIDI ports. Finally, rotate trimpots VR1-VR7 fully clockwise. These can be adjusted later if a sensor appears to have more sensitivity than the others (you will need to remove the boards from the box to do so). Mounting the boards First of all, disconnect the 26-way IDC cable from the main board (but leave it connected to the display board) and unclip the power switch from the main board. At this point, you can also remove the two capture screws on the DB9 socket – but don’t lose them! Now the display PC board can be mounted within the box. As we mentioned before, the mounting is rather unconventional with the display protruding from the base of the box rather than from the lid. This allows the main PC board to mount close to the opening of the box, making it possible to insert the RCA sockets and the DB9 socket into the holes in the sides of the case (even if you have to prise the box edge out a little as you do it. The display PC board is mounted on 9mm tapped spacers and held in with M3 screws. This is where your precision in drilling and shaping the holes is tested! Once the display board CAPACITOR CODES    Value     mF      IEC 1mF 1mF 1u 100nF 0.1mF 100n 33pF NA 33p EIA 105 104 33 December 2005  77 Parts List – Main Drum Kit 1 PC board coded 01211051, 187 x 104mm 1 PC board coded 01211052, 140 x 100mm 1 UB2 box measuring 197 x 113 x 63mm 1 DB9 cable (plug to socket lead 1.8m long) 1 2-line 16-character LCD module – see text 1 250mA 9V DC plugpack 1 mini rocker switch (S7) 4 stereo PC mount RCA sockets 2 PC mount DC power sockets 1 5-pin PC mount DIN socket 1 DB15 IDC male plug 1 DB9 PC mount right angle female connector 1 26 pin IDC header 1 26 pin right angle IDC header 1 16 pin right angle IDC header 2 26-pin IDC line sockets 1 16-pin IDC socket 1 7-way DIL header for Jaycar LCD module 1 14-way SIL header for Altronics & DSE LCD module 5 SPST PC-mount snap action switches (S1-S4, S6) 1 SPST micro tactile switch (S5) 1 18-pin IC socket 1 heatsink, 19 x 19 x 10mm 1 16MHz crystal (X1) 5 9mm tapped spacers 10 M3 x 10mm screws 4 M3 Nylon nuts 2 M3 x 15mm screws 4 No.6 self taping screws 2 crimp spade female connectors for switch 1 serial DB9 cable male to female 1 30mm length of 0.8mm tinned copper wire 1 180mm length of 26-way IDC cable 1 2m length of 16-way IDC cable 1 100mm length of medium duty hookup wire 1 500mm length of 0.8mm tinned copper wire 2 PC stakes Viewed from the opposite angle to the earlier shot, the 4x RCA stereo sockets can be seen on the lower (main) board, along with the IDC cable emerging from the top board IDC socket. is secured, insert the switch into its hole in the side of the case. Now comes the main PC board. It is secured in the box only by the screws which hold in the RCA sockets and the DB9 sockets – it doesn’t have any mounting screws or pillars as the display board does. As you lower the main PC board into the case, reattach both the 26-way IDC cable and the switch wires. Angle the board down so that the RCA sockets go through the holes in the end of the box and then gently prise the side of the box outwards so the DB9 socket fits into its hole as you locate the board inside the case. The RCA and DB9 sockets are the only sockets which actually emerge through the box – the rest are flush with Semiconductors 2 LM324 quad op amps (IC1,IC2) 1 PIC16F88 programmed with DRUMKIT16.hex (IC3) 1 4040 counter (IC4) 1 6N138 optocoupler (IC5) 1 MAX232 RS232 receiver/driver (IC6) 1 7805 5V three terminal regulator (REG1) 1 1N4004 1A diode (D8) 7 1N4148 switching diodes (D1-D7) 1 5mm red LED (LED1) Capacitors 1 470mF 16V PC electrolytic 1 100mF 16V PC electrolytic 5 10mF 16V PC electrolytic 7 1mF 16V PC electrolytic 5 1mF ceramic 9 100nF MKT polyester 2 33pF ceramic Resistors (1/4W 1%) 22 100kW 1 22kW 1 10kW 8 2.2kW 1 1kW 1 470W 4 220W 7 20kW horizontal trimpots (code 203) (VR1-VR7) 1 10kW horizontal trimpot (code 103) (VR8) 78  Silicon Chip The fully assembled project, ready to screw the base (lid) on. The four holes in the lid are for the stand-mounting saddle clamps (if required). siliconchip.com.au It’s almost finished – the PC boards are in, the base is on and the RS232 socket is secured. All that’s left now are some labels: one for the front panel and one each for the end (RCA sockets) and side (input/output sockets and power switch). the inside of the box. With the board in place, re-attach the DB9 capture screws from the outside of the box to hold the socket in place. The RCA socket sets is held in place using four No.6 self-tapping screws that screw into the holes in the RCA socket mouldings. (Don’t be tempted to rely on the soldered joints to hold the socket set in place – removing and inserting plugs could eventually break the joints). Mounting on the drum stand? As you can see from our opening photo, we made up a stand from 25mm dowel (actually broom handle!) and T-pieces to hold all of the pad sensor plates. This stand can also hold the MIDI Drum Kit control box if you wish. Do this by attaching two 25mm saddle clamps to the box lid using M4 x 12mm Nylon screws and nuts. The screw is inserted from the inside of the case to allow clearance for the PC board. The two saddle clamps are held in place with Nylon screws are required to nylon screws and nuts to prevent shorts. prevent them shorting anything on the back of the main PC board. The sensors, foot pedal, foot switch and rear panel can now be attached. stand in this issue but space has We had hoped to describe the beaten us – these will be described construction of the two types of pad next month. SC SILICON CHIP Fig.4: the full-size front panel artwork with hole positions for the switches and mounting holes. No display cutout is shown as this will vary with the type of display. An accurate photocopy of this could also be used as a drilling template. siliconchip.com.au December 2005  79