Scaling ACS712 20A Current Sensor to Siemens LOGO! Analog Input

David Krause27 min read
Sensor IntegrationSiemensTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

1. Overview

The ACS712 is a Hall-effect-based, fully integrated linear current sensor IC from Allegro MicroSystems. The 20 A variant (ACS712ELCTR-20A-T and its modular breakout equivalents) produces a ratiometric analog voltage of 100 mV per ampere around a quiescent bias of VCC/2. Connecting the output to a Siemens LOGO! 8 0-10 V analog input, the engineer must (a) scale the 0.5-4.5 V output window into the LOGO! integer range, (b) bond the 5 V sensor ground to the LOGO! 24 V negative rail, and (c) apply a single-point gain trim to compensate for the device's ±1.5 % total output error. This reference covers each of those steps in the order they need to be performed, documents the field-proven gain factors, and provides a verification procedure and a troubleshooting matrix for the typical "1.5 A reading at zero current" symptom that motivated this design note.

2. Prerequisites and Required Hardware

Before scaling begins, gather the following components and confirm firmware compatibility. The full BOM is intentionally small because the ACS712 is a single-package current transducer with no external shunt, op-amp, or reference needed.

  • Siemens LOGO! 8 base module with on-board 0-10 V analog inputs: 6ED1052-1MD08-0BA1 (relay out, 24 V supply) or 6ED1052-1CC08-0BA1 (transistor out, 12/24 V supply). For pure 24 V applications, the 6ED1052-2MD08-0BA1 variant with Ethernet is recommended. All three modules expose I7 and I8 as 0-10 V analog inputs by default.
  • LOGO!Soft Comfort V8.3 or later (FUP/Ladder editor, simulation, PC→LOGO! download). Earlier versions (V8.0-V8.2) ship with a Gain range limited to ±10.0, which is fine for this application but prevents large-scale high-gain blocks if the engineer wants to scale up to mA units (then 0.1 × 1000 = 100, which requires the V8.3+ extended range).
  • ACS712-20A current sensor module. Acceptable part numbers include ACS712ELCTR-20A-T (bare SOIC-8 IC) or any of the common breakout boards: HiLetgo ACS712-20A, DIYmall ACS712, or the "Robodo Electronics" 5 A/20 A/30 A module set. Verify the part marking on the IC - LC suffix indicates SOIC-8 tape-and-reel packaging.
  • Isolated 5 VDC supply for the sensor. Recommended: Traco TSR 1-2450 (24 V → 5 V, 1 A) or RECOM R-78E5.0-0.5 (switching, 500 mA). A linear LM7805 will work if dissipation is acceptable (drop 19 V × 15 mA = 0.285 W, well within TO-220 ratings).
  • Reference ammeter: a calibrated clamp meter (Fluke 376, Kyoritsu 2046R, or similar ±2 % instrument) or a 100 A/75 mV shunt combined with a 4.5-digit DMM. The reference should have a stated accuracy at least 5× better than the ACS712 (so ±0.3 % or better).
  • Programmable DC load or fixed resistive load bank capable of drawing 0.5 A, 1.0 A, 5.0 A, 10.0 A, 15.0 A, and 20.0 A for the verification matrix. Resistive loads of 1.2 Ω, 2.4 Ω, 4.8 Ω at 24 VDC produce 20 A, 10 A, 5 A respectively - use these to verify the full scale.
  • Shielded twisted pair (e.g. Belden 8761, Alpha 2466C) for the sensor cable if it is longer than 200 mm from the LOGO! base.

3. ACS712 Sensor Internal Architecture and Datasheet Parameters

The ACS712 die contains a copper primary conduction path (terminals IP+ and IP-), a linear Hall sensor IC, and a low-offset chopper-stabilized amplifier. Current flowing in IP+/IP- generates a magnetic field; the Hall element produces a voltage proportional to that field. The amplifier brings the differential Hall voltage to a single-ended output that swings around Vcc/2 with a sensitivity of mV per ampere. Key parameters from the official Allegro datasheet (document 620050426):

Parameter ACS712-05B ACS712-20A ACS712-30A
Optimized primary current, IP ±5 A ±20 A ±30 A
Sensitivity (typ) 185 mV/A 100 mV/A 66 mV/A
Quiescent output voltage (Vcc = 5.0 V) Vcc × 0.5 = 2.500 V Vcc × 0.5 = 2.500 V Vcc × 0.5 = 2.500 V
Output at +IP 3.425 V (typ) 4.500 V (typ) 4.480 V (typ)
Output at -IP 1.575 V (typ) 0.500 V (typ) 0.520 V (typ)
Total output error (TA = 25 °C) ±1.5 % ±1.5 % ±1.5 %
Bandwidth 80 kHz 80 kHz 80 kHz
Step response time (90 % of IP step) < 5 µs < 5 µs < 5 µs
Sensitivity temperature coefficient typ +0.12 %/°C typ +0.12 %/°C typ +0.12 %/°C
Primary conductor resistance 1.2 mΩ 1.2 mΩ 1.2 mΩ
Supply voltage (Vcc) 4.5 V - 5.5 V 4.5 V - 5.5 V 4.5 V - 5.5 V
Supply current (typ) 10 mA 10 mA 10 mA
Output drive capability ±1.5 mA ±1.5 mA ±1.5 mA
Output load capacitance (max) 10 nF 10 nF 10 nF
Min output load resistance 4.7 kΩ 4.7 kΩ 4.7 kΩ
Package SOIC-8 (suffix LC) SOIC-8 (suffix LC) SOIC-8 (suffix LC)

Reference: Allegro ACS712 datasheet, document 620050426. The three transfer-curve points that drive the LOGO! scaling are:

  • V0 = 2.500 V at 0 A
  • V+ = 4.500 V at +20 A
  • V- = 0.500 V at -20 A

Note the symmetry: the slope is 100 mV/A but the offset is at 2.500 V, so the output range is centered on Vcc/2. This is the only fully bipolar, single-supply, isolated-current measurement IC in this price class. The Allegro ACS723 (3.3 V or 5 V supply, lower noise, 120 kHz bandwidth) is the modern successor if the application can accept the 5 V supply requirement and lower sensitivity (266 mV/A on the 5 A variant, 132 mV/A on the 20 A variant). For three-phase industrial motor monitoring, the LEM LA 55-P (closed-loop, ±0.6 % accuracy, 100 kHz bandwidth) provides a wider dynamic range and reinforced insulation.

4. Breakout-Board Variants and the On-Board Divider

Many low-cost ACS712-20A modules on the market (e.g. the "Robodo" / "DIYmall" 5 A/20 A/30 A stack, the "HiLetgo" 5-piece set) are designed for direct connection to a 3.3 V MCU and include a 5:1 resistive divider on the OUT pin. The divider is implemented as two SMD 0805 resistors (typically 30 kΩ and 7.5 kΩ, or 20 kΩ + 5 kΩ) in parallel with an output protection Zener (5.1 V). With the divider, the OUT pin swings from 0.1 V to 0.9 V instead of 0.5 V to 4.5 V, and a current of 0 A reads 0.5 V (Vcc/2 × 1/5). The user must therefore either:

  1. Confirm the divider is present with a DMM (measure resistance from OUT to GND with the supply off; > 5 kΩ indicates a divider, < 100 Ω indicates a direct output) and account for the ÷5 factor in the LOGO! Gain, or
  2. Bypass the divider by populating R1 (top resistor) with a 0 Ω link or by lifting one leg of R2 (bottom resistor). This restores the full 0.5-4.5 V swing and gives the LOGO! AI more usable resolution (450 steps span ±20 A instead of 90 steps).
Resolution impact: with the divider removed, the LOGO! AI uses 400 of its 1000 available integer steps for ±20 A, equivalent to 0.10 A/step. With the divider in place, the AI uses 80 of 1000 steps, equivalent to 0.50 A/step. For battery monitoring, motor control, or photovoltaic applications where the engineer needs better than 0.5 A resolution, remove the divider. For simple on/off current-presence detection (e.g. dry-run protection on a pump), the divider is acceptable.

5. Siemens LOGO! 8 Hardware Selection and Analog Input Topology

The LOGO! 8 family (6ED1052-1xxx08-0BAx) provides analog inputs in two physical forms: on-board analog inputs (I1-I4 or I7-I8 depending on variant) and expansion-module analog inputs (AM2, AM2 RTD, AM2 AQ). The on-board inputs of a 24 V LOGO! 8 are organized as 0-10 V / 0-20 mA switchable, with the configuration set by the BM firmware based on the LOGO!Soft Comfort hardware tree. Reference: LOGO! 8 System Manual, 11/2018 edition (§4.3 "Analog inputs").

Property 0-10 V mode 0/4-20 mA mode (AM2)
Input range 0.000 V - 10.000 V 0 mA - 20 mA (or 4 mA - 20 mA)
Raw integer (LOGO! representation) 0 - 1000 0 - 1000
Resolution 10 mV per step 20 µA per step
Input impedance (voltage mode) ≥ 78 kΩ (typical 100 kΩ) ≤ 250 Ω (current shunt)
Channel count on BM I7, I8 (on 6ED1052-1MD08) Requires AM2 module (6ED1055-1MA00)
Channel count on AM2 n/a AI1, AI2
Over-voltage protection ±30 V (clamped) ±30 mA (clamped)
Update rate 10 ms (per channel) 10 ms (per channel)
Wire-break detection Enabled in LOGO!Soft Comfort Enabled in LOGO!Soft Comfort

For an ACS712-20A on a 0-10 V input, the integer range 0-1000 maps to 0.000-10.000 V, and the ACS712 output 0.5-4.5 V occupies integer values 50-450. The AI returns 250 at 0 A, 350 at +10 A, 450 at +20 A, and 50 at -20 A. This is the integer that enters the LOGO! amplifier block. Note that the LOGO! 12/24V variants (6ED1052-1CC08-0BA1) have the same analog input topology as the 24V variant, but the digital inputs are 12V-level and the supply accepts 12 V or 24 V. The ground reference (M terminal) is the same regardless of supply voltage.

6. LOGO!Soft Comfort Project Setup and Block Library

Open LOGO!Soft Comfort V8.3 or later and create a new project. The following analog-related blocks are used in this application:

  • AI (Analog Input) - reads the raw integer 0-1000 from the BM on-board input or expansion module. The block has a wire-break detection setting in V8.3+ (default: enabled, range -32768 to +32767).
  • B021 - Analog Amplifier (Math: y = (Gain × x) + Offset) - the linear two-point scaling block. Gain range -10.0 to +10.0 (V8.0-V8.4) or extended to ±1000 in V8.3+ for some configurations. Offset range -32768 to +32767.
  • B022 - Analog Comparator - overcurrent alarm at 18.0 A (or user threshold), with hysteresis of +0.5 to prevent chattering.
  • B023 - Analog Watchdog - detects wire break (out of range) on AI7. Threshold = 10.0 (or 1.0 V on the raw integer), triggers an alarm if the AI stays outside the band for more than 1 second.
  • B020 - Analog MUX - selects between two current sensors if a multi-phase measurement is needed.
  • B025 - Analog Max/Min - tracks the highest and lowest current since last reset for cycle analysis. Reset on a digital input from the operator panel.
  • B026 - Average Value - averages the last N=8 samples (default; configurable 2-32) to suppress display jitter on the LOGO! onboard display.
  • B030 - Data Log - writes the AI7 raw value to a micro-SD card in CSV format at 1-second intervals for long-term trend analysis. Requires a micro-SD card installed in the LOGO! 8.BF or 8.FS model.

All blocks accept the LOGO! integer representation internally. A value of "1" on the input of an analog block represents 0.001 V (in 0-10 V mode) or 0.020 mA (in 0/4-20 mA mode). When you connect AI7 to B021 directly, the integer 250 arriving at B021 is the raw 0-10 V count, not a "0.250 V" representation. This is the most common confusion in the field - always design Gain and Offset against the raw integer, not against the physical quantity, when working inside LOGO!.

7. Scaling Math: Two-Point Linear Calibration

The two-point linear calibration extracts the slope and offset of the sensor from the two end-of-scale values published in the datasheet:

Slope (A per integer step) = (I+ - I-) / (AI+ - AI-) = (+20 - (-20)) / (450 - 50) = 40 / 400 = 0.1 A/step

Offset (A) = I+ - Slope × AI+ = 20 - 0.1 × 450 = -25 A

These are exactly the values to enter into B021:

  • Gain = 0.1
  • Offset = -25

Verification at the integer points:

AI7 raw Voltage Predicted current Expected: Gain × AI + Offset
50 0.500 V -20.0 A 0.1 × 50 + (-25) = -20.0 A
150 1.500 V -10.0 A 0.1 × 150 + (-25) = -10.0 A
250 2.500 V 0.0 A 0.1 × 250 + (-25) = 0.0 A
350 3.500 V +10.0 A 0.1 × 350 + (-25) = +10.0 A
450 4.500 V +20.0 A 0.1 × 450 + (-25) = +20.0 A

If the engineer prefers the display to read in mA (range -20000 to +20000), the equivalent is Gain = 0.1 (treating each integer step as 1 mA after the gain) and no extra scaling, or, alternatively, a B021 output fed to a B027 Mathematical Functions block with formula: y = a × x + b, with a = 1000 and b = 0. This converts the B021 output (in A) to mA without a second amplifier block. Note that LOGO!Soft Comfort V8.3 also provides a B024 "Analog Arithmetic" block that accepts the same Gain/Offset pattern but exposes the four arithmetic operations in a single block.

Pitfall - "Gain can only be ±10": LOGO!Soft Comfort V8.0-V8.4 limits the Gain field of B021 to ±10.0. The values 0.1 and -25 are inside that range. If the engineer enters Gain = 10, the block saturates at AI = 250 (output 0) and overflows above AI = 450 (output 2000, which the LOGO! clamps to 32767 and is wrong by 100×). Always derive Gain and Offset from the AI integer resolution that the BM actually exposes; do not paste gain values from non-LOGO! literature without unit conversion.

8. Wiring Topology and Common-Mode Considerations

Three topologies are encountered in the field, in increasing order of reliability:

  1. Two isolated supplies (FAIL) - 24 VDC for the LOGO!, 5 VDC for the sensor from a separate wall adapter. The two grounds are not bonded. Symptom: 0.3-2.0 A offset at zero primary current, drifting with time and temperature. This is the most common field failure mode and was the root cause in the field installation that motivated this reference.
  2. Two isolated supplies with bonded 0 V (ACCEPTABLE) - same as above but with a dedicated bonding wire from the sensor GND to the LOGO! M terminal. Symptom: zero offset, but the bonding wire carries leakage current from the 24 V supply to the 5 V supply return, which can inject 50/60 Hz common-mode noise if the cable is long.
  3. DC/DC converter from LOGO! 24 V to sensor 5 V (RECOMMENDED) - the sensor is powered by a 24 V → 5 V DC/DC module on the same DIN rail. The DC/DC's -Vin and -Vout are tied together at the same terminal block. The sensor's GND pin runs directly to the LOGO!'s M terminal. This topology has a single ground reference, no common-mode noise injection, and survives a wire-break test.

Recommended wiring diagram (textual):

[24 VDC supply +] ----> LOGO! 24 V terminal
[24 VDC supply -] ----> LOGO! M terminal  (LOG_0V)
                  |
                  +---> DC/DC 24V in +  
                  +---> DC/DC 0V in - 
                  
[DC/DC 5V out +] ----> ACS712 VCC (+5V)
[DC/DC 0V out -] ----> ACS712 GND  (SENSOR_0V)
                       |
                       +------> LOGO! I7 GND rail (LOG_0V via M)
                       
[ACS712 OUT pin]  ----> LOGO! I7 signal input
[ACS712 IP+ and IP-]  -> carry the measured current; 1.2 mΩ shunt on these
                          terminals

For runs longer than 200 mm between the sensor and the LOGO! base, use shielded twisted pair (Belden 8761 or equivalent). Ground the shield at the LOGO! end only, leaving the sensor end floating. This avoids shield-current loops and prevents high-frequency noise from coupling into the AI. Reference: LOGO! 8 System Manual, §A.5 "Shielding and routing".

For the LOGO! 12/24V variant (6ED1052-1CC08-0BA1), the supply accepts 12 VDC or 24 VDC, but the analog input topology and the M terminal reference are unchanged. The 5 V sensor supply can be obtained from a 12 V → 5 V DC/DC module (e.g. Traco TSR 1-1250) with the same ground-bonding pattern.

WARNING - Primary conductor isolation: The IP+ and IP- pins of the ACS712 carry the full measured current at line potential. The ACS712 housing and breakout board traces are NOT reinforced-insulated for mains voltage. For 230 VAC applications, the measured conductor must be in a properly fused and insulated enclosure, and the engineer must use a 600 V-rated sensor variant or place the sensor on the low-voltage side of the system. The ACS712 is rated for basic insulation at 300 V working voltage per UL 60950-1 (see the datasheet). For HVAC and industrial motor control above 50 V, the engineer should consider a closed-loop Hall sensor (LEM LA-series, Tamura L01Z) or a current transformer with burden resistor.

9. Step-by-Step LOGO! Configuration Procedure

  1. Open LOGO!Soft Comfort and create a new project. Set the BM hardware to 6ED1052-1MD08-0BA1 (or compatible). On-board analog inputs I7 and I8 should be in "0-10 V" mode by default; verify in the BM properties dialog.
  2. Wire the sensor and the DC/DC converter per the topology above. Power up. With no primary current, measure ACS712 OUT to GND with a DMM - you should read 2.500 V ± 0.025 V. If not, the sensor supply is unstable or the module is faulty.
  3. Insert an Analog Input (AI) block on I7. In the simulation panel, force AI7 = 250 and verify that the program reads 250 (it should).
  4. Insert a B021 Analog Amplifier block. Connect AI7 to its input X. Set Gain = 0.1 and Offset = -25.
  5. Connect the B021 output to a Message Text block displaying the value, and to a B022 Analog Comparator for overcurrent at 18.0 A (Threshold A = 18.0; hysteresis +0.5).
  6. Compile the program. Use the simulation to force AI7 = 50, 150, 250, 350, 450 in turn; the message text must read -20.0, -10.0, 0.0, +10.0, +20.0 respectively.
  7. Connect the LOGO! to the PC via Ethernet (preferred) or micro-USB. Click "PC → LOGO!" to download the program and run it. Apply a known 5 A load and observe the message text. Trim Gain by an empirical factor of 0.98-1.00 to align with the reference ammeter.
  8. Save the project and back up the LOGO! program card if the LOGO! uses a micro-SD (LOGO! 8 6ED1052-xBA08 variants and later).

Reference: LOGO! 8 System Manual, §4.4 "Configuring analog values".

10. Single-Point Gain Trim for Residual Error

After applying the Gain = 0.1 / Offset = -25 values, residual error is dominated by the ACS712 ±1.5 % total output error and the LOGO! AI gain error of ±0.5 % (25 °C). A single-point gain trim near 80 % of full scale is sufficient for most field installations. The trim factor is calculated as:

Trim factor = Ireference / ILOGO!

For example, with a 16.0 A load, the LOGO! reads 16.32 A. The trim factor is 16.00 / 16.32 = 0.9804. Update Gain to 0.1 × 0.9804 = 0.0980. Re-upload and verify at 5.0 A, 10.0 A, 15.0 A. The original installation reported matching the reference instrument by setting Gain = 0.99 (a 1 % trim), well inside the ±1.5 % envelope.

For sub-1 % accuracy, the engineer can apply a two-point calibration: trim Gain at 80 % of full scale, then re-trim Offset at 0 A (or at a low but non-zero current such as 1.0 A). The two-point trim is implemented by alternating B021 and B024 (Analog Math with a/b) blocks in the LOGO! program. Note that LOGO!'s integer resolution at 0.1 A per step means that the best-case repeatability is ±0.05 A; for higher accuracy use the ACS723 or a LEM closed-loop transducer.

11. Noise Filtering and EMC

The ACS712 output has a bandwidth of 80 kHz and the Hall element picks up both common-mode and differential-mode noise. The LOGO! 8 AI has no internal filter, so the engineer is responsible for analog filtering. For PWM-driven loads (variable-frequency drives, switching power supplies), the noise can be tens of mV peak-to-peak on the OUT pin. Recommended filtering:

  1. Capacitor at the sensor output. Place a 100 nF X7R (or C0G/NP0 for temperature stability) ceramic capacitor from ACS712 OUT to GND. The pole is at f = 1 / (2π × Rout × C) = 1 / (2π × 4.7 kΩ × 100 nF) ≈ 340 Hz. The minimum load resistance on the ACS712 output is 4.7 kΩ, so 100 nF is the maximum value for a 340 Hz pole. For a 1 kHz pole, use 33 nF.
  2. RC filter at the LOGO! input. Add a 1 kΩ resistor in series with the sensor signal at the LOGO! terminal, with a 100 nF capacitor from LOGO! I7 to M. This makes a second-order filter with the sensor-side capacitor. Cutoff: f = 1 / (2π × 1 kΩ × 100 nF) ≈ 1.6 kHz.
  3. LOGO! software averaging. Add a B026 Average Value block with N=8 samples (80 ms time constant at 10 ms scan). This suppresses display jitter without affecting the 1-second data log rate.
  4. Shielded cable for long runs. Use Belden 8761 (shielded twisted pair, 18 AWG) for cable lengths exceeding 200 mm. Ground the shield at the LOGO! end only, leaving the sensor end floating. Do not connect both ends - this creates a ground loop and injects 50/60 Hz hum.

For installations near variable-frequency drives, add a ferrite bead (e.g. Würth Elektronik 74270097) on the sensor cable close to the LOGO! terminal. This suppresses common-mode currents above 10 MHz.

12. Temperature Compensation and Long-Term Drift

Three temperature-sensitive error sources interact:

  1. ACS712 sensitivity temperature coefficient, typically +0.12 %/°C around the 25 °C trim point. For a 30 °C temperature rise, this is +3.6 % at the high end, or +0.72 A on a 20 A full-scale reading. The chip's own self-heating contributes about +0.5 °C per minute of continuous full-scale current.
  2. LOGO! AI gain temperature coefficient, typically ±0.03 %/°C, or ±0.6 % over 20 °C - this is small relative to the ACS712 drift.
  3. Sensor 5 V supply drift. The ACS712 output is ratiometric: Vout scales with Vcc. A 1 % drift in the 5 V rail produces 1 % error at the 2.5 V bias but 0.5 % error at the 4.5 V full-scale point. Use a low-drift regulator or a 5 V reference (e.g. TL431, ±1 % initial, ±50 ppm/°C) for the sensor supply if the application is exposed to wide ambient temperature swings.

For installations where the ambient temperature varies by more than 20 °C, apply a software compensation curve in LOGO! by reading an AI from a PT100/PT1000 (AM2 RTD module) and adjusting the Gain block with a B027 Math block. The compensation formula is Gaincompensated = Gain25°C × (1 - 0.0012 × (Tamb - 25)).

13. Multi-Phase and Multi-Channel Expansion

For three-phase motor monitoring or three-channel battery bank monitoring, repeat the configuration for I8 (on-board) and add AM2 modules for additional channels. A typical three-phase setup uses:

  • 3 × ACS712-30A modules (66 mV/A, 0-30 A range) on the three phase conductors
  • AI7, AI8 for phases L1 and L2 (on-board BM inputs)
  • AI3 on AM2 module (6ED1055-1MA00-0BA2) for phase L3
  • Three independent B021 amplifier blocks with Gain = 0.1515 A/step (30 A variant) and Offset calculated from the AI integer at 0 A (typically 224 because the 30 A output swing is 0.52 V to 4.48 V, so the 0 A reading is AI = 248, yielding Offset = 0.1515 × 248 - 0 = 37.6)
  • One B022 comparator per phase with Threshold = 25.0 A (or user trip value)
  • One B030 data log block writing all three currents to micro-SD at 1-second intervals

For the 30 A variant with Vcc = 5 V, the output swing is from 0.52 V to 4.48 V (sensitivity 66 mV/A, not 100 mV/A), so the AI integer swings from 52 to 448 at ±30 A. The corrected Gain is 60 / (448 - 52) = 60 / 396 = 0.1515 A/step, with Offset = 0.1515 × 248 - 0 = 37.6 (so that AI = 248 produces 0.0 A). Verify these against the actual measured AI values at the calibration points.

14. Verification, Acceptance Test, and Logging

  1. Zero-current test. Disconnect the primary conductor from the load. The LOGO! display must read 0.0 ± 0.1 A within 5 s of disconnect. If it reads ±0.3 A or more, repeat the ground-bonding procedure (Section 8) and re-check the 5 V supply for ripple.
  2. Mid-range linearity. Apply 5.0 A, 10.0 A, 15.0 A in turn. The display must match the reference ammeter within ±0.2 A (about ±1.0 % on the 20 A range). If the error is non-monotonic, the AI input has a wiring issue; if the error is a constant percentage, the Gain trim is off.
  3. Full-scale check. Apply 20.0 A for 60 s. The display must read 20.0 ± 0.3 A. Drift during the 60 s window indicates sensor self-heating; reduce test duration to 20 s for hot-spot characterization.
  4. Reverse-current check. Reverse IP+/IP-. Apply 5.0 A; display must read -5.0 ± 0.2 A. If it reads +5.0, the engineer is reading the absolute value of current and the LOGO! program is missing the sign bit. Add a sign-aware function block to handle bidirectional power monitoring.
  5. Step response. Use the LOGO! onboard data log (B030 Data Log block, 8 kB retention) to record AI7 at 100 ms intervals. Switch the load from 0 A to 20 A. Display must reach 19.0 A within 1 s. The 5 µs step response of the ACS712 is far below the LOGO!'s 10 ms scan time, so the dominant time constant is the LOGO! AI filter (none by default) plus the user-applied B026 Average Value block.
  6. Acceptance test record. Log the four reference points (0 A, 5 A, 10 A, 20 A) with the LOGO! display value and the reference ammeter value. File the report with the project documentation. Re-test annually or after any wiring change.

15. Troubleshooting Matrix

Symptom Likely root cause Diagnostic step Corrective action
LOGO! reads -1.5 A to -2.0 A at zero primary current Floating sensor 0 V reference Measure sensor GND to LOGO! M terminal with DMM; should read 0.000 V DC Add bonding wire from sensor GND to LOGO! M, or migrate to DC/DC converter topology
LOGO! reads 0.0 A at no load but 0.5-1.0 A at 1.0 A AI range is 4-20 mA, not 0-10 V Check BM hardware config in LOGO!Soft Comfort (HW tree → BM → I7/I8 type) Set I7/I8 to "0-10 V" mode in the BM properties
LOGO! reads 0.0 A at no load and 20.0 A at any load > 0.5 A Gain is set to 10 instead of 0.1 Inspect B021 Gain parameter; simulate AI7 = 250 to confirm output is 0.0 Set Gain = 0.1, Offset = -25
LOGO! display fluctuates ±2 A at constant load Common-mode noise on long sensor cable Scope sensor OUT pin at the LOGO! terminal; check for 50/60 Hz modulation Use shielded twisted pair; tie shield to GND at LOGO! end only; add 100 nF X7R cap from OUT to GND at the LOGO! terminal block
LOGO! display drifts +0.5 A over 10 minutes Sensor self-heating or power supply warm-up Touch the sensor IC after 5 minutes; if hot to touch, self-heating Allow 5-minute warm-up before zero-check; add temperature compensation block
LOGO! reads negative on positive current IP+ and IP- reversed on the load Inspect current direction through the sensor Reverse conductor direction; current flow is conventional from IP+ to IP-
LOGO! value is 0-10× too high Resistive divider on breakout board (5:1) and not compensated Power off and measure OUT to GND resistance; > 5 kΩ = divider present Multiply Gain by 5 to compensate, or remove divider by lifting R2
LOGO! always shows 0.0 A ACS712 supply below 4.5 V; OUT pulled low Measure Vcc at ACS712 module; must be 4.5-5.5 V Verify 5 V supply; check for shorted output trace
LOGO! AI shows "—" or "ERR" Wire break / over-range / sensor disconnected Measure OUT to GND; if floating, wire is broken Inspect cable; confirm voltage is between 0.0 V and 10.0 V
LOGO! reads correctly at 5 A and 10 A but error grows above 15 A ACS712 saturation begins near 20 A; sensor band-limited Inspect load behavior; check for inrush current Upgrade to ACS712-30A variant (66 mV/A) for the same application, or use a current shunt
LOGO! reads random values 0-20 A at no load Loose terminal screw on sensor OUT or GND Visually inspect all four sensor terminals; tug on wires Re-torque terminal screws to 0.5 N·m; use ferrules on stranded wires
LOGO! AI reading slowly creeps up after a few hours Thermal expansion of the ACS712 die; self-heating Measure temperature of sensor IC; check ambient temperature Reduce continuous load to 80 % of full scale; add heatsink to copper trace; or upgrade to ACS723 with 5 µV/°C offset drift

16. Frequently Asked Questions

What is the ACS712-20A output voltage range?

The ACS712-20A outputs 100 mV per ampere around a quiescent bias of Vcc/2. With a 5.0 V supply it produces 0.5 V at -20 A, 2.5 V at 0 A, and 4.5 V at +20 A, for a total swing of 4.0 V peak-to-peak. See the Allegro ACS712 datasheet for the full transfer curve and supply rejection characteristics.

Why does the LOGO! show 1.5 A when no current flows?

Two causes are most common. First, the 5 V sensor supply and the 24 V LOGO! supply share no common 0 V reference, so the OUT pin floats above or below its 2.5 V bias by 150-300 mV, equivalent to 1.5-3.0 A on the 20 A variant. Second, the AI range was inadvertently set to 4-20 mA instead of 0-10 V. Bond the sensor GND to the LOGO! M terminal and confirm the input mode in the BM hardware configuration of LOGO!Soft Comfort.

What Gain and Offset values are correct in LOGO!Soft Comfort for the 20 A variant?

For the 20 A variant connected to a 0-10 V analog input (raw integer 0-1000), use Gain = 0.1 and Offset = -25 in the B021 Analog Amplifier block. This maps AI = 50 to -20.0 A, AI = 250 to 0.0 A, and AI = 450 to +20.0 A. Apply an empirical single-point trim factor of 0.98-1.00 to the Gain to match a calibrated reference ammeter.

Does the ACS712 require a separate 5 V power supply?

Yes. The ACS712 requires a regulated 5 V (±5 %) supply capable of sourcing 10-15 mA continuous. Power it from a DC/DC converter (Traco TSR 1-2450, RECOM R-78E5.0-0.5) fed from the same 24 V supply that powers the LOGO!, and tie the 0 V returns together. Most breakout boards include a 5 V regulator, but the input rail must be 7-12 VDC if the on-board regulator is used.

Can the ACS712 measure AC current as well as DC?

Yes. The Hall-effect output responds to the instantaneous DC-biased AC current with a bandwidth of 80 kHz. For 50/60 Hz line-frequency measurement, the LOGO! can read the peak value directly with a B025 Max/Min block and compute the RMS as Vmax / 1.414 / sensitivity. For non-sinusoidal loads (variable-frequency drives, switching power supplies), use the B030 Data Log block to capture the waveform and compute true RMS in the program or post-process with a spreadsheet.

What happens if my breakout board has a 5:1 resistive divider on the OUT pin?

Many low-cost modules include a 5:1 divider that drops the 0-5 V output to 0-1 V for 3.3 V MCUs. The LOGO! 0-10 V AI works fine with the divider present, but you lose 80 % of the available resolution. Multiply the LOGO! Gain by 5 to compensate (e.g. Gain = 0.5 for the 20 A variant with divider) or remove the divider by lifting the bottom resistor (R2) and replacing R1 with a 0 Ω link.

Why does the offset shift as the sensor warms up?

The ACS712 has a sensitivity temperature coefficient of +0.12 %/°C and a quiescent output voltage temperature coefficient of ±10 mV typical. After 5-10 minutes of operation, the die self-heats by 5-10 °C above ambient, which shifts the gain. Allow a 5-minute warm-up before performing a zero-current trim, and consider a one-time temperature compensation block (Gaincompensated = Gain25°C × (1 - 0.0012 × (Tamb - 25))) if the ambient temperature varies by more than 20 °C during operation.

Can I use the ACS712 to measure 230 VAC line current?

Only with a properly isolated, fused, and enclosed installation. The ACS712 is rated for basic insulation at 300 V working voltage. The engineer must place the IP+ and IP- pins in a fused enclosure, ensure the breakout board traces cannot be touched during operation, and follow all local electrical codes. For most 230 VAC applications, a current transformer (CT) with burden resistor is preferred - safer, cheaper, and provides natural isolation.

Back to blog