infineon / multi-half-bridge Goto Github PK
View Code? Open in Web Editor NEWLibrary of Infineon's multi-half-bridge TLE94112 for Arduino, Raspberry Pi and more.
License: Other
Library of Infineon's multi-half-bridge TLE94112 for Arduino, Raspberry Pi and more.
License: Other
Hello! I see that ModusToolbox is one of the frameworks in the PAL source. However, I don't see how to reconcile the CMAKE build system of the tests, etc with the make build system of Modustoolbox. Is there an an example somewhere which shows the full instructions or build system to integrate this into a Modustoolbox project?
Thanks!
Any plans to get this driver be part of the mainline kernel?
The library works perfectly with the Infineon board XMC1100 Arduino compatible. Installing the shield on an Arduino UNO instead compilation can't happen. Investigating in the errors list I found the following messages:
C:\Users\enrico\Desktop\Arduino\libraries\TLE94112\src\TLE94112.cpp:42:13: error: 'FALSE' was not declared in this scope
mEnabled = FALSE;
C:\Users\enrico\Desktop\Arduino\libraries\TLE94112\src\TLE94112.cpp:50:13: error: 'TRUE' was not declared in this scope
mEnabled = TRUE;
C:\Users\enrico\Desktop\Arduino\libraries\TLE94112\src\TLE94112.cpp:64:13: error: 'FALSE' was not declared in this scope
mEnabled = FALSE;
[etc...]
I have added a couple of conditions defines in the library header file as shown below
#ifndef TLE94112_CONF_H
#define TLE94112_CONF_H
// PATCH START ===================================================
/*
The following two conditional define patches the compatibility of the library
with NON-Infineon boards. The boolean TRUE and FALSE (uppercase) are defined
in the Arduino IDE Infineon XMC110 library but are note recognised when
the board is set to Arduino UNO/Genuino. It is reasonable suppose that this
same issue - untested - exhists too with the other boards of the Arduino
family supported by the Arduino IDE versione 1.8.3 and further
Enrico Miglino <[email protected]>
July, 5, 2017
*/
#ifndef TRUE
#define TRUE true
#endif
#ifndef FALSE
#define FALSE false
#endif
// ================================================= PATCH END
#include "Arduino.h"
This patch has been added in the header file Arduino/libraries/TLE94112/util/tle94112_conf.h
I've followed every step (including hooking everything up) as shown by your youtube video. Running basicTest doesn't work, the 12V power supply powers the board. Too bad... quick fix I hope?
i used this library and the example with controlling 2 motor to independently control each of the 6 motors i connected with IR remote. but for each motor i have to choose controller.TLE_PWM3, controller.TLE_PWM2, or controller.TLE_PWM1. and even if i use different buttons from remote for each motor, if i used controller.TLE_PWM3 for three motors for example, when i try to change the speed of one of them, all the 3 the motors are changing their speed. i attached here the code im trying to use.
im sorry if this is not a correct request, its my first day on this site and one of my first arduino projects.
thank you!
`
#include <TLE94112.h>
#include <Tle94112Motor.h>
#include <IRremote.h>
//declaram fiecare buton folosit. de ex n21 reprezinta butonul de la care comandam alimentarea motorului 2 cu factorul de umplere 1 (50%).
#define n11 0x1
#define n21 0x2
#define n31 0x3
#define n41 0x4
#define n51 0x5
#define n61 0x6
#define n12 0x7
#define n22 0x8
#define n32 0x9
#define n42 0x22
#define n52 0x0
#define n62 0xA
#define n13 0x29
#define n23 0x2C
#define n33 0x2D
#define n43 0x2B
#define n53 0x2F
#define n63 0x2E
#define ON 0xC
#define OFF 0xD
#define sus 0x20
#define jos 0x21
//setam pinul de intrare pentru receptorul IR
int RECV_PIN = 2;
Tle94112 controller = Tle94112();
Tle94112Motor motor1(controller);
Tle94112Motor motor2(controller);
Tle94112Motor motor3(controller);
Tle94112Motor motor4(controller);
Tle94112Motor motor5(controller);
Tle94112Motor motor6(controller);
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
irrecv.enableIRIn();
controller.begin();
// Configuram semipuntile la care conectam motorul 1
//dam sensul rotatiei, poate fi schimbat prin inversarea lowside cu hiside
motor1.connect(motor1.HIGHSIDE, controller.TLE_HB1);
motor1.connect(motor1.LOWSIDE, controller.TLE_HB3);
motor1.setPwm(motor1.HIGHSIDE, controller.TLE_PWM3);
// setam frecventa pwm la 200(poate fi setata si la 100 sau 80)
motor1.setPwmFreq(motor1.HIGHSIDE, controller.TLE_FREQ200HZ);
motor2.connect(motor2.HIGHSIDE, controller.TLE_HB2);
motor2.connect(motor2.LOWSIDE, controller.TLE_HB4);
motor2.setPwm(motor2.HIGHSIDE, controller.TLE_PWM3);
motor2.setPwmFreq(motor2.HIGHSIDE, controller.TLE_FREQ200HZ);
motor3.connect(motor3.HIGHSIDE, controller.TLE_HB5);
motor3.connect(motor3.LOWSIDE, controller.TLE_HB6);
motor3.setPwm(motor3.HIGHSIDE, controller.TLE_PWM3);
motor3.setPwmFreq(motor3.HIGHSIDE, controller.TLE_FREQ200HZ);
motor4.connect(motor4.HIGHSIDE, controller.TLE_HB7);
motor4.connect(motor4.LOWSIDE, controller.TLE_HB8);
motor4.setPwm(motor4.HIGHSIDE, controller.TLE_PWM1);
motor4.setPwmFreq(motor4.HIGHSIDE, controller.TLE_FREQ200HZ);
motor5.connect(motor5.HIGHSIDE, controller.TLE_HB11);
motor5.connect(motor5.LOWSIDE, controller.TLE_HB12);
motor5.setPwm(motor5.HIGHSIDE, controller.TLE_PWM1);
motor5.setPwmFreq(motor5.HIGHSIDE, controller.TLE_FREQ200HZ);
motor6.connect(motor6.HIGHSIDE, controller.TLE_HB10);
motor6.connect(motor6.LOWSIDE, controller.TLE_HB9);
motor6.setPwm(motor6.HIGHSIDE, controller.TLE_PWM1);
motor6.setPwmFreq(motor6.HIGHSIDE, controller.TLE_FREQ200HZ);
motor1.begin();
motor2.begin();
motor3.begin();
motor4.begin();
motor5.begin();
motor6.begin();
}
void loop()
{
//citirea codurilor de la telecomanda
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume();
//functionarea motoarelor
if (results.value == n11)
{
motor1.start(63);}
if (results.value == n12)
{
motor1.start(255);}
if (results.value == n13)
{
motor1.start(0);
}
if (results.value == n21)
{
motor2.start(63);
}
if (results.value == n22)
{
motor2.start(255);
}
if (results.value == n23)
{
motor2.start(0);
}
if (results.value == n31)
{
motor3.start(63);
}
if (results.value == n32)
{
motor3.start(255);
}
if (results.value == n33)
{
motor3.start(0);
}
if (results.value == n41)
{
motor4.start(63);
}
if (results.value == n42)
{
motor4.start(255);
}
if (results.value == n43)
{
motor4.start(0);
}
if (results.value == n51)
{
motor5.start(63);
}
if (results.value == n52)
{
motor5.start(255);
}
if (results.value == n53)
{
motor5.start(0);
}
if (results.value == n61)
{
motor6.start(63);
}
if (results.value == n62)
{
motor6.start(255);
}
if (results.value == n63)
{
motor6.start(0);
}
}
} `
Your driver seems not to work and is blocking the LED.
This is my test code ( You can commen/uncomment USE_DRIVER ). The LED is only blinking when not using the driver.
Environemt: Arduino UNO, DC-Motor-Shield TLE94112EL V1.3
#include <TLE94112.h>
#include <Tle94112Motor.h>
Tle94112 controller = Tle94112();
Tle94112Motor motor1(controller);
#define USE_DRIVER
void setup()
{
#ifdef USE_DRIVER
// Enable MotorController Tle94112
// Note: Required to be done before starting to configure the motor
controller.begin();
// Connect motor1 to HB1 and HB3
motor1.connect(motor1.HIGHSIDE, controller.TLE_HB1);
motor1.connect(motor1.LOWSIDE, controller.TLE_HB3);
// Drive HB1 with signal from PWM1
// Note: This allows to control the speed of the motor
motor1.setPwm(motor1.HIGHSIDE, controller.TLE_PWM1);
// Set PWM Frequency, default is 80 Hz
motor1.setPwmFreq(motor1.HIGHSIDE, controller.TLE_FREQ100HZ);
#endif
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
for (int n = 10; n < 255; n++)
{
motor1.setSpeed(n);
delay(100);
digitalWrite(LED_BUILTIN, HIGH);
delay(100);
digitalWrite(LED_BUILTIN, LOW);
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.