Make sure to use heat shrink for any exposed wire connections!

Insert the two breakbeam sensors into their slots at the top of the 3D printed lid.

Strip and tin the breakbeam sensors' ground and power connections. Solder their ground connections together. Then, solder their power connections together.

The JST 3-pin socket cable will plug into the servo motor. Solder the cable's ground connection to an additional wire. 

Then, solder the breakbeam's shared ground connections to this ground junction. Cover the connection with heat shrink.

Solder an additional wire to the breakbeam sensors' power wires. Cover the connection with heat shrink.

Solder the following connections to the MatrixPortal M4's pins.

  • The group's ground connection to the MatrixPortal M4's ground pin
  • The breakbeam sensors' data pin to A1
  • The JST socket's data pin to A4

For the Audio Amplifier Version, also solder:

  • The breakbeam sensors' power connection to the MatrixPortal M4's 3V pin

Additional I2S Audio Version Wiring

Prepare the speaker by cutting and stripping the wire. Solder the speaker wires to the MAX98357.

Prepare 5 wires about 12" long each by stripping the insulation. If you are using jumpers, cut off the ends first.

Solder the following connections to the MAX98357:

  • Red wire to the Vin
  • Black wire to Gnd
  • White wire to DIN
  • Blue wire to BCLK
  • Green wire to LRC
If you are having difficulty keeping the 3V wires and Ground Wires from touching, you may consider adding some hot glue as insulation.

Solder the following additional connections to the MatrixPortal's  pins.

  • The breakbeam sensors' power connection and the MAX98357's power connection to the MatrixPortal M4's 3V pin
  • The blue wire from the MAX98357's BCLK pin to A2
  • The green wire from the MAX98357's LRC pin to A3
  • The white wire from the MAX98357's DIN pin to TX

Make a longer Audio Amplifier JST 3-pin cable

If you are building the Audio Amplifier version, cut a JST 3-pin cable in half. Then, strip and tin its wires.

Solder wires to each JST end to create a longer cable. Cover all connections with heat shrink. This cable will be used for the STEMMA speaker.

This guide was first published on Nov 16, 2021. It was last updated on Feb 27, 2024.

This page (Wiring) was last updated on Nov 11, 2021.

Text editor powered by tinymce.