Homemade hall effect current sensor. Current converters are the right solution. DC current measurement

Measure the current of a high voltage power supply? Or the current consumed by the car's starter? Or current from a wind generator? All this can be done contactlessly using a single chip.

Melexis is taking the next step in creating green solutions by opening up new possibilities for non-contact current sensing in renewable energy, hybrid electric vehicle (HEV) and electric vehicle (EV) applications. The MLX91206 is a programmable monolithic sensor based on Triaxis™ Hall technology. The MLX91206 allows the user to build small, cost-effective touch solutions with fast response times. The chip directly controls the current flowing in an external conductor, such as a bus or trace on a printed circuit board.

The MLX91206 non-contact current sensor consists of a CMOS Hall integrated circuit with a thin layer of ferromagnetic structure on its surface. An integrated ferromagnetic layer (IMC) is used as a magnetic flux concentrator, providing high gain and a higher signal-to-noise ratio of the sensor. The sensor is particularly suitable for measuring DC and/or AC current up to 90 kHz with ohmic insulation, characterized by very low insertion loss, fast response time, small housing size and ease of assembly.

The MLX91206 meets the demand for widespread electronics applications in the automotive industry, renewable energy conversion (solar and wind), power supplies, motor control and overload protection.

Areas of use:

  • measurement of current consumption in battery power supply;
  • solar energy converters;
  • automotive inverters in hybrid vehicles, etc.

The MLX91206 has overvoltage protection and reverse voltage protection and can be used as a stand-alone current sensor connected directly to the cable.

MLX91206 measures current by converting magnetic field, created by currents flowing through a conductor, into a voltage that is proportional to the field. The MLX91206 has no upper limit on the current level it can measure because the output level depends on the conductor size and distance from the sensor.

Distinctive features:

  • programmable high-speed current sensor;
  • magnetic field concentrator providing a high signal-to-noise ratio;
  • protection against overvoltage and reverse polarity;
  • lead-free components for lead-free soldering, MSL3;
  • fast analog output (DAC resolution 12 bit);
  • programmable switch;
  • thermometer output;
  • PWM output (ADC resolution 12 bits);
  • 17-bit ID number;
  • faulty track diagnostics;
  • fast response time;
  • huge DC bandwidth - 90 kHz.

How the sensor works:

MLX91206 is a monolithic sensor made on the basis of technology Triais® Hall. Traditional planar Hall technology is sensitive to the flux density applied perpendicular to the IC surface. The IMC-Hall ® current sensor is sensitive to the flux density applied parallel to the surface of the IC. This is achieved through an integrated magnetic concentrator (IMC-Hall®), which is applied to the CMOS crystal. The IMC-Hall ® current sensor can be used in the automotive industry. It is a Hall effect sensor that provides an output signal proportional to the flux density applied horizontally and is therefore suitable for current measurement. It is ideal as an open loop current sensor for PCB mounting. The transfer characteristic of the MLX91206 is programmable (bias, gain, clamping levels, diagnostic functions...). The output is selectable between analog and PWM. Linear analog output is used for applications requiring fast response (<10 мкс.), в то время как выход ШИМ используется для применения там, где требуется низкая скорость при высокой надежности выходного сигнала.

Measures small currents up to ±2 A

Small currents can be measured with the MLX91206 by increasing the magnetic field through a coil around the sensor. The sensitivity (output voltage compared to coil current) of the measurement will depend on the size of the coil and the number of turns. Additional sensitivity and reduced sensitivity to external fields can be obtained by adding a shield around the coil. The bobbin provides very high dielectric insulation, making the MLX91206 a suitable solution for high voltage power supplies with relatively low currents. The output must be extended to obtain the maximum voltage for high currents in order to obtain maximum accuracy and resolution in measurements.

Fig.1. Low current solution.

Average currents up to ±30 A

Currents in the range of up to 30 A can be measured using a single conductor on a PCB. When routing a PCB, the current allowance and total power dissipation of the trace must be taken into account. The traces on the PCB must be thick enough and wide enough to continuously handle the average current. The differential output voltage for this configuration can be approximated by the following equation:

Vout = 35 mV/ * I

For a current of 30 A, the output will be approximately 1050 mV.

Fig.2. Solution for average current values.

High current measurement up to ±600 A

Another method for measuring large currents on PCBs is to use thick copper traces that can carry current on the opposite side of the PCB. MLX91206 should be located close to the center of the conductor, however, since the conductor is very wide, the output is less sensitive to placement on the board. This configuration also has less sensitivity depending on distance and conductor width.

Fig.3. Solution for large current values.

About melexis

Established for over ten years, Melexis designs and manufactures products for the automotive industry, offering a variety of integrated sensors, ASSPs and VLSI products. Melexis solutions are extremely reliable and meet the high quality standards required in automotive applications.

This design was born because at one time I did not have access to those wonderful modern microcircuits that were specially designed for reading voltage from current sensors. I needed to create an analogue of such a microcircuit, as simple as possible, but no less accurate. In my opinion, the resulting scheme copes with its task quite well.

Automotive positive rail current sensor on discrete components.

The first current amplifier on transistor Q2 has a gain of 6.2 (Figure 1). A thermal compensation amplifier is assembled on Q1, controlled by an IC1B microcircuit and maintaining the Q1 collector voltage at a constant level, regardless of the temperature of the circuit. The circuit reference voltage is the 5V system power supply. The voltages shown in the circuit diagram were measured in a real device.

Figure 1. Q1 and Q2 convert the voltage drop across current sense resistor R3 into a common-mode voltage matched to the microcontrollers' ADC input levels.

IC1A amplifies the voltage difference across the collectors of transistors Q1 and Q2. The op amp gain of this is 4.9. R3 is formed by two surface mount resistors stacked on top of each other. With an output voltage of 5 V, the maximum current measured by the circuit is 25 A.

Two zener diodes protect the circuit from voltage surges in the vehicle's on-board network. As you know, voltage peaks in it can reach 90 V. If the circuit provokes you to criticize, select the values ​​of R6 and R7 with a minimum spread. If you consider this insufficient, coordinate R1 and R4.

I haven't done anything like that, but the operation of the circuit is quite satisfactory to me. The design uses surface mount resistors. With the exception of R3, all are size 0805 and have a 1% tolerance.

Don’t forget to choose fiberglass with foil of sufficient thickness for your printed circuit board and make a wide conductive path, and for R3 provide a two-wire connection according to the Kelvin circuit. At a maximum current of 25 A, this circuit heats up very little.

To control current consumption, record motor blocking or emergency de-energization of the system.

Working with high voltage is hazardous to health!

Touching the terminal block screws and terminals may result in electric shock. Do not touch the board if it is connected to a household network. For the finished device, use an insulated housing.

If you don’t know how to connect the sensor to an electrical appliance operating from a common 220 V network or you have doubts, stop: you could start a fire or kill yourself.

You must clearly understand the operating principle of the device and the dangers of working with high voltage.

Video review

Connection and setup

The sensor communicates with the control electronics via three wires. The output of the sensor is an analog signal. When connecting to Arduino or Iskra JS, it is convenient to use Troyka Shield, and for those who want to get rid of wires, Troyka Slot Shield is suitable. For example, let’s connect a cable from the module to a group of Troyka Shield contacts related to analog pin A0. You can use any analog pins in your project.

Examples of work

To make working with the sensor easier, we wrote the TroykaCurrent library, which converts the values ​​of the analog output of the sensor into milliamps. Download and install it to repeat the experiments described below.

DC current measurement

To measure direct current, connect the sensor to the open circuit between the LED strip and the power supply. Let's output the current value of direct current in milliamps to the Serial port.

CurrentDC.ino #include Serial.print("Current is "); Serial.print(sensorCurrent.readCurrentDC()); Serial.println("mA"); delay(100); )

AC current measurement

To measure alternating current, we connect the sensor to the open circuit between the alternating voltage source and the load. Let's output the current value of alternating current in milliamps to the Serial port.

CurrentAC.ino // library for working with a current sensor (Troyka module)#include // create an object to work with the current sensor // and pass it the pin number of the output signal ACS712 sensorCurrent(A0) ; void setup() ( // open the serial port Serial.begin(9600); ) void loop() ( // output sensor indicators for direct current Serial.print("Current is "); Serial.print(sensorCurrent.readCurrentAC()); Serial.println("mA"); delay(100); )

Board elements

Sensor ACS712ELCTR-05B

The ACS712ELCTR-05B current sensor is based on the Hall effect, the essence of which is as follows: if a conductor with current is placed in a magnetic field, an emf appears at its edges, directed perpendicular to the direction of the current and the direction of the magnetic field.
The microcircuit is structurally composed of a Hall sensor and a copper conductor. The current flowing through the copper conductor creates a magnetic field, which is perceived by the Hall element. The magnetic field depends linearly on the current strength.

The output voltage level of the sensor is proportional to the measured current. Measurement range from −5 A to 5 A. Sensitivity - 185 mV/A. In the absence of current, the output voltage will be equal to half the supply voltage.

The current sensor is connected to the load in the open circuit through screw blocks. To measure direct current, connect the sensor, taking into account the directions of the current, otherwise you will get values ​​with the opposite sign. For alternating current, polarity does not matter.

Contacts for connecting a three-wire loop

The module is connected to the control electronics via three wires. Purpose of three-wire loop contacts:

    Power (V) - red wire. Based on the documentation, the sensor power supply is 5 volts. As a result of the test, the module operates on 3.3 volts.

    Ground (G) - black wire. Must be connected to microcontroller ground;

    Signal (S) - yellow wire. Connects to the analog input of the microcontroller. Through it, the control board reads the signal from the sensor.

To measure large currents, as a rule, a non-contact method is used - special current clamps. Current clamp is a measuring device that has a sliding ring that covers an electrical wire and the amount of current flowing is displayed on the device indicator.

The superiority of this method is undeniable - in order to measure the current strength there is no need to break the wire, which is especially important when measuring large currents. This article describes DC current clamp, which are quite possible to do with your own hands.

Description of the design of homemade current clamps

To assemble the device you will need a sensitive Hall sensor, for example, UGN3503. Figure 1 shows the device of a homemade pliers. You need, as already mentioned, a Hall sensor, as well as a ferrite ring with a diameter of 20 to 25 mm and a large “crocodile”, for example, similar to the one on the wires for starting (lighting) a car.

The ferrite ring must be accurately and accurately sawed or broken into two halves. To do this, the ferrite ring must first be filed with a diamond file or an ampoule file. Next, sand the fracture surfaces with fine sandpaper.

On one side, glue a gasket from drawing paper to the first half of the ferrite ring. On the other side, stick a Hall sensor on the other half of the ring. It is best to glue it with epoxy glue, you just need to make sure that the Hall sensor is in good contact with the fracture zone of the ring.

The next step is to connect both halves of the ring and wrap it around it with a crocodile and glue it. Now, when you press the crocodile handles, the ferrite ring will diverge.

Electronic circuit of current clamps

The schematic electrical diagram of the multimeter attachment is shown in Figure 2. When current flows through an electrical wire, a magnetic field appears around it, and the Hall sensor detects the power lines passing through it and generates some constant voltage at the output.

This voltage is amplified (by power) by op amp A1 and goes to the multimeter terminals. The ratio of the output voltage to the flowing current: 1 Ampere = 1 mVolt. Trimmer resistances R3 and R6 are multi-turn. To set up, you need a laboratory power supply with a minimum output current of about 3A, and a built-in ammeter.

First, connect this attachment to the multimeter and set it to zero by changing the resistance R3 and the middle position of R2. Next, before any measurement it will be necessary to set zero with potentiometer R2. Set the power supply to the lowest voltage and connect a large load to it, for example, an electric lamp used in car headlights. Then hook the “pliers” onto one of the wires connected to this lamp (Figure 1).

Increase the voltage until the power supply ammeter shows 2 amperes. Tighten resistance R6 so that the voltage value of the multimeter (in millivolts) matches the data on the power supply ammeter in amperes. Check the readings a few more times, changing the current strength. Using this attachment it is possible to measure current up to 500A.