High Power PWM Output Interface

Module Support

The user high power PWM output interface is supported by only the Fortiq-42 modules.

Speed Modules

Speed Module Support for High Power PWM Output

Module

User High Power Output Support

Vertiq 81-08

Vertiq 40-06

Vertiq 23-06

Servo Modules

Servo Module Support for High Power PWM Output

Module

User High Power Output Support

Vertiq 81-08

Vertiq 40-06

Vertiq 23-06

Vertiq Fortiq-42

Description

Vertiq’s high power PWM output interface provides access to a PWM output driver with read/write accessibility to the frequency, duty cycle, and mode. At the hardware level, this driver is an open-drain MOSFET without an internal pull up resistor. The mode parameter determines which portion of the PWM cycle the duty cycle represents, high or low, and is dependent on your application’s hardware setup.

Frequency is described in Hz. Frequency has a minimum of 1Hz and is limited to 5000Hz.

As mentioned above, mode’s impact is hardware dependent. If, for example, you use the hardware setup described in Initial High Power PWM Output Setup and Testing with IQ Control Center , pulling up to Vpower , mode will function as follows:

With mode set to 0, setting a duty_cycle of 75 has the following output:

../_images/pwm_mode_1.png

With mode set to 1, setting a duty_cycle of 75 has the following output:

../_images/pwm_mode_2.png

Without pulling up to Vpower , mode will have the opposite impact on the duty cycle.

Usage

Initial High Power PWM Output Setup and Testing with IQ Control Center

The IQ Control Center provides the easiest way to interact with your module’s PWM peripheral. To do so:

  1. Open IQ Control Center. If you have not installed the program, please follow the instructions in Getting Started with Speed Motors Using IQ Control Center.

  2. Connect your module to IQ Control Center

  3. Select the Testing Tab on the left side:

    ../_images/control_center_testing.png
  4. Scroll down in the Testing Tab until you find PWM Output Duty Cycle

    ../_images/pwm_testing_tab.png
  5. To change a value, either type in your desired value, or use the arrows

  6. To save the value to the module click the set arrow icon arrow_pic.

  7. To test your PWM output, use the following simple circuit

    ../_images/pwm_sample_circuit.png

    By changing the PWM duty cycle, you should see the LED change intensity.

Vertiq Python API - PWM Interface

Note

Please note that the following PWM output interface testing was performed with a Fortiq-42 module. Your exact commands may change depending on the module in use.

Vertiq’s PWM interface can also be accessed through Vertiq’s Python API. Through the API you gain read/write access to the PWM parameters duty cycle, frequency, and mode. Please note, only mode and frequency are savable values. To use the API, please use the following steps:

  1. If you have never used Vertiq’s Python API, you must first set up your local computer to use the Python API using the instructions found at Getting Started with Python

  2. After completing the walkthrough, you can interact with the pwm_interface client

  3. To read a value, use the fortiq.get command. For example, to read the PWM output frequency:

    print(fortiq.get("pwm_interface", "pwm_frequency"))
    
  4. To write a value, use the fortiq.set command. For example, to set a duty cycle of 45:

    fortiq.set("pwm_interface", "duty_cycle", 45)
    
  5. To save a value, use the fortiq.save command. For example, to save the PWM mode:

    fortiq.save("pwm_interface", "pwm_mode")