How to wire your smoothieboard

= Introduction
The main goals of this guide is to provide basic electrical knowledge to beginners and to share some usefull tips and ideas of how to achieve a nice wiring for your machines.
There’s thousands of awesome builders around the world with top notch parts and genius concepts but when it come to wire it often comes down to hide everything behind some panels and place two zip ties. While it will surely work, spending a few hours organizing and optimizing your wiring is a win-win. Your machine will be safer, cleaner and even you won’t need to hide everything anymore ;). It can save you time later debugging problems or upgrading parts without rewiring them all the way.

complex-wiring.png width="500"

Electricity 101

This section is a basic summary of electricity. It will teach you how to safely wire your machine.
Basic electricity is not a really difficult domain. It’s dangerous if you don’t know what you’re doing and where is the danger. Remember that common sense is a great asset for not dying in the process.

First thing to mention is the fact that there is different electrical laws on different countries. They can be very (too) strict to irrelevant (dangerous), different units or different colors. This guide try to be as global as possible but it can’t be granted that everything apply in your country. If you have any doubts, please refer to your local rules.

[https://en.wikipedia.org/wiki/Mains_electricity (summary of wikipedia article)]

Mains electricity is the general-purpose alternating-current (AC) electric power supply of your house. The nominal voltage is 110V (Volts) for North America, Japan and a few countries or 230V for most of the rest of the world. Most of our machines runs on single phase power. They should plug into a 3 poles electrical inlet composed of the following:

L is for live, also known as hot or phase. It carries the alternate current to your house. This is the main source of danger ! You should NEVER EVER work on it while plugged. You shouldn't be able to touch exposed parts connected to L while plugged.

N is for neutral. It completes the electrical circuit remaining at a voltage in proximity to 0V. The neutral is connected to the ground (Earth), and therefore has nearly the same electrical potential as the earth. This prevents the power circuits from increasing beyond earth voltage, such as when they are struck by lightning or become otherwise charged.

Earth wire or ground (written GND, P or PE) connects the chassis of equipment to earth ground as a protection against faults (electric shock).

DC power are provided by power supply unit (PSU). Power supplies have input for the mains (L, N and PE) and a few outputs of DC voltage of a fixed value. Our machines usually use 12V or 24V PSU. %V PSU are often found for electronics. Co2 lasers have they own specific power supply.
DC power is at these voltages is not dangerous. You'll start to feel a small bite at 24V. By the way you should always work on your electrical components without power because the tiny circuit running on 3.3V isn't going to like to be touched by mistake by a 24V wire.

As seen earlier, earth is for security. In case of default, by example from an equipement, a wire breaking or a screw coming loose, conductive parts of your machine may end connected to live ! And there's no way to detect it until you (or your kids, or your pets) touch it. As we do not like surprise BBQ, there's a simple way to prevent that; earthing everything.
Here's some examples of things to earth:
- your aluminium extrusion chassis
- your 230V heated bed support
- The metalsheet enclosure of your laser

Furthermore earthing those big conductive parts will helps with static electrical discharges and prevent them to damage your brand new smoothieboard !

image http://smoothieware.org/local--files/how-to-wire/inlet_with_fuse width="200" Your house has protection. They are different accordingly to your local rules. In case of electrical default they may be too slow to react so adding a fuse on the mains of your machine is a good idea. You can buy nice inlets with integrated fuse like this one:

For bigger power, a circuit breaker is a better option as they are a quicker to react in case of problem (the fuse needs to melt).
Even quicker, the RCCB (Residual current circuit breaker) will check the currents leaving to and returning from the load and compare them. If the difference is bigger than a fixed threshold (usually 30mA), il will open.

Need help ;)

How to choose your wires

Let's start our tour in cables jungle. Here's some basic tips about how to choose them. Some simple but nonetheless important notions because cables can overheat and potentially catch fire if they are sized improperly or wear out due to improper strain relief.

Thomas Sandalerer has made a great work resuming this chapter in this video:
html <iframe width=“100%” height=“720” src=“https://www.youtube.com/embed/Ta5rP8YcYaI” frameborder=“0” allowfullscreen></iframe>
html

Not much choice here, you got to choose between solid-core and stranded wire. Both have their pros/cons:

Solid-core or single-stranded are cheaper to make, stay in shape when bent and can be used in screw terminals without using ferrules. However they will break quickly if used on moving parts as stretching and compressing cooper too many times will break it.

Stranded wire are a bit more pricey but they are flexible and therefor suitable for movements. As they don't keep their shape you'll need a little more cable management to keep everything tidy. It's also a good idea to use ferrules on them when using screw terminals to keep all the tiny wires together.
Just make sure there are actually copper, as the cheaper copper-clad-aluminum wires will break way more easily under stress and fail over time in most connectors.
Another good alternative is silicone wire, as used in electric RC cars, it’s a good bit more expensive, but is actually a perfect match for the job.

Shielded cables are surrounded by a metallic mesh providing a shield against electromagnetic interferences (EMI). They can prevent a power cable like the output of a VFD (Variable-Frequency Drive) from emitting to much noise around it. In the other hand they can provide protection against EMI to a low power data line like an USB cable.
In our case shielded cables are not required except if your run VFD controlled spindle CNC or high power laser tubes.
The shield needs to be connected to ground only in the controller end, not on actuator or captor end.
Shield mesh should not be considered and used as a grounding cable It could do it on a low power DC 3d printer but if AC mains run things in your setup, you'll better don't use it and use a wire inside the cable or a separate one for grounding.

Now that you know which type to use, we need to choose a wire size:
Wire's size (cross-section) determines how much current you can safely pass through. An under-sized wired will generate heat and isolation can melt leading to short circuit or catch fire. When I doubt, one rule: Bigger is safer !

There is different ways to speak of wire's sizes. The two mains are AWG (for American Wire Gauge) and mm2 (metric system). AWG's notation is followed by a number. Don't get confuse, a greater number indicate a smaller wire diameter and and a small number a bigger wire. You can find conversion charts between the two units online but what interest us more is how much amps each size can carry:

~ AWG ~ Maximum amps
24 0.577 A
22 0.92 A
20 1.5 A
18 2.3 A
16 3.7 A
14 5.9 A
12 9.3 A
10 15 A
8 24 A
6 37 A
~ mm2 ~ Recommended amps~ Maximum amps
0.2 A A
0.3 A A
0.5 0.5 A 1.5 A
0.75 2.5 A 5.0 A
1.0 3.0 A 10.0 A
1.5 6.0 A 15.0 A
2.5 15 A 25 A
4.0 20 A 40 A
6.0 25 A 60 A
10.0 40 A 100 A

Sources:
AWG: http://www.powerstream.com/Wire_Size.htm mm2: https://www.hoelzle.ch/technik/set_kabelquerschnitte_f.php

As a conclusion and using Thomas's video tiers:

Tier 1 - sensors, indicators, thermistors, small stepper (less than 1.5A like NEMA17) endstops, computer fans

can be wired in AWG20 or 0.5mm2

Tier 2 - Hotend Heaters, bigger motor (more than 1.5A like NEMA23), Mains of power supply, 230VAC heat pads

AWG12-18 or 1.5-2.5mm2

Tier 3 - low voltage heat pads (12-24VDC) or any amps-hungry element

AWG10 and more or 2.5mm2 and more

image http://smoothieware.org/local--files/how-to-wire/color_coding width="400" Color coding your wire is an easy way to identify them later by just looking at them. Color coding is generally ruled by electrical laws of countries. Here’s the most importants:
Brown, black or grey for Live
Light blue or white (US) for Neutral
Yellow-green for Earth

While our machines usually run at 12-24VDC, it’s a good idea to reserve at least the neutral and earth colors. Use at least a color for + and GND of your DC power

Example of common colors used in Switzerland:

  • L1 Brown
  • L3 Black
  • L3 Grey
  • N Light Blue
  • PE Yellow/Green

* Lower AC XV Red/Orange

  • Lower AC 0V White/Green

* DC+ blue/red

  • DC- white/blue
  • Analog/digital data lines White/purple/blue/red

More informations: http://www.electronicshub.org/electrical-wiring-color-codes/

Wiring supplies

In this chapter you will find usefull components used in electrical cabinet to achieve nice and clean machines.The idea is to show you what exists on the market how it's called so you can source it.
You will be able to find this items either online on shops like aliexpress, bang good, ebay ect. or locally from electrician or best cabinets builders (right term?). Again take this as an insight of how we do thing in industrial electrical engineering.

Here's a few things you can use to manage your wires and cables but also pneumatic or water hoses, filament tubes, etc.

Cable trunking

image http://smoothieware.org/local--files/how-to-wire/Wiring-Ducts.jpg height="200" image http://smoothieware.org/local--files/how-to-wire/20160402-Eustathios-3.jpg height="200" Also called cable ways, cable ducts. The slotted ones are very handy, wires can go in or out where you want. If you have a hot spot full of cables, you can cut somes parts to widthen the slot. Just cut to length and screw in place. They exist in many size of width and height, take some time to choose the right one. 20x20mm fits nicely on 2020 aluminium extrusion. Make sure to use if possible flat head screws or at least with no sharp edges who can damage your wires. The main downside is that you sometimes need to sacrifice space to place them, especially inside electrical cabinets or let's say the electronics area of your printer.

Mesh sleeves & Spiral wrap

image http://smoothieware.org/local--files/how-to-wire/mesh_sleeve.jpg height="200" image http://smoothieware.org/local--files/how-to-wire/spiral_wrap.jpg height="200" Usefull to link moving parts over short distance like extruder carriages. They are no brain to use but once in place it's not the happiest thing to have to add new wires inside.

Drag chains

image http://smoothieware.org/local--files/how-to-wire/cable_chain.jpg height="200" The holy grail for CNC routers but they fit perfectly on smaller 3d printers too. Like wire trunking they're available in many size by meter(s). Don't worry if the length is too long for your need. You can just remove some elements until you get the correct length. You will found two types, one closed, the other can be open all the way (to make you happier when adding new wires).

Terminals

2stages%20terminal.jpg height="175"

You probably know well terminals as elements on your control board where you connect your wires. I'd like to introduce another type of terminals used in industry to simplify wiring job. They have similar function as screw terminals strips: connect circuits together. Where screw terminals have only 2 connection points these industrial terminals can have up to 4 connections points and can be are multilevel to save space. They exist in different size for different wire size. Standard size is up to 2.5mm2 (awg13) but your can find smaller ones capped for 0.5 or 0.75mm2 (awg18 or 20), again to save space.

Connection points can either be spring clamps or screws. Screw tend to be the “old” way while clamp is easier, faster and less prone to wire break (screw over tightened). Screw connections require crimping ferrules on flex wires.

On the left: 2 level terminal with 3 clamp connection points on each.
image http://smoothieware.org/local--files/how-to-wire/screw_terminals.jpg height="200" image http://smoothieware.org/local--files/how-to-wire/bridge_terminals.jpg height="200"

Each terminal or terminal's stage can be bridged with its neighbours (in red on the right). Bridges can be purchased at any special length from 2 to 10 or 20. The longer is the better since you can cut them afterward.

For example, make 2 groups of bridged terminals and use each to distribute power supply + and - easily from a single place and spare you the aweful spaghetti-thing going from a component to another to another to … You can do that for every different voltage running on your machine.

Use them as wire interface between the inside and the outside of your control box. Below: internal cabinets wiring come from the bottom cable way, upper cables go to actuators, sensors, etc.
Example_01 height="615"

Crimping Connectors

Crimping connectors are a cheap and easy way to connect our electrical components. They are many types available. The most known are Dupont, Molex or the simple headers as found on arduino, etc.
20161206-smoothie_wiring.jpg width="1090"

The smoothieboard comes with a complet set of Dupont connectors for the stepper motors, endstops and thermistors. They require some dexterity to crimp and we strongly advise you to buy a cheap crimping tool on one of your favourite asian web store. It will last you a life and save a lot of time (and anger).

How to

The crimping operation is quite straight forward:
  • strip about 2mm of the wire
  • place the pin on the crimping tool, tighten a little
  • place your stripped cable inside the pin, you need to “feel” the correct depth there is two claw on the pin, one who bites the copper, the other the isolation for better protection against traction.
  • When in place finish the crimping tool mouvement.
  • You can adjust the tool to crimp more or less the pin by removing the srew and turning the dial on the side (see picture above).
    </callout>

Ressources :

=== Aviation type

The so called aviation type connectors are cheap, provide a more solid connection than Crimped connectors showed above. They too are available in many configurations depending of the number of pins and pin size. Pin needs to be soldered, make sure you have a soldering iron .These connectors make great connectors for controller enclosures, see examples at the bottom of this page.

20161206-smoothie_wiring-2.jpg width="1090"

<callout type=“success” icon=“true” title=“ Tips”>

  • Remove the really small screw to open the connector and try not to loose it by replacing it on the black part during your work inside
  • pin numbers are written on the inside and the outside of the black part so no front or back view questions.
  • since it mount from the outside of the enclosure, make sure to pass your wires trough the hole before soldering (seems logical but…no, wait and see)

Tools

Basic:

  • Wire stripper
  • Precision cutter plier
  • Cable cutter
  • Ferrules crimper
  • Soldering iron & solder
  • Screwdrivers 1 to 00
  • Multimeter
  • Lighter (poor's heat gun)
  • Zip ties
  • Heat shrinks

Optional:

  • Zip tie gun
  • Heat gun
  • Crimping tools depending connectors used

Soldering

Navigate between steps with side arrows. id=Soldering |interval=60000 |imageMain=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-5.jpg |imageMainCaption= First strip the cable at desired length and twist it. Heat your soldering iron, I mainly use it at about 350°C, clean the tip and apply some solder for better heat transmission to the wire |image01=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-6.jpg |image01Caption= Next apply the tip of the soldering iron behind the wire, near the end, then apply solder from the other side and slide both along the stripped distance. |image02=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-7.jpg |image02Caption= .. and so the solder will follow. Done ! |image03=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-9.jpg |image03Caption= Connector side: apply solder the to tip, heat the pin, and apply solder. |image04=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-10.jpg |image04Caption= Then, with soldering iron in one hand, the wire in the other, heat the pin while applying the wire, both should melt. Remove the iron and the cool. Done again !

Reminders and tips:

  • Be carefull with the iron,by picking heated parts, etc it can seriously burn your hands (or something else, with a bit of talent)
  • Don't forget to unplug the iron when you have completed your job (very bad room heating)
  • Use only lead free solder, your lungs will thank you later. Some use a small fan to vent it away.
  • Clean your solder tip frequently
  • You will quite soon feel the need of a third or a forth arm when soldering, be creative, use clamps, weight, wise, girlfriend, etc to help you.
  • Really don't forget to unplug the damn thing.
    </callout>

100%"

<callout type=“success” icon=“true” title=“ Soldering is hard …”>

… until the day you discover the magic of “flux”.

Soldering flux makes everything work much better, and takes soldering from a chore to a pleasure.

If you don't like soldering, it's probably that you just forgot to buy flux.

Simply get a bottle or a pen of flux, apply liberally, then solder as you would normally, and everything will be great.

Zip tie wire routing techniques

Nothing better than example. Here's a quick example of zip tie wiring around a terminal block (who could be your smoothie board, a PSU, stepper driver or whatever)
Navigate between steps with side arrows. For comprehension non-cutted zip ties are the last applied. I used medium zip ties for visibility. For a real project adjust the size depending of the amount of wires and their gauge.

id=ZiptieWiring |interval=60000 |imageMain=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-8.jpg |imageMainCaption= Start: A few single and multi-levels terminals |image01=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-13.jpg |image01Caption= Tools used (remove the crimping tool ;)) |image02=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-14.jpg |image02Caption= Step 1: wire a complete side of the element, cut wire long enough to go where they should end by the way you've planned and add extra length |image03=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-15.jpg |image03Caption= For the example I'll just route the wire to the other side of the terminals with a C shape and connect them here |image04=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-16.jpg |image04Caption= Step 2: Let's start by farthest wire by grouping them together. I choose to go by 2 terminals |image05=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-17.jpg |image05Caption= Step 3: Then I make a 90° angle with the first wires, the same with the seconds and zip them together |image06=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-19.jpg |image06Caption= Adding the third |image07=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-21.jpg |image07Caption= And so on ... |image08=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-22.jpg |image08Caption= ... until the end of the side. At this point this "side" is done. |image09=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-24.jpg |image09Caption= Step 4: Prepare the 90° turn. First I double the last zip tie but I don't tighten it fully to be able to move it. |image10=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-27.jpg |image10Caption= Then slide it a few cm further. Because it's barely loose, the wire shouldn't cross themselves. |image11=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-28.jpg |image11Caption= Step 5: Now make the turn at the desired angle and radius. Adjust length between inside and outside cables so everything looks smooth (!) and tighten the zip tie |image12=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-29.jpg |image12Caption= Step 6: Again to keep wires straight, double the last zip tie ... |image13=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-30.jpg |image13Caption= ... and slide it. Tighten it. |image14=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-31.jpg |image14Caption= and so on... At this point you may have wires leaving or entering the "pack", proceed as step 3 |image15=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-33.jpg |image15Caption= In my case I made a second 90° angle |image16=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-34.jpg |image16Caption= Step 7: Add a zip tie before the first leaving wire(s), connect it/them and re add a zip tie after. Repeat until the end... |image17=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-39.jpg |image17Caption= Everything is connected, almost no crossing (you'll have some at some point with more complexe wiring) |image18=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/20161206-smoothie_wiring-41.jpg |image18Caption= Underside view

Reminders and tips:

  • Always connect one side, route the wire to the other(s) end(s) nicely, then cut and connect.
  • Always add extra length of wire. It costs not so much and will save you time replacing the too short ones.
  • Don't be shy on zip ties.
  • You'll get better looking cabinets if you place all the zip ties facing the same way
  • This is an example, don't hesitate to combine zip ties with cable ways or sleeves depending yours needs.
    </callout>

= Examples

== Henrik Olsson's machine
id=OlssonExample |interval=60000 |imageMain=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/DSCF1945.JPG |image01=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/DSCF1946.JPG |image02=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/DSCF1948.JPG |image03=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/DSCF1952.JPG |image04=http://chibidibidiwah.wdfiles.com/local--files/how-to-wire/DSCF1953.JPG

===To do:
green connectors (phoenix)
examples (ask to googleplus community pictures and pick the best)
cable ways how-to (next one I'll make)
How to connect earth, locking washer
Tools pictures