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]
Rating:
Author: MIKROE
Last Updated: 2022-01-17
Package Version: 1.0.0.1
mikroSDK Library: 1.0.0.0
Category: Current sensor
Downloaded: 6833 times
Not followed.
License: MIT license
AC Current click can measure alternating currents up to 30A and it features the MCP3201 ADC (analog to digital) converter and the MCP607 CMOS Op Amp, both from Microchip. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target MCU over an SPI interface, and the AN pin on the mikroBUS line.
Do you want to subscribe in order to receive notifications regarding "AC Current click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "AC Current click" changes.
Do you want to report abuse regarding "AC Current click".
Library description
Key functions:
void accurrent_init ( );
- Click initialization setting CS to Highfloat accurrent_getmA( );
- Gets the current value of AC Current in mAfloat accurrent_getA( );
- Gets the current value of AC Current in A
Example description
The application is composed of three sections:
void applicationTask()
{
ac_current = accurrent_getmA();
FloatToStr(ac_current,text);
mikrobus_logWrite("Current value: ",_LOG_TEXT);
mikrobus_logWrite(text,_LOG_TEXT);
mikrobus_logWrite(" mA",_LOG_LINE);
Delay_ms(1000);
}
Other MikroElektronika libraries used in the example:
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.