TOP Contributors

  1. MIKROE (2642 codes)
  2. Alcides Ramos (348 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 (136223 times)
  2. FAT32 Library (69492 times)
  3. Network Ethernet Library (55711 times)
  4. USB Device Library (45994 times)
  5. Network WiFi Library (41639 times)
  6. FT800 Library (40801 times)
  7. GSM click (28789 times)
  8. PID Library (26332 times)
  9. mikroSDK (26059 times)
  10. microSD click (25146 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

Ammeter click

Rating:

1

Author: MIKROE

Last Updated: 2019-05-03

Package Version: 1.0.0.1

mikroSDK Library: 1.0.0.0

Category: Measurements

Downloaded: 3807 times

Not followed.

License: MIT license  

Ammeter click is a mikroBUS add-on board with circuitry for measuring electric current ( both AC and DC ).

No Abuse Reported

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

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

Do you want to report abuse regarding "Ammeter click".

  • mikroSDK Library 2.0.0.0
  • Comments (3)
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

Front / Back View

Front / Back View

Ammeter front and back view

View full image

Library Description

The library covers all the necessary functions that enables the usage of the Ammeter click board.
It offers reading from output register and calculations that result in relatively accurate amperage value.

Key functions:

  • uint16_t ammeter_amperage() - Function is used to measure amperage of a power consumer connected to the click board.
  • uint16_t ammeter_getRawData() - Function is used to read raw data value from output register.
  • uint16_t ammeter_dataRead() - Function is used to read data from output register.

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes SPI module, LOG and GPIO structures, sets CS pin as output and AN pin as input.
  • Application Initialization - Initalizes SPI driver and makes an initial log.
  • Application Task - This is an example that shows the capabilities of the Ammeter click by measuring amperage in miliampers. Ammeter click board can be used to saftly measure current up to 1A both AC and DC, in the case of AC, for peak to peak value. It is important to notice that this click board has its' own electronic circuit, and may not be powered from the same source which we are measuring. Result will not be correct in that case.
void applicationTask( )
{
    amperage = ammeter_amperage();
    IntToStr( amperage, logTxt );
    mikrobus_logWrite( " Amperage: ", _LOG_TEXT );
    mikrobus_logWrite( logTxt, _LOG_TEXT );
    mikrobus_logWrite( "mA ", _LOG_LINE );
    mikrobus_logWrite( "-----------------------", _LOG_LINE );
    Delay_ms( 1000 );
}

Other mikroE Libraries used in the example:

  • SPI
  • UART
  • Conversions

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.

Schematic

Schematic

Ammeter click schematic

View full image

ALSO FROM THIS AUTHOR

MMC FAT16 Legacy Library

5

The Multi Media Card (MMC) is a Flash memory card standard. MMC cards are available in sizes up to and including 32 GB and are used in cellular phones, digital audio players, digital cameras and PDA’s.

[Learn More]

Proximity 2 click

0

Proximity 2 Click features MAX44000, an IC that integrates an ambient light as well as a proximity sensor. The chip consists of an array of photodiodes that convert light into current, which the internal circuitry then converts into a digital value.

[Learn More]

EERAM 5V click

0

EERAM 5V click is a static RAM (SRAM) memory click board™ with the unique feature - it has a backup non-volatile memory array, used to store the data from the SRAM array. Since the SRAM is not able to maintain its content after the power loss, the non-volatile EEPROM backup can be a very handy addition that can be used to preserve the data, even after the power loss event. This is a very useful feature when working with critical or sensitive applications. The memory backup procedure can be executed both automatically and manually. When it is set to work in the manual mode, the onboard capacitor will act as a power source with enough power to complete the backup cycle. The power-on backup restore mode is also available, taking only about 25ms to complete.

[Learn More]