TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (352 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136733 times)
  2. FAT32 Library (69949 times)
  3. Network Ethernet Library (55941 times)
  4. USB Device Library (46265 times)
  5. Network WiFi Library (41886 times)
  6. FT800 Library (41170 times)
  7. GSM click (28983 times)
  8. PID Library (26413 times)
  9. mikroSDK (26359 times)
  10. microSD click (25375 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

Thunder EMU click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.4

mikroSDK Library: 2.0.0.0

Category: Miscellaneous

Downloaded: 26 times

Not followed.

License: MIT license  

Thunder EMU Click is a compact add-on board that can be used to emulate lightning. This board features circuits that generate an RF signal that mimics lightning strikes. It is a thunder emulator board that allows you to mimic lightning signals that can represent different distances, thus enabling you to debug your lightning detector application for all kinds of scenarios. The RF signal has an effective range of about 5 – 15cm from the emulator antenna of this Click board™ to the sensor antenna.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Thunder EMU click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Thunder EMU click" changes.

Do you want to report abuse regarding "Thunder EMU click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Thunder EMU click

Thunder EMU Click is a compact add-on board that can be used to emulate lightning. This board features circuits that generate an RF signal that mimics lightning strikes. It is a thunder emulator board that allows you to mimic lightning signals that can represent different distances, thus enabling you to debug your lightning detector application for all kinds of scenarios. The RF signal has an effective range of about 5 – 15cm from the emulator antenna of this Click board™ to the sensor antenna.

thunderemu_click.png

click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Sep 2023.
  • Type : I2C type

Software Support

We provide a library for the Thunder EMU Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for Thunder EMU Click driver.

Standard key functions :

  • thunderemu_cfg_setup Config Object Initialization function.

    void thunderemu_cfg_setup ( thunderemu_cfg_t *cfg );
  • thunderemu_init Initialization function.

    err_t thunderemu_init ( thunderemu_t *ctx, thunderemu_cfg_t *cfg );
  • thunderemu_default_cfg Click Default Configuration function.

    err_t thunderemu_default_cfg ( thunderemu_t *ctx );

Example key functions :

  • thunderemu_generate_thunder This function generates close, mid or far range thunder signal by setting the predefined DAC output profile at the specific timing.

    err_t thunderemu_generate_thunder ( thunderemu_t *ctx, uint8_t mode );
  • thunderemu_get_close_pin This function returns the CLOSE pin logic state.

    uint8_t thunderemu_get_close_pin ( thunderemu_t *ctx );
  • thunderemu_get_mid_pin This function returns the MID pin logic state.

    uint8_t thunderemu_get_mid_pin ( thunderemu_t *ctx );

Example Description

This example demonstrates the use of Thunder EMU click board by generating CLOSE, MID, or FAR range thunder signal depending on the click push-buttons state.

The demo application is composed of two sections :

Application Init

Initializes the driver and performs the click default configuration.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    thunderemu_cfg_t thunderemu_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.
    thunderemu_cfg_setup( &thunderemu_cfg );
    THUNDEREMU_MAP_MIKROBUS( thunderemu_cfg, MIKROBUS_1 );
    if ( I2C_MASTER_ERROR == thunderemu_init( &thunderemu, &thunderemu_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( THUNDEREMU_ERROR == thunderemu_default_cfg ( &thunderemu ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

    log_info( &logger, " Application Task " );
}

Application Task

Checks if any of the click board buttons are pressed and then generates a thunder signal related to the pressed button and displays an appropriate message on the USB UART.

void application_task ( void )
{
    if ( !thunderemu_get_close_pin ( &thunderemu ) )
    {
        if ( THUNDEREMU_OK == thunderemu_generate_thunder ( &thunderemu, THUNDEREMU_MODE_CLOSE ) )
        {
            log_printf( &logger, " Close range thunder signal generated!\r\n\n" );
            Delay_ms ( 500 );
        }
    }
    else if ( !thunderemu_get_mid_pin ( &thunderemu ) )
    {
        if ( THUNDEREMU_OK == thunderemu_generate_thunder ( &thunderemu, THUNDEREMU_MODE_MID ) )
        {
            log_printf( &logger, " Mid range thunder signal generated!\r\n\n" );
            Delay_ms ( 500 );
        }
    }
    else if ( !thunderemu_get_far_pin ( &thunderemu ) )
    {
        if ( THUNDEREMU_OK == thunderemu_generate_thunder ( &thunderemu, THUNDEREMU_MODE_FAR ) )
        {
            log_printf( &logger, " Far range thunder signal generated!\r\n\n" );
            Delay_ms ( 500 );
        }
    }
}

Note

Thunder EMU click should be used in combination with a Thunder click which detects a lightning presence. The emulator is calibrated for ranges of up to 15cm from the sensor board. It's recommended to distant both click boards from their development boards using a Shuttle click to reduce the board noise that can affect the sensor and emulator performance.

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.ThunderEMU

Additional notes and informations

Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.


ALSO FROM THIS AUTHOR

10DOF click

0

10DOF click is a mikroBUS add-on board for enhancing hardware prototypes with 10DOF functionality (10 degrees of freedom).

[Learn More]

13DOF click

0

13DOF Click is an advanced 13-axis motion tracking Click board™, which utilizes three different sensor ICs onboard: BME680, a digital gas, humidity, pressure and temperature sensor and BMM150, a geomagnetic sensor and a BMI088, small, versatile 6DoF sensor module. All integrated sensors ICs are made by Bosch Sensortec, featuring the state-of-the-art sensor technology processes, in order to fulfill the requirements for immersive gaming and navigation applications, which require highly accurate sensor data fusion.

[Learn More]

SPI Isolator 5 click

0

SPI Isolator 5 Click is a compact add-on board with a digital isolator optimized for a serial peripheral interface. This board features the DCL541A01, a high-speed quad-channel digital isolator from Toshiba Semiconductor. Outstanding performance characteristics of the DCL541A01 are achieved by Toshiba CMOS technology and the magnetic coupling structure. In addition, they comply with UL 1577 safety-related certification, have a withstand voltage rating of 5kVrms, and operate with the external supply voltage ranging from 2.25V to 5.5V, providing compatibility with lower voltage systems enabling voltage translation functionality across the isolation barrier.

[Learn More]