3.2. Connecting everything
This section explains how to connect motor power, motors, and a microcontroller to a Motoron motor controller.
Connecting terminal blocks
We generally recommend using green 3.5mm-pitch terminal blocks for the motor power and motor connections. If you have an assembled version of the Motoron, these terminal blocks come soldered to the board. Otherwise, you will need to solder them yourself. They should be soldered to the larger through holes for board power and motor outputs (GND, VIN, M1A, M1B, M2A, …).
Alternatively, if you are not going to stack multiple Motorons on top of each other, you can use blue 5mm-pitch terminal blocks, which are included in the kit versions. The 5mm-pitch terminal blocks are tall enough that it is easy to accidentally cause a short between the motor outputs of two Motorons that are plugged into each other. If you decide to use the 5mm terminal blocks, we recommend using the tabs on the side of the terminal blocks to connect them together before soldering them to the Motoron (see our video about how to install terminal blocks for more information).
Connecting motor power and motors
Motor power and motor connections for a Motoron M3S256 or M3H256 Triple Motor Controller.
The negative terminal of the motor power supply should be connected to the Motoron’s large GND pin or the smaller pins next to it. The positive terminal of the motor power supply should be connected to the Motoron’s large VIN pin or the smaller pins next to it. These GND and VIN connections are required for each Motoron in a stack of Motorons. Connecting two Motorons via stackable headers does not connect their VIN pins at all, and it does not the connect their GND pins in a way that is meant to carry the large currents involved in motor control. Note that connecting power to VIN does not power the Motoron’s microcontroller and does not cause any LEDs to turn on.
Each motor should have one lead connected to an MxA pin (M1A, M2A, or M3A) and the other lead connected to the MxB pin with the matching motor number. The Motoron’s concept of “forward” corresponds to MxA driving high while MxB drives low, so you might consider this when deciding which motor lead connects to which Motoron pin. You can also flip the wires later if you want to flip the direction of motion.
Connecting a controller
The Motoron M3S256 shield is designed to be plugged into the 1×10 and 1×8 female headers of an Arduino or Arduino-compatible board that has the shape of the Arduino Uno R3 using stackable female headers or male headers soldered to the Motoron. Similarly, the Motoron M3H256 is designed to be plugged into pins 1 through 20 of a Raspberry Pi using female headers.
Plugging the Motoron into a controller this way connects the GND, SDA, and SCL pins of both boards, allowing the controller to communicate with the Motoron via I²C. It also powers the Motoron’s microcontroller by connecting the Arduino’s IOREF or the Raspberry Pi’s 3V3 pin to the Motoron’s logic voltage.
The Motoron does not need to be connected directly to the controller: it can be connected through another board (including other Motoron boards) as long as those boards pass the GND, SCL, SDA, and logic voltage connections through.
You can also connect the Motoron to a controller board that has a different shape as long as you make the same connections. The Motoron’s GND, SCL, and SDA pins should be connected to the corresponding pins on the controller board, and the Motoron’s logic voltage (labeled IOREF or 3V3 depending on which type of Motoron you have) should be connected to the logic voltage supply of the controller board, which should be between 2.8 V and 5.5 V.
Most of the pins on the Motoron have a spacing of 0.1" and are on the same 0.1" grid, making it easy to connect the Motoron to a perf-board or breadboard.
After you have connected one Motoron to a microcontroller, you can connect other Motorons to the same microcontroller simply by stacking them above or below the first one.
Once you make the GND and logic power connections and turn on the logic power, you should see the Motoron’s yellow LED blink. The red LED will also turn on unless something is communicating with the Motoron and causing it to turn the LED off.
Powering the controller
By default, the Motoron does not supply power to the Arduino or Raspberry Pi, so you will need to power them separately. However, there are options for powering the controllers, as documented in Section 4 for the M3S256, and in Section 5 for the M3H256.