⚠ Under heavy construction

As of July 11, 2026, Sorter V2 is not yet in a position to be built.

The documentation that exists is incomplete. Any given page may be accurate, inaccurate, present only as an example, or badly out of date. We do not yet recommend that anyone attempt to build Sorter.

For the most live updates on our progress, join our Discord.

Electronics — Connecting the components

Connecting the components

How-to guide

Every cable between the PSU, the control board and the Orange Pi, and the socket each end goes into.

Author Daddy-O's Bricks - Bill

Contributors Spencer, Jon and BrickCycleAlice

AI-generated first draft. Written from the basically board v1.3 board files and the cable schedule, not from an actual build. The sockets and the pinouts are read from the board itself and are real. The order of the steps is not checked against a machine. One step involves mains voltage: read the page fully before you start.

Parts needed

Computer

  • 1×
  • 1×

Wire harness

For the USB hub's 24 V lead (PWR2), one of these

Barrel plug on its own two wires, one of the three plugs, screwed into the hub's terminal

  • 1×
    Three per machine, one each on PWR1, PWR2 and PWR3.
or

Lead with a barrel plug at each end, into the hub's DC jack (only if the housings are far apart)

  • 1×
    Alternative to the plug in the hub's terminal, only when the housings are mounted too far apart for that plug's lead.
  • 1×
  • 1×
    Optional. About 10 m (33 ft) for the machine, over every lead you make.

Electronics

  • 1× 1.2m

A an interchangeable alternative works (hover for what).

Tools needed

  • Multimeter
  • Clear tape and scissors, for the cable labels
  • A small screwdriver, for the hub's power terminal
  • Side cutters or wire strippers, only if the plug's two wires do not already have bare ends
  • Only if you make your own control board 24 V lead (PWR1): wire strippers and a crimp tool
  • Optional, for the sleeving: scissors and tape, or a hot knife

The PSU box, the control board housing and the Orange Pi housing are all bolted to the frame, and the cables are made or bought. This page plugs them together, and screws the USB hub's power wires into the hub. Nothing here needs a soldering iron.

Make these leads before you start. Each has a page that builds it, and the step named plugs it in.

Make the control board's 24 V lead (PWR1) before you start. One barrel plug at the PSU end and a JST-VH housing at the board end, 920 mm (36 in) of 18 AWG (0.82 mm²) pair between them. Step 1 plugs it in.

Diagram of the finished lead, left to right: a barrel plug with two short leads, red and black, each joined to the 18 AWG (0.82 mm²) pair by a butt connector, the two connectors staggered; the pair, 914 mm end to end; and two VH contacts in a two-position VHR-2 housing, red in pin 1 for +24 V and black in pin 2 for ground.
The finished control board 24 V lead (PWR1), with a moulded plug. Diagram: author not recorded.

Make the Orange Pi's 24 V lead (PWR3) before you start. A barrel plug on the buck converter's own input wires, with the converter's USB-C lead going on to the Pi. Step 7 plugs it in.

Diagram of the finished lead with a moulded plug, left to right: a barrel plug with two short leads, red and black, each joined to one of the converter's red and black input wires by a butt connector, the two connectors staggered; the converter's input wires, 100 mm (4 in) or more; the buck converter; and its own USB-C lead going to the Pi's PWR IN socket.
The finished Orange Pi 24 V lead (PWR3), with a moulded plug. Diagram: author not recorded.

Make four channel stepper leads (STP1 to STP4) before you start. Each is the motor's own lead with its Dupont plug replaced by a 4-pin JST-PH housing. Step 2 plugs them into J27, J31, J35 and J39.

A line drawing in the style of the StepperOnline cable drawing. On the left the 6-pin PHR-6 housing at the motor end, drawn to the shape in that drawing: a lane down the mating side, two blocks with a rectangular window between them, and a flange on the wire side with chamfered corners. Positions 6 at the top down to 1 at the bottom are labelled RED B-, empty, BLU A-, GRN B+, empty and BLK A+. On the right the 4-pin PHR-4 at the board end, the same outline mirrored and scaled to four positions with its flange on the wire side, positions 4 at the top down to 1 at the bottom, labelled coil B from motor 6, coil B from motor 3, coil A from motor 4 and coil A from motor 1. Four wires join them: motor 6 to PHR-4 position 4, motor 4 to position 2, motor 3 to position 3 and motor 1 to position 1, so the wires from motor positions 4 and 3 cross.
One channel stepper lead (STP1 to STP4): the motor's 6-pin housing on the left, the 4-pin board housing on the right. Diagram: author not recorded.

Make the chute stepper lead (CHU1) before you start. A 24 AWG (0.20 mm²) tail spliced onto the motor's four leads and ending in a 4-pin JST-PH housing. Step 2 plugs it into J23.

Four panels. 1: the stripped end of a motor lead, 20 AWG (0.52 mm²), and of a 24 AWG (0.20 mm²) tail. 2: one wire in each end of a clear butt splice, the insulation against the barrel and the stripped ends reaching the wire stop in the centre. 3: the splice between the two jaws of a crimping die marked 24 to 20 AWG (0.2 to 0.6 mm²), crimped one end and then the other. 4: four wires, black, green, red and blue, each with its splice at a different distance along the cable.
The splices that join the tail to the motor's leads, staggered along the chute stepper lead (CHU1). Diagram: author not recorded.

Make the chute limit switch lead (LIM1) before you start. A 610 mm (24 in) pair with two #187 push-on receptacles at the switch end and a 3-pin Dupont housing at the board end. Step 3 plugs it into J5.

Laid out on a bench: the red roller-lever switch with its three bare tabs, two insulated quick-connect receptacles already crimped onto short leads, and the stripped end of a red and black 22 AWG (0.33 mm²) pair
The switch end of the limit switch lead (LIM1): two #187 receptacles on the pair. Photo: BrickCycleAlice.

Prepare three LED strips with their cables before you start. Each lamp has a strip with a short pigtail (LED2 to LED4) ending in a barrel plug, and a board cable (LED2a to LED4a) of about 920 mm (36 in) with the matching socket and a 2-pin Dupont housing. Step 4 plugs the board cables into the LED ports.

Diagram of two cables. Cable 1, the lamp pigtail: an LED strip, a clamp-on connector, and red and black wires ending in a barrel plug. Cable 2, the board cable: a barrel socket, two staggered butt connectors on its red and black wires, and a longer cable ending in a two-pin Dupont plug that goes to the board, red in pin 1 for +V and black in the other for GND.
The two cables of one lamp: the pigtail (LED2) and the board cable (LED2a). Diagram: author not recorded.

Print and cut the cable labels before you start. One label strip for each end of every cable, on the sheet for your paper size, or as flags on a Brother label printer. Put the two labels for each cable on as you plug it in, so a repair later can tell which cable is which.

Three drawings of one cable label, here with the ID PSU1. 1: the flat strip, a rectangle with the ID at each end, a blank section between them and a dashed fold line in the middle. 2: the strip folded round a cable seen end on, the two IDs together and sticking out. 3: the same label seen from the side on a cable, with the ID reading from either side.
One cable label, flat and folded round a cable. Every ID on the sheet looks like this. Drawn from the label sheet, not from a build, by Balloon.

The PSU output pigtails (PSU1 to PSU3) are already in the PSU box. The USB hub's lead (PWR2) has no page: step 6 below connects it. Ordering the wire harness has the length and gauge of every lead.

Do not plug the mains lead (AC1) into the IEC inlet until the last step. The mains wiring inside the PSU box is finished and the box stays closed from here on, so nothing on this page goes near it, but the machine is not to see mains until every cable below is in and checked.

Every cable on this page

CableFrom, and its connectorTo, and its connector
24 V, control board (PWR1)PSU box jack, male DC barrelBoard J1, JST-VH 2-pin (make the control board's 24 V lead)
24 V, USB hub (PWR2)PSU box jack, male DC barrelHub 2-pin power terminal, bare wires (or the hub's DC jack, with a lead that has a barrel plug at each end)
24 V, Orange Pi (PWR3)PSU box jack, male DC barrelBuck converter, then USB-C into PWR IN (make the Orange Pi's 24 V lead)
Channel steppers (×4: STP1 to STP4)Board J27 (STP1, C1), J39 (STP2, C2), J31 (STP3, C3), J35 (STP4, C4), JST-PH 4-pinThe motor's own JST-PH 6-pin socket (make the channel stepper leads)
Chute stepper (CHU1)Board J23, 4-pin JST-PH (or J24 beside it, 4-pin Dupont on 2.54 mm (0.1 in) pins)The motor's flying leads, spliced to a thinner tail and crimped into a PH housing (make the chute stepper lead)
Chute limit switch (LIM1)Board J5, 3-pin Dupont, 2 positions usedTwo #187 push-on tabs on the switch (make the limit switch lead)
Camera lamps (×3: LED2a to LED4a)Board J8 / J9 / J10, 2-pin DupontBarrel socket, which takes the barrel plug on the lamp's pigtail (LED2 to LED4) (optional but recommended; without it the cable runs to the strip) (prepare the LED strip)
Ribbon to the layers (RIB1)Board J17, 16-pin IDCJ3 on the first layer board, 16-pin IDC
Ribbons between the layer boards (RIB2, one fewer than the layers)J4 on a layer board, 16-pin IDCJ3 on the next layer board down, 16-pin IDC
Door servos (one per layer)J5 on that layer's board, 3 pins on 2.54 mm (0.1 in) spacingThe servo's own lead, fixed to the servo, with a 3-pin plug
Pico to hub (USB6)Micro USB on the PicoUSB-A on the hub
Hub to Orange Pi (USB5)USB-A on the hubUP USB3.0 on the Pi
Cameras (×3: USB2 to USB4)The camera's own USB lead: USB2 on C2, USB3 on C3 (the two OV9732) and USB4 on C4 (the IMX415)USB-A on the hub

Ordering the wire harness calls the first three PWR1, PWR2 and PWR3, the steppers STP1 to STP4 and CHU1, the limit switch LIM1, the lamps LED2a to LED4a, the long ribbon RIB1 and the short ribbons between the layer boards RIB2. The door servos' own leads have no ID in the schedule. The two bought USB cables between the Pico, the hub and the Orange Pi are USB6 and USB5, and the cameras' own detachable USB leads are USB2 to USB4, each labelled at both ends.

The three 24 V leads (PWR1 to PWR3)

All three plug into the PSU box's three DC jacks, which are the same 24 V, so it does not matter which lead goes in which jack. Push each one fully home. Nothing else runs off the supply, the two cooling fans included, and there is no spare jack.

The buck converter is the only bought part of the three. The leads themselves are:

PWR1, control board
18 AWG (0.82 mm²), 920 mm (36 in). Male DC barrel plug at the PSU end, JST-VH 2-pin (VHR-2) housing at the board end. No stock cable has that pair of ends, so a vendor makes it as part of the harness order, or you can make the control board's 24 V lead yourself.
PWR2, USB hub
22 AWG (0.33 mm²), a moulded male DC barrel plug on its own short lead, with no second plug. Its two bare wires go into the hub, not into the board: step 6 shows how.
PWR3, Orange Pi
22 AWG (0.33 mm²), 150 mm (6 in), a male DC barrel plug onto the buck converter's input wires. The buck's USB-C lead is the other half of the run.

The machine needs three male barrel plugs for these three, plus, if you fit the optional LED plug and socket, one on each of the three LED pigtails (LED2 to LED4). Ordering the wire harness has a drawing of every cable in the machine, with the gauge, the length and both end connectors on it.

Every jack on the PSU box is 5.5 mm (0.217 in) x 2.1 mm (0.083 in), centre-positive. A 2.5 mm (0.098 in) plug looks the same and does not mate. Check the pin size before you buy a barrel lead.

Sleeving the leads you make (optional)

You can skip this and the machine works the same. The braided sleeving keeps the wires of each lead together as one tidy cable, protects them where they run along the frame past the moving parts, and is another way of securing the cables.

Where: over every lead you make yourself. Each helper page has the length and the step where it goes on:

The PWR2 lead to the USB hub, the USB cables (USB2 to USB6), the ribbons (RIB1, RIB2) and the servos' own leads are bought parts with no page to make them, and the PSU box pigtails (PSU1 to PSU3) stay inside the box, so none of those is sleeved. In all, about 10 m (33 ft) for the machine: one 15.2 m (50 ft) roll.

When: while you make each lead, from the cut end, before you fit the connector that goes on it. A finished plug or housing may not go through the sleeving: the 6-pin housing on a channel stepper lead is too big for it, and a 4-pin PH housing is a tight fit that has not been tried. Do not plan on adding sleeving to a finished lead. The harness drawings sleeve the four channel stepper leads (STP1 to STP4) only; sleeving the rest is a choice, not part of the drawing.

How: the same on every lead.

  1. Push the braid together lengthwise to open it: it widens as it shortens. Feed all the wires of the lead into it together, so none of them is left outside.
  2. Cut it to length with a hot knife or a soldering iron with a blade tip, so the cut melts shut. Plain scissors leave the braid fraying. With no hot tool, wrap a turn of tape around the braid where you will cut, cut through the middle of the tape with scissors, and leave the tape on.
  3. Stop the sleeving 5 to 10 mm (0.2 to 0.4 in) short of each housing or plug, so the crimped contacts and the housings can flex and the sleeving never crowds into one.
  4. Hold each end with a small piece of heat shrink or a turn of tape, so that the braid cannot creep back along the wires.

Leave the sleeving loose enough to bend. A strap that anchors a lead goes on over the sleeving: pull it tight enough to hold, but not so tight that it crushes the braid.

Through the top plate

The C-channels, the camera lamps and the cameras stand on the top plate, and the PSU box, the control board housing and the Orange Pi housing are bolted to the hex frame below it. Ten leads start on the plate and have to come down through it, into the plate's five cable holes (the C holes on the top interface's hole map):

  • The four channel stepper leads (`STP1` to `STP4`), one from each channel's motor.
  • The three lamp board cables (`LED2a` to `LED4a`), from the plug on each lamp's pigtail.
  • The three camera USB leads (`USB2` to `USB4`).

Every other lead on this page starts below the plate, so none of them goes through it. The chute stepper, the limit switch and the ribbon (RIB1) are all under the plate already.

Which hole takes which lead is not settled. The plate was cut before the layout-guide arrangement of the C-channels, and the parts calculator lists it as due to change: new holes for the layout guides, and the cable holes moved to suit. Until that is decided, use the cable holes the plate you have already has.

Securing the cables

Fasten the leads to the frame with hook-and-loop (Velcro) straps rather than zip ties, wherever a lead may have to come undone. You will take the machine apart again, from the electronics layer up, and a zip tie has to be cut each time, which is slow when the bucket is loaded and the feeder is bolted down.

  • This covers the motor leads too. Strap the four channel stepper leads (STP1 to STP4) and the chute stepper lead (CHU1) to the frame, and the same for the camera, LED, limit switch, USB and ribbon cables and the 24 V leads, anything that runs along the frame and may need to come loose.
  • Leave a little slack at every connector and splice, so that nothing pulls on the thin wire when a part moves or you lift a box.
  • Do not make it neat yet. Run the machine for a good while first, and tidy once you know where the leads sit. The chute sweeps all the way round the machine, so check that no lead is in a spot where something that moves can catch on it.

Labelling the cables

Put a label with the cable's ID (STP1, PWR2, RIB1 and so on) on both ends of every cable, close to the connector, as you plug it in. The chute stepper (CHU1) needs one at its board end only. The printable sheets, the Brother label printer files and the folding steps are on Labelling the cables.

The control board, socket by socket

Steps 1 to 5 plug into this board, and step 5 goes on from it to the layer boards, which have their own drawing there. It is drawn from above, the way you look at it once the housing is open.

TMC2209 TMC2209 TMC2209 TMC2209 TMC2209 Pico micro USB J5 · HALL_SW_0 chute limit switch J6 · HALL_SW_1 second switch input, spare J8 · LED_0_1 J9 · LED_0_2 both switched by GPIO 1 J10 · LED_1_1 J11 · LED_1_2 both switched by GPIO 6 J39 / J40 C-channel 2 rotor J17 · 16-pin ribbon (RIB1) down to the layer boards J12 · unused PWM J1 · 24 V in JST-VH, pin 1 = +24 V J23 · JST-PH chute stepper J27 · JST-PH C-channel 1 rotor J31 · JST-PH C-channel 3 rotor J35 · JST-PH 4th channel rotor Dashed outlines are parts already on the board. J24 / J28 / J32 / J36 carry the same stepper signals on 2.54 mm (0.1 in) pins.
basically board v1.3 from above. Red outlines are the sockets a cable plugs into on this page; the parts already fitted to the board are dashed.

The housing's openings reach the sockets along the edges of the board. If one of the sockets below will not reach with the cover on, take out the four countersunk screws, lift the cover, plug the cable in, and put the cover back. See Control board housing, step 6.

Step 1 Plug 24 V into the control board (PWR1)

The board's power input is J1, the big 2-pin socket in one corner of the board. It is the only connector of that size on the board, and the plug only goes in one way up. Pin 1 is +24 V and pin 2 is ground, and both are fused on the board. The board prints 24V beside pin 1 and GND beside pin 2: the red wire goes on the 24V side.

Step 2 Plug in the five stepper cables (STP1 to STP4, CHU1)

Each stepper has its own socket, and the socket decides which motor the software is driving. Plug them in as below.

SocketPrinted beside itThe motor that goes on itCable end
J23Stepper_A2Chute stepperJST-PH 4-pin (CHU1), built on the motor's bare leads (a 4-pin Dupont housing goes on J24 beside it instead): make the chute stepper lead
J27Stepper_A3C-channel 1 rotorJST-PH 4-pin, STP1
J31Stepper_A4C-channel 3 rotorJST-PH 4-pin, STP3
J35Stepper_A5Classification channel rotor (the software calls it the carousel)JST-PH 4-pin, STP4
J39Stepper_A6C-channel 2 rotorJST-PH 4-pin, STP2

On every stepper socket, pin 1 is the one on the square pad and carries A2; the PH sockets and the 2.54 mm (0.1 in) pins both put it at the same end. A PH housing is keyed and only plugs in one way round, so its position 1 is the end that goes over the square pad. A Dupont housing has no key, so go by the pad. The chute stepper lead (CHU1) page has the drawing.

Every socket has a row of 2.54 mm (0.1 in) pins beside it carrying the same signals, so a cable with a Dupont end goes on those instead: J24 beside J23, J28 beside J27, and so on, with each pin's coil name printed beside it so you can read them off the board rather than counting positions. Stepper_A6 is on the far side of the board on its own; the other four are in a row along one edge. Each socket is wired to the driver printed beside it, so that driver has to carry the address for that stepper. The addresses are set in preparing the control board, step 3.

Check the coils before you plug a motor in. A stepper has two coils, two wires each, and the plug has four holes: holes 1 and 2 feed one coil, 3 and 4 the other. Put a multimeter across the wires that should be a pair. A pair reads a few ohms; two wires from different coils read open circuit. If holes 2 and 3 are the pair, pull those two contacts out of the housing and swap them, or the motor will buzz and barely turn. Full pinout and the board-side footprint: the wire harness page.

Step 3 Wire the chute limit switch (LIM1)

The switch tells the machine where the chute is. Its cable (LIM1) ends in a 3-pin Dupont housing with only two positions filled, and it goes on J5, the header the board prints HALL_SW_0. The filled positions are ground and signal, and the empty one goes over the pin the board prints 3.3V. The housing is not keyed and fits either way round, so check that before you push it on: the limit switch lead shows it.

At the switch end, push the two #187 tabs onto the switch's COM and NC terminals. The switch has three tabs and one stays empty. Wired this way the circuit is closed while the lever is free and opens when the chute presses it, which is what the machine expects. If homing runs the wrong way round later, the setting is in the software, not the wiring.

Board v1.4.1: the switch socket is different. J5 is a 2-pin latching Dupont socket printed LIMIT SWITCH, and there is no J6 and no 3.3V pin. The 3-pin housing on LIM1 does not fit it. The limit switch lead page has the 2-pin version.

Step 4 Plug in the three camera lamps

The board has four LED ports. The fan in the housing lid is already on one of them, so the three camera lamps take the other three: LED2 and LED2a on C2, LED3 and LED3a on C3, and LED4 and LED4a on the classification channel (C4). Any lamp can go on any of the three ports. Each lamp comes with a prepared LED strip and a board cable (LED2a to LED4a) of about 920 mm (36 in) of 22 AWG (0.33 mm²) with the Dupont housing on one end. The barrel plug on the strip's pigtail (LED2 to LED4) and the matching socket on the cable's other end are optional but recommended: they make maintenance easier, because the lamp's power can be disconnected close to the lamp. Without them the cable runs straight to the strip.

PortPrinted on the boardWhat goes on it
J8LED_0_1Camera lamp
J9LED_0_2Camera lamp
J10LED_1_1Camera lamp
J11LED_1_2The housing fan, fitted on the housing page

The board prints +V beside the pin on the square pad of each port and GND beside the round one. The red wire goes to +V. The Dupont housing has no key and fits either way up, but the arrow moulded on it always marks the black (ground) wire on every lead here, so push it on with the arrow end over GND.

Board v1.4.1 has three LED and fan ports, not four. They are J8 to J10, printed LED_0_1, LED_0_2 and LED_1_1. Each has a JST XA socket beside it wired to the same output (J11, J15, J14), which is an alternative plug for that port, not a fourth output. The three lamps and the fan need four.

Four ports, two switches (v1.3). J8 and J9 turn on and off together, and so do J10 and J11. So one lamp always comes on with the fan. Which lamp is on which output is picked in the software later, on the LED button for each channel.

On a v1.3 board, the solder jumper beside each of these three ports should already be bridged, from preparing the control board, step 4. If you skipped it, do it before the lamps go on: the 180 Ω resistor in each port is there for a bare LED board and only dims a strip. Boards from v1.4 have no resistor and no jumper.

Plugging one in. Push the 2-pin 2.54 mm (0.1 in) Dupont housing on the board cable (LED2a to LED4a) onto the port, red to +V, metering which pin that is first. If you fitted the plug and socket, push the lamp's barrel plug into the socket on the other end of that cable. Cable-tie the pair along whatever it runs down so it is not left hanging.

The barrel pair is optional but recommended, and it makes maintenance easier. It is the point where a lamp comes off, so the power to a lamp can be disconnected close to the lamp and the lamp unplugged without unwiring the board end. It is the same 5.5 mm (0.217 in) × 2.1 mm (0.083 in) size as a PSU output jack, so check what you are plugging into.

Then assign the output in software: Settings, the channel, the LED button, pick which output that lamp is on and set the brightness. Nothing lights until an output is assigned. The lamps' board cables are LED2a to LED4a, and their pigtails LED2 to LED4, in the cable schedule, which still draws every drop split at a barrel jack.

Step 5 Connect the layer boards: the ribbons (RIB1, RIB2) and the door servos

Every layer has a layer adapter board, and the boards are chained one after another. A long ribbon (RIB1) runs from the control board to the first board, a short ribbon (RIB2) joins each board to the one below it, and each board has its own layer's door servo plugged into it.

The ribbons between the boards and the servos are plugged in while the chute tower is built, because the sockets are hard to reach once it is in the frame. This step shows every connection, so you can plug in whatever is still loose and check the rest. What is left to do here is RIB1.

Control board basically board v1.3 J17 RIB1 long ribbon, J17 to J3 of layer 1 Layer adapter board, layer 1 top of the stack J3 · in J4 · out RIB2 short ribbon, J4 to J3 of the next board J5 · servo lead, fixed to the servo orange to PWM, red to V+, brown to GND Door servo, layer 1 MG995 Layer adapter board, layer 2 J3 · in J4 · out RIB2 short ribbon, J4 to J3 of the next board J5 · servo lead, fixed to the servo orange to PWM, red to V+, brown to GND Door servo, layer 2 MG995 Layer adapter board, layer 3 bottom of the stack J3 · in J4 · nothing plugged in J5 · servo lead, fixed to the servo orange to PWM, red to V+, brown to GND Door servo, layer 3 MG995 A three-layer machine, not to scale. Each further layer adds one board, one servo and one RIB2 ribbon.
The ribbons and the servo leads of a three-layer machine. Red outlines are the sockets a cable plugs into.

Each board has the same three sockets. They are drawn from above, the way you look at the board on the chute.

J1 J6 J2 J7 J3 J4 GND V+ PWM J3 · 16-pin ribbon, in RIB1 from the control board on the first layer, RIB2 from the board above on the rest J4 · 16-pin ribbon, out RIB2 on to J3 of the board below, nothing on the last layer J5 · servo header the door servo's own 3-pin plug, slid on from the left Dashed outlines are unused footprints with no connector fitted. Nothing plugs into them.
The layer adapter board from above. Red outlines are the sockets a cable plugs into.
SocketPrinted beside itWhat goes on itCable end
J3J3The ribbon coming in: RIB1 on the first layer's board, RIB2 from the board above on every other16-pin IDC, keyed
J4J4The ribbon going on: RIB2 to J3 of the board below. Empty on the last layer's board16-pin IDC, keyed
J5GND, V+, PWMThis layer's door servo3 pins, plug on the servo's own lead

RIB1. One flat 16-pin ribbon, 1.2 to 1.5 m (47 to 59 in), runs from J17 on the control board down to J3 on the first layer board in the chute stack. Both ends are keyed, so it only goes in one way up.

RIB2. One 300 mm (12 in) ribbon runs from J4 of each board to J3 of the board below it, so a machine with three layers has two of them. Both ends are keyed. J4 of the last board stays empty.

J3 is the way in and J4 the way out, and the board prints nothing but the two names. A board fed on J4 gets no signal at all, and every layer below it moves the wrong door.

The door servo. The servo's own lead (300 mm, 12 in) is fixed to the servo and ends in a 3-pin plug. It goes on J5, the three pins that lie flat along the board, so the plug slides on from the side away from the ribbon sockets. The board prints GND, V+ and PWM beside the pins, and the pin on the square pad is PWM. The brown wire goes to GND, the red wire to V+ and the orange wire to PWM. The pins have no key, so a plug fits either way round: go by the print and the wire colours. The control board has a J5 too, the limit switch header in step 3. This one is on the layer board.

Step 6 Power the USB hub (PWR2)

The hub has its own 2-pin screw terminal for power, on its circuit board. The two wires of the plug's lead (PWR2) go in there. Do this with the PSU box not plugged in to the mains.

  1. Plug the barrel plug into a free 24 V jack on the PSU box. Push it fully home.
  2. Find out which of the plug's two wires is the + wire. Inside the plug's barrel there is a centre contact. The outer metal sleeve is the other contact. Touch one multimeter probe to the centre contact and the other to the end of each wire in turn, with the multimeter on continuity. The wire that beeps is +. Mark it, for example with a piece of tape.
  3. If the two wires do not already have bare ends, cut off a little of the plastic from the end of each so the bare copper is long enough to go all the way into the terminal.
  4. On the hub's circuit board, find the 2-pin terminal. The board prints + and - next to it. Loosen both screws a few turns.
  5. Push the + wire into the opening marked + and the other wire into the opening marked -. Push each one in until no bare copper shows outside the terminal.
  6. Tighten both screws, then give each wire a gentle pull. If a wire moves, tighten the screw more.

The plug's own lead (PWR2), about 310 mm (12 in) with the plug, is long enough when the Orange Pi housing, which carries the hub on its roof, is bolted next to the PSU box as in the frame drawing.

If you mounted the two housings further apart and the lead does not reach, buy a ready-made lead (`PWR2`) with a 5.5 mm (0.217 in) x 2.1 mm (0.083 in) barrel plug at each end, centre contact +24 V at both ends (it is listed in the parts above as the alternative). Plug one end into the PSU box and the other into the round DC socket on the hub. The terminal stays empty, so skip points 2 to 6 of the list above.

Step 7 Plug in the USB (USB2 to USB6): the Pico, the hub, the Orange Pi and the cameras

The Orange Pi talks to the control board over USB, through the powered hub. The three cameras are on the same hub.

26-pin header debug UART HDMI TYPE-C LCD CAM PWR IN USB-C, from the 24 V to 5 V buck not the power port UP: USB 3.0 to the USB hub DOWN: USB 2.0 spare LAN wired network, optional USB 2.0 spare microSD the SorterOS card, at software setup FAN · 5 V, 2-pin see the note below 5 V on pins 2 and 4
The Orange Pi 5 from above, in the same orientation as the photo on the Orange Pi 5 page. Only the sockets this build uses are marked.
  1. Plug the buck converter's USB-C lead into the socket the board prints PWR IN. The Pi has two USB-C sockets that look the same and only the one marked PWR IN is a power input. The other is USB 3.1 and DisplayPort, with no power function. Check that the converter is putting out 5 V before it goes anywhere near the Pi, as under Check the lead on Make the Orange Pi's 24 V lead (PWR3).
  2. Run a USB cable (USB6) from the Pico's micro USB socket to any port on the hub.
  3. Run a USB cable (USB5) from the hub to the port marked UP USB3.0 on the Pi, the upper of the two stacked sockets. The hub comes with a USB-A to USB-A lead for this.
  4. Plug the three cameras into the three remaining hub ports. Each one arrives with its own detachable USB lead, separate from the cable of the lamp it sits on: the IMX415 4K module on the classification camera lamp on C4 (USB4), and the two OV9732 720p modules on the C2 (USB2) and C3 (USB3) feeder camera lamps.

That fills the hub: three cameras and the Pico, no spare port.

They have to be data cables. Many short USB cables carry power only and nothing will appear on the Pi. Use the powered hub as well: a hub running off the Pi's own power has been seen to brown the Pi out and crash it.

Step 8 Check it over, then plug it in

Before the machine sees mains:

  1. All three DC leads (PWR1 to PWR3) are in their jacks, and the PSU box is closed.
  2. At the hub's power terminal, the wire from the plug's centre contact is under +, and neither wire pulls out.
  3. Every stepper plug is fully home, and no plug is hanging on one contact.
  4. The ribbon (RIB1) goes from the board to J3 of the first layer board, and down the stack on the layer ribbons (RIB2), J4 to J3.
  5. Each layer's door servo is on J5 of its own board, the brown wire at the GND end.
  6. Nothing is resting on the fan blades.

Then plug in the mains lead (AC1) and switch the inlet switch on. The red power light on the Orange Pi comes on. The fan in the housing lid does not run yet, because the software switches it.

The finished result

Every cable between the three boxes in, and the machine switched on for the first time.

Image coming: the three enclosures bolted to the hex frame with every cable run between them, the ribbon dropping into the chute stack and the Orange Pi's red LED lit

Next: software setup, which installs SorterOS on the Orange Pi and hands off to the SorterOS section, where the control board is flashed and the setup wizard asks you which output each lamp and each stepper is on.