Intermediate
30 min

Handle 15A loads seamlessly with BTS70041EPPXUMA1 and STM32F031K6

Innovative power switching safeguarded by ReverSave™

PROFET Click - 15A with Nucleo 32 with STM32F031K6 MCU

Published Oct 01, 2024

Click board™

PROFET Click - 15A

Dev Board

Nucleo 32 with STM32F031K6 MCU

Compiler

NECTO Studio

MCU

STM32F031K6

Empower your projects with the efficiency, adaptability, and safety of our smart high-side switch, offering precise management for a wide range of applications with 15A loads and the added assurance of ReverSave™ in cases of reverse polarity.

A

A

Hardware Overview

How does it work?

PROFET Click - 15A is based on the BTS70041EPPXUMA1, a single-channel, smart high-side power switch with an Infineon Technologies embedded protection and diagnosis feature. The BTS70041EPPXUMA1 has a driving capability suitable for 15A loads and comes equipped with "ReverseON" functionality, which causes the power transistor to switch on in case of reverse polarity. It also offers outstanding energy efficiency with reduced current consumption, state-of-art current sense accuracy, and faster switching/slew rate with no impact on EMC, making it suitable for resistive, inductive, and capacitive loads, replacement of electromechanical relays, fuses, and discrete circuits, and many more. This Click board™ uses three digital pins for direct control. The input pin

marked as IN routed to the PWM pin of the mikroBUS™ socket activates the corresponding output channel labeled VOUT. Also, the Diagnosis Enable (DEN) pin routed to the CS pin of the mikroBUS™ socket controls the diagnosis and protection circuitry. Combined with IN pins, it enables the selection of appropriate operating states: Sleep, Stand-by, and Active Mode. The BTS70041EPPXUMA1 is protected against overtemperature, overload, reverse power supply (GND and VIN are reverse supplied), and overvoltage. Overtemperature and overload protection work when the device is not in Sleep mode, while overvoltage protection works in all operation modes. For diagnosis purposes, the BTS70041EPPXUMA1 provides a combination of digital and analog signals at the AN pin of the

mikroBUS™ socket. The PROFET Click supports an external power supply for the BTS70041EPPXUMA1, which can be connected to the input terminal labeled as VIN and should be within the range of 4.1V to 28V. VIN has an undervoltage detection circuit, which prevents the activation of the power output stages and diagnosis if the applied voltage is below the undervoltage threshold. A power supply indication, red LED labeled as VIN, indicates the presence of an external power supply. This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. Also, it comes equipped with a library containing functions and an example code that can be used as a reference for further development.

PROFET Click - 15A hardware overview image

Features overview

Development board

Nucleo 32 with STM32F031K6 MCU board provides an affordable and flexible platform for experimenting with STM32 microcontrollers in 32-pin packages. Featuring Arduino™ Nano connectivity, it allows easy expansion with specialized shields, while being mbed-enabled for seamless integration with online resources. The

board includes an on-board ST-LINK/V2-1 debugger/programmer, supporting USB reenumeration with three interfaces: Virtual Com port, mass storage, and debug port. It offers a flexible power supply through either USB VBUS or an external source. Additionally, it includes three LEDs (LD1 for USB communication, LD2 for power,

and LD3 as a user LED) and a reset push button. The STM32 Nucleo-32 board is supported by various Integrated Development Environments (IDEs) such as IAR™, Keil®, and GCC-based IDEs like AC6 SW4STM32, making it a versatile tool for developers.

Nucleo 32 with STM32F031K6 MCU double side image

Microcontroller Overview

MCU Card / MCU

default

Architecture

ARM Cortex-M0

MCU Memory (KB)

32

Silicon Vendor

STMicroelectronics

Pin count

32

RAM (Bytes)

4096

You complete me!

Accessories

Click Shield for Nucleo-32 is the perfect way to expand your development board's functionalities with STM32 Nucleo-32 pinout. The Click Shield for Nucleo-32 provides two mikroBUS™ sockets to add any functionality from our ever-growing range of Click boards™. We are fully stocked with everything, from sensors and WiFi transceivers to motor control and audio amplifiers. The Click Shield for Nucleo-32 is compatible with the STM32 Nucleo-32 board, providing an affordable and flexible way for users to try out new ideas and quickly create prototypes with any STM32 microcontrollers, choosing from the various combinations of performance, power consumption, and features. The STM32 Nucleo-32 boards do not require any separate probe as they integrate the ST-LINK/V2-1 debugger/programmer and come with the STM32 comprehensive software HAL library and various packaged software examples. This development platform provides users with an effortless and common way to combine the STM32 Nucleo-32 footprint compatible board with their favorite Click boards™ in their upcoming projects.

Click Shield for Nucleo-32 accessories 1 image

Used MCU Pins

mikroBUS™ mapper

Diagnosis Signal
PA0
AN
NC
NC
RST
Diagnosis Enable
PA4
CS
NC
NC
SCK
NC
NC
MISO
NC
NC
MOSI
Power Supply
3.3V
3.3V
Ground
GND
GND
Output Channel Activation
PA8
PWM
NC
NC
INT
NC
NC
TX
NC
NC
RX
NC
NC
SCL
NC
NC
SDA
NC
NC
5V
Ground
GND
GND
1

Take a closer look

Schematic

PROFET Click - 15A Schematic schematic

Step by step

Project assembly

Click Shield for Nucleo-144 front image hardware assembly

Start by selecting your development board and Click board™. Begin with the Nucleo 32 with STM32F031K6 MCU as your development board.

Click Shield for Nucleo-144 front image hardware assembly
Nucleo 144 with STM32L4A6ZG MCU front image hardware assembly
Stepper 22 Click front image hardware assembly
Prog-cut hardware assembly
Stepper 22 Click complete accessories setup image hardware assembly
Nucleo-32 with STM32 MCU Access MB 1 - upright/background hardware assembly
Necto image step 2 hardware assembly
Necto image step 3 hardware assembly
Necto image step 4 hardware assembly
Necto image step 5 hardware assembly
Necto image step 6 hardware assembly
STM32 M4 Clicker HA MCU/Select Step hardware assembly
Necto No Display image step 8 hardware assembly
Necto image step 9 hardware assembly
Necto image step 10 hardware assembly
Debug Image Necto Step hardware assembly

Track your results in real time

Application Output via Debug Mode

1. Once the code example is loaded, pressing the "DEBUG" button initiates the build process, programs it on the created setup, and enters Debug mode.

2. After the programming is completed, a header with buttons for various actions within the IDE becomes visible. Clicking the green "PLAY" button starts reading the results achieved with the Click board™. The achieved results are displayed in the Application Output tab.

DEBUG_Application_Output

Software Support

Library Description

This library contains API for PROFET Click - 15A driver.

Key functions:

  • profet_read_an_pin_voltage - PROFET read AN pin voltage level function

  • profet_set_mode - PROFET set mode

Open Source

Code example

This example can be found in NECTO Studio. Feel free to download the code, or you can copy the code below.

/*!
 * @file main.c
 * @brief PROFET 15A Click Example.
 *
 * # Description
 * This example showcases the ability of the PROFET 15A Click board.
 * It configures Host MCU for communication and then enables 
 * and disables output channel. Besides that, it reads the voltage 
 * of IS pin and calculates current on output.
 *
 * The demo application is composed of two sections :
 *
 * ## Application Init
 * Initialization of the communication modules(ADC and UART) 
 * and additional pins for controlling the device.
 *
 * ## Application Task
 * On every iteration of the task device switches between 
 * DIAGNOSTIC and OFF mode while it reads the voltage of IS pin 
 * and with that calculates current on output.
 * 
 * @note
 * Formula for calculating current on load: 
 * I_load = voltage(IS) x kILIS / 1.2 kΩ
 *
 * Click board won't work properly on the PIC18F97J94 MCU card.
 * 
 * @author Luka FIlipovic
 *
 */

#include "board.h"
#include "log.h"
#include "profet15a.h"

static profet15a_t profet15a;   /**< PROFET 15A Click driver object. */
static log_t logger;    /**< Logger object. */

void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    profet15a_cfg_t profet15a_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    profet15a_cfg_setup( &profet15a_cfg );
    PROFET15A_MAP_MIKROBUS( profet15a_cfg, MIKROBUS_1 );
    if ( profet15a_init( &profet15a, &profet15a_cfg ) == ADC_ERROR )
    {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }
    
    log_info( &logger, " Application Task " );
    
    profet15a_set_mode( &profet15a, PROFET15A_DIAGNOSTIC_ON );
    Delay_ms( 1000 );
}

void application_task ( void )
{
    static uint8_t mode = PROFET15A_DIAGNOSTIC_ON;
    float profet15a_an_voltage = 0;
    
    profet15a_set_mode( &profet15a, mode );
    
    if ( PROFET15A_DIAGNOSTIC_ON == profet15a.mode )
    {
        mode = PROFET15A_MODE_OFF;
        log_printf( &logger, " > Output ON diagnostic mode\r\n" );
        Delay_ms( 2000 );
    }
    else
    {
        mode = PROFET15A_DIAGNOSTIC_ON;
        log_printf( &logger, " > Output OFF\r\n" );
    }

    if ( profet15a_read_an_pin_voltage ( &profet15a, &profet15a_an_voltage ) != ADC_ERROR )
    {
        log_printf( &logger, " > IS Voltage \t~ %.3f[V]\r\n", profet15a_an_voltage );
        
        float current = profet15a_an_voltage * profet15a.kilis / profet15a.rsens;
        log_printf( &logger, " > OUT Current \t~ %.3f[A]\r\n", current );
    }  
    
    log_printf( &logger, "*******************************************\r\n" );
    
    Delay_ms( 2000 );
}

void main ( void )
{
    application_init( );

    for ( ; ; )
    {
        application_task( );
    }
}

// ------------------------------------------------------------------------ END

Additional Support

Resources

Love this project?

'Buy This Kit' button takes you directly to the shopping cart where you can easily add or remove products.