ماژول سنسور اندازه گیری جریان ina219
نمایش نسخه قابل چاپ
ماژول سنسور اندازه گیری جریان ina219
این محصول مشابه یکی ازتولیدات کمپانی ادافروت می باشد.
رفرنس :https://learn.adafruit.com/adafruit-...reakout/wiring
کتابخانه آردوینو
رفرنس : https://github.com/adafruit/Adafruit_INA219
نمونه سیم بندی ماژول با آردوینو .
ماژول دارای ارتباط iic می باشد.
فایل پیوست 3273
نمونه مدار کامل اندازه گیری ولتاژ و جریان موتور dc
فایل پیوست 3274
نحوه آدرس دهی iic :
فایل پیوست 3275نقل قول:
If more than one INA219 breakout board is used, each board must be assigned a unique address. This is done with the address jumpers on the right edge of the board. The I2C base address for each board is 0x40. The binary address that you program with the address jumpers is added to the base I2C address.
To program the address offset, use a drop of solder to bridge the corresponding address jumper for each binary '1' in the address.
p to 4 boards may be connected. Addressing is as follows:
Board 0: Address = 0x40 Offset = binary 00000 (no jumpers required)
Board 1: Address = 0x41 Offset = binary 00001 (bridge A0 as in the photo above)
Board 2: Address = 0x42 Offset = binary 00010 (bridge A1)
Board 3: Address = 0x43 Offset = binary 00011 (bridge A0 & A1)
نقل قول:
نمونه کد آردوینو :
کد:#include <Wire.h>
#include <Adafruit_INA219.h> // You will need to download this library
Adafruit_INA219 sensor219; // Declare and instance of INA219
void setup(void)
{
Serial.begin(9600);
sensor219.begin();
}
void loop(void)
{
float busVoltage = 0;
float current = 0; // Measure in milli amps
float power = 0;
busVoltage = sensor219.getBusVoltage_V();
current = sensor219.getCurrent_mA();
power = busVoltage * (current/1000); // Calculate the Power
Serial.print("Bus Voltage: ");
Serial.print(busVoltage);
Serial.println(" V");
Serial.print("Current: ");
Serial.print(current);
Serial.println(" mA");
Serial.print("Power: ");
Serial.print(power);
Serial.println(" W");
Serial.println("");
delay(2000);
}
سلام
ببخشید خودتون اینو تست کردین
تا الان دو یا سه نمونه سنسور ولتاژ و جریان خریدم خروجی درستی ندارن
البته اونا ارزون تر بودن