TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139251 times)
  2. FAT32 Library (71749 times)
  3. Network Ethernet Library (57120 times)
  4. USB Device Library (47430 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28077 times)
  9. PID Library (26885 times)
  10. microSD click (26198 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: 3319 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

PLL Click

0

PLL Click is a frequency multiplier which uses the Phase-Locked Loop (PLL) techniques to provide a high-frequency clock output from a cheap, standard fundamental mode crystal oscillator.

[Learn More]

6DOF IMU 13 Click

0

6DOF IMU 13 Click is a compact add-on board that contains an eCompass that consists of a 3-axis linear accelerometer and a 3-axis magnetic field sensor. This board features the MC6470, an accelerometer and magnetometer for a 6 DoF (6 Degrees of Freedom) sensor solution, from mCube Inc.

[Learn More]

RS485 3 click

5

RS485 3 click uses SN65HVD31DR from Texas Instruments, a tri-state differential line driver and differential input line receiver. The click is intended to be used as UART to RS422/RS485 communication interface. It is suited for transmitting smaller blocks of data over long distances, using the four-wire bus, allowing for full-duplex communication.

[Learn More]