Fads to Obsessions and Beyond...




Free domain for life, exceptional technical support, website transfer

MAX-471 Current Sensor

A Maxim MAX471 high-side current sensor is interfaced with a PIC18F248 microcontroller to test measuring bi-directional current flow. The MAX471 is produced as a SOIC package, so a breakout board version (sourced from eBay chinese supplier) was used rather than the actual IC in isolation.

Further, the eBay breakout board version (with breadboard ready headers and free shipping) costs less than one-half the cost of just the MAX471 chip from a "western" source (Mouser, Digikey, RS Components etc). The breakout board did not provide access to all the MAX471 functionality (i.e., current direction and shut-off/power-down facility). The breakout board was modified to enable current direction sensing output and also enable variation of sensitivity of the current sense voltage.


Many projects require the measurement (or perhaps more generally the "sensing") of current for either circuit control (e.g., battery charging, power supply, i.e., making decisions based upon measured current) or circuit protection (e.g., fault condition has occurred and power needs to be shunted/isolated). Measurement of current can be categorised as either by "direct methods" or "indirect methods" (1).

Indirect methods rely upon magnetic induction using current transformers, Rogowski Coils or Hall-Effect Devices. A major advantage of indirect methods is the isolation of the measurement components from the line voltage. Current transformers (Rogowski Coils are air-core designs rather than having a high permeability core such as laminated steel) require an AC or switched DC current in order to produce a current measurement. This is obviously a limitation in a "straight" DC circuit application (and current transformers are relatively expensive in the DIY setting).

Another indirect method relies upon the Hall Effect, the production of a voltage difference across an electrical conductor, transverse to an electric current in the conductor and a magnetic field perpendicular to the current (2). The advantage of Hall effect devices is that they are capable of measuring large currents with low power dissipation. However, the literature reports there are numerous drawbacks that can limit their use, including non-linear temperature drift requiring compensation, limited bandwidth, low range current detection requires a large offset voltage that can lead to error, susceptibility to external magnetic fields, and high cost.

An example of the implementation of a Hall Effect device for current sensing is the Allegro ACS712 Hall Effect-based linear current sensor. The ACS712 was assessed but the breakout board version purchased was found to have low sensitivity compared to the datasheet value (possibly due to being manufactured from production rejects, hence enabling the low cost items available from ebay/Chinese suppliers). As a note, the Allegro ACS723 05AB (SOIC 8-pin package $4.50/each from RS-Online at time of writing) is now available. This current sensor has the same advantages of the ACS721 (isolation etc) but a sensitivity of 400mV/A (for the 05AB version, ± 5A).

However, devices based upon "direct methods" (which include current sensing resistors and inductor DC resistance) are available more economically and provide greater sensitivity. The use of a "sense resistor" for current measurement is well known having the advantages of simplicity and linearity. The MAX471 is such a device providing high-side current sensing (i.e. does not interfere with the ground path) for currents up to ± 3A.

The Maxim MAX471 has the other following benefits (as listed in the datasheet):

    • precision internal resistor
    • 2% accuracy over temperature range
    • monitors both charge and discharge
    • 100 uA max supply current
    • 3 - 36V supply voltage

The MAX471 has an internal sense resistor for currents up to ± 3A (otherwise, the MAX472 can be used with external sense resistor for higher currents). A breakout board version (eBay Chinese supplier) was used for the evaluation of the MAX471 (both due to this being less costly than purchasing the component as a stand-alone item, and the MAX471 itself is now obsolete, not being readily available to the DIY'er - the current production version is the MAX4080 available from Maxim).

The Circuit Details and Schematic Diagrams Sections provide information about physical connection of the MAX471 to a circuit to enable current measurement either manually using a DMM (this is more just to test the actual IC and breakout board) and with a PIC18F248 microcontroller.

The Testing/Experimental Results Section discusses the various steps used in testing the MAX471 and examining the utility of the component compared to just using a shunt resistor. Also demonstrated is how to modify the breakout board to enable access to all the MAX471 functionality (i.e., current direction and shut-off/power-down facility). The breakout board was further modified to enable variation of sensitivity of the current sense voltage.


The circuit consists largely of the usual minimum requirements for a PIC (PIC18F248 dealt with here) that is, power supply, oscillator (external crystal oscillator - 40MHz) and in-circuit serial programming (ICSP). A voltage reference is formed by the TL431 programmable shunt regulator diode.

The majority of the circuit is based upon the DIY PIC Development Board.

Circuit Operation

A "wall wart" power supply was chosen rather than constructing a dedicated DC power supply dropping/converting from an AC wall socket. Surplus chargers from laptops are readily available (in this case supplying 16-24V with 65W max) which provide not only a safer option (compared to construction from a suitable transformer, rectifier, connection to AC etc) but also a much more economical option (generally zero cost for a surplus charger, compared to ten's of dollars for a suitable transformer, let alone cost of ancillary circuitry, PCB etc).

The surplus laptop charger requires a suitable socket connection and a voltage regulator, in this case a LM317T, to provide the regulated 5V generally required by PIC microcontrollers. The power supply circuit is given in the Schematics Section. The LM317T circuit is the standard design direct from the datasheet, with input and output capacitors to provide smoothing and the resistor/potentiometer to provide selection of output voltage.

The MAX471 breakout board produces a voltage of 1V/A (the MAX471 itself is nominally 500µA/A and a 2kΩ Rout resistor is used on the breakout board, thus giving the 1V/A) which is read using the onboard ADC (10-bit) provided by the PIC18F248. The MAX471 provides an output at the SIGN pin (pin 5) for current direction, but this is not enabled on the breakout board as purchased from the ebay supplier. The Schematic Section shows how the breakout board was modified to enable utilising the SIGN signal to determine current direction. A 100kΩ pull-up resistor was used as recommended by the datasheet.

Simiarily, the breakout board was modified further to enable changing the value of the Rout resistor. This enabled better matching of the full scale output from the MAX471 to the range of the ADC/voltage reference.

A TL431 programmable shunt regulator diode is used to provide a 5V reference for the PIC ADC module.

A MAX232 is used to enable RS-232 communication between the PIC microcontroller and an attached PC, in order to display the measured voltage (and hence desired circuit current) from the MAX471.


Software/Firmware

The firmware enables connection of the PIC18F248 with a PIC via RS-232 and periodic reading of the voltage on the MAX471 pin 5 (for current direction) and pin 8 (for current magnitude) via the onboard ACD. The firmware is the same as described and detailed in the PIC analog to digital converter (ADC) page.


Note: Image loading can be slow depending on server load.

  • MAX471 SchematicMAX471 Schematic

    Silver Membership registration gives access to full resolution schematic diagrams.

    MAX471 Schematic

Modified breakout board to enable access to full functionality of MAX471.

modified breakout board

Pin 1 of the MAX471 enables shutdown. Connection to ground for normal operation, when "high" the MAX471 enters shutdown mode with supply current less than 5µA (the datasheet specifies normal supply current is typical 20µA, with a maximum of 48µA). On the breakout board, pin 1 is connected directly to ground, and the PCB would have required drilling/cutting to enable microcontroller access to pin 1 of the MAX471. This was not done for this testing of the MAX471/breakout board.


This project did not require a PCB.

The construction was done using prototyping board. See the photographs and schematic diagram sections.

Qty Schematic Part-Reference Value Notes
Resistors
3R1-R310K1/4W, 10% 
1R41501/4W, 10% 
Capacitors
2C1,C222pFCeramic 
1C30.33uF 
1C40.1uF 
5C6-C101uF 
Diodes
1D11N-4001 
Integrated Circuits
1U1PIC18F248PIC microcontroller  datasheet
1U27805Linear Voltage Regulator  datasheet
1U3MAX232ERS232 Driver/Receiver datasheet
1U4TL431Programmable Voltage Reg. Diode datasheet
1U5MAX471Current Sensor Breakout Board version datasheet
Miscellaeous
1J1CONN-H55-pin connector for ICSP
1SW1SW-SPDT 
1X110MHzCrystal Oscillator
Description Downloads
MAX471 - Bill of Materials Text File Download

Testing of the MAX471 breakout board consisted of a number of stages. Initially, dummy loads where connected to produce currents of known magnitude with the output of the MAX471 Vout pin monitored with a digital multimeter. I have a DIY electronic dummy load which made applying known currents easy. If this is not available, simply use a suitable load resistor (and varying the applied voltage and or resistor value to develop the desired current value).

The MAX471 produces a current proportional to the measured current of 500µA/A and with a 2kΩ Rout resistor (as installed on the breakout board) from pin 8 to ground, this provides an output voltage of 1V/A.

Using the DIY electronic dummy load (see the Photographs Section) the expected 1V/A was indeed found on the output from the MAX471 breakout board when measuring the OUT pin with a DMM. Various supply voltages (the MAX471 can tolerate 3-36V) were applied and the load current varied. The expected 1V/A was observed with very stable readings being produced.

The MAX471 provides an output at the SIGN pin (pin 5) for current direction, but this is not enabled on the breakout board as purchased from the ebay supplier. The Schematic Section shows how the breakout board was modified to enable utilising the SIGN signal to determine current direction. A 100kΩ pull-up resistor was used as recommended by the datasheet. When the current was reversed at the inputs RS- and RS+ of the breakout board, either a logic high or low as indeed produced to indicate current direction.

Simiarily, the breakout board was modified further to enable changing the value of the Rout resistor. This enabled better matching of the full scale output from the MAX471 to the range of the ADC/voltage reference. From the datasheet, for the MAX471 the following equation gives the value of Rout for a desired full-scale output voltage (Vout) and full-scale current being measured (Iload).

Rout = Vout / (Iload x 500µA/A)

Note that the desired full-scale output voltage (Vout) can be no greater than the MAX471 supply voltage VRS+ - 1.5V.

With the PIC18F248 operating voltage of 5V, it is convenient to have a Vref of either 5V or 2.5V for the ADC. So using the above equation, for a full scale input range of 3A, in order to produce a full scale output voltage of 2.5V Rout is 1667Ω.

Another example, I have a number of solar cells that produce a maximum output current of 0.5A, so to produce a full scale MAX471 output voltage of 2.5V Rout equals 10kΩ

Conclusion

The MAX471 provides a cheap and convenient option for measuring current up to 3A (the MAX472 can be used if higher currents required). The breakout board version is inconvenient in that current direction and the ability to alter Rout is not provided (although relatively easily changed to enable this functionality - see Schematics Section).

The sensitivity provided by the MAX471 (500µA/A and with a 2kΩ Rout resistor (as installed on the breakout board) from pin 8 to ground, provides an output voltage of 1V/A) enables adequate resolution and sensitivity with most ADC/voltage references commonly available (10-bit on-board ADC available on most Microchip microcontrollers).

Compared to the ACS712 current sensor the MAX471 provides much better sensitivity and resolution. Although the MAX471 requires an additional I/O pin on a microcontroller to enable determination of current direction, compared to the ACS712 which provides current direction via the magnitude of the current sensor voltage output. The MAX471 does not provide galvanic isolation from the measurement circuit unlike the ACS712.

Finally, the output voltage corresponding to the measured input current was very stable in regards to the MAX471 supply voltage, unlike the ACS712 which requires a very stable supply in order to maintain the "set point" of Vcc/2 which is the ACS471 "zero" current signal.


As a general precauation double check polarity of power connections etc before powering up the IC. The MAX471 has a power supply requirement of DC 3-36V.

The Schematics Section shows how the breakout board was modified to enable utilising the SIGN signal to determine current direction. Simiarily, the breakout board was modified further to enable changing the value of the Rout resistor.


No video's loaded for this project.

Comments/Questions

No comments yet.

Add Comment/Question

Only Logged-In Members can add comments

"If we could sell our experiences for what they cost us, we'd all be millionaires".

Please donate any amount to help with hosting this web site.

If you subscribe (only $2/annum) you can view the site without advertisements and get emails abouts updates etc.

X

Sorry!

Only logged-in users with correct Membership Level can download.


Membership starts at only $2, so join now!