ADI Trinamic Blog

We transform digital information into physical motion.

 
  • Newsletter
  • Blog Ethics
  • Legal/Impressum
  • Main Website
Menu
  • Newsletter
  • Blog Ethics
  • Legal/Impressum
  • Main Website
  • TMC7300 Example Script

    Setup with the TMC7300-EVAL-KIT and DC motor

    Trinamic recently launched a new line of battery-powered motor driver chips. The TMC7300 is one of them, capable of driving 1 DC motor up to 2A, or 2 DC motors up to 2.4A (peak). In this post, I’ll show you a small example script to drive a DC motor using the TMC7300-EVAL-KIT.

    First, I assemble the Evaluation Kit by using the Eselsbrücke connector board to connect the TMC7300-EVAL board with the Landungsbrücke interface board. Second, I connect a motor to the evaluation board. Finally, I plug in the USB-C cable for direct access with my computer using the TMCL-IDE.

    With the setup complete, I can tune the TMC7300 DC driver IC and immediately see the motor’s behavior in real life, and in the graphical user interface.

    Figure 1: Screenshot on how the movement looks like

    Using the TMCL-IDE, I create a short example script that moves the DC motor as shown in figure 1. The motor PWM goes from 0% duty cycle to 30%, to 50% and back to zero. Afterwards, it shows the same values in negative direction.

    Below is the script I used.

    #module 1 COM16/USB/id1/Landungsbruecke [Landungsbruecke]
    
    CALC ADD, 1               // Add 1 to accu
    STOA 0, 0                    // Store local variable to accumulator
    
    SAP 7, 0, 0, 1          // Deactivate Standby of TMC7300
    
    Loop:
                SAP 0, 0, 30, 1     // Set duty cycle for Motor 1 to 30%
                WAIT TICKS, 0, 1000 // Wait 1 second
                SAP 0, 0, 50, 1     // Set duty cycle for Motor 1 to 50%
                WAIT TICKS, 0, 1000 // Wait 1 second
                SAP 0, 0, 30, 1     // Set duty cycle for Motor 1 to 30%
                WAIT TICKS, 0, 1000 // Wait 1 second
                SAP 0, 0, 0, 1      // Set duty cycle for Motor 1 to 0%
                WAIT TICKS, 0, 1000 // Wait 1 second
                SAP 0, 0, -30, 1        // Set duty cycle for Motor 1 to -30%
                WAIT TICKS, 0, 1000 // Wait 1 second
                SAP 0, 0, -50, 1        // Set duty cycle for Motor 1 to -50%
                WAIT TICKS, 0, 1000 // Wait 1 second
                SAP 0, 0, -30, 1        // Set duty cycle for Motor 1 to -30%
                WAIT TICKS, 0, 1000 // Wait 1 second
                SAP 0, 0, 0, 1      // Set duty cycle for Motor 1 to 0%
                WAIT TICKS, 0, 1000 // Wait 1 second
         
                CALC ADD, 1    // Add 1 to accu
                STOA   0, 0      // Store value to accumulator
                COMP 100       // <----- Amount of loops set here
                JC LE, Loop      // Jump to label Loop
    
    SAP 7, 0, 1, 1          // Activate Standby of TMC7300
    
    STOP
    

    And that’s all there is to it. For more information on the TMC7300, please visit the TMC7300 product page here.

    Share this:

    • Twitter
    • Facebook
    • LinkedIn
    • Pinterest
    • Print
    • Email

    Related

    March 10, 2020 / Lars Jaskulski / 0

    Categories: Code Snippet, DIY, Products, Projects, Tutorial

    Tags: brushed DC motors, code, code snippet, DC driver, DC motor, evaluation kit, TMC7300

    Driving a linear stage with the TMC4671 – Firmware Adaptation Additive Manufacturing in Space

    Comments are currently closed.

Recent Posts

  • Guest Blog: UBC Thunderbots
  • Guest Blog: TURAG
  • Guest Blog: School of Engineering Telecom Physics University of Strasbourg
  • Guest Blog: STAR Dresden
  • Pushing the Limits of Stepper Motor Control in 3D Printing

Social

  • View trinamic.mc’s profile on Facebook
  • View Trinamic_MC’s profile on Twitter
  • View trinamic’s profile on GitHub
  • View UC4SHA5_GAw1Wbm2T2NWpWbA’s profile on YouTube

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Newsletter

 

Info

Waterloohain 5
22769 Hamburg
+49 40 514 806 40

Tags

3D printer 3d printing arduino BLDC cDriver code code snippet coolStep drive Driver ease of use ethercat eval kit evaluation kit Field Oriented Control FOC GUI guide heliostat How-To IC linear stage motion controller motor driver open source hardware programming rtmi servo servo controller IC setup silentstepstick stealthChop stepper stepper motor stepper motor driver stepper motor driver ic stepper motors technology TMC4671 tmc5130 TMCL TMCL-IDE TRINAMIC TRINAMIC Motion Control tuning

Tag Cloud

    3D printer 3d printing arduino BLDC cDriver code code snippet coolStep drive Driver ease of use ethercat eval kit evaluation kit Field Oriented Control FOC GUI guide heliostat How-To IC linear stage motion controller motor driver open source hardware programming rtmi servo servo controller IC setup silentstepstick stealthChop stepper stepper motor stepper motor driver stepper motor driver ic stepper motors technology TMC4671 tmc5130 TMCL TMCL-IDE TRINAMIC TRINAMIC Motion Control tuning

Pages

  • Blog Ethics
  • Newsletter
  • Player Embed
  • Search Videos
  • User Videos
  • Video Category
  • Video Tag

Categories

  • Competition
  • Guest blog
  • Industry News
  • Jobs
  • Myths about Motors
  • Open Source Hardware
  • Products
  • Projects
    • DIY
    • University Projects
  • Research
  • Social
  • Software
  • technology
  • Trade Shows
  • Tutorial
    • Code Snippet
  • Uncategorized

Copyright © 2015 TRINAMIC BlogTheme created by PWT. Powered by WordPress.org

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.