Computers, Development Boards & Shields
Educational & Robotics Kits
Electronic Sensors
Motors & Controllers
Communication & Display
Electronic Components
Soldering & Lab Tools

MotorMaster Pin-Out and Quick Reference

General Usage and Operation

The Versalino MotorMaster is intended for use with Versalino Controllers, if you want to run the MotorMaster on a standard Arduino you will probably be interested in the guide for running Versalino boards on a regular Arduino.

When selecting the way to power your MotorMaster you should use a Type E Power connector (just like the connector used for the Versalino). That means that all of the battery adapters for the Versalino will work perfectly for the MotorMaster. If you choose to use an external adapter for power make sure to change the power jumper (next to the power jack) to “EXT”. Using External power greatly reduces the chance of regulator overheating, and board brown-outs on your Versalino.

If you would like to share the input power to your Versalino with the MotorMaster then you can put the jumper in the “VIN” position (shared power is recommended for 9V and under only).

The Arduino/Versalino Code

Using the MotorMaster library which can be downloaded from the following link: Download the MotorMaster library from the resources tab here. Below is just one of many examples of what you can do with the Versalino MotorMaster in your next project.

#include "MotorMaster.h"

void setup()
{
myMotorMaster.begin(A0, A1, A2, 2, 3, 4, 5, 13, 6);
//assigns the MotorMaster to a custom pin-out (feel free to be more creative)
}

void loop()
{
myMotorMaster.drive(COILA, FULLFORWARD);//Drive COILA forward
myMotorMaster.drive(COILB, FULLREVERSE);//Drive COILB in reverse
delay(5000); //for five seconds
myMotorMaster.drive(COILA, FULLSTOP);//stop both coils
myMotorMaster.drive(COILB, FULLSTOP);
delay(2500); //for 2.5 seconds
}

Pins and Purposes

PinPurposeDetails
GndCommon groundMake sure it can handle 2A
A0Trig1General Purpose Switch
A1Trig2General Purpose Switch
A2Trig3General Purpose Switch
D1IN1Controls Coil Pin 1
P1ENABLEATurns Coil pins 1 and 2 on (high) or off (low)
D2IN2Controls Coil Pin 2
P2ENABLEBTurns Coil pins 3 and 4 on (high) or off (low)
D3IN3Controls Coil Pin 3
P3IN4Controls Coil Pin 4
VddRegulated PowerControls the logic inside the H-Bridge (L298N VSS 4.5 V to 7 V)
NO PIN’Orientation Indicator PinLook at the solder points on the board for the one without a pin.
VinSupply VoltageRouted to all Coil Pins (L298N VS 2.5V to 46V @ 2A)

DC Connectors

COILA control pins.
PinLinkDetails
D1IN1Controls CoilA Pin 1
P1ENABLEATurns CoilA pins 1 and 2 on (high) or off (low)
D2IN2Controls CoilA Pin 2
COILB control pins.
PinLinkDetails
P2ENABLEBTurns CoilB pins 3 and 4 on (high) or off (low)
D3IN3Controls CoilB Pin 3
P3IN4Controls CoilB Pin 4

Stepper Connector

COILA control pins.
PinLinkDetails
D1IN1Controls CoilA Pin 1
P1ENABLEAEnsure CoilA & CoilB are always set to the same level for stepper operation
D2IN2Controls CoilA Pin 2
P2ENABLEBEnsure CoilA & CoilB are always set to the same level for stepper operation
D3IN3Controls CoilB Pin 3
P3IN4Controls CoilB Pin 4

Endstop Ports

In order to keep the MotorMaster as open and accessable as possible all the Endstop ports (Trig1 to Trig3) are wired specifically to work with the following open source Endstops The Makerbot Mechanical Endstop V1.2

EndstopV1S2

Endstop 1 / Trig1
PinPurposeDetails
VddRegulated PowerPowers the Endstop board
GndCommon ground 
GndCommon ground 
A0Trig1/Endstop1Logic pin for Endstop 1.2 Compatible port
Endstop 2 / Trig2
PinPurposeDetails
VddRegulated PowerPowers the Endstop board
GndCommon ground 
GndCommon ground 
A1Trig2/Endstop2Logic pin for Endstop 1.2 Compatible port
Endstop 3 / Trig3
PinPurposeDetails
VddRegulated PowerPowers the Endstop board
GndCommon ground 
GndCommon ground 
A2Trig3/Endstop3Logic pin for Endstop 1.2 Compatible port

The fabled Versalino Bus to Uno Bus Conversion

If you picked up the MotorMaster for a standard Arduino or any other other Microcontroller you are probably interested in getting it wired up. When it comes to Arduino compatible devices you are in luck, because the library was carefully written to allow custom pin assignments
Here is an example of Basic DC Control using the MotorMaster library with custom wiring based on the Pin-out listed earlier (Just be sure to put the Enable pins on Pulse width Modulation pin if you want anything other than off or full throttle).

Circuit Diagrams & Explanations

Below is a circuit diagram from the L298N Datasheet that does an excelent job illustrating the DC circuit C & D Correspond to IN(1 & 2 or 3 & 4) while Ven corresponds to ENABLEA or ENABLEB.
DC_L298N_HALF_CIRCUIT[1]
Below is a modified circuit diagram from the L298N Datasheet that represents the circuit as it is designed to operate a Stepper Motor The modifications were made to improve the accuracy of its MotorMaster representation.
L298N_STEPPER_CIRCUIT[1]
No comments yet.

Leave a Reply