TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 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 (136537 times)
  2. FAT32 Library (69730 times)
  3. Network Ethernet Library (55840 times)
  4. USB Device Library (46172 times)
  5. Network WiFi Library (41800 times)
  6. FT800 Library (40985 times)
  7. GSM click (28921 times)
  8. PID Library (26383 times)
  9. mikroSDK (26277 times)
  10. microSD click (25297 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

Current 2 click

Rating:

8

Author: MIKROE

Last Updated: 2019-01-10

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Measurements

Downloaded: 4059 times

Not followed.

License: MIT license  

The Current 2 click is an accurate current sensing Click board suitable for a very accurate measurement of the current through the load. It utilizes the high-side current sensing approach, which has a few advantages over the low-side current sensing.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Current 2 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Current 2 click" changes.

Do you want to report abuse regarding "Current 2 click".

  • mikroSDK Library 2.0.0.0
  • 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

Current 2 click

Current 2 click

Native view of the Current 2 click board.

View full image
Current 2 click

Current 2 click

Front and back view of the Current 2 click board.

View full image

Library Description

Library offers a choice to get 10bit result from the AD converter as one sample result or averaged result with desired number of samples. Result from the ADC can be calculated to get current in a proper value [mA], depending on the RSENSE, ROUT and VREF on the Current 2 Click board. For more details check documentation.

Key functions:

  • uint16_t current2_getADC( void ) - Function returns 10-bit digital value from the AD converter.
  • uint16_t current2_getAverageADC( uint8_t nSamp ) - Function returns averaged result from the AD converter.
  • uint16_t current2_getCurrent( uint8_t nSample ) - Function reads averaged result from the ADC and performs a calculations to get current in proper value [mA].

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes peripherals and pins.
  • Application Initialization - Initializes SPI interface in Mode 0.
  • Application Task - (code snippet) - Reads the current averaged result of 20 samples and gets this result in a proper value [mA]. Repeats the current reading every 500ms.
void applicationTask()
{
    current = current2_getCurrent( 20 );

    WordToStr( current, text );

    mikrobus_logWrite( "Current : ", _LOG_TEXT );
    mikrobus_logWrite( text, _LOG_TEXT );
    mikrobus_logWrite( " mA", _LOG_LINE );

    Delay_ms( 500 );
}

Other mikroE Libraries used in the example:

  • Conversions
  • SPI
  • UART

Additional notes and information

Depending on the development board you are using, you may need USB UART clickUSB UART 2 clickor 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

Thermo K click

0

THERMO K click carries the MCP9600 IC from Microchip. Depending on the type of probe it uses the click can measure temperatures from −200 °C to +1372 °C.

[Learn More]

Clock Gen 5 click

0

Clock Gen 5 Click is a compact add-on board that contains a digital programmable oscillator solution. This board features the LTC6903, a low-power self-contained digital frequency source providing a precision frequency from 1kHz to 68MHz set through a 3-wire SPI digital interface from Analog Devices.

[Learn More]

Magneto 10 click

0

Magneto 10 Click is a compact add-on board that contains a 3D magnetometer. This board features the MLX90392, a +/-5mT range magnetometer for low-noise applications from Melexis Technologies. The MLX90392, specially designed for micropower applications, measures magnetic fields along the three axes (X, Y being in a plane parallel to the surface of the die, and Z being perpendicular to the surface).

[Learn More]