You are here

TwinTeeth - Wiring the electronics

In this chapter we are going to wire the electronics.

TwinTeeth uses an Arduino Mega 2560 and a Ramps 1.4 board which holds the Pololu A4988 Motor Drivers and other electronic circuitry.This low-cost board was designed for the RepRap 3D printer and now is very popular. Together with the Arduino provide most of the electronics needed by TwinTeeth. Only the Laser Toolhead uses an additional circuit, the Pickup Driver, which has the function to interface the PHR-803T blu-ray pickup and the Arduino.This chapter doesn't cover this circuit because we will describe it later in "Assembling the Laser ToolHead" chapter.

Turn the framework upside down with the Z axis pointing you because the electronics is installed at the bottom side of the framework.

Installing the endstop switches

If you did not install the endstop switches before, then now is the time to do it.

TwinTeeh was designed to use common subminuature DB series micro-switches with straight terminals and no auxiliary actuator. You can use any of this series because the max. current which will pass through it will be only some mA and a potential tension of 5V.

Endstops usually have three terminals. They are marked C (common), NC (normally closed) and NO (normally open).

The terminal at the centre of the switch is usually the NO (normally open) terminal. We don't use it.

Solder two wires on the NC and C terminals (see next picture) and using a cutter or a file go into the endstop housing of each vertex till the endstop fits well into it.

The switch has to be levelled with the top surface of the vertex and the tiny actuator button standing out of it (see next picture). The actuator button must be centred between the 6mm axis.

Turning the Acme screw by hand, move the carriage to the bottom position and check that the endstop screw hits the actuator properly.

Then using two M2 or M2.5 metal-sheet screws attach the endstop switch into the housing through the two holes included.

Repeat these steps with the other endstop switches.

Installing the Arduino and the Ramps

Now we are going to attach the Arduino Mega to the built-in PCB spacers. You have several options about where to install it but we recommend you to install it at the right side of the triangle (see next picture)

Put the Arduino on the PCB spacers and check that the PCB holes match the holes of the spacers. Using 2.5x10mm metal-sheet or wood screws carefully attach the Arduino to the spacers.

Take the Ramps board and solder two male pins on the 12V-Aux pin holes (see next picture) Most Ramps boards come without these pins. Later we will connect there the cooling fan (see wiring diagram below).

Check that all the microstep jumpers are installed in all axes. TwinTeeth uses 1/16 microstepping.

Install the Ramps on the Arduino. Take care to insert all the pins at the same time.

Find the stepper motor drivers.

You will need three drivers for the X,Y,Z motors and an additional one which is shared by the 3D Extruder motor and the Paste Dispenser motor (in case you want to use those ToolHeads)

Before installing the drivers, paste the small Alu. radiator on the A4988 ICs.

Then Insert the drivers in the X, Y, Z positions on the Ramps. Insert also the fourth driver in the E0 position (if you want it).

Warning: take care when installing the drivers on the Ramps because if you install them incorrectly you will destroy them. You will also destroy them if you connect/disconnect the motors while the power is on.

If you look at the board with the yellow fuses on your left, then the correct position of the drivers is with its tiny potentiometer pointing to your right (see next picture).

Wiring the electronics

Before installing the wiring take a look at the following diagram:

If you didn't do it before, now is the time to install the wires through the pass-through hole of the Z axis Alu. tube.

You will need to install 15 wires. CAT5 or similar; flexible wires for computer networks will do the job. Max current will be 1A per wire for the four wires of the 3D extruder motor. The rest of the wires will carry a few mA.

Install also a one-way thin shielded cable for the FE signal. We used an earphone cable for this.

We recommend you to use a cable grommet in the bottom hole of the Alu. tube.

Installing the DB15 Connector

All of these wires will go from the Ramps at the bottom to the DB15 connector at the top side. The connector is used to plug the various ToolHeads that TwinTeeth supports.

Next table shows a complete description of the DB15 connector pin out.

DB15

ToolHead

Arduino/Ramps

IN/OUT

Signal Name

Description

1

Laser

D11

OUT

SEL1

SEL1 and SEL2 turn on/off one of the three laser diodes (UV, Red and IR)

2

Laser

D5

OUT

Lens servo

PWM signal for moving the focus lens.

3

Laser

D6

OUT

Laser power

PWM signal for controlling the laser diode current (and power)

4

Laser

D4

OUT

SEL2

SEL1 and SEL2 turn on/off one of the three laser diodes (UV, Red and IR)

5

3D Printer/Paste Dispenser

E0-1A

OUT

Stepper 1A

Stepper motor coil 1-A.

6

3D Printer/Paste Dispenser

E0-2B

OUT

Stepper 2B

Stepper motor coil 2-B.

7

3D Printer/Paste Dispenser

E0-1B

OUT

Stepper 1B

Stepper motor coil 1-B.

8

3D Printer/Paste Dispenser

E0-2A

OUT

Stepper 2A

Stepper motor coil 2-A.

9

3D Printer

D10

OUT

Heater

Hot-end heater.

10

3D Printer

D10

OUT

Heater

Hot-end heater.

11

Laser

N/A

N/A

+5V

Direct +5V from PSU.

12

3D Printer

T0

IN

Thermistance

Hot-end thermistance.

13

3D Printer

T0

IN

Thermistance

Hot-end thermistance.

14

Laser

GND

N/A

GND

Pickup Driver Analog GND (FE cable shield)

15

Laser

A3

IN

FE

Focus Error signal line.

DB15 Shield

Laser

N/A

N/A

GND1

Pickup Driver digital GND (direct from PSU)

Now we are going to install the connector. Turn the framework upside.

Find the Z axis Leadscrew Cover piece (see next picture) and using a cutter or a file go into the square housing of the Alu. tube and remove the elephant's foot, traces of plastic, etc.

Check that the Alu. tube fits well into the housing.

Put the DB15 cover on the Leadscrew Cover and using a marker pen mark two lines on the Alu. housing, where the DB15 cover touches it (see next picture)

Using a mini-rotary tool cut a slot in the Leadscrew Cover piece (see next picture). This slot will help us to pass-through the wiring.

Pass the wires through the Alu. housing and the slot. Then slide the Leadscrew Cover into the Alu.tube.

Using two M3x16mm bolts attach it to the top triangle and the Bearing Cover, just on the front holes, because will attach later the DB15 cover on the back holes.

Take the DB15 connector and the DB15 Cover part.

Check that the connector fits well into the cover and use a cutter to go over the plastic and adapt it till the connector fits properly.

Using the soldering iron, install two M3 nuts in their traps (see next picture). We will use them later to bolt there the connector.

Solder the wires to the DB15 connector. Use heatshrink here to insulate the connections if you want to.

Note that the GND1 wire is soldered directly on the DB15 metal shield and that the Auto-levelling Probe wire is not soldered to the connector.

We recommend you to write down the DB15 pin out configuration, including the colours of the wires and where they are soldered, just for future reference.

Now install the connector on the DB15 Cover. Pull on the wires from the bottom hole of the Z Alu. tube in order to fit the wiring into the connector, the cover and the tube.

Attach the connector to the DB15 cover with two M3x8 bolts.

Attach the DB15 cover through the Leadscrew Cover and the triangle with two M3x20 bolts.

Take a plastic plug and using a cutter cut the bottom end.

Insert the plastic plug into the Leadscrew Cover hole. Lead out through the slot the Auto-levelling Probe wire (red colour in next picture)

Now we will continue with the bottom side of the wiring. Turn the framework downside again.

Note that the bottom triangle has pass-through holes and zip-tie holders to attach the wiring. You can use it to lead the wiring. Insert the cables through the holes before soldering the connectors because later will not pass through.

Now solder on the bottom end of the wires the female pin connectors needed to connect the wiring to the Ramps.

2-pin connector to the +5V/GND1 power supply lines of the Pickup Driver

2-pin female connector to the cooling fan. This fan is optional but we suggest to use it for cooling the stepper motor drivers.

Adjust the wire length of the endstop switches and solder also a 2-pin female connector to each of them.

We recommend using heatshrink to insulate all those connections.

You don't need to solder any connector to the D10 wires (Heater) because they will be installed into the D10 clamp connector of the Ramps.

Wiring the stepper motors

The three X,Y,Z NEMA 17 motors usually come with four wires long enough to connect them directly to the Ramps. Otherwise you will need to increase their length with a joint.

Check the stepper motor wiring configuration to see that the colours of the wires correspond with the coils of the motor and with the pins 2B,2A,1A,1B on the Ramps. Each stepper motor manufacturer uses different wiring colours and sometimes it is confusing.

We use Wantai 42BYGHW609 stepper motors with the following wiring colours:

Solder a 4-pin female connector to the four motor wires of each motor in the correct order.

Wiring the Auto-levelling probe

The auto-levelling system uses a probe (see top right of the wiring diagramm) which touches the fixture platform closing a circuit. It is connected to the Z-Min endstop pins and it is used during the calibration phase to measure the distance from the probe to the bed in some points. With this information the firmware automatically levels the bed while the robot is moving.

Now we are going to install the probe wiring.

We will need the following materials:

1 x Spring telephone cord or similar

1 x CAT5 o similar flexible wire (1 meter of lenght) for the Probe. We already installed this wire through the Alu. tube.

1 x One-way male connector

1 x Two-ways female pin connector

1 x 100nF ceramic capacitor

1 x crocodrille clip

First solder the one-way male connector to one end of the spring wire. Remember that we already soldered the female part to the fixture platform.

Insert the other end of the spring cable (from the top-side of the triangle to the bottom side) through the hole of the Bottom Hexagon and get it near the endstop area of the Ramps board.

Connect the male connector to the fixture platform connector.

Solder the 2-pin female connector to the other end of the wires. Don't forget to solder between the probe wire and the spring cable the 100nF ceramic capacitor. This is to avoid spurious signalling.

Then solder the crocodrille clip to the top end of the probe wire.

We will use this crocodrille clip to connect the wire to the probe. For the moment clamp it in one of the DB15 cover holes.

Connecting the Wiring

Once all the wiring is ready you can connect it to the Ramps.

First, connect the X,Y,Z stepper motor cables to the Ramps. Make sure to insert them in the correct pins: 2B,2A,1A,1B.

After that connect the endstop connectors. RAMPS has six connectors for endstops, max .and min. each for X, Y and Z. The endstop pins are grouped on the top right of RAMPS and are clearly marked endstops, X-, Y- and Z- (these are the min. endstops, the equivalent max. endstops pins aren’t marked and are between/after these). Each has three pins marked S, -, +.

Most CNC and 3D printer machines use the min. ensdtops for homing but TwinTeeth is an inverted delta robot and it uses the max. endstop connectors for it.

Connect now each endstop to the max endstop connector of each axis. The switches are connected to the S and - pins.

Warning: If you connect the endstops incorrectly you will cause a short-circuit in the Arduino. This is easily done if you plug the 2-pin plug in - and + pins instead of S and -.

AP in last picture means Auto-Levelling Probe.

Connect also the FE shielded cable in its position (GND and A3) on the Aux-1 pin area.

And connect the D11-D4 wires of the laser ToolHead to the servos pin area.

Connect the thermistor wires to the T0 pins.

Clamp the two D10 wires of the hot-end heater to the D10 connector of the Ramps.

If you are going to use the cooling fan (optional), find a position to install it and connect it also to the Ramps.

Finally check twice that all the wiring is correctly connected. This is important because if there is anything wrong you can destroy the electronics.

Wiring the Power Suply

The best power supply for TwinTeeth is probably a PC ATX power supply. TwinTeeth uses two different voltages: +12V and +5V and ATX power supplies provide both of them and enough current for all the electronics and motors.

The +12V line is used to power the Ramps, Arduino, Stepper Motors, Hot-end, etc. You have to connect these wires to the 5A-12V green clamp connector of the Ramp (see next picture).

The +5V line is used to power the Pickup Driver circuit of the Laser Toolhead. This line comes directly from the power supply. Don't power this circuit from the Arduino because you could create an overcurrent on the pins and destroy it. Also the Arduino is very noisy and it can induce that noise in the Pickup Driver which is very sensible to it.

Take care with the polarity of the power supply wires and note that there are two GND signals on the DB15 connector: one GND signal comes from the Arduino through the shielded FE cable and the other one comes directly from the power supply and is connected to the DB15 metal shield. It's important to maintain these two GND lines in order to isolate the Pickup Driver from electric noise.

You will need to adapt the PC ATX power supply before using it with TwinTeeth. Take a look at this RepRap Power Suppy Tutorial where you will find useful information about how to do it. Note that TwinTeeth will need an additional +5V line (red) that RepRap doesn't use. RepRap only uses +12V lines (yellow).

Don't use the +5V standby line (purple) instead of the +5V (red) because it is always on and only provides 10mA of current. Any of the red wires will be OK.

We recommend you to use a 4-ways connector or 2 x 2-ways connectors to easily connect/disconnect the power supply to TwinTeeth.

Warning: Don't connect the power supply now, not until you have checked that the drivers are correctly installed, the wiring is OK and the firmware installed. We will do it later when we will check that everything is ok.

Assembling the Auto-Levelling Probe

The auto bed-levelling system uses a probe that is made with a recycled marker pen and a conductive tip. It is connected to the Arduino through the crocodile clamp we installed before.

The probe closes a circuit when touching the aluminium fixture bed. In that way, the robot can take some “reference points” and know how much has to adjust the bed to level it while moving.

Now we are going to assemble the probe. You will need the following materials:

1 x Marker Pen Hexagon

1 x 9.5mm (OD) used marker pen with no ink

1 x Conductive tip

1 x Piece of 1mm cooper wire (70mm)

1 x Drop of Cyanoacrylate

For the conductive tip you can use: a tiny connector pin, a sharp multimeter test lead, a sharp cooper tip or something similar. We will solder a wire to it, so it has to be made with an easy-soldering metal.

First check that the marker pen fits well into the hexagon hole and use a 9.5mm drill bit to clear the hole if needed.

Using a metal saw cut the marker pen at approx. 45-50mm from the tip.

Then using pliers remove the ink cartridge and the tip. Clean with alcohol or acetone the rests of ink if needed.

Solder the wire to the conductive pin and introduce it through the marker tip hole. Make a loop on the other side of the wire to attach the crocodile clip.

Finally glue the tip to the marker with a drop of cyanoacrylate.

Check that it slides well through the hexagon hole.

The Auto-levelling Probe is ready.

It is very easy to use it: just clamp the crocodile clip to the bended wire and run the auto-levelling process. We will do it later.

You can also clamp the crocodile clip to any conductive tool tip if you want to. For example a drill bit installed in a mini-rotary tool.

Almost ready

After installing the wiring and the probe TwinTeeth is almost ready and it will look like in following pictures:

In next chapters we will install the software, turn TwinTeeth on for the first time and calibrate it.