Difference between revisions of "BarBot/Components/ControlSystem"

From Nottinghack Wiki
Jump to navigation Jump to search
 
(52 intermediate revisions by one other user not shown)
Line 2: Line 2:
  
 
===General Description===
 
===General Description===
The Barbot control system will be based on an Arduino Mega 2560 and a Raspberry Pi. Power will be from a PC ATX PSU.
+
The Barbot control system is based on an Arduino Mega 2560 and a Raspberry Pi. Power is from a PC ATX PSU.
 +
 
 +
[[File:20140730_000240_resized.jpg|none|700px|Control box - internal layout ]]
  
 
===Control box layout===
 
===Control box layout===
[[File:ControlBox.png|none|600px|Control box - internal layout (draft)]]
+
[[File:ControlBox.png|none|700px|Control box - internal layout]]
 +
 
 +
===Connector panel===
 +
[[File:ConnectorPanelLabelled.png|none|250px|Control panel with labels]]
 +
 
 +
===Fuses===
 +
[[File:ControlBoxFuses.png|none|250px|Control box - fuse layout]]  
  
===External connections===
 
 
====Platform (9 way 'D' skt)====
 
====Platform (9 way 'D' skt)====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Pin no!! Signal
+
! Pin no!! Signal!!Wire colour|| Pololu / Arduino
 
|-
 
|-
| 1 || +5V supply to platform
+
| 1 || +5V supply || Orange || PSU +5V
 
|-
 
|-
| 2 || Stepper coil A
+
| 2 || Stepper coil A || Green || Pololu
 
|-
 
|-
| 3 || Stepper coil A
+
| 3 || Stepper coil A || Purple || Pololu
 
|-
 
|-
| 4 || Stepper coil B
+
| 4 || Stepper coil B || Yellow || Pololu
 
|-
 
|-
| 5 || Stepper coil B
+
| 5 || Stepper coil B || Blue || Pololu
 
|-
 
|-
| 6 || Serial TX to platform
+
| 6 || Serial TX to platform || White/black || 14 (TX3)
 
|-
 
|-
| 7 || N/C
+
| 8 || "Glass present" signal || Grey || 15 (RX3)
 
|-
 
|-
| 8 || "Glass present" signal
+
| 9 || Ground || Black || PSU 0V
|-
 
| 9 || Ground
 
 
|}
 
|}
  
====Cherry conveyor (9 way 'D' skt)====
+
====Cherry / olive conveyor (9 way 'D' skt)====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Pin no!! Signal
+
! Pin no!! Signal!!Wire colour|| L298N (1)
 
|-
 
|-
| 1 || N/C
+
| 2 || Stepper coil A||Green|| OUT2
 
|-
 
|-
| 2 || Stepper coil A
+
| 3 || Stepper coil A||Purple|| OUT1
 
|-
 
|-
| 3 || Stepper coil A
+
| 4 || Stepper coil B || Yellow || OUT4
 
|-
 
|-
| 4 || Stepper coil B
+
| 5 || Stepper coil B || Blue || OUT3
 
|-
 
|-
| 5 || Stepper coil B
+
| 7 || IR sensor || Orange ||
 
|-
 
|-
| 6 || N/C
+
| 8 || IR LED || Grey ||
 
|-
 
|-
| 7 || IR sensor
+
| 9 || Ground || Black ||  
|-
 
| 8 || IR LED
 
|-
 
| 9 || Ground
 
 
|}
 
|}
  
Line 59: Line 60:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Pin no!! Signal
+
! Pin no!! Signal !!Wire colour !! L298N (2)
 +
|-
 +
| 2 || Motor +ve||Green || OUT1
 +
|-
 +
| 3 || Motor -ve||Purple || OUT2
 
|-
 
|-
| 1 || N/C
+
| 8 || CAM switch || White/black ||
 
|-
 
|-
| 2 || Motor
+
| 9 || Ground || Black || PSU 0V
 +
|}
 +
 
 +
====Stirrer and umbrella dropper (9 way 'D' skt)====
 +
{| class="wikitable"
 
|-
 
|-
| 3 || Motor
+
! Pin no!! Signal!! Wire colour!! L298N (3/4)
 
|-
 
|-
| 4 || N/C
+
| 1 || Umbrella dropper || Orange || OUT1 (4)
 
|-
 
|-
| 5 || N/C
+
| 6 || Umbrella dropper || Blue || OUT2 (4)
 
|-
 
|-
| 6 || N/C
+
| 2 || Motor +ve (swizzler) || Orange || OUT1 (3)
 
|-
 
|-
| 7 || N/C
+
| 3 || Motor -ve (swizzler) || Black || OUT2 (3)
 
|-
 
|-
| 8 || CAM switch
+
| 4 || Motor -ve (up/down) || Purple|| OUT3 (3)
 
|-
 
|-
| 9 || Ground
+
| 5 || Motor +ve (up/down) || White/black || OUT4 (3)
 
|}
 
|}
  
====Stirrer (9 way 'D' skt)====
+
====7 segment "days accident free" display (9 way 'D' skt)====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Pin no!! Signal
+
! Pin no!! Signal!!Wire color!!Arduino
 
|-
 
|-
| 1 || N/C
+
| 6 || Reset|| Purple ||28
 
|-
 
|-
| 2 || Motor (up/down)
+
| 7 || Clock|| White/blue ||29
 
|-
 
|-
| 3 || Motor (up/down)
+
| 9 || Ground||Black||PSU 0V
|-
+
|}
| 4 || Motor (swizzler)
+
 
|-
+
====Big Syringe (9 way 'D' skt)====
| 5 || Motor (Swizzler)
+
{| class="wikitable"
 
|-
 
|-
| 6 || N/C
+
! Pin no!! Signal!!Wire color!!BTS7960B
 
|-
 
|-
| 7 || N/C
+
| 2 || Motor +ve||Red/brown||OUT1
 
|-
 
|-
| 8 || N/C
+
| 3 || Motor -ve||Black||OUT2
|-
 
| 9 || N/C
 
 
|}
 
|}
  
====Umbrella dropper (9 way 'D' skt)====
+
====Optic servos (25 way 'D' skt)====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Pin no!! Signal
+
! Pin no!! Signal!!Wire colour||Arduino / PSU
 
|-
 
|-
| 1 || N/C
+
| 2 || Ground || Black || PSU 0V
 
|-
 
|-
| 2 || Solenoid
+
| 15 || +5V supply || Pink || PSU +5V
 
|-
 
|-
| 3 || Solenoid
+
| 3 || Servo 0 || Yellow || 40
 
|-
 
|-
| 4 || N/C
+
| 16 || Ground || Black || PSU 0V
 
|-
 
|-
| 5 || N/C
+
| 4 || +5V supply || Pink || PSU +5V
 
|-
 
|-
| 6 || N/C
+
| 17 || Servo 1 || Green || 42
 
|-
 
|-
| 7 || N/C
+
| 5 || Ground || Black || PSU 0V
 
|-
 
|-
| 8 || N/C
+
| 18 || +5V supply || Pink || PSU +5V
 
|-
 
|-
| 9 || N/C
+
| 6 || Servo 2 || Blue || 44
|}
+
|-
 
+
| 19 || Ground || Black || PSU 0V
====Big Syringe (9 way 'D' skt)====
 
{| class="wikitable"
 
 
|-
 
|-
! Pin no!! Signal
+
| 7 || +5V supply || Pink || PSU +5V
 
|-
 
|-
| 1 || N/C
+
| 20 || Servo 3 || Grey || 46
 
|-
 
|-
| 2 || Motor
+
| 8 || Ground || Black || PSU 0V
 
|-
 
|-
| 3 || Motor
+
| 21 || +5V supply || Pink || PSU +5V
 
|-
 
|-
| 4 || N/C
+
| 9 || Servo 4 || Purple || 48
 
|-
 
|-
| 5 || N/C
+
| 22 || Ground || Black || PSU 0V
 
|-
 
|-
| 6 || N/C
+
| 10 || +5V supply || Pink || PSU +5V
 
|-
 
|-
| 7 || N/C
+
| 23 || Servo 5 || Orange || 50
 
|-
 
|-
| 8 || N/C
+
| 25 || Spare / unused || White/black || 52
 
|-
 
|-
| 9 || N/C
+
| 13 || Ground || Black || PSU 0V
 
|}
 
|}
 
+
====Optic servos (25 way 'D' skt)====
+
====Mixer servos (25 way 'D' skt)====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Pin no!! Signal
+
! Pin no!! Signal!!Wire colour||Arduino / PSU
 
|-
 
|-
| 1 || +5V supply
+
| 2 || Ground || Black || PSU 0V
 
|-
 
|-
| 2 || Servo 0
+
| 15 || +5V supply || Pink || PSU +5V
 
|-
 
|-
| 3 || Ground
+
| 3 || Servo 0 || Yellow || 41
 
|-
 
|-
| 4 || +5V supply
+
| 16 || Ground || Black || PSU 0V
 
|-
 
|-
| 5 || Servo 1
+
| 4 || +5V supply || Pink || PSU +5V
 
|-
 
|-
| 6 || Ground
+
| 17 || Servo 1 || Green || 43
 
|-
 
|-
| 7 || +5V supply
+
| 5 || Ground || Black || PSU 0V
 
|-
 
|-
| 8 || Servo 2
+
| 18 || +5V supply || Pink || PSU +5V
 
|-
 
|-
| 9 || Ground
+
| 6 || Servo 2 || Blue || 45
 
|-
 
|-
| 10 || +5V supply
+
| 19 || Ground || Black || PSU 0V
 
|-
 
|-
| 11 || Servo 3
+
| 7 || +5V supply || Pink || PSU +5V
 
|-
 
|-
| 12 || Ground
+
| 20 || Servo 3 || Grey || 47
 
|-
 
|-
| 13 || +5V supply
+
| 8 || Ground || Black || PSU 0V
 
|-
 
|-
| 14 || Servo 4
+
| 21 || +5V supply || Pink || PSU +5V
 
|-
 
|-
| 15 || Ground
+
| 9 || Servo 4 || Purple || 49
 
|-
 
|-
| 16 || +5V supply
+
| 22 || Ground || Black || PSU 0V
 
|-
 
|-
| 17 || Servo 5
+
| 10 || +5V supply || Pink || PSU +5V
 
|-
 
|-
| 18 || Ground
+
| 23 || Servo 5 || Orange || 51
 
|-
 
|-
| 19 - 23 || N/C
+
| 24 || Zero limit switch || White/black || 37
 
|-
 
|-
| 24 || Makerslide zero / limit switch
+
| 12 || Ground || Black || PSU 0V
 
|-
 
|-
| 25 || Ground
+
| 25 || Emergency stop switch || White/black || 53
 +
|-
 +
| 13 || Ground || Black || PSU 0V
 
|-
 
|-
 
|}
 
|}
  
====Carbonate drinks servos (25 way 'D' skt)====
+
====Dashers (15 way 'D' skt)====
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Pin no!! Signal
+
! Pin no!! Signal !!Wire colour|| Arduino
 
|-
 
|-
| 1 || +5V supply
+
| 1 || Motor common +ve || Red/brown || PSU +5V
 
|-
 
|-
| 2 || Servo 0
+
| 2 || Motor 0 -ve || Yellow || Dasher driver 0  
 
|-
 
|-
| 3 || Ground
+
| 3 || Motor 1 -ve || Green || Dasher driver 1
 
|-
 
|-
| 4 || +5V supply
+
| 4 || Motor 2 -ve || Blue || Dasher driver 2
 
|-
 
|-
| 5 || Servo 1
+
| 5 || Cam switch 0 || Purple || 22
 
|-
 
|-
| 6 || Ground
+
| 6 || Cam switch 1 || Grey || 24
 
|-
 
|-
| 7 || +5V supply
+
| 7 || Cam switch 2 || White/black || 26
 
|-
 
|-
| 8 || Servo 2
+
| 8 || Cam switch common ground || Black || PSU 0V
 +
|}
 +
 
 +
====LEDs / bling (15 way 'D' skt)====
 +
{| class="wikitable"
 
|-
 
|-
| 9 || Ground
+
! Pin no!! Signal !! Wire colour || Arduino / PSU
 +
|-
 +
| 1 || +5V supply (Dashers) || Red || PSU +5V
 +
|-
 +
| 9 || +5V supply || Red || PSU +5V
 +
|-
 +
| 2 || +5V supply || Red || PSU +5V
 
|-
 
|-
| 10 || +5V supply  
+
| 10 || +5V supply || Red || PSU +5V
 
|-
 
|-
| 11 || Servo 3
+
| 3 || Neopixel 0 (Dashers 24+24+24 LEDs) || Yellow || 7
 
|-
 
|-
| 12 || Ground
+
| 11 || Neopixel 1 (Optics 6 LEDs) || White/purple  || 8
 
|-
 
|-
| 13 || +5V supply
+
| 4 || Neopixel 2 || Purple || 9
 
|-
 
|-
| 14 || Servo 4
+
| 12 || Neopixel 3 || Blue || 10
 
|-
 
|-
| 15 || Ground
+
| 5 || Neopixel 4 || Green || 11
 
|-
 
|-
| 16 || +5V supply
+
| 13 || Neopixel 5 || Red/blue  || 12
 
|-
 
|-
| 17 || Servo 5
+
| 14 || Ground || Blue || PSU 0V
 
|-
 
|-
| 18 || Ground
+
| 7 || Ground (Dashers) || Blue || PSU 0V
 
|-
 
|-
| 19 - 25 || N/C
+
| 15 || Ground || Blue || PSU 0V
 
|-
 
|-
 +
| 8 || Ground || Blue || PSU 0V
 
|}
 
|}
  
====Dashers (15 way 'D' skt)====
+
===Arduino Mega 2560 Connections===
{| class="wikitable"
+
{| class="wikitable sortable"
 +
|-
 +
! Signal !! Arduino pin !! pinMode !! Signal type !! Wire colour
 +
|-
 +
| Optic 0 || 40 || OUTPUT || servo || Yellow
 +
|-
 +
| Optic 1 || 42 || OUTPUT || servo || Green
 +
|-
 +
| Optic 2 || 44 || OUTPUT || servo || Blue
 +
|-
 +
| Optic 3 || 46 || OUTPUT || servo || Grey
 
|-
 
|-
! Pin no!! Signal
+
| Optic 4 || 48 || OUTPUT || servo || Purple
 
|-
 
|-
| 1 || Cam switch 0  
+
| Optic 5 || 50 || OUTPUT || servo || Orange
 +
|-
 +
| Mixer 0 || 41 || OUTPUT || servo || Yellow
 
|-
 
|-
| 2 || Cam switch 0
+
| Mixer 1 || 43 || OUTPUT || servo || Green
 
|-
 
|-
| 3 || Motor 0
+
| Mixer 2 || 45 || OUTPUT || servo || Blue
 
|-
 
|-
| 4 || Motor 0
+
| Mixer 3 || 47 || OUTPUT || servo || Grey
 
|-
 
|-
| 5 || Cam switch 1
+
| Mixer 4 || 49 || OUTPUT || servo || Purple
 
|-
 
|-
| 6 || Cam switch 1
+
| Mixer 5 || 51 || OUTPUT || servo || Orange
 
|-
 
|-
| 7 || Motor 1
+
| Dasher 0 cam switch || 22 || INPUT_PULLUP || switch to ground  || Purple
 
|-
 
|-
| 8 || Motor 1
+
| Dasher 0 driver || 23 || OUTPUT || LOW = motor off, HIGH = motor on || Green
 
|-
 
|-
| 9 || Cam switch 2
+
| Dasher 1 cam switch || 24 || INPUT_PULLUP || switch to ground || Grey
 
|-
 
|-
| 10 || Cam switch 2
+
| Dasher 1 driver || 25 || OUTPUT || LOW = motor off, HIGH = motor on || Purple
 
|-
 
|-
| 11 || Motor 2
+
| Dasher 2 cam switch || 26 || INPUT_PULLUP || switch to ground || White/black
 
|-
 
|-
| 12 || Motor 2
+
| Dasher 2 driver || 27 || OUTPUT || LOW = motor off, HIGH = motor on || White/purple
 
|-
 
|-
| 13 - 15 || N/C
+
| Cherry/olive conveyor start/stop || 38 || OUTPUT || Normally HIGH, pulse LOW for 10 msec to start, hold LOW to stop|| Yellow
|}
 
 
 
====LEDs / bling (15 way 'D' skt)====
 
{| class="wikitable"
 
 
|-
 
|-
! Pin no!! Signal
+
| Cherry/olive conveyor end sensor || 39 || INPUT_PULLUP || LOW = sensor clear, HIGH = item at end of conveyor || Orange
 
|-
 
|-
| TBC || TBC
+
| Lemon vendor start || 34 || OUTPUT|| Normally HIGH, pulse LOW for 10 msec to start || Purple
|}
 
 
 
===Arduino Mega 2560 Connections===
 
{| class="wikitable"
 
 
|-
 
|-
! Signal !! Arduino pin !! pinMode !! Signal type
+
| Stirrer start || 36 || OUTPUT || Normally HIGH, pulse LOW for 10 msec to start || Blue
 
|-
 
|-
| Optic 0 || TBC || OUTPUT || servo
+
| Umbrella dropper || 32 || OUTPUT || Normally LOW, pulse HIGH for 500 msec || Orange
 
|-
 
|-
| Optic 1 || TBC || OUTPUT || servo
+
| Big Syringe BTS7960B || 5 || OUTPUT || PWM || Yellow
 
|-
 
|-
| Optic 2 || TBC || OUTPUT || servo
+
| Big Syringe BTS7960B || 6 || OUTPUT || PWM || Purple
 
|-
 
|-
| Optic 3 || TBC || OUTPUT || servo
+
| Platform "glass present" || 15 (RX3) || INPUT_PULLUP || LOW = no glass, HIGH = glass present || Grey
 
|-
 
|-
| Optic 4 || TBC || OUTPUT || servo
+
| Platform illumination control || 14 (TX3) || OUTPUT || serial (TX to platform only) || White/black
 
|-
 
|-
| Optic 5 || TBC || OUTPUT || servo
+
| Pololu stepper driver || 2 || OUTPUT || Step || Green/yellow
|-
 
| Mixer 0 || TBC || OUTPUT || servo
 
 
|-
 
|-
| Mixer 1 || TBC || OUTPUT || servo
+
| Pololu stepper driver || 3 || OUTPUT || Direction || Yellow
 
|-
 
|-
| Mixer 2 || TBC || OUTPUT || servo
+
| Pololu stepper driver || 4 || OUTPUT || Enable || White/black
 
|-
 
|-
| Mixer 3 || TBC || OUTPUT || servo
+
| Optics 'D' type pin 25 (spare) || 52 || INPUT_PULLUP || Spare / unused || White/black
 
|-
 
|-
| Mixer 4 || TBC || OUTPUT || servo
+
| Zero limit switch || 37 || INPUT_PULLUP || LOW = at zero, HIGH = not at zero || White/blue
 
|-
 
|-
| Mixer 5 || TBC || OUTPUT || servo
+
| Emergency stop || 53 || INPUT_PULLUP || LOW = not pressed, HIGH = pressed || White/black
 
|-
 
|-
| Dasher 0 || TBC || OUTPUT || pulse low
+
| Neopixel 0 (Dashers) || 7 || OUTPUT || Neopixel serial (72 LEDs) || Yellow
 
|-
 
|-
| Dasher 1 || TBC || OUTPUT || pulse low
+
| Neopixel 1 (Optics) || 8 || OUTPUT || Neopixel serial (6 LEDs) || White/purple
 
|-
 
|-
| Dasher 2 || TBC || OUTPUT || pulse low
+
| Neopixel 2 || 9 || OUTPUT || Neopixel serial || Purple
 
|-
 
|-
| Neopixel on Dashers || TBC || OUTPUT || Neopixel serial
+
| Neopixel 3 || 10 || OUTPUT || Neopixel serial || Blue
 
|-
 
|-
| Cherry/olive conveyor || TBC || OUTPUT || pulse low
+
| Neopixel 4 || 11 || OUTPUT || Neopixel serial || Green
 
|-
 
|-
| Lemon vendor || TBC || OUTPUT|| pulse low
+
| Neopixel 5 || 12 || OUTPUT || Neopixel serial || Red/blue
 
|-
 
|-
| Stirrer || TBC || OUTPUT || pulse low
+
| Serial to RPi (via level shifter)|| 16 (TX2) || OUTPUT || serial TX || Green
 
|-
 
|-
| Umbrella dropper || TBC || OUTPUT || pulse low
+
| Serial from RPi (via level shifter) || 17 (RX2) || INPUT_PULLUP || serial RX || Blue
 
|-
 
|-
| Big Syringe || TBC || 2 x OUTPUTs || both need to support PWM
+
| 7 segment display - Reset || 28 || OUTPUT || Normally LOW, pulse HIGH to reset display to zero || Purple
 
|-
 
|-
| Platform "glass present" || TBC || INPUT_PULLUP || 0 = no glass, 1 = glass present
+
| 7 segment display - Clock || 29 || OUTPUT || Normally LOW, pulse HIGH to advance display || White/blue
 
|-
 
|-
| Platform illumination control || TBC || OUTPUT || serial (TX to platform only)
+
|}
 +
 
 +
===Raspberry Pi Connections===
 +
{| class="wikitable sortable"
 
|-
 
|-
| Pololu stepper controller || TBC || 3 x OUTPUTs || Step, Direction, Enable
+
! Signal !! RPi pin !! Wire colour
 
|-
 
|-
| Limit / zero switch || TBC || INPUT_PULLUP || 0 = platform at zero, 1 = platform not at home position
+
| +3V3 || 1 || Yellow
 
|-
 
|-
| Emergency stop || TBC || INPUT_PULLUP || 0 = switch pressed, 1 = switch not pressed
+
| +5V || 2 || Red
 
|-
 
|-
| Lighting / bling ? || ? || ? || Neopixel serial?
+
| Ground || 6 || Black
 
|-
 
|-
| Serial comms to/from Rassberry Pi || || 1 x INPUT, 1 x OUTPUT || serial (TX / RX) ||
+
| TXD (to Arduino via level shifter) || 8 || Purple
 
|-
 
|-
! Total I/O !! !! 27 x OUTPUT, 3 x INPUT_PULLUP, 1 x INPUT !! !!
+
| RXD (from Arduino via level shifter) || 10 || White/purple
 
|}
 
|}

Latest revision as of 11:49, 5 February 2019

Control System

General Description

The Barbot control system is based on an Arduino Mega 2560 and a Raspberry Pi. Power is from a PC ATX PSU.

Control box - internal layout

Control box layout

Control box - internal layout

Connector panel

Control panel with labels

Fuses

Control box - fuse layout

Platform (9 way 'D' skt)

Pin no Signal Wire colour Pololu / Arduino
1 +5V supply Orange PSU +5V
2 Stepper coil A Green Pololu
3 Stepper coil A Purple Pololu
4 Stepper coil B Yellow Pololu
5 Stepper coil B Blue Pololu
6 Serial TX to platform White/black 14 (TX3)
8 "Glass present" signal Grey 15 (RX3)
9 Ground Black PSU 0V

Cherry / olive conveyor (9 way 'D' skt)

Pin no Signal Wire colour L298N (1)
2 Stepper coil A Green OUT2
3 Stepper coil A Purple OUT1
4 Stepper coil B Yellow OUT4
5 Stepper coil B Blue OUT3
7 IR sensor Orange
8 IR LED Grey
9 Ground Black

Lemon vendor (9 way 'D' skt)

Pin no Signal Wire colour L298N (2)
2 Motor +ve Green OUT1
3 Motor -ve Purple OUT2
8 CAM switch White/black
9 Ground Black PSU 0V

Stirrer and umbrella dropper (9 way 'D' skt)

Pin no Signal Wire colour L298N (3/4)
1 Umbrella dropper Orange OUT1 (4)
6 Umbrella dropper Blue OUT2 (4)
2 Motor +ve (swizzler) Orange OUT1 (3)
3 Motor -ve (swizzler) Black OUT2 (3)
4 Motor -ve (up/down) Purple OUT3 (3)
5 Motor +ve (up/down) White/black OUT4 (3)

7 segment "days accident free" display (9 way 'D' skt)

Pin no Signal Wire color Arduino
6 Reset Purple 28
7 Clock White/blue 29
9 Ground Black PSU 0V

Big Syringe (9 way 'D' skt)

Pin no Signal Wire color BTS7960B
2 Motor +ve Red/brown OUT1
3 Motor -ve Black OUT2

Optic servos (25 way 'D' skt)

Pin no Signal Wire colour Arduino / PSU
2 Ground Black PSU 0V
15 +5V supply Pink PSU +5V
3 Servo 0 Yellow 40
16 Ground Black PSU 0V
4 +5V supply Pink PSU +5V
17 Servo 1 Green 42
5 Ground Black PSU 0V
18 +5V supply Pink PSU +5V
6 Servo 2 Blue 44
19 Ground Black PSU 0V
7 +5V supply Pink PSU +5V
20 Servo 3 Grey 46
8 Ground Black PSU 0V
21 +5V supply Pink PSU +5V
9 Servo 4 Purple 48
22 Ground Black PSU 0V
10 +5V supply Pink PSU +5V
23 Servo 5 Orange 50
25 Spare / unused White/black 52
13 Ground Black PSU 0V

Mixer servos (25 way 'D' skt)

Pin no Signal Wire colour Arduino / PSU
2 Ground Black PSU 0V
15 +5V supply Pink PSU +5V
3 Servo 0 Yellow 41
16 Ground Black PSU 0V
4 +5V supply Pink PSU +5V
17 Servo 1 Green 43
5 Ground Black PSU 0V
18 +5V supply Pink PSU +5V
6 Servo 2 Blue 45
19 Ground Black PSU 0V
7 +5V supply Pink PSU +5V
20 Servo 3 Grey 47
8 Ground Black PSU 0V
21 +5V supply Pink PSU +5V
9 Servo 4 Purple 49
22 Ground Black PSU 0V
10 +5V supply Pink PSU +5V
23 Servo 5 Orange 51
24 Zero limit switch White/black 37
12 Ground Black PSU 0V
25 Emergency stop switch White/black 53
13 Ground Black PSU 0V

Dashers (15 way 'D' skt)

Pin no Signal Wire colour Arduino
1 Motor common +ve Red/brown PSU +5V
2 Motor 0 -ve Yellow Dasher driver 0
3 Motor 1 -ve Green Dasher driver 1
4 Motor 2 -ve Blue Dasher driver 2
5 Cam switch 0 Purple 22
6 Cam switch 1 Grey 24
7 Cam switch 2 White/black 26
8 Cam switch common ground Black PSU 0V

LEDs / bling (15 way 'D' skt)

Pin no Signal Wire colour Arduino / PSU
1 +5V supply (Dashers) Red PSU +5V
9 +5V supply Red PSU +5V
2 +5V supply Red PSU +5V
10 +5V supply Red PSU +5V
3 Neopixel 0 (Dashers 24+24+24 LEDs) Yellow 7
11 Neopixel 1 (Optics 6 LEDs) White/purple 8
4 Neopixel 2 Purple 9
12 Neopixel 3 Blue 10
5 Neopixel 4 Green 11
13 Neopixel 5 Red/blue 12
14 Ground Blue PSU 0V
7 Ground (Dashers) Blue PSU 0V
15 Ground Blue PSU 0V
8 Ground Blue PSU 0V

Arduino Mega 2560 Connections

Signal Arduino pin pinMode Signal type Wire colour
Optic 0 40 OUTPUT servo Yellow
Optic 1 42 OUTPUT servo Green
Optic 2 44 OUTPUT servo Blue
Optic 3 46 OUTPUT servo Grey
Optic 4 48 OUTPUT servo Purple
Optic 5 50 OUTPUT servo Orange
Mixer 0 41 OUTPUT servo Yellow
Mixer 1 43 OUTPUT servo Green
Mixer 2 45 OUTPUT servo Blue
Mixer 3 47 OUTPUT servo Grey
Mixer 4 49 OUTPUT servo Purple
Mixer 5 51 OUTPUT servo Orange
Dasher 0 cam switch 22 INPUT_PULLUP switch to ground Purple
Dasher 0 driver 23 OUTPUT LOW = motor off, HIGH = motor on Green
Dasher 1 cam switch 24 INPUT_PULLUP switch to ground Grey
Dasher 1 driver 25 OUTPUT LOW = motor off, HIGH = motor on Purple
Dasher 2 cam switch 26 INPUT_PULLUP switch to ground White/black
Dasher 2 driver 27 OUTPUT LOW = motor off, HIGH = motor on White/purple
Cherry/olive conveyor start/stop 38 OUTPUT Normally HIGH, pulse LOW for 10 msec to start, hold LOW to stop Yellow
Cherry/olive conveyor end sensor 39 INPUT_PULLUP LOW = sensor clear, HIGH = item at end of conveyor Orange
Lemon vendor start 34 OUTPUT Normally HIGH, pulse LOW for 10 msec to start Purple
Stirrer start 36 OUTPUT Normally HIGH, pulse LOW for 10 msec to start Blue
Umbrella dropper 32 OUTPUT Normally LOW, pulse HIGH for 500 msec Orange
Big Syringe BTS7960B 5 OUTPUT PWM Yellow
Big Syringe BTS7960B 6 OUTPUT PWM Purple
Platform "glass present" 15 (RX3) INPUT_PULLUP LOW = no glass, HIGH = glass present Grey
Platform illumination control 14 (TX3) OUTPUT serial (TX to platform only) White/black
Pololu stepper driver 2 OUTPUT Step Green/yellow
Pololu stepper driver 3 OUTPUT Direction Yellow
Pololu stepper driver 4 OUTPUT Enable White/black
Optics 'D' type pin 25 (spare) 52 INPUT_PULLUP Spare / unused White/black
Zero limit switch 37 INPUT_PULLUP LOW = at zero, HIGH = not at zero White/blue
Emergency stop 53 INPUT_PULLUP LOW = not pressed, HIGH = pressed White/black
Neopixel 0 (Dashers) 7 OUTPUT Neopixel serial (72 LEDs) Yellow
Neopixel 1 (Optics) 8 OUTPUT Neopixel serial (6 LEDs) White/purple
Neopixel 2 9 OUTPUT Neopixel serial Purple
Neopixel 3 10 OUTPUT Neopixel serial Blue
Neopixel 4 11 OUTPUT Neopixel serial Green
Neopixel 5 12 OUTPUT Neopixel serial Red/blue
Serial to RPi (via level shifter) 16 (TX2) OUTPUT serial TX Green
Serial from RPi (via level shifter) 17 (RX2) INPUT_PULLUP serial RX Blue
7 segment display - Reset 28 OUTPUT Normally LOW, pulse HIGH to reset display to zero Purple
7 segment display - Clock 29 OUTPUT Normally LOW, pulse HIGH to advance display White/blue

Raspberry Pi Connections

Signal RPi pin Wire colour
+3V3 1 Yellow
+5V 2 Red
Ground 6 Black
TXD (to Arduino via level shifter) 8 Purple
RXD (from Arduino via level shifter) 10 White/purple