AN-074: Using the MAX14914PMB with TMCM-0960-MotionPy

要約

This document introduces the usage of MAX14914PMB with the TMCM-0960-MotionPy. The MAX14914 peripheral module provides the hardware to evaluate the MAX14914 high-side/push-pull driver that operates as both an industrial digital output (DO) and an industrial digital input (DI). The functionality and the implementation in the MicroPython environment are introduced.

Introduction

The MAX14914PMB[1] provides the hardware to evaluate the MAX14914[2] high-side/push-pull driver that operates as both an industrial digital output (DO) and an industrial digital input (DI). For more information please refer to the MAX22190 product page. The MAX14914PMB can be evaluated together with the TMCM-0960-MotionPy V2.X[4]. Therefore, some basic functions have been implemented in Python to use this setup in a MicroPython environment. This document will give a brief introduction on how to start up the example and use the basic functions of the module.

Figure 1: MAX14001PMB.
Figure 1: MAX14001PMB.

Requirements

  • Set up TMCM-0960-MotionPy[4] as shown in AN061[3]
  • Terminal connection to TMCM-0960-MotionPy
  • Wire up MAX14914PMB[1]
  • 24V DC power supply

Connecting the PMOD board

There are multiple options to connect the MAX14914PMB to the TMCM-0960-MotionPy[4]. In the default configuration, the MAX14914PMB is connected to PMOD-0 connector on the TMCM-0960-MotionPy V2.X. This setup is shown in Figure 2. The corresponding pins can be found in Table 1.

Figure 2: MAX14914PMB connected to TMCM-0960-MotionPy V2.X.
Table 1. Standard wiring configuration
MAX14914PMB Pin Description
DO_SET A5 Switch control input
DO_PP  A6  Push-Pull DO or DI type select input
DI_ENA  A7 Digital input mode logic enable input 
 DIDO_LVL  A4 Open-Drain DOI level output 
 FAULT  C6 Open-Drain fault output
 OV_VDD B0  Open-Drain overvoltage Output 

Structure and functions

The chip is addressed directly by driving the corresponding pins. For ease of use some functions have been implemented in the max14914.py[5] Use the functions to setIOMode(mode), setPPMode(mode) and setDO(state) to set the pins. To read out the module the functions getDIDO_LVL(), getFault() and getOV_VDD() are provided. These functions should be self explanatory have a look at their annotation.

Running the examples

To start you can try the two provided examples max14914pmb_input.py[6] and max14914pmb_output.py[6]. The example max14914pmb_input.py[6] will configure the module as input and reads out the current state. Start by connecting the MAX14914PMB to the MotionPy board. Wire up a power supply and load to the MAX14914PMB terminal. Connect the MotionPy to your PC and start a terminal connection. If you connected the MAX14914PMB to PMOD-0 on TMCM-0960-MotionPy you can simply run the script. Otherwise, open the example script and edit the configuration. You can start the example script with the command:

exec ( open (" PyTrinamicMicro / platforms / motionpy2 / examples / modules / max /
,→ max14914pmb_input .py") . read () )

The script should now print the readout of the input in the following structure to the terminal.

Input state : x ; Fault state : x ; OV_VDD : x

The second example max14914pmb_output.py[6] demonstrates the MAX14914PMB as a digital output. The script configures the module as output and toggles the state periodically. Start by setting up your MAX14914PMB together with your MotionPy as before. You can start the example script with the command:

exec ( open (" PyTrinamicMicro / platforms / motionpy2 / examples / modules / max /
,→ max14914pmb_output .py") . read () )

The output of the module should now switch on and off. In the terminal, you should find the current state in the following structure.

Output state : x ; Fault state : x ; OV_VDD : x

Have fun exploring the features of MAX14914PMB and feel free to modify and extend the scripts.

参考資料

[1] MAX14914PMB product page: www.maximintegrated.com/en/products/power/mosfet-drivers-controllers/MAX14914PMB.html

[2] MAX14914 product page: www.maximintegrated.com/en/products/power/mosfet-drivers-controllers/MAX14914.html

[3] Application Note AN061-TMCM_0960_Module: www.trinamic.com/products/modules/details/tmcm-0960-motionpy/

[4] TMCM-0960-MotionPy product page: www.trinamic.com/products/modules/details/tmcm-0960-motionpy/

[5] Path to max14914.py: PyTrinamicMicro/platforms/motionpy2/modules/max/max14914.py

[6] Path to max14914pmb_input.py: PyTrinamicMicro/platforms/motionpy2/examples/modules/max/max14914pmb_input.py

[7] Path to max14914pmb_output.py: PyTrinamicMicro/platforms/motionpy2/examples/modules/max/max14914pmb_output.py