![]() This allows you to check the correct functioning of the photovoltaic cells, on the one hand, and to measure its performance over time. The EnergyBoard is an energy measurement module for polyphase power-monitoring systems. One possible application with an INA219 sensor is to create an energy meter to measure the electrical power absorbed by a solar panel, for example. #include #include Adafruit_INA219 ina219 float voltage_V = 0, shuntVoltage_mV, busVoltage_V float current_mA = 0 float power_mW = 0 float energy_Wh = 0 long time_s = 0 void setup ( void ) Application getCurrent_mA () to retrieve the current value from the shunt resistor.shuntVoltage_mV () to recover the voltage across the shunt resistor.getBusVoltage_V () to retrieve the voltage value on the Vin- / Vin + bus.begin () to initialize communication with the sensor.P = UxI with P the power (W), U the voltage (V) and I the current (A).Įnergy is the power consumed by the device over timeĮ = Pxt with E energy (Wh), P power (W) and t time (h) The electrical power exchanged by two devices is calculated by multiplying the voltage and the current on the bus connecting them: To display the INA219 measurements, we will use the Adafruit library Adafruit_INA219.h which you can download or install directly from the Arduino IDE.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |