TOP Contributors

  1. MIKROE (2784 codes)
  2. Alcides Ramos (387 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (120 codes)
  5. Bugz Bensce (97 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 (140168 times)
  2. FAT32 Library (72622 times)
  3. Network Ethernet Library (57643 times)
  4. USB Device Library (47957 times)
  5. Network WiFi Library (43553 times)
  6. FT800 Library (42942 times)
  7. GSM click (30140 times)
  8. mikroSDK (28670 times)
  9. PID Library (27057 times)
  10. microSD click (26552 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

L meter click

Rating:

5

Author: MIKROE

Last Updated: 2019-06-28

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Measurements

Downloaded: 3532 times

Not followed.

License: MIT license  

L Meter Click is a compact and accurate Click board, capable of measuring and monitoring the inductance of the external component.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "L meter click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "L meter click" changes.

Do you want to report abuse regarding "L meter click".

  • Information
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

L Meter click

L Meter click

Native view of the L Meter click board.

View full image
L Meter click

L Meter click

Front and back view of the L Meter click board.

View full image

Library Description

Library contains all the necessary functions for successfully reading Frequency and Inductance on the indicator.

Key functions:

  • uint32_t lmeter_getFrequency() - Frequency reading function.
  • float lmeter_getCoilInductance() - Inductances reading function.
  • void lmeter_tick() - Timer Tick functions.

Examples description

The application is composed of the three sections :

  • System Initialization - Sets PWM pin as OUTPUT and INT pin as INPUT.
  • Application Initialization - Initialization driver init and Timer init.
  • Application Task - Reads the frequency and induction on the inductor in [uH] and this data logs to USBUART. - Waits for valid user input and executes functions based on set of valid commands.
  • Commands :
    'F' - For calculating and logging frequencies
    'L' - For calculating and logging inductances
    'T' - Enabling and disabling additional C2 capacitors
void applicationTask()
{
    uint8_t dataReady_;
    char receivedData_;

    dataReady_ = UART_Rdy_Ptr( );

    if (dataReady_ != 0)
    {
        receivedData_ = UART_Rd_Ptr( );

        switch (receivedData_)
        {
            case 'F' :
            {
                mikrobus_logWrite(" --- PLEASE WAIT FOR THE CALCULATION PROCESS TO COMPLETE ---", _LOG_LINE);
                lmeter_setTimer();
                _Frequency = lmeter_getFrequency();
                if (_Frequency < _LMETER_MIN_INDUCTANCE_RANGE)
                {
                    mikrobus_logWrite(" Frequency is out of range !!! ", _LOG_LINE);
                    mikrobus_logWrite("  ", _LOG_LINE);
                }
                else
                {
                    FloatToStr(_Frequency, demoText);
                    mikrobus_logWrite(" Frequency = ", _LOG_TEXT);
                    mikrobus_logWrite(demoText, _LOG_TEXT);
                    mikrobus_logWrite(" kHz ", _LOG_LINE);
                    mikrobus_logWrite("  ", _LOG_LINE);
                }
                break;
            }
            case 'L' :
            {
                mikrobus_logWrite(" --- PLEASE WAIT FOR THE CALCULATION PROCESS TO COMPLETE ---", _LOG_LINE);
                lmeter_setTimer();
                _Frequency = lmeter_getFrequency();
                
                if (_Frequency < _LMETER_MIN_INDUCTANCE_RANGE)
                {
                    mikrobus_logWrite(" Frequency is out of range !!! ", _LOG_LINE);
                    mikrobus_logWrite("  ", _LOG_LINE);
                }
                else
                {
                    _Inductance = lmeter_getCoilInductance(_Frequency);

                    FloatToStr(_Inductance, demoText);
                    mikrobus_logWrite(" Inductance = ", _LOG_TEXT);
                    mikrobus_logWrite(demoText, _LOG_TEXT);
                    mikrobus_logWrite(" uH ", _LOG_LINE);
                    mikrobus_logWrite("  ", _LOG_LINE);
                }
                break;
            }
            case 'T' :
            {
                if (T_SW == _LMETER_T_SW_ENABLE)
                {
                    T_SW = _LMETER_T_SW_DISABLE;
                    lmeter_setTSpin( _LMETER_T_SW_DISABLE );
                    mikrobus_logWrite(" ---  NEW SETTINGS - DISABLE [C2] CAPACITOR --- ", _LOG_LINE);
                    mikrobus_logWrite("* The sum of all the capacitors is 1000pF ", _LOG_LINE);
                    mikrobus_logWrite("* Disabled capacitor [C2]", _LOG_LINE);
                }
                else
                {
                    T_SW = _LMETER_T_SW_ENABLE;
                    lmeter_setTSpin( _LMETER_T_SW_ENABLE );
                    mikrobus_logWrite(" ---  NEW SETTINGS - ENABLE [C2] CAPACITOR --- ", _LOG_LINE);
                    mikrobus_logWrite("* The sum of all the capacitors is 500pF ", _LOG_LINE);
                    mikrobus_logWrite("* Active new capacitor [C2]", _LOG_LINE);
                }
                break;
            }
        }
    }
}

Other mikroE Libraries used in the example:

  • Conversions Library

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

ALSO FROM THIS AUTHOR

Secure 4 Click

0

Secure 4 click includes the ATECC608A, a secure CryptoAuthenticatio device from Microchip, which is equipped with an EEPROM array which can be used for storing of up to 16 keys, certificates, consumption logging, security configurations and other types of secure data.

[Learn More]

Color 7 Click

0

Color 7 Click is a very accurate color sensing Click board which features the TCS3472 color light to digital converter with IR filter, from ams.

[Learn More]

Light mix-sens Click

0

Light mix-sens Click is carrying TMD37253, an advanced proximity measurement, color sense (RGBC+IR), and digital ambient light sensing (ALS) device. The TMD37253 slim module package has been designed to accommodate a “single hole” aperture approach that incorporates an IR LED and factory calibrated LED driver. The proximity detection feature provides object detection (e.g., mobile device screen to the user’s ear) by photodiode detection of reflected IR energy (sourced by the integrated LED). The ALS detection feature provides photopic light intensity data. The color photodiodes have UV and IR blocking filters and a dedicated data converters producing 16-bit data.

[Learn More]