Trinamic TMCM-0960-MotionPy User manual

MicroPython SBC for Test, Dev, and Lab Automation MICROPYTHON SBC
TMCM-0960-MotionPy
Document Revision V1.00 •2020-10-23
The TMCM-0960-MotionPy board is a single board computer running MicroPython. It comes with
several communication interface options like CAN, RS485, UART, and separate GPIO headers. With
a wide supply voltage range of +6...+50V and industrial Fieldbus interfaces it is the engineers’swiss-
army-knife for small automation applications.
Features
•Board supply voltage: +6V to +50V
•
Screw terminals and standard con-
nectors
•CAN, RS485, UART Interfaces
•
Connectors and headers for GPIOs
•
CAD design files available for down-
load on www.trinamic.com
•
Software projects available on Github:
www.github.com
Applications
•Laboratory Automation
•Drives
•Semiconductor Handling
•Robotics
•Factory Automation
Simplified Block Diagram
©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at: www.trinamic.com
Read entire documentation.

TMCM-0960-MotionPy •Document Revision V1.00 •2020-10-23 2 / 11
Contents
1 Getting Started 3
2 Connectors and LEDs 4
2.1 Power supply and Communication Interface Connector ....................... 5
2.2 GPIO Connectors .............................................. 6
2.3 Evaluation Board LEDs and Switches ................................... 8
2.4 Safe Mode .................................................. 9
2.5 Reset to Factory Default .......................................... 9
3 Evaluation Board Design Files 10
4 Software and Firmware Information 10
5 Revision History 11
5.1 Document Revision ............................................. 11
©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com

TMCM-0960-MotionPy •Document Revision V1.00 •2020-10-23 3 / 11
1 Getting Started
You need
•TMCM-0960-MotionPy
•
Regulated Power Supply for nominal +24
VDC
•Latest TMCL-IDE
•
For TMCL and CAN firmware versions:
USB-2-RS485 adapter or CAN adapters
Precautions
•
Do not mix up signals or short-circuit pins.
•
Do not exceed the maximum rated supply
supply voltage!
•Start with power supply off!
Figure 1: TMCM-0960-MotionPy Evaluation board
NOTICE
Both supplies (motor supply and logic supply) must be connected. They can be
driven by the same source.
©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com

TMCM-0960-MotionPy •Document Revision V1.00 •2020-10-23 4 / 11
2 Connectors and LEDs
Figure 5top view of the TMCM-0960-MotionPy shows the main connector JST-PH with Power input (+Vcc)
and UART, RS485, CAN communication interfaces (marked light blue), GPIO signal pin headers (marked
green, red, pink) and Realtime Clock power source (+Vbat) 2pin header (marked gray).
Figure 2: Top view of TMCM-0960-MotionPy
Each connector has a small individual signal name marked in the silkscreen of the board , right next to the
respective connectors’pin.
©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com

TMCM-0960-MotionPy •Document Revision V1.00 •2020-10-23 5 / 11
2.1 Power supply and Communication Interface Connector
Connector Types and Mating Connectors
Connector Connector type on-board Mating connector type
Power/Comms
JST B8B-PH-K-S
(JST PH series, 8pins, 2mm pitch)
Connector housing: JST PHR-8
Contacts: JST SPH-002T-P0.5S
Wire: 0.22mm2, AWG 24
USB-C USB-C female connector USB-C male connector
Table 1: Connector Types and Mating Connectors of the TMCM-0960-MotionPy
Figure 3: Power/Communication and USB-C connectors of TMCM-0960-MotionPy
Power/Communication Connector Pin Assignment
Pin no. Pin name Level Description
1 GND Power (GND) Supply and signal ground connection
2 +Vcc Supply Supply voltage input (+6V to +50 VDC)
3 UART TX +3.3 VDC Serial comm. transmitting signal
4 UART RX +3.3 VDC Serial comm. receiving signal
5 RS485+ +3.3 VDC Bidirectional diff. RS485 bus signal (non-inverting)
6 RS485- +3.3 VDC Bidirectional diff. RS485 bus signal (inverting)
7 CAN_H +3.3 VDC Bidirectional diff. CAN bus signal (non-inverting)
8 CAN_L +3.3 VDC Bidirectional diff. CAN bus signal (inverting)
Table 2: TMCM-0960-MotionPy Power supply and Communication Interface connector pin assignment
NOTICE Always keep the power supply voltage below the upper limit of 50V!
Oth-
erwise the driver electronics will be seriously damaged. Especially, when the
selected operating voltage is near the upper limit a regulated power supply is
highly recommended.
©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com

TMCM-0960-MotionPy •Document Revision V1.00 •2020-10-23 6 / 11
2.2 GPIO Connectors
The TMCM-0960-MotionPy offers three separated input/output headers, directly connected to the MCU
(STM32F405RGT6). On the left side of the board, from 2x5pin header (green) - direct SPIand serial
interfaces, plus three GPIO options. On the right side of the board, from two 1x4pin headers (pink / red) -
MCU direct reset and boot, plus software-set digital input/output and clock signals. In addition, from the
1x2pin header - Supply for the MCU Real-Time Clock.
Figure 4: GPIO connectors of TMCM-0960-MotionPy
Please check the online available design files and schematic data for additional information on the
connectors’signal connections and pinning.
2x5pin GPIO Header (Green) Pin Assignment
Pin no. Pin name Level Description
1 GND Power (GND) Common system supply and signal ground
2 SPISCK +3.3 VDC SPI Interface Serial Clock
3 UART TX +3.3 VDC UART General Serial Output
4 SPIMISO +3.3 VDC SPI Interface Master In Slave Out
5 UART RX +3.3 VDC UART General Serial Input (Pull-down)
6 SPIMOSI+3.3 VDC SPI Interface Master Out Slave In
7 GPIO (PC0) +3.3 VDC MCU GPIO PC0 pin
8 GPIO (PA4) +3.3 VDC MCU GPIO PA4 pin
9 GPIO (PC1) +3.3 VDC MCU GPIO PC1 pin
10 +3.3V +3.3 VDC Common on-board +3.3V supply level
Table 3: 2x5pin GPIO Header (Green) Pin Assignment
©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com

TMCM-0960-MotionPy •Document Revision V1.00 •2020-10-23 7 / 11
1x4pin Header (Pink) Pin Assignment
Pin no. Pin name Level Description
1 GND Power (GND) Common system supply and signal ground
2 NRST +3.3 VDC MCU NRST pin7 - MCU Reset signal
(Activated through button SW101)
3 BOOT0 +3.3 VDC MCU BOOT0 pin60 - MCU Boot signal (Pull-down)
4 +3.3V +3.3 VDC Common on-board +3.3V supply level
Table 4: 1x4pin Header (Pink) Pin Assignment
1x4pin Header (Red) Pin Assignment
Pin no. Pin name Level Description
1 +3.3V +3.3 VDC Common on-board +3.3V supply level
2 SWDIO +3.3 VDC Software programmable GPIO (Green LED)
3 SWDCLK +3.3 VDC Software programmable CLK (Red LED)
4 GND Power (GND) Common system supply and signal ground
Table 5: 1x4pin Header (Red) Pin Assignment
1x2pin RTC Header (Gray) Pin Assignment
Pin no. Pin name Level Description
1 GND Power (GND) Common system supply and signal ground
2 +Vbat +1.65...+3.3 VDC MCU VBAT pin1
Supply for Real-Time Clock (RTC)
Table 6: 1x2pin RTC Header (Gray) Pin Assignment
©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com

TMCM-0960-MotionPy •Document Revision V1.00 •2020-10-23 8 / 11
2.3 Evaluation Board LEDs and Switches
Figure 5: Switches and LEDs of TMCM-0960-MotionPy
Switches
Switch Description
SWDIO Software defined; special function - USR Switch (chapter 2.4)
NRST Board reset
S1PC3 Software defined; connected to MCU
S2PC2 Software defined; connected to MCU
Table 7: TMCM-0960-MotionPy Switches
LED Description
LEDR2 White LED - Software defined; connected to MCU
LEDG2 Blue LED - Software defined; connected to MCU
SWDCLK
Green LED - Software defined; connected to 1x4pin Header
(Red) pin 3 and MCU
SWDIO
Red LED - Software defined; connected to 1x4pin Header (Red)
pin 2 and MCU
Table 8: TMCM-0960-MotionPy LEDs
©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com

TMCM-0960-MotionPy •Document Revision V1.00 •2020-10-23 9 / 11
2.4 Safe Mode
To enter safe mode, do the following steps:
1. Connect the board with USB, so it powers up.
2. Hold down the USR switch (SWDIO switch).
3. While still holding down USR, press and release the NRST switch.
4. The LEDs will then cycle red to blue to red+blue and back again.
5. Keep holding down USR until only the red LED is lit, and then let go of the USR switch.
6. The red LED should flash quickly 4 times, and then turn off.
7. You are now in safe mode.
In safe mode, the boot.py and main.py files are not executed, and so the MotionPy board boots up with
default settings. This means you now have access to the filesystem (the USB drive should appear), and you
can edit boot.py and main.py to fix any problems. Entering safe mode is temporary, and does not make
any changes to the files on the pyboard.
2.5 Reset to Factory Default
The SWD connector can also be used to reset the Evaluation board to factory default settings. This is
useful for example when the RS485 and/or CAN bit rate and ID settings of the board are not known. Do
the following things to perform a reset to factory default settings:
1. Switch offthe supply power.
2. Link together the pins CLK and DIO of the 1x4pin Header (Red) (using a jumper).
3. Switch on the supply power.
4. Wait until the MCU status and error LED flash alternating.
5. Switch offthe supply power.
6. Remove the link between the CLK and the DIO pin.
7. Switch on again. The module now runs with factory default settings.
©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com

TMCM-0960-MotionPy •Document Revision V1.00 •2020-10-23 10 / 11
3 Evaluation Board Design Files
All design files for the base board are available for free. We offer the original ECAD files, Gerber data, the
BOM, and PDF copies.
•For the TMCM-0960-MotionPy the ECAD files are in KiCAD format.
The files are available on Trinamic’s website at https://www.trinamic.com/.
Note
Iffiles are missing on the website or something is wrong please send us a note.
4 Software and Firmware Information
Example firmware projects are available on Github: https://github.com/trinamic/PyTrinamicMicro.
©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com

TMCM-0960-MotionPy •Document Revision V1.00 •2020-10-23 11 / 11
5 Revision History
5.1 Document Revision
Version Date Author Description
1.00 2020-10-29 HH, LK, SK Initial release version.
Table 9: Document Revision
©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com
Table of contents