Direct current measurement - Arduino

Today I will introduce several available Arduino sensors that can be used in DC projects. This means with a rated supply voltage of 5V with max. 5V output.
Current measurement
ACS712
An ACS712 sensor, also referred to as ACS712ELC-XXA-XX, indicates the value of amers to measure DC (and AC). The sensor uses a hall sensor to measure the current flow.
Versions for 5A, 20A, 30A are available. For all versions, the nominal output voltage is 2.5V at 0A. The sensor has an analog output with a range of 0 to 5V.
Module5A  20A30A
Vcc5V5V5V
Max measure value-5 to +5A-20 to 20A-30 to 30A
Voltage at 0AVcc/2 --> 2.5VVcc/2 --> 2.5VVcc/2 --> 2.5V
One amp step185mV / A100mV / A66mV / A
Chip versionACS712ELC-05AACS712ELC-20AACS712ELC-30A
The module contains a terminal block for connecting the conductor through which the current flows in series. The module does not include a PCB mounting hole. There are versions from other manufacturers that also include mounting holes, but the price is higher.
INA219
Another popular current sensor is the INA219. The sensor works on the I2C bus and can be used to measure both direct and symmetrical current. Maximum current range 0 to + -3.2A at voltage up to + -26V. The sensor measures the principle of 0.1ohm shunt voltage drop. The advantage is the possibility to use several modes, while it is possible to reduce the parameters of voltage and current range, which can dynamically increase the resolution of measurement.
The best resolution has the third mode, which operates at 16V, 400mA with 0.1mA resolution. The sensor also contains on the PCBs A0, A1, which can be soldered to emulate a different address, it is useful when using multiple sensors with one Arduin, eliminating the need to use the I2C multiplexer. The advantage is simple addressing on the I2C bus. In total, up to 4 INA219 sensors can be operated. The base address is 0x40, with area A0 0x41, with area A1 0x44, with areas A0 and A1 0x45.

INA3221
Another available I2C sensor from the INA family is a module equipped with an INA3221 chip, which in addition to current measurement and voltage measurement - but about the next time. The module is equipped with up to three channels on which current can be measured. The module is connected to the source for these three channels, on which we will perform measurements, the power supply range is 0-26V. The measurement is again based on the principle of shunt voltage drop, where the measurable current is limited to 1.1A. The module supply voltage is 2.7 to 5.5V.
The huge advantage of the module with INA3221 chip is its consumption at the level of 350μA. Fits into battery operated applications. On the other hand, the disadvantage is that the module is supplied without terminal blocks for CH 1 to 3 channels and power supply connection. The module is also equipped with flats A0, A1, so it is again possible to emulate up to 4 modules on one I2C bus. Individual CH channels contain CH and GND terminals. This means that the appliance on which we measure the voltage is connected to the module in parallel - as a voltmeter, not in series as for an ammeter.

WCS1700
For non-invasive measurement methods, Hall sensor current sensors, such as WCS1700, can be used for both direct and alternating current. The sensor contains, in addition to the analogue output, a digital output which can be set by a potentiometer - trimmer. In a particular application, it can serve as an identifier for crossing a certain current limit.
In the program implementation it is necessary to calibrate the sensor. The calibration value can be obtained by reading the values from the empty sensor to reach 0mV. Based on the measured analog value from the analog output of the sensor, this value can be converted to millivolts, for example, by mapping from 0-1023 (ADC) to 0-5000mV and then converted to amperes with a 32mV / A step. Interesting are current values that can be measured. For DC, the measuring range is 0 to + -70A. Since the ADC converter with a range of 0-1023 for current measurements up to 70A is small, measurements with this sensor are rather indicative.
For more accurate measurements from individual sensors it is possible to sample measurements and average them. When using these sensors with voltage sensors, it is also possible to calculate the power of the appliance.
List of projects: https://arduino.php5.sk
Use in applications:
  • Measurement of current of appliances connected to the battery
  • Measurement of current from solar panel
  • Measurement of current from MPPT controller
  • Current measurement in electronics, modules and other sensors
Example of visualization in the final application:

Comments

Popular posts from this blog

Web scraper via Arduino & NodeMCU & ESP32

ESP32 control via UDP datagrams

Biking on Google Maps - Arduino Leonardo (32u4) - HID device