Vous êtes sur la page 1sur 11

HOW TO BUILD A USB INTERFACE FOR JP1

By Tommy N. Tyler Version 1.0 12/6/03

1. INTRODUCTION. These instructions describe several ways to build a USB interface, all using our old friend the perf board. Even though the interface uses a 20-pin integrated circuit there are so few connections that a printed circuit board is hardly necessary. Both designs are based on a circuit developed by Joe Cutler and a packaging idea developed by Mark Pierson. The key component of the circuit is a small microcomputer containing a proprietary program that is available only from Delcom Engineering. This chip translates the serial data sent and received by the PC from RS232 format to the format used by a 2-wire serial EEPROM. 2. PARTS REQUIRED. The first decision to be made for this project is where you are going to buy the parts. There are a number of options, depending on your budget and your preferences. Here's a generic list of the essential, no-frills parts required: ITEM 1. 2. 3. 4. 5. 6. 7. 8. DESCRIPTION Integrated Circuit, Delcom Engineering 802300 (U1) Crystal or Ceramic Resonator, 6 MHz (Y1) Capacitor, Monolythic, 0.1 MFD (C1) Capacitor, Tantalum, 4.7 MFD (C2) Resistor, 1/4 W, 7.5K 1% (R1) Resistor, 1/4W, 1K 5% (R2, R3, & R4) Small piece of perf board USB Cable QTY 1 1 1 1 1 3 1 1

And here are some additional parts you may need: ITEM 9. 10. 11. 12. 13. 14. 15. DESCRIPTION IDC Connector, 6-pin Female 4 to 10 ft. piece of 6-conductor flat ribbon cable IC Socket, 20-pin LED, Red, T-1 (3 mm) Resistor, 1/4W, 270 ohms 5% (R5) Plastic Box, about 1-1/2" x 2" x 3/4" Resettable Fuse, 1/4 amp (F1) QTY 1 1 1 1 1 1 1

All options start with purchasing item 1 from Delcom Engineering (www.delcom-eng.com) as their part number 802300 at a cost of $8.00 plus UPS shipping. You can also buy items 2 through 5 from Delcom as a kit, their part number 803507, for $3.60. Delcom even sells a USB cable (item 8) as their part number 803504 for $6.50. One end has a Type "A" connector and the other end has stripped and tinned wires, ready for soldering. Many of the remaining parts, particularly Items 6, 7, and 10 through 14, are often available from Radio Shack. Item 11 in their catalog is part number 276-1991 ($.59), and item 14 is 270-288 ($1.99). The interface needs two cables. The first, item 8, is a standard 4-conductor USB cable, 4 to 6 feet long, with a Type "A" USB connector at one end. The other end will be soldered to your interface, so if it has a Type "B" connector you can just cut it off. Radio Shack also has USB cables but they are considerably more expensive than those sold by nearly everyone else, including Delcom. The second cable required is the one that plugs into JP1, and is made from items 9 and 10. Alternative methods of making this cable have been discussed extensively in previous articles. Another approach to obtaining parts is to purchase only the IC from Delcom and place a single order for everything else from Mouser (www.mouser.com). Even with an additional UPS shipping charge this option can be cost effective because of Mouser's low prices. I don't own stock in Mouser. I prefer them over DigiKey, Jameco, and Newark because they have no minimum order requirements, and everything in their enormous catalog always seems to be in stock. Furthermore, they are the only internet source we know of who stock and sell the rare 6-pin IDC connector (item 9). -- page 1 of 11 pages --

Here's a shopping list based on Mouser Catalog No. 616: ITEM 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. DESCRIPTION Delcom IC Ceramic Resonator, 6 MHz (Y1) Capacitor, Monolythic, 0.1 MFD (C1) Capacitor, Tantalum, 4.7 MFD (C2) Resistor, 1/4 W, 7.5K 1% (R1) Resistor, 1/4W, 1K 5% (R2, R3, & R4) perf board USB Cable, 6 ft. IDC Connector, 6-pin Female ribbon cable IC Socket, 20-pin LED, Red, T-1 (3 mm) Resistor, 1/4W, 270 ohms 5% (R5) Box, 1-3/8" x 2" x 3/4", Hammond 1551Gxx ( select color. xx = BK for black, GY for gray) Resettable Fuse, 1/4 amp (F1) QTY 1 1 1 1 1 3 --1 1 --1 1 1 1 1 CAT. PG. --505 482 461 377 376 --650 none --746 118 376 996 353 STOCK NO. --520-ZTA600MT 75-1C10Z5U104M050B 581-TAP475K010SCS 71-RN60D-F-7.5K 30BJ250-1K --172-1024 649-71602-306 --575-199320 78-TLDR4400 30BJ250-270 546-1551Gxx 650-RXE025 PRICE $8.00 .36 .10 .40 .21 .66 --2.70 .67 --.48 .22 .22 1.03 .50

The complete list comes to a total of a little over $15, compared to about $18 for just items 1 through 5 and 8 if purchased from Delcom, plus at least $2 or $3 for the box and other items you'll need from Radio Shack. Another advantage of ordering from Mouser, other than being able to obtain the specialty parts like the IDC connector and the resettable fuse, is the opportunity to order some spare parts or parts for a friend for just a few pennies more. Personally, I like to order an extra box in case I mess up adding holes for cables, etc. Plan on budgeting a total of about $20 to $40 for the entire project, including shipping charges, depending on parts you may already have and how elaborate you decide to make the interface. Item 11, the IC socket, is highly recommended because it will minimize handling of the expensive chip during construction of the interface. Item 15 is a solid-state, self resetting fuse that will prevent drawing excessive current from your USB port if there's an accidental short in the interface. Consider it nonessential, but if you lack confidence in your construction ability you can use it. Items 12 and 13 are really window dressing. Other than reminding you that the interface is plugged into a live USB port they serve no useful purpose. The Delcom chip needs a 6 MHz crystal. It works equally well with either a series type quartz crystal (as included in the Delcom parts kit) or a ceramic resonator such as the one I've shown in the Mouser shopping list. My preference is to use a resonator, but if you prefer quartz you can substitute for item 2 of the Mouser list their Stock No. 520-HCU600-S, found on page 508 of the catalog, and add another dime to the cost.

Figure 1.

Blank Perf Board for Hammond Box

3. DELUXE HAMMOND BOX (MOUSER) VERSION. The perf board for the version that uses the box sold by Mouser starts out as a rectangle 1.2" wide by 1.8" long (12 holes x 18 holes) as shown in Figure 1. Notch two opposite corners and round off the other two slightly until the board fits comfortably inside the box. You will probably have to sandpaper or file the edges a little. -- page 2 of 11 pages --

Figure 2 shows component locations. (Refer to Section 4. for a slightly simpler version with fewer parts.) Anchor the socket to the board with a little glue, or bend some of its terminals over to hold it in place while you work on the assembly. The LED and C2 are polarized. The negative terminal of C2 and the cathode (negative terminal) of the LED must be connected to the ground wire. The LED should be elevated on its leads with about 1/4" space between it and the perf board, so it will stick through a hole in the box when enclosed.

Figure 2.

Top View of Assembled Board

Figure 3 shows wiring on the bottom side of the board. Leave all cable wires for last. Cut and form component leads so they lie clear of each other, and solder them everywhere they are shown touching. Long jumpers can be made from solid buss wire and sleeving, or with insulated wire (the smaller the gage the better, and solid is better than stranded). Use a few drops of cement, or weave them in and out of a pair of vacant holes, to keep them from flopping around. This is all going to be protected and hidden from sight, so don't worry about neatness.

Figure 3.

Bottom View of Assembled Board

There are a couple of ways to pass the cable wires through the board. You can strip back the insulation far enough so that only the bare wires stick through the existing holes. Or you can enlarge the holes with a 1/16" drill bit and insert the insulated wires as shown in the illustration. See that long jumper that loops up around pin 20 and down to pin 13? If you prefer, use an insulated jumper that goes directly to pin 13 from the white cable wire and the upper lead of R1. If you look carefully at Figures 2 and 3 you'll see that wires 4 and 5 of the ribbon cable are swapped over each other. Want some good news? Pins 4, 5, 6, 9, 15, 16, 19, and 20 of U1 are not used, and there are no connections to those pins of the socket. After you have completed the board assembly make a final check of your work against Figure 3. Be sure all connections are as shown, that all joints are well soldered, and that there are no shorts between wires or pins that are not shown connected. The next step is attachment of the mating connector for JP1. -- page 3 of 11 pages --

All JP1-compatible remotes have a T-shaped access hole in the battery compartment for the 6-pin JP1 connector, as shown generically in Figure 4. Sometimes it is at the forward end of the compartment, and sometimes at the rear, but in either case the vertical bar of the "T" always points toward the rear or lower end of the remote, and serves as a sort of (unnecessary) clearance slot for the connector cable.

Figure 4. Orientation of JP1 Connector in a Typical Remote The six pins are always positioned in the opening as shown in the right hand detail of Figure 4. The pin numbers are not marked on the board, but often there's a printed rectangle with the corner nearest pin 1 chamfered. Our objective is to install the connector so that the cable approaches from the rear end of the remote. Then whenever you plug it into any remote you can mentally associate the cable wires with the vertical bar of the "T" and be assured of correct orientation.

Figure 5.

Assembling IDC Connector Without Strain Relief

Cut the end of the cable clean and square. If you're not going to use a snap-on strain relief the cable should enter the connector from the rear as shown in Figure 5, with wire number 1 (shown with a red stripe in the illustration) toward the corner socket that will mate with pin 1. Squeeze the two halves of the connector together carefully until the parts latch. If you are using a connector with solder pins or crimp pins refer to Figures 4 and 5 to make sure it is terminated correctly. Figure 6 shows assembly of an IDC connector with strain relief. Wire number 1 is still oriented toward the corner

Figure 6.

Assembling IDC Connector With Strain Relief -- page 4 of 11 pages --

socket that will mate with pin 1, but the cable should enter the connector from the front so that after folding it back under the strain relief it will lie along the vertical bar of the "T" opening when plugged into the remote. The illustration shows the type of connector sold by Mouser, on which pin 1 is identified with a symbol. Place the cable in the connector so that the end of wire number 1 is right below the symbol, then squeeze the connector together carefully until the parts latch. Wrap the cable back over the top and under the strain relief and hold it as tightly as you can while you press the strain relief down until the loops snap over the ribs on the sides of the connector. At this point it is recommended that you carefully insert U1 into its socket and test the unit before enclosing it. Figure 7 shows how the final assembly fits into the Hammond box. Cut or file a notch at the edge of the left end wall of the box for the ribbon cable to exit. Make the notch about 5/16 inch wide x 1/16 inch deep for ribbon cable, or size it to fit the type of cable you've used. Make a notch at the edge of the other end for the USB cable to exit. Make this notch about 3/16 inch diameter x 3/16 inch deep (D-shaped). Mark the underside of the lid with the locations of both notches to guide you, and cut or file away the thin rib in these areas. Try to make the fit of both cables as tight as you can.

Figure 7.

Modifications to Hammond Box for Cables and LED

Drill a hole in the lid slightly larger than the LED. The location shown in Figure 7 should work, but you might take a measurement to your LED to double-check. It's not necessary to fasten the board inside the box. It will be easier to align the LED with its hole if the board is left loose. Stuff a little foam rubber or other insulating material into the box if you prefer. Some sort of strain relief should be used on both cables. You can wind several layers of a thin strip of electrical tape, use tie wraps, hot melt glue, or any other means to prevent pulling on the solder joints by tugging on the cables after the box is screwed shut. 4. SIMPLE HAMMOND BOX (MOUSER) VERSION. The If you want to build a slightly simpler version of the interface you can omit F1, R5, and the LED. Figure 8 shows parts layout, and Figure 9 shows the wiring details.

Figure 8.

Top View of Optional Assembly Without Fuse or LED -- page 5 of 11 pages --

Figure 9.

Bottom View of Optional Assembly Without Fuse or LED

5. Radio Shack Box Version. The perf board for the version that uses the box sold by Radio Shack starts out as a rectangle 1.2" wide by 1.8" long (12 holes x 18 holes) with the center hole drilled out with a 1/4" drill bit, as shown in Figure 10. Before starting assembly check to be sure the board fits within the box, and sandpaper the

Figure 10.

Blank Perf Board for Radio Shack Box

sides if necessary. The board assembly is similar to that for the Hammond box except that the components are layed out a little differently to clear the center post. Figure 11 shows suggested component placement and wiring.

Figure 11.

Top and Bottom View of Assembled Board -- page 6 of 11 pages --

Solder all connections where wires are shown touching in Figure 11. If you want to omit fuse F1 use the positive lead of C2 for the connection to C1, and extend the red wire of the USB cable across the ground wire until it reaches the positive lead of C2. There's plenty of room to add the optional LED and its resistor R5 if desired. Refer to Figure 3 for information on how to connect them.

Figure 12.

Modifications to Radio Shack Box for Cables

Figure 12 shows how the board assembly lays loose in the box. Cut or file notches in each end of the top and/or bottom half of the box for the cables to exit. Use electrical tape, tie wraps, or hot melt glue to provide strain relief for the cables. 6. How It Works. Figure 13 shows a schematic of the USB interface. All the work is done by Microcomputer U1, which is programmed to function as an interpreter between serial communications to/from the PC over the GRN and WHT wire pair, and signals to/from the remote on the SDA, SCL, and RESET lines. Circuitry internal to U1 normally tri-states pins 1, 2, and 3 so that the remote is operational when the interface is inactive. U1 relays data in 8-byte packets rather than in 16-byte packets as serial and parallel interfaces do, so it is a little slower uploading and downloading.

Figure 13.

Schematic of USB Interface

The USB port supplies 5VDC operating power for U1 over the RED and BLK wire pair. F1 is an optional solid-state fuse that acts like a variable resistor. At normal currents the resistance is too low to have any effect. If the current increases above 250 milliamps F1 switches to a high resistance state to limit the current and protect the PC and interface. F1, R5, and the LED are nonessential components. Although the interface receives its power from the PC, the remote still needs batteries to power the EEPROM in order to pass the interface check and upload or download. Current drain on the remote is negligible. -- page 7 of 11 pages --

The following supplement entitled HOW TO UPGRADE A USB INTERFACE TO THE IMPROVED DESIGN, version 1.1, was published on 12 June 2004.

1. BACKGROUND. The first generation USB Interface, which was released last December, was a welcome sight to the many members who use laptops without serial or parallel ports available. I've tried to analyze early trouble reports for this interface and to perform extensive tests that, regrettably, I did not do sooner. As a result, some weaknesses in the original design have been identified that are easily corrected. Fortunately, the improved design uses almost the same parts as the original design; they are just arranged differently. New instructions on how to build the Improved USB Interface have just been released, superceding all previous instructions. The original instructions will not be revised. By and large, everyone who built or bought a USB interface has been able to use it, some with minor annoyances and some with no problems at all. Typical of the annoyances are trouble uploading or downloading unless batteries are removed, and not being able to operate the remote without unplugging JP1. A special problem resulted from prematurely publishing schematics of the design showing pin 5 of the Delcom chip used for the RESET signal to the remote, then later deciding to use pin 3 instead. Those who jumped in early (including Filebug) and used the initial schematic found that they had to remove batteries to upload or download. The explanation is simple, but it has caused a lot of confusion. Without a RESET signal, the only way to disable the remote's processor so that it won't interfere with upload/download is to remove batteries. Since the fault was ours, we are changing the IR.exe software so that the RESET signal is output on BOTH pins 3 and 5. That eliminates the need to rewire the RESET pin for units built to the earlier schematic. 2. INTERFACES BUILT FROM SCRATCH. The following instructions should be taken as suggested guidelines. Don't hesitate to deviate from them if you see an easier way to accomplish the same result. A. HAMMOND BOX VERSION. Remove and discard three 1K resistors connected to pins 1, 2, and 3 of U1. This is easiest done by cutting the leads close to the top of the board, then pulling them through from the bottom for unsoldering. Replace those resistors with three 10K resistors. Connect all three of their left leads to wires 1 and 2 through an insulated jumper (shown in red). NOTE: If you built your interface with a 4-conductor cable and tied pins 1 and 2 of JP1 together at the connector, you must replace the cable with one having six conductors so that wires 1 and 2 are available at the board. Connect jumpers from pins 1, 2, and 3 of U1 to wires 6, 4, and 5, respectively, and their corresponding resistors. BEFORE AFTER

Figure 1.

Changes to Board Assembly of Hammond Box Version -- page 8 of 11 pages --

B. RADIO SHACK BOX VERSION. Remove and discard three 1K resistors connected to pins 1, 2, and 3 of U1. This is easiest done by cutting the leads close to the top of the board, then pulling them through from the bottom for unsoldering. Replace those resistors with three 10K resistors. Connect all three of their upper leads to wires 1 and 2. NOTE: If you built your interface with a 4-conductor cable and tied pins 1 and 2 of JP1 together at the connector, you must replace the cable with one having six conductors so that wires 1 and 2 are available at the board. Connect jumpers (shown in red) from pins 1, 2, and 3 of U1 to wires 6, 4, and 5, respectively, and their corresponding resistors. Use insulated wire so the jumpers won't short out against the upper resistor leads. BEFORE AFTER

Figure 2. 2. PURCHASED INTERFACES. A. HOVISDIRECT. BEFORE

Changes to Board Assembly of Radio Shack Box Version

Remove and discard three 1K resistors near the JP1 cable. This is easiest done by PREPARATION AFTER

Figure 3.

Changes to Board Assembly of HOVISDIRECT Interface -- page 9 of 11 pages --

cutting the leads at the tops of the resistors, then pulling the resistors and leads out while heating the solder joints. Clean out all six holes with a solder removal tool or desoldering braid. If you don't have any of those resources you can try the dangerous method of heating the pads one at a time and blowing sharply on the hole before the melted solder solidifies. Drill a small hole approximately where shown in the "preparation" detail of Figure 3. Replace the resistors with three 10K resistors, except insert their bottom leads into the solder pads closer to the edge of the board. Before soldering the bottom leads, loop them back up through the original row of solder pads so that they form three short jumpers across the positions formerly occupied by the 1K resistors. Bundle the upper leads together and route them across and down through the small hole. Solder all three leads to the trace connecting wires 1 and 2. B. FILEBUG. Remove and discard three 1K resistors near the JP1 cable. This is easiest done by cutting six leads close to the body of the resistors, then pulling the leads out while heating the solder joints. Clean out all six holes with a solder removal tool or desoldering braid. If you don't have any of those resources you can try the dangerous method of heating the pads one at a time and blowing sharply on the hole before the melted solder solidifies. BEFORE PREPARATION AFTER

Figure 4.

Changes to Board Assembly of FILEBUG Interface

Drill three small holes approximately where shown in the "preparation" detail of Figure 4. Replace the resistors with three 10K resistors, except stand them on end with their upper leads bent over and routed down through the new holes toward the edge of the board. Loop the lower leads back up through the board as shown in the "AFTER" detail, to form three short jumpers across the positions formerly occupied by the 1K resistors. Use sleeving (shown in red) or a piece of electrical tape to prevent them from touching the traces that run between the resistor pads. Solder all three lower leads to each other and to the pads for wires 1 and 2.

-- page 10 of 11 pages --

3. EXPLANATION OF CHANGES. Most readers will neither be interested in reading this section, nor understand it. It is included mostly for the record. Figure 5 shows a comparison of the output portion of the schematic of the original USB Interface with that of the improved design. U1 is actually a Cypress CY7C63100 BEFORE AFTER

Figure 5.

Output Circuits of Original Versus Improved Design

microcomputer with a proprietary program in ROM. When pins 1, 2, and 3 are used as outputs, they will sink up to 1.5 mA for a "0", and source up to 0.6 mA for a "1". Source current is derived from the 5VDC USB power supply through an internal pull-up resistor that has a value of 16K 8K. At worst case the pins can source only about 0.2 mA. That's pretty weak for a line driver, and gives a rise-time of almost 2.5 microseconds on the SCL signal with typical line capacitance. The SDA signal is only slightly better, due to the internal 10K pull-up in the remote. Deriving the pull-up voltage from the USB supply means that a "1" voltage level can be as low as 4.85 volts, which may not be high enough to release RESET in some 6-volt remotes with healthy batteries. In the improved design, all three signals lines are pulled up to the remote's operating voltage through 10K resistors. This ensures that the voltage levels swing from near 0 volts to near Vbatt, and produces a rise-time of about one microsecond on the SDA and SCL signal lines. As is often the case, if there are no batteries in the remote the quiescently-high outputs from the interface will provide current through the input protection diodes of the EEPROM. This will bootstrap the Vcc pin up to an operating level that is sometimes sufficient to enable upload or download without batteries. Likewise, when used with a 3-volt remote the interface will boost the EEPROM voltage to near 5 volts, even if there are batteries in the remote. None of this is harmful. During prototype tests the interface satisfactorily uploaded and downloaded both with and without batteries when using the following model remotes: 6012, 6131, 7200, 7800, 8811, 15-1994, and ShowStopper. It also performed flawlessly when voltage in a model 7200 was varied from 2.63 volts to 6.97 volts. The ability to function without batteries is considered more of a curiosity than a necessity, and is not guaranteed. A standard survivability test of a good interface design is to confirm that no damage to the remote is caused by plugging in JP1 upside down and trying to download. Sad to say, many careless users do this often. No problems were found when this was tested.

-- page 11 of 11 pages --

Vous aimerez peut-être aussi