Building A Stripboard Comms Controller

From RepRap
Jump to: navigation, search
Crystal Clear action run.png
Stripboard Comms Controller

Release status: Obsolete

No image available.png
Stripboard Comms Controller
CAD Models
External Link

DEPRECIATED! See Darwin PowerComs Board.

HOWTO: Building A Stripboard Comms Controller

Comms board


The Comms controller is the main interface between the host PC and the rest of the RepStrap or RepRap. See RepStrap for an overview of all the components.


Tools and consumables

  • A soldering iron and accessories (see Electronics Fabrication Guide).
  • Solder
  • Electric drill or at least a suitable drill bit
  • Some wire for jumpers/links
  • Wire strippers
  • Small pliers or tweezers


  • C1: 100μF eletrolytic capacitor (with a voltage rating of 30V or higher).
  • C2-C5: 1μF eletrolytic capacitors (with a voltage rating of 30V or higher).
  • U1: MAX-232 or equivalent chip
  • U2: 7805 voltage regulator
  • Connectors. A simple low cost choice is to use header pins and matching sockets. Try to get keyed pins and sockets that prevent you from putting the connector on backwards, because if you do it will most probably destroy the module and possibly other connected modules. Take great care! Alternatively, you can directly solder wires into the board after putting the modules on the machine in which case you don't need any connectors. If you use connectors, you need:
    • J1: two pin connector (used as a power connector)
    • J4: three pin connector (used to connect to the PC serial port)
    • J2, J3: four pin connector (used to connect to the network of devices)
  • A piece of stripboard with 2.54mm (0.1") spaced continuous track. It should be a minimum of 21 holes along the track direction and 12 holes sideways. It is a good idea to provide some extra space to make screw holes for mounting.
  • A female DB9 9-pin serial socket to plug into a PC serial port. 25 pin connectors can also be used if preferred by making appropriate modifications.


This is the schematic diagram of the circuit you will be building. See reading a schematic to understand the various parts.

Comms board schematic

Preparing the board

The strips on the back of the board need to be "separated" at certain points. The easiest way to do this is to use a small electric drill with a drill bit around 3-4mm in diameter. Don't drill all the way, just far enough to cut the copper tracks - you may find a 3.5mm drill in a hand-held chuck is easier to control. See the Electronics Fabrication Guide for more details.

This image shows the rear of the stripboard so you can see the points that were separated. Underside of stripboard

The points marked in black are where you should separate the tracks.

Note: This is the minimum size. It is recommended that you leave sufficient additional space on all sides to allow for easy mounting. Around 20mm will be ample.

Important: There are some voltages that can and will damage components if you aren't careful. Double and triple check that:

  • You have completely separated the necessary tracks. Use a multimeter or continuity checker if you have one.
  • You have not connected any two adjacent tracks with shards of copper. It is a good idea to scrape down the channels to ensure there are no fragments. Again, check this with a multimeter or continuity checker.
  • When the board is assembled, check that 12V, 5V and ground are not shorting together. Expect some connectivity because of the components, but not a dead short.
  • It pays to check that 12V, 5V and ground wire also connect to the relevant pins of the major components before you apply power.

Making the board

Solder the components into the board as pictured below. See the Electronics Fabrication Guide if you're new to soldering or component placement.

Component side of board

Pay particular attention to:

  • U1 (the MAX-232) chip orientation. The notch should be at the top, as pictured.
  • U2, the 7805 voltage regulator. The metal tab should be to the left as pictured.
  • The capacitor polarity. Pay attention to the + and - indicators and match the capacitor. There is usually a band down one side of the capacitor that has minus (-) symbols written down it. For capacitors that have a lead out of each end, a dent is usually found on the positive end. Yes, the positive end of C5 is meant to connect to ground (RS232 voltage magic is involved here).

Board connections

The connector pins are numbered from the top of the board down, so for example the pin in hole E8 is pin number 1 of connect J4. It is advised that you do not plug and unplug things with the PSU turned on, else the magic smoke sometimes escapes.

  • J1: Power connector
    1. +12V
    2. Ground
  • J2: Incoming comms
    1. Comms channel
    2. +12V
    3. Ground
    4. +5V
  • J3: Outgoing comms
    1. Comms channel
    2. +12V
    3. Ground
    4. +5V
  • J4: PC Serial connector
    1. Ground. When using a 9-pin female serial socket, this is pin 5.
    2. To receive on PC (RX). When using a 9-pin female serial socket, this is pin 2.
    3. To transmit on PC (TX). When using a 9-pin female serial socket, this is pin 3.


If you're planning on using a PC power supply to run your RepRap, then you can use the 5V supply that it provides instead of using a 7805. The simple way to do this is to make the following changes:

  • Leave out the 2-pin power connector (J1).
  • Leave out the 7805 voltage regulator
  • Put a 3-pin power connector where you would have put the 7805.
  • Then from top to bottom (as pictured on the top view), the connections are +12V, Gnd, +5V.
  • Wire a cable to suit your power supply that connects to the pins in this order.

Even if you do use a PC power supply, you can just connect the 12V line and use the module as depicted.

The MAX202 chip can be used as a drop-in replacement for the MAX232, optionally allowing C2-C5 to be replaced with cheaper 0.1uF ceramic capacitors. See for details on chip and sampling options.

The board has a lot of spare space on it and you can make a much more compact board if you prefer. However space is really useful for mounting and adding modifications later on, should any be needed (which will probably save you from starting from scratch). There is a possibility that you might want to add a heatsink to the 7805 in the future, and these take up a little space too. If in doubt, be generous with the board size.


If you experience trouble, please share the problems (and resolutions) with us here:

Debugging your serial connection

Before applying power always first check your stripboard wiring as described in the Electronics Fabrication Guide.

Experienced hardware folk never trust their hardware. First make sure your serial port operates, which is easily done by shorting the Rx and Tx lines out on the serial lead from your PC. These are pins 2 & 3 and a small screwdriver will do the job. Do not touch the other pins or the casing. With the other arms, type characters at a dumb serial terminal such as Hyperterminal (Windows), minicom (Linux) or kermit (Linux) which has had all flow control turned off. If the port works, your typing should echo back - and stop echoing when you remove the screwdriver. If it doesn't work, you have the wrong port, a dead lead, a dead port, or if really unlucky a combination of the above.

When testing with comms software ensure flow control is set to "none". If in doubt for the other settings, use the following (though it's not too important at this stage): 19200 baud, 8 bits, no parity, one stop bit (8-N-1). If available, set carrier-detect to off.

Use the same principle to test the connector to the board, shorting it out with a screwdriver while no power is applied is acceptable. The pins to short are pins 2 and 3 of the serial connector on the module board (while the cable is still attached to the PC). If that doesn't work, your cable is suspect.

If all this checks out and you have verified the stripboard soldering, then you can apply power to the board. If you have a multimeter, check the following voltage levels are present. If any of these are wrong it suggests a defect in your wiring. In each case, measure from the first pin with the negative input of your voltmeter to the second pin with the positive input of your voltmeter. For these measurements, plug the power in, but do not plug the device into the PC. Also leave the communications connectors empty.

  • Pin 15 to 16: 5V. A mismatch suggests a power supply or 7805 issue.
  • Pin 15 to 14: -7 to -15V. A mismatch suggests a short on the board or a miswiring of the cable.
  • Pin 15 to 13: 0V. A mismatch suggests a miswired cable.
  • Pin 15 to 12: 5V
  • Pin 15 to 11: 4 to 4.5V.

Now plug the serial connector into the PC (still leaving the communications connectors empty). You should now measure the following:

  • Pin 15 to 16: 5V. A mismatch suggests a power supply or 7805 issue.
  • Pin 15 to 14: -7 to -15V. A mismatch suggests a short on the board or a miswiring of the cable.
  • Pin 15 to 13: -7 to -15V. A mismatch suggests a miswired cable.
  • Pin 15 to 12: 5V
  • Pin 15 to 11: 4 to 4.5V.

Now get a module connector cable (which is either 3 or 4 wires depending on how you're constructing your modules) and connect J2 to J3. This makes the comms card behave as if it is addressing other controller cards. Be sure that you don't get your cable twisted when you connect J2 to J3. Doing so shorts your 12V pin directly to ground, a move that is unlikely to do your power supply a lot of good.

Alternatively, you can simply attach a jumper wire from pin 1 on the outgoing comms connector (J2) to pin 1 on the incoming communications connector (J3). Take great care not to get your connector cable twisted.

You should now observe the following:

  • Pin 15 to 11: 5V (rather than somewhere from 4 to 4.5V)

At this stage you should be able to do an internal echo test.

Using your comms software and the same settings as you previously used (no flow control), type or send some characters. The exact same characters should echo back to you. If you remove the power from the module, the echo should stop. Turn it on again and check that echo returns. Similarly, if you remove the comms cable echo should stop, put it back it and check that echo returns.

For Linux you can also use the 'poke' utility form the firmware toolkit to test the interface. I used device /dev/ttyUSB0 - a serial USB adaptor - as my serial port on a Linux box, Windows users probably have COM1 or something similar. Here is the command line; change your serial device to match and make sure you have access rights to that device (in Ubuntu you must be a member of the system dialout group):

echo 0||./poke -d 2 -t /dev/ttyUSB0 -v -w

It should come back with:

<54><51><31><02><00><00><d0>[54][51][31][02][00][00][d0]Read fail 2
<54><51><31><02><00><00><d0>[54][51][31][02][00][00][d0]Read fail 2
<54><51><31><02><00><00><d0>[54][51][31][02][00][00][d0]Read fail 2
<54><51><31><02><00><00><d0>[54][51][31][02][00][00][d0]Read fail 2

If this does not happen, type:

stty -F $serialport -echo -cooked

and try again.

For Windows the poke utility is not currently available. You can use the Java stepper exerciser application instead. If you launch it and drag one of the position sliders, you should see the following error: Update exception: Received data packet when expecting ACK

Now you are ready to connect your stepper controller.

See Also

-- Main.SimonMcAuliffe - 02 Feb 2006