Voltecx is in beta. The macOS build comes first; Windows and Linux packages are still being tested.Beta. macOS comes first; Windows and Linux are still in testing. What's new
Documentation

Hall-Effect Current Sensor (hallCurrentSensor)

Measures current through a conductor and gives a proportional voltage, isolated.

hallCurrentSensor

Component reference · 繁體中文

Group: ICs · Kind: {"definition":"hallCurrentSensor","kind":"subsystem"}

When to use it

Use it to see what a real current sensor does to a reading. Use Ammeter for a plain measurement, Shunt Amplifier with Shunt for a shunt, and Closed-Loop Hall Transducer for tens of amperes from DC to 200 kHz.

Pins

Pin Domain Meaning
IPP electrical Primary current in, positive reading
IPN electrical Primary current out
VIOUT electrical Sensor output, measured against GND
GND electrical Ground reference of the output

Common parameters

  • sens: Sensitivity (the 05B device: 185 mV/A) (Default: 0.185)
  • vq: Output at zero current, VCC x 0.5 with a 5 V supply (Default: 2.5)
  • bw: Bandwidth: the single pole of the response (-3 dB) (Default: 80000)
  • rSense: Resistance of the primary conductor between IPP and IPN (Default: 0.0012)
  • noise: RMS output noise; 0 = a noiseless sensor (Default: 0)

Parameters

Key Unit Default Typical range Description Datasheet source
sens V/A 0.185 1m – 10 V/A Sensitivity (the 05B device: 185 mV/A) x05B Performance Characteristics, Sens typ, p.6
vq V 2.5 0 – 15 V Output at zero current, VCC x 0.5 with a 5 V supply Common Operating Characteristics, VIOUT(Q), p.5
bw Hz 80000 1k – 100meg Hz Bandwidth: the single pole of the response (-3 dB) Common Operating Characteristics, f, p.5
rSense Ω 0.0012 1u – 10 Ω Resistance of the primary conductor between IPP and IPN Common Operating Characteristics, RPRIMARY typ, p.5
outMin V 0.1 -15 – 15 V Lowest output voltage (saturation near GND) assumption: the datasheet does not give the saturation level
outMax V 4.9 -15 – 15 V Highest output voltage (saturation near VCC = 5 V) assumption: the datasheet does not give the saturation level
tDelay s 0 0 – 10u s Propagation delay ahead of the bandwidth pole: with the pole, a step reaches 50 % this plus ln 2 / (2 pi bw) late; 0 = none model parameter: the ACS712 default applies none (a preset sets its sheet's tpd)
noise V 0 0 – 1 V RMS output noise; 0 = a noiseless sensor x05B Performance Characteristics, VNOISE(PP) typ 21 mV peak to peak at 2 kHz, p.6 (set to simulate; about a sixth of peak to peak is the rms)
seed — 1 0 – 9007t Whole-number seed of the noise model parameter

Parameter descriptions are in English in both languages.

Model

The primary path is the conductor resistance rSense in series with a current meter, so the part adds the drop rSense * i to the circuit. The output is a controlled voltage source driven by vq + sens * i, then a first-order low-pass at bw, then seeded Gaussian noise of noise volts rms, then a limit to outMin ... outMax. The noise depends only on seed and on time, so a run repeats exactly. The real part is ratiometric (sensitivity and zero level follow VCC), isolated and drifts with temperature. None of that is modelled.

Common mistakes

  • The output saturates near the supply rails, which is about plus or minus 13 A at the default sensitivity. A larger current reads as a flat top, so pick a variant with lower sensitivity for it.
  • The sensor is not ratiometric here, so the sensitivity and the zero level stay fixed. Connect the output to a load that expects the 2.5 V zero level, and keep the step below about a tenth of the response time.
  • The noise is 0 by default, so set an rms value of a few millivolts to see it. A different seed gives a different noise, and the same seed always gives the same run.

Problems rules: step.too_large, param.out_of_range

Datasheet and sources

sens is the typical sensitivity of the variant (185 mV/A for the 5 A device, 100 mV/A for 20 A, 66 mV/A for 30 A). vq is the zero-current output (VCC x 0.5), bw is the -3 dB bandwidth, and rSense is the primary conductor resistance. outMin and outMax are assumptions, and noise is converted from the peak-to-peak noise in the table. Pass them to ic.fromSpec with the hallCurrentSensor template and rename the pins to the datasheet names. Or place a preset: ACS724LLCTR-05AB, or the TI isolated Hall sensor TMCS1123 in 16 grades (A1A-A5A at 2.5 V, B1A-B5A at 1.65 V, C1A-C5A at 0.33 V zero-current output, D71; 25 to 150 mV/A, SBOSA24D). tDelay is an optional fixed propagation delay ahead of the bandwidth pole (default 0); the TMCS1123 presets set it so that the pole and the delay together give the sheet's 110 ns tpd.

Example

Open the example with the command file.openExample and the name demo:hallCurrentSensor.


Generated by cargo xtask reference from the usage texts and parameter specs. Do not edit by hand.