element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sustain The World - Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Sustain The World - Design Challenge
  • More
  • Cancel
Sustain The World - Design Challenge
Blog Sustain The World - Smart Portable Freezer #5 Relax XMC 4700+TLE94112 for Arduino
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fyaocn
  • Date Created: 7 Sep 2020 2:27 AM Date Created
  • Views 477 views
  • Likes 1 like
  • Comments 0 comments
Related
Recommended

Sustain The World - Smart Portable Freezer #5 Relax XMC 4700+TLE94112 for Arduino

fyaocn
fyaocn
7 Sep 2020

      • 1.  Description of Motor Controller  TLE94112 for Arduino
      • 2. Understand TLE94112EL
      • 3. Control with Arduino
      • 4. Next Step

1.  Description of Motor Controller  TLE94112 for Arduino

The DC motor control shield for Arduino is equipped with the TLE94112EL, a twelve-fold half-bridge driver with integrated power stages.

image

 

Key rating ,

  • Brushed DC Motor Control up to 0.9 A peak, 5.5 – 18 V normal operating input voltage, 18 – 20 V extended operating input voltage and  Maximum input voltage up to 40V (absolute max. rating)
  • Control of: Six independent bidirectional DC motors or  Eleven cascaded bidirectional DC motors
  • Motor speed control by PWM,  Three independent PWM generators, with PWM frequency: 80 Hz, 100 Hz or 200 Hz, 8-bit resolution, 0.5% duty cycle steps,
  • SPI interface for high configurability and detailed diagnosis
  • And protetion of Overtemperature, Overcurrent,  Undervoltage,  Overvoltage

Typical application can be,

image

Stacked two shield shall be configurated with following steps,

  • The Pin 10 of the Arduino Uno is used by default to control CSN (Negated Chip Select) input of the TLE94112EL, the pin 9 of the Arduino Uno can be used instead to stack two shields . In this case, the resistor R7 must be desoldered (Figure 9) and a 0 resistormust be soldered on the footprint of R8.
  • The CSN input of each TLE94112EL must be controlled individually by different microcontroller GPIOs: - The TLE94112EL of one DC Motor shield is controlled by the pin 10 (default setting), The TLE94112EL of the other DC Motor shield is controlled by the pin 9.

image

With pin definition,

image

 

 

2. Understand TLE94112EL

The TLE94112EL is a protected twelve-fold half-bridge driver designed especially for automotive motion control applications such as heating, ventilation and air conditioning (HVAC) flap DC motor control.

With the block diagram

image

Demo control of DC motor with OUT1 and OUT2,

image

As in board ,

image

 

3. Control with Arduino

Same as Smart Switch of previous blog, import the lib first, and open the sample sketch,

/*!
 * \name        basicTest
 * \author      Infineon Technologies AG
 * \copyright   2019 Infineon Technologies AG
 * \version     2.0.0
 * \brief       This example runs a basic controller test with one attached motor on the TLE94112 shield
 * \details
 * It will run the motor in forward and backward direction if the motor
 * is able to run in both directions. Otherwise it will only run in on direction.
 * Take this example as a first test when starting with this shield.
 *
 * SPDX-License-Identifier: MIT
 *
 */


#include <TLE94112-ino.hpp>
#include <TLE94112Motor-ino.hpp>
#include "SPI.h"


// Tle94112 Object on Shield 1
Tle94112Ino controller = Tle94112Ino();


// Tle94112Motor Objects on controller
Tle94112Motor motor(controller);


void setup()
{
  // Switch on communications
  Serial.begin(115200);
  while (!Serial)
  {};


  // Enable MotorController on all Shields and Motors
  // Note: Required to be done before starting to configure the motor
  // controller is set to default CS1 pin
  controller.begin();


  // Connect a motor to HB1/HB2 highside and HB3/HB4 lowside
  // With two combined halfbridges the motor can have up to 1.8 A
  // IMPORTANT connect PWM to Lowside as higside is active Free wheeling
  motor.initConnector(motor.HIGHSIDE, controller.TLE_NOPWM, controller.TLE_HB1, controller.TLE_HB2, controller.TLE_NOHB, controller.TLE_NOHB);
  motor.initConnector(motor.LOWSIDE,  controller.TLE_PWM1,  controller.TLE_HB3, controller.TLE_HB4, controller.TLE_NOHB, controller.TLE_NOHB);


  // start the motor controller
  motor.begin();


  // end the setup function
  Serial.println("Init ready");
}


void loop()
{
  // coast the motor
  motor.coast();
  delay(1000);


  // max forward/backward
  Serial.println("max forward/backward");
  motor.start(255);
  delay(1000);
  motor.coast();
  delay(1000);
  motor.start(-255);
  delay(1000);
  motor.coast();
  delay(1000);


  // ramp ripple forward/backward
  Serial.println("ramp ripple forward/backward");
  motor.start(255); // start max forward
  delay(1000);
  motor.rampSpeed(0, 5000); // ramp down to 0
  delay(1000);
  motor.start(-255); // start max backward
  delay(1000);
  motor.rampSpeed(0, 5000); // ramp down to 0
  delay(1000);


  // ramp up/down forward
  Serial.println("ramp up/down forward");
  motor.start(50); // start above 0 to allow motor to start
  motor.rampSpeed(255, 5000); // ramp up to max
  delay(1000);
  motor.rampSpeed(100, 5000); // ramp down
  delay(1000);
  motor.rampSpeed(255, 5000); // ramp up to max
  delay(1000);
  motor.rampSpeed(0, 5000); // ramp down to 0


  // ramp up/down backward
  Serial.println("ramp up/down backward");
  motor.start(50); // start above 0 to allow motor to start
  motor.rampSpeed(-255, 5000); // ramp up to min
  delay(1000);
  motor.rampSpeed(-100, 5000); // ramp up
  delay(1000);
  motor.rampSpeed(-255, 5000); // ramp up to min
  delay(1000);
  motor.rampSpeed(0, 5000); // ramp up to 0


  // ramp transient with a change in rotation direction
  Serial.println("ramp transient");
  motor.rampSpeed(-255, 1000); // ramp down to min
  delay(1000);
  motor.rampSpeed(255, 1000); // ramp up to max
  delay(1000);
  motor.rampSpeed(-255, 1000); // ramp down to min
  delay(1000);
  motor.rampSpeed(0, 1000); // ramp up to 0
  delay(1000);


  // stop and coast
  Serial.println("stop and coast");
  motor.stop(255); // stop and hold with max force
  delay(1000);
  motor.coast();
  delay(1000);
}

Build on arduino,

image

With arduino, the conrol of motor is easy, just init the motor , select pin configuration and pin control , the command sent by SPI to control DC motor on the shield . This is simple control of one motor, if more be connected, just import the lib can control it.

4. Next Step

These library can be used well, but how to use two arduino shield at the same time. That shall be further invested.

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube