4.3. Connecting a serial device

The RX, TX, and TXIN pins on the Simple Motor Controller G2 can be used to communicate with devices with logic-level (TTL) serial interfaces, such as microcontrollers or USB-to-serial adapters. The Simple Motor Controller uses 3.3V logic, but the RX and TXIN inputs 5V-tolerant, which means that the Simple Motor Controller can be used directly with a microcontroller running at 5 V as long as that microcontroller is guaranteed to read the 3.3 V signal from TX as high.

The serial pins use asynchronous, logic-level (TTL), non-inverted serial signals with 8-bit characters and one stop bit (often expressed as 8-N-1). This is the type of serial typically used by microcontroller UART modules.

Whenever connecting devices, remember to wire the grounds together, and ensure that each device is properly powered. Unpowered devices with a TTL serial port can turn on or partially on, drawing power from the serial line, which means that extra care must be taken when turning power off and on to reset the devices.

Note: You must use an inverter and level shifter such as a MAX232 or a Pololu 23201a Serial Adapter if you want to interface an RS-232 device with the Simple Motor Controller G2. Connecting an RS-232 device directly to the Simple Motor Controller G2 can permanently damage it.

All you need to control the Simple Motor Controller G2 with a microcontroller is a connection between the microcontroller’s TTL serial transmit pin and the Simple Motor Controller G2’s RX pin. If you want to get feedback from the controller, you can connect the TX pin to the microcontroller’s TTL serial receive pin and/or connect the ERR pin to one of the microcontroller’s digital inputs. Connecting one of the microcontroller’s digital outputs to the RST pin allows the microcontroller to reset the motor controller.

The following diagram shows how multiple motor controllers can be connected to a single microcontroller UART:

Wiring diagram for controlling multiple Simple Motor Controllers with single TTL serial source, such as a microcontroller.

See Section 6.6 for more information on connecting multiple controllers on the same serial line.

Related Products

High-Power Simple Motor Controller G2 18v15 (Connectors Soldered)
High-Power Simple Motor Controller G2 18v15
High-Power Simple Motor Controller G2 24v12 (Connectors Soldered)
High-Power Simple Motor Controller G2 24v12
High-Power Simple Motor Controller G2 18v25
High-Power Simple Motor Controller G2 24v19
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Menu
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors