S-AVR » Serial

The S-AVR:Serial is an add-on board which contains a MAX232 line driver chip which is capable of translating between the CMOS levels from the MCU to the differential voltage on a PC's COM port. This allows a PC to talk to the MCU, both as a dumb terminal and in a more intelligent message-passing mode.

Step 1: Tool-Check

You will need:

  • S-AVR
  • Soldering Iron & Solder
  • Sharp Knife or Scalpel
  • Wire Cutters/Strippers
  • Long-nose pliars
  • Cross-head screwdriver
  • PC with COM port

Step 2: Order the Components

You will need the following components. For readers in the UK I have included the order codes for Rapid Electronics. If you're elsewhere it probably makes sense to source the components locally - they are very common and should be easy to find. Note that if you have already made the S-AVR and the S-AVR:LED, you probably have enough veroboard and SIL sockets left over. If not, the complete order from Rapid comes to £4.99. Then you pay delivery at £4.95 and VAT on that total, bringing it up to £11.42. Rapid will give you free delivery for orders over £30 ex VAT, so if you're short of common components it probably makes sense to stock up of a few things. You will get discounts for ordering more than five or ten.

Rapid Order CodeDescriptionQuantity
82-0148MAX232CPE+ Dual RS2321
11-10361uF 25v Tantalum Capacitor5
15-01509-Way D-Type Solder-Lug Socket1
15-02209-Way D-Type Connector Cover1
01-0108Stranded Wire1
22-170332-Way Turned-Pin SIL Socket1
22-051510-Way 2.54mm Single-Row PCB Header1
22-512410-Way 2.54mm Single-Row Socket1
22-172216-Pin 0.3in Turned-Pin DIL Socket1
34-050564mm x 95mm Stripboard1

Step 3: Cut the Tracks!

As before, cut the tracks where you see the white lines.

Step 4: Solder the Jumper Wires

There are five blue jumper wires this time. As before, the wires should be inserted from the other side of the board.

Step 5: Solder the Components

Note that components should be inserted from the other side of the board.

  • Solder the DIL socket so its corners are at A6, H6, A9 and H9, with pin 1 at H9
  • Solder the five capacitors, taking care to get the polarity right:
    • Long leg at E13, short leg at D13.
    • Long leg at H13, short leg at F13.
    • Long leg at I11, short leg at C11.
    • Long leg at G10, short leg at I10.
    • Long leg at H5, short leg at G5.
  • Solder pins from the SIL strip:
    • 7 pins between E1 and K1
  • Solder pins from the single-row header:
    • 3 pins between E4 and G4.
    • 3 pins between A13 and C13.

Step 6: Insert the MAX232 Chip

Insert the chip into the DIL socket so that pin 1 is at H9.

Step 7: Construct the Serial Cable

Take a 2m length of black stranded wire and a 2m length of blue stranded wire and twist them together. Now take a 2m length of white stranded wire and carefully twist it around the other two, so you end up with a 3-core plait.

Now cut off three of the single-row sockets. Cut using wire cutters in the middle of the fourth pin. Now strip three 7mm lengths of insulation from the earth wire of some old mains cable, and put them over each wire at one end of your braid. Strip 3mm from the end of each wire, and solder them to the socket row as shown below, paying particular attention to the relative position of each wire colour, and then push the green insulation down over the soldered pins. Now solder the other end of the cable into the 9-pin D-type connector as shown below, again paying particular attention to the positions of each wire colour (white to pin 2, blue to pin 3 and black to pin 5). Now fasten the D-type connector into the hood.

Step 8: Connecting Up!

Before connecting up you will need to make a small modification to your S-AVR. Cut off two turned-pin SIL sockets and solder them to the main board as shown above, leaving five blank holes between it and the strip of five already there, such that they line up with pins 3 and 4 of the MCU. This allows both serial ports on the MCU to be used.

Now ensure that your S-AVR is powered off, then take six staples and use them as shown above to bridge the S-AVR:Serial to the S-AVR as you did with the S-AVR:LED board.

Now connect the D-type connector to the COM port of your PC, and the other end of the cable to the serial interface as shown above.


Leave a comment

You can use TWiki syntax in your comment