Goal

Melzi RepRap Controller PCB

By the end of this stage your machine will be ready to commission.

The electronics will have been temporarily fitted. This allows wire lengths to be set and the machine to start working. It is deliberately rather messy, as this allows wires to be re-routed over and under each other and similar adjustments. The messiness will, of course, be tidied up over the next few instruction pages.

Your will be guided through the print of the final parts needed for your RepRap Huxley to build itself: the clips for holding the controller PCB and the power socket.

You will then remove the temporary attachments and replace them with permanent ones.

Important: general rules for wiring up

You will do serious damage to your RepRap electronics if the power is connected backwards. Other damaging mistakes are to short out high-current devices like motors and heaters, and to connect high-voltage devices like stepper drivers to signal inputs like temperature sensors.

So – in the sections below where it tells you to check things – please check them thoroughly. It is worth taking the time…

Also important for the steps below: when attaching wires to screw connectors, strip about 5mm of insulation off them, twist them between your fingers, and tin them with solder. The tinning is needed for good contact, and to ensure that fraying does not cause shorts.

When wires leave a device (like a motor) or arrive at a connection (like the screw connectors on the controller) leave a small slack length (about 20mm long) for strain relief – don’t have the wires taut.

Finally, when making any changes to the wiring or any other electrical aspect of the machine, first disconnect both the power and the USB.

Tools

  • Wire strippers
  • Soldering iron
  • Small screwdriver
  • Vice

You will also need a reel of sticky tape.

Setting the Motor Currents

If you have purchased a machine from RepRapPro, this is already been done for you. If not, or if they need adjusting for any reason, this process is described HERE

Wire routes

These elevations show the wire routes round the machine. They are referred to in the individual sections below.

Reprappro-huxley-wire-routes-front.jpg  Reprappro-huxley-wire-routes-left.jpg

Reprappro-huxley-wire-routes-right.jpg  Reprappro-huxley-wire-routes-back.jpg

The wires will ultimately be attached using coil strip and cable ties. But at this stage attach then using sticky tape (the tape called “pressure tape” works well). If you do this you can build things up incrementally without sacrificing ties when you need to move a wire.

The PTFE tube shield

Reprappro-huxley-tube-shield.jpg

Run a length of the curled wire retaining strip along the back M6 threaded bar at the top. This should completely cover the threads. It prevents the extruder’s PTFE tube from rubbing on them.

The controller

Reprappro-huxley-pcb-clips.jpg

You will need the four printed PCB clips.

Reprappro-huxley-pcb-fitted.jpg

Clip the top two onto the frame as near to the top of the M6 threaded rods as you can. The open ends of the clips point outwards. The slots in the clips point downwards.

Offer up the controller PCB to the slots. Offset the printed circuit so that the USB connector (with the black USB cable connected in the picture – don’t connect it yet) is just to the left of the right-hand threaded bar.

Push the bottom clips onto the frame to secure the PCB. Take care not to damage any of the soldered components.

All the connectors along the top of the controller are labelled so you can get the right wires in the right connectors. The only exception is the extruder fan – this does not connect to the connector labelled “FAN”; that is for something else. See the extruder wiring section below for more information.

Power

Reprappro-huxley-2011-09-162016.54.48.jpg

The power from the 19v power supply comes through the connector with positive in the centre and negative around the outside

Reprappro-huxley-2011-09-162016.53.07.jpg

You will need two power cables in the machine: one about 500 mm long for the controller board, and one about 400 mm long for the heated bed. Both connect to the socket above.

The power plug

Strip the insulation from the ends of the two power wire pairs. For the +19v ends strip about 5mm. For the 0v ends strip about 15mm.

Twist the +19v ends together and tin them. Put a length of heatshrink over both, then solder them to Pin 3 in the picture:

Reprappro-huxley-powerSMALL.jpg

Run the heatshrink down over the pin and shrink it.

Twist the 0v ends together and push the result through Pin 1 , then across and through Pin 2. Keep it clear of Pin 3.

You must connect BOTH ground wires to BOTH pins, or either the heat bed or Melzi will not work when you plug the power in!

Solder these wires to BOTH Pins 1 and 2. Trim off any excess.

Reprappro-huxley-power-clip.jpg Reprappro-huxley-power-clip2.jpg

Check that the power connector fits easily into the printed power-connector bracket. Then attach the printer power-connector bracket to the vertex of your Huxley at the back on the left. Unbolt the M6 nut and washer, put the power connector on, and replace the washer and nut. Attach the power connector to the bracket with the supplied nut.

The power wire to the controller board follows the upper path of route E.

Trim the wires to the right length (not forgetting the extra for strain relief – see above), strip the ends, and tin them.

Now plug the power supply into the power connector. Make sure that neither of the free ends of the power leads can short on anything and connect a voltmeter to the ends that you are about to screw into the controller board.

Turn on the power, and make sure that you have +19v and 0v where you expect.

Turn off the power and unplug the power supply.

Reprappro-huxley-controller-power.jpg

Screw the wires into the power connector of the controller. The 0v (GND) connection is on the right. The +19v is on the left. Check this again with a meter to the outside of the power connector and then to its middle pin.

Heated bed power wire

The power wire to the heated bed follows the lower path of route E. Leave a generous loop so that the bed can run back and forth along its full travel. But don’t make the wire so long that it catches on things. Tape it on and try different lengths by hand. Only cut it when its right.

Reprappro-huxley-heatbed-power.jpg

Strip the ends, tin them, and screw them into the heated bed. The 0v (GND) connection is in the middle. The +19v is on the right. There is no connection on the left.

Check that 0v (GND) and +19v on the heated bed are connected to the corresponding points on the controller board with the meter.

Reprappro-huxley-heatbed-relief.jpg

The power cable to the heatbed PCB should be routed such that no strain is applied to the screw terminal as a result of the Y axis movement. This may be achieved by forming a loop of cable as shown above.

The stepper motors

Stepper motor wiring

Y

Start with the Y stepper wires. These follow route G on the pictures above. Gently twist the wires (not tight) so that they lie neatly together. Tape the wires to the frame every 60/70 mm.

From left to right the colour sequence of the Y-motor wires connecting to the controller is: Black, Green, Blue, Red.

Trim the wires to the right length (not forgetting the extra for strain relief – see above), strip the ends, tin them, and screw them into the “Y-MOTOR” controller connector.

X

Next do the X wires. These follow route A. Again gently twist them. Allow a loop as shown – remember that this will have to accommodate the Z axis as it moves up and down.

From left to right the colour sequence of the X-motor wires connecting to the controller is: Black, Green, Blue, Red.

Trim the wires to the right length (not forgetting the extra for strain relief – see above), strip the ends, tin them, and screw them into the “X-MOTOR” controller connector.

Extruder

Next do the extruder motor wires. These follow the top of route E. Take care that the wires run clear of the extruder shaft attached to the big gear.

From left to right the colour sequence of the extruder-motor wires connecting to the controller is: Black, Green, Blue, Red.

Trim the wires to the right length (not forgetting the extra for strain relief – see above), strip the ends, tin them, and screw them into the “E-MOTOR” controller connector.

Z

Finally in this section do the Z wires.

Reprappro-huxley-z-motor-wiring.png

The Z-motor wires run along route B.

The two Z motors are connected in series as shown above. Cut two 20mm lengths of heat-shrink sleeving and put it on one of each pair of wires that will be connected together. Then twist the ends and solder them, then shrink the sleeving over the join.

From left to right the colour sequence of the Z-motor wires connecting to the controller is: Black, Green, Blue, Red.

Trim the wires to the right length (not forgetting the extra for strain relief – see above), strip the ends, tin them, and screw them into the “Z-MOTOR” controller connector.

Endstops

Connect your endstops using two wires each. It is a good idea to use a different colour for each axis as this will make it easier to get the endstops connected to the correct input. The wires you cut from the stepper motors are different colours…

For the limit switch end, crimp or solder a terminal onto the end of the wires, then cover with some heatshrink to insulate the terminal. Connect to the outer pins of the limit switches (the NC = Normally Closed connections; RepRap expects the switch to open when the endstop is hit.)

Reprappro-huxley-switch-wires.jpg

The endstop switch holes should be drilled out to 3mm diameter so they can be mounted using #4×1/2″ self tapping screws (alternatively, #2-56 and M2.2 screws will fit the switch, but are not included).

Y

The Y endstop is mounted beside the Y motor:

Reprappro-Huxley-Y-endstop3.JPG Reprappro-huxley-y-endstop.jpg

You may need to trim the length of the lever so that it fits; cut it with a pair of pliers. The moving end of the lever is closest to the smooth rod, as it’s the linear bearing on the Y axis that makes contact with it.

Its wires follows route F.

Trim the wires to the right length (not forgetting the extra for strain relief – see above), strip the ends, tin them, and screw them into the “YSTOP” controller connector. They can be connected either way – they have no polarity.

X and Z

For the X endstop, screw the switch to the X-motor end of the X axis, so that…

Reprappro-Huxley-XZ-endstops.JPG Reprappro-huxley-x-endstop.jpg

…it will be between the switch and the X-motor end of the X axis.

The wires follow route A. Wind them loosely round the X motor wires.

Trim the wires to the right length (not forgetting the extra for strain relief – see above), strip the ends, tin them, and screw them into the “XSTOP” controller connector. They can be connected either way – they have no polarity.

The Z endstop switch is mounted using the “h” shaped printed clip.

Leave a generous loop of wire between the switch and where you first attach it to the frame. You need to be able to move the “h” clip up and down to set the Z zero position.

The Z switch wires follow route F.

Trim the wires to the right length (not forgetting the extra for strain relief – see above), strip the ends, tin them, and screw them into the “ZSTOP” connector. They can be connected either way – they have no polarity.

Hot end

The hot end ribbon cable loom you made can wrap around the Bowden tube, all the way back to the extruder drive. Then loop the ribbon cable wires behind and over the top of the threaded bars, across the top of the machine, to the Melzi. Give a generous loop – remember that the X axis has to run from end to end when the Z axis is at the bottom of its travel. Tape the wires to the middle of the front bar.

The fan wires should be on one side of the ribbon cable. Check which is the positive (red) and negative (black) wire, by following it back from the hot end connector. Trim them to the right length (not forgetting the extra for strain relief – see above), strip the ends, and tin them. Loosen the power wires from the power input screw terminals, then screw them AND the fan wires back into the main power connector. Make sure you get the polarity right – red/positive and black/negative.

The fan wires DO NOT connect to the connector marked “FAN”. That is for an optional fan for cooling prints as they are being built from materials that require extra cooling.

Run the hot end heater wires (the two pairs of wires in the centre of the ribbon cable) to the “HOTEND” connector. Trim the wires to the right length (not forgetting the extra for strain relief – see above), strip the ends, tin them, and screw them into the “HOTEND” connector. They can be connected either way – they have no polarity.

Run the pair of wires for the hot end thermistor to the “ETEMP” connector. Trim the wires to the right length (not forgetting the extra for strain relief – see above), strip the ends, tin them, and screw them into the “ETEMP” connector. They can be connected either way – they have no polarity.

Heated bed control cable

If your ribbon cable does not have a coloured stripe you can easily add one with a felt-tipped pen. This will help you orientate the wires correctly (this is an example picture, with more wires than are needed here):

Reprappro-mendel-bed-ribbon-marking.jpg

Take the 4-way ribbon cable – you may need to strip this from the 20-way ribbon cable supplied with the extruder. Separate the wires at one end for about 15mm.

Reprappro-huxley-idc.jpg

Push the separated wires into the 4-way connector. There is no need to strip the wires. Use a small screwdriver to push the wires into the terminals, which will cut the wire sheath and make contact. Be gentle – don’t damage the connector by pushing too far.

Plug the connector onto the 4-way pin header on the heated bed at the right in this picture. You will need to gently bend the pins (long-nosed pliers are easiest) on the heated bed to allow the connector to fit on:

Reprappro-Huxley-heatbed-connector.JPG

The ribbon cable follows route E.

The pin-out of the header pins on the heated bed is as follows:

  1. unused / bed levelling (closest to edge of board, closest to camera in picture above)
  2. Heated bed signal wire
  3. Thermistor signal
  4. Thermistor signal / Ground (furthest from edge of board, furthest from camera in picture above)

Only three of the four wires are used; the fourth is for a future enhancement for bed levelling for which your machine is already pre-configured. The unused header pin is the one closest to the edge of the board, and has the red wire going to it in the picture above.

The next header pin in is the signal that turns the heated bed MOSFET on and off. That needs to be connected to a pin on the expansion header of the Melzi (bottom right in picture) as shown below. The wire goes on the pin on the top row, second pin in from the left:

Reprappro-huxley-bed-MOSFET-gnd.jpg

The “HOTBED” connector on the Melzi is not connected to anything, since we are using the bed mounted MOSFET to control the heatbed.

The final header pins (the two furthest from the edge of the board) go to the connector labelled “BTEMP” on the Melzi. The wire connected to the innermost pin on the heatbed PCB is Thermistor signal / Ground. This should be screwed into the BTEMP connector, in the side nearest the ETEMP connector. The next wire in the ribbon cable (between ground and the signal wire) connects to the other side of the BTEMP connector.

USB cable

The USB cable plugs into the mini-USB connector beside the SD card socket on the controller. The cable follows route C.

Test Wiring

Use your meter to double-check the power connections. Set your meter to measure resistance. Short the probe ends. You may find (particularly if your meter is not the most expensive one on the market) that the reading is not quite 0 ohms. Note down what it is – this is your meter’s idea of a dead short. Add this number to the low resistances given below.

Make sure that 0v (GND) – the outside of the power connector – runs to the places in the circuitry that you would expect (for example the case of the SD card socket).

Check that the +19v wires run from the central pin on the connector to the right places on the circuit boards.

Check the continuity of the connections to the heated bed with a meter from the screw connections on the controller board to the little blobs of solder on top of the 4-way connector. If you have open-circuit problems, it may be the IDC. A neat trick with this to rectify an open circuit (thanks to Alan Ryder) is gently to pull the IDC apart, take the wires out, strip them, and tin them. Then reassemble – the tinning ensures good contact with the IDC blades. This is only worth doing if you have problems with the simple method, though.

Measure the resistance between the two screws on the power connector. This may start low and then rise. (This is the capacitors in the circuit charging up with the tiny current from the meter.) It should level out at a few hundred ohms.

Measure the resistance between the two screws on the hot-end heater resistor/cartridge connector. This should be about 6.8 ohms.

Make sure all the moving axes are not touching their endstop switches. Check that each resistance on the X, Y and Z endstop connectors is 0 ohms. That is to say the endstop switches should be closed. Press each switch in turn. The corresponding resistance should rise to 5K ohms or more (the resistance of the circuit components on the controller board in parallel with the switch).

Check the heated bed temperature sensor connector. The resistance should be around 5 to 10 kilohms. This is not just the resistance of the sensor. Other parts of the circuit on the controller board are in parallel with it.

Check the hot-end temperature sensor connector. The resistance should be around 5 to 10 kilohms. This is not just the resistance of the sensor. Other parts of the circuit on the controller board are in parallel with it.

Check the motors are connected properly. Measure the resistance of each pair of wires (black/green and blue/red) of each motor; the resistance should be 3.2 ohms for each pair on the X, Y and E axis, and 6.4 ohms on Z (because 2 motors are connected in series).

You did check the motor currents, as described above, didn’t you?