Smart Digital Magnetometer HMR2300 The Honeywell HMR2300 is a three-axis smart digital magnetometer to detect the strength and direction of an incident magnetic field. The three of Honeywell's magneto-resistive sensors are oriented in orthogonal directions to measure the X, Y and Z vector components of a magnetic field. These sensor outputs are converted to 16-bit digital values using an internal deltasigma A/D converter. An onboard EEPROM stores the magnetometer's configuration for consistent operation. The data output is serial full-duplex RS-232 or half-duplex RS-485 with 9600 or 19,200 data rates. Applications include: Attitude Reference, Compassing & Navigation, Traffic and Vehicle Detection, Anomaly Detection, Laboratory Instrumentation and Security Systems. A RS-232 development kit version is available that includes a windows compatible demo program, interface cable, AC adapter, and carrying case. Honeywell continues to maintain product excellence and performance by introducing innovative solid-state magnetic sensor solutions. These are highly reliable, top performance products that are delivered when promised. Honeywell's magnetic sensor solutions provide real solutions you can count on. FEATURES & BENEFITS High Accuracy Over 1 gauss, <0.5% Full Scale Range of 2 gauss, <70 gauss Resolution Three Axis (X, Y, Z) Digital Outputs 10 to 154 Samples Per Second, Selectable RS-232 or RS-485 Serial Data Interfaces PCB or Aluminum Enclosure Options 6-15 volt DC Unregulated Power Supply Interface HMR2300 SPECIFICATIONS Characteristics Conditions Min Supply Voltage Pin 9 referenced to Pin 5 (Ground) 6.5 Supply Current Vsupply = 15V, with S/R = On Typ Max Units 15 Volts 35 mA Power Supply 27 Temperature Operating Ambient -40 +85 C Ambient, Unbiased -55 125 C Full Scale (FS), Total Field Applied -2 +2 gauss Resolution Applied Field to Change Output 67 Accuracy RSS of All Errors @+25C 1 gauss 2 gauss 0.01 1 0.52 2 %FS Best Fit Straight Line @+25C 1 gauss 2 gauss 0.1 1 0.5 2 %FS Storage Magnetic Field Range Linearity Error micro-gauss Hysterisis Error 3 Sweeps Across 2 gauss @+25C 0.01 0.02 %FS Repeatability Error 3 Sweeps Across 2 gauss @+25C 0.05 0.10 %FS Gain Error Applied Field for Zero Reading 0.05 0.10 %FS Offset Error Applied Field for Zero Reading 0.01 0.03 %FS Temperature Coefficient of Gain -600 Effect Power Supply Effect ppm/C 114 From +6 to +15V with 1 gauss Applied Field 150 ppm/V PCB Only PCB and Non-Flanged Enclosure PCB and Flanged Enclosure 28 94 98 grams Operating, 5 to 10Hz for 2 Hours 10Hz to 2kHz for 30 Minutes 10 2.0 mm g Mechanical Weight Vibration Digital I/O Timing TRESP *dd Commands (dd = Device ID) *ddP *ddR, *ddS, *ddT *ddC *ddQ *99 Commands *99Q 1.9 2 3 6 40 2+(ddx80) 2+(ddx40) 2+(ddx120) 2.2 3.2 6.2 60 2+Typ 2+Typ 2+Typ msec TDELAY *dd Commands (dd = Device ID) *99 Commands 39 40 ddx40 41 2+Typ msec TBYTE 9600 19,200 1.04 0.52 Power Applied to End of Start-Up Message 50 TSTARTUP 2 (See Timing Diagrams) msec 80 msec www.honeywell.com HMR2300 Characteristics Digital I/O Timing Conditions Min Typ Max Units (See Timing Diagrams) TRESP *dd Commands (dd = Device ID) *ddP *ddR, *ddS, *ddT *ddC *ddQ *99 Commands *99Q 1.9 2 3 6 40 2+(ddx80) 2+(ddx40) 2+(ddx120) 2.2 3.2 6.2 60 2+Typ 2+Typ 2+Typ msec TDELAY *dd Commands (dd = Device ID) *99 Commands 39 40 ddx40 41 2+Typ msec TBYTE 9600 19,200 1.04 0.52 Power Applied to End of Start-Up Message 50 TSTARTUP msec 80 msec BLOCK DIAGRAM V+ Gnd Pwr Cond C TX UART ADC RX HMC1002 HMC2003 HMC1001 EEPROM RS-232 COMMUNICATIONS (Timing is Not to Scale) www.honeywell.com 3 HMR2300 RS-485 COMMUNICATIONS (Timing is Not to Scale) GLOBAL ADDRESS (*99) DELAY (Timing is Not to Scale) PIN CONFIGURATION Pin Number 1 2 3 4 5 6 7 8 9 Pin Name NC TD RD NC GND NC NC NC V+ Description No Connection Transmit Data, RS-485 (B+) Receive Data, RS-485 (A-) No Connection Power and Signal Ground No User Connection (factory X offset strap +) No User Connection (factory Y offset strap +) No User Connection (factory Z offset strap +) Unregulated Power Input (+6 to +15 VDC) PCB DIMENSIONS AND PINOUT (Connector Not Shown for Clarity) 4 www.honeywell.com HMR2300 CASE DIMENSIONS RS-232 UNBALANCED I/O INTERCONNECTS HOST PC HMR2300 TD RD D R RD TD R D GD www.honeywell.com GD 5 HMR2300 RS-485 BALANCED I/O INTERCONNECTS HOST PC AD Z Z R B+ RD(A) Z = 120 ohms RD(A) R R TD(B) TD(B) D D HMR2300 HMR2300 ID = 01 ID = 02 DATA COMMUNICATIONS The RS-232 signals are single-ended undirectional levels that are sent received simultaneously (full duplex). One signal is from the host personal computer (PC) transmit (TD) to the HMR2300 receive (RD) data line, and the other is from the HMR2300 TD to the PC RD data line. When a logic one is sent, either the TD or RD line will drive to about +6 Volts referenced to ground. For a logic zero, the TD or RD line will drive to about -6 Volts below ground. Since the signals are transmitted and dependent on an absolute voltage level, this limits the distance of transmission due to line noise and signal to about 60 feet. When using RS-485, the signals are balanced differential transmissions sharing the same lines (half-duplex). This means that logic one the transmitting end will drive the B line at least 1.5 Volts higher than the A line. For a logic zero, the transmitting end will drive the B line at least 1.5 Volts lower than the A line. Since the signals are transmitted as difference voltage level, these signals can withstand high noise environments or over very long distances where line loss may be a problem; up to 4000 feet. Note that long RS-485 lines should be terminated at both ends with 120-ohm resistors. Another precaution on RS-485 operation is that when the HMR2300 is in a continuous output mode of operation, the host PC may have to send repeated escape and carriage return bytes to stop the stream of output data. If the host can detect a recieved carriage return byte (0D hex), and immediately send the escape-carriage return bytes; then a systematic stop of continuous output is likely. If manually sent, beware that the half-duplex nature of the interface corrupt the HMR2300 outbound data while attempting to get the stop command interleaved between the data. As noted by the Digital I/O timing specification and Figure 3, the HMR2300 has a delayed response feature based on the programmed device ID in response to global address commands (*99....). Each HMR2300 will take its turn responding so that units do not transmit simultaneously (no contension). These delays also apply to the RS-232 interface versions of the HMR2300. 6 www.honeywell.com HMR2300 COMMAND INPUTS A simple command set is used to communicate with the HMR2300. These commands can be automated; or typed in realtime while running communication software programs, such a windows hyperterminal. Command Inputs(1) Response(2) Bytes(3) Description ASCII - Output Readings in BCD ASCII Format (Default) Binary - Output Readings in Signed 16-bit Bianary Format P = Polled - Output a Single Sample (Default) C = Continuous - Output Readings at Sample Rate Escape Key - Stops Continuous Readings Set Sample Rate to nnn Where: Nnn = 10, 20, 25, 30, 40, 50, 60, 100, 123, or 154 Samples/sec (Default = 20) S/R Mode: TN - ON = Auto S/R Pulses (Default) TF - OFF = Manual S/R Pulses *ddT Toggles Command (Default = On) ] Character - Single S/R: ]S -> SET = Set Pulse ]R -> RST = Reset Pulse Toggle Alternates Between Set and Reset Pulse Read Device ID (Default = 00) Set Device ID Where nn = 00 to 98 Set Baud Rate to 9600 bps (Default) Format *ddWE *ddA *ddWE *ddB ASCII_ON BINARY_ON 9 10 Output *ddP *ddC Esc *ddWE *ddR=nnn {x, y, z reading} {x, y, z stream} {stream stops} OK 7 or 28 ... 0 3 *ddWE *ddTN *ddWE *ddTF *ddWE *ddT *dd]S *dd]R *dd] *99ID= *ddWE *ddID=nn *99WE *99!BR=S S/R_ON S/R_OFF {Toggle} SET RST {Toggle} ID=_nn OK OK BAUD_9600 OK BAUD=_19,200 ZERO_ON ZERO_OFF {Toggle} AVG_ON AVG_OFF {Toggle} OK OK {See Desc.} 7 8 7 or 8 4 4 4 7 3 14 OK BAUD=_9600 OK BAUD=_9600 or BAUD=_19,200 SER#_nnnn 14 S/W_vers:_ nnnn H/W_vers:_ nnnn OK Sample Rate Set/Reset Mode Set/Reset Pulse Device ID Baud Rate *99WE *99!BR=F Zero Reading Average Readings Re-Enter Response Query Setup *ddWE *ddWE *ddWE *ddWE *ddWE *ddWE *ddWE *ddWE *ddZN *ddZF *ddZR *ddVN *ddVF *ddV *ddY *ddN *ddQ Default Settings *ddWE *ddD Restore Settings *ddWE *ddRST Serial Number *dd# Software Version *ddF Hardware Version Write Enable *ddH *ddWE 14 14 Set Baud Rate to 19,200 bps (8 bits, no parity, 1 stop bit) Zero Reading Will Store and Use Current as a Negative Offset so That the Output Reads Zero Field *ddZR Toggles Command The Average Reading for the Current Sample X(N) is: Xavg=X(N)/2 + X(N-1)/4 + X(N-2)/8 + X(N-3)/16 + ... *ddV Toggles Command Turn the "Re-Enter" Error Response ON (*ddY) or OFF (*ddN). OFF is Recommended for RS-485 (Default = ON) Read Setup Parameters. Default: ASCII, POLLED, S/R ON, ZERO OFF, AVG OFF, R ON, ID=00, 20 sps Change All Command Parameter Settings to Factory Default Values Change All Command Parameter Settings to the Last User Stored Values in the EEPROM 16 22 Output the HMR2300 Serial Number 27 Output the HMR2300 Software Version Number 19 Output the HMR2300 Hardware Version Number 8 9 8 or 9 7 8 7 or 8 3 3 62-72 Activate a Write Enable. This is required before commands: Set Device ID, Baud Rate, and Store Parameters. Store *ddWE *ddSP DONE 8 This writes all parameter settings to EEPROM. These Parameters OK values will be automatically restored upon power-up. Too Many Wrong Entry Re-enter 9 A command was not entered properly or 10 characters Characters were typed after an asterisk (*) and before a . Missing WE Write Enable Off WE_OFF 7 This error response indicates that this instruction requires Entry a write enable command immediately before it. (1) All inputs must be followed by a carriage return, or Enter, key. Either upper or lower case letters may be used. The device ID (dd) is a decimal number between 00 and 99. Device ID = 99 is a global address for all units. (2) The "" symbol is a carriage return (hex 0D). The "_" sign is a space (hex 20). The output response will be delayed from the end of the carriage return of the input string by 2 msec (typ.), unless the command sent as a global device ID = 99. www.honeywell.com 3 7 HMR2300 DATA FORMATS The HMR2300 transmits each X, Y, and Z axis as a 16-bit value. The output data format can be either 16-bit signed binary (sign plus 15 bits) or a binary coded decimal (BCD) ASCII characters. The command *ddA will select the ASCII format and *ddB will select the binary format. The order of ouput for the binary format is Xhi, Xlo, Yhi, Ylo, Zhi, Zlo. The binary format is more efficient for a computer to interpret since only 7 bytes are transmitted. The BCD ASCII format is easiest for user interpretation but requires 28 bytes per reading. There are limitations on the output sample rate (see table below) based on the format and baud rate selected. Examples of both binary and BCD ASCII outputs are shown below for field values between 2 gauss. Field (gauss) +2.0 +1.5 +1.0 +0.5 0.0 BCD ASCII Value 30,000 22,500 15,000 7,500 00 -0.5 -1.0 -1.5 -2.0 -7,500 -15,000 -22,500 -30,000 Binary Value (Hex) High Byte Low Byte 75 30 57 E4 3A 98 1D 4C 00 00 E2 C3 A8 8A B4 74 1C D0 Binary Format: 7 Bytes XH | XL | YH | YL | ZH | ZL | XH = Signed Byte, X axis XL = Low Byte, X axis = Carriage Return (Enter key), Hex Code = 0D ASCII Format: 28 Bytes SN | X1 | X2 | CM | X3 | X4 | X5 | SP | SP | SN | Y1 | Y2 | CM | Y3 | Y4 | Y5 | SP | SP | SN | Z1 | Z2 | CM | Z3 | Z4 | Z5 | SP | SP | The ASCII characters will be readable on a monitor as sign decimal numbers. This format is best when the user is interpreting the readings. PARAMETER SELECTION VERSUS OUTPUT SAMPLE RATE Sample Rate (sps) 10 20 25 30 40 50 60 100 123 154 8 ASCII 9600 yes yes yes yes no no no no no no 19,200 yes yes yes yes yes yes no no no no Binary 9600 yes yes yes yes yes yes yes yes no no 19,200 yes yes yes yes yes yes yes yes yes yes f3dB Notch (Hz) 17 17 21 26 34 42 51 85 104 131 (Hz) 50/60 50/60 63/75 75/90 100/120 125/150 150/180 250/300 308/369 385/462 Command Input Rate - min. (msec) 20 20 16 14 10 8 7 4 3.5 3 www.honeywell.com HMR2300 DEVICE ID The Device ID command (*ddID=nn) will change the HMR2300 ID number. A Write Enable (*ddWE) command is required before the device ID can be changed. This is required for RS-485 operation when more than one HMR2300 is on a network. A Device ID = 99 is universal and will simultaneously talk to all units on a network. BAUD RATE COMMAND The Baud Rate command (*dd!BR=F or S) will change the HMR2300 baud rate to either fast (19,200 baud) or slow (9600 baud). A Write Enable (*ddWE) command is required before the baud rate can be changed. The last response after this command has been accepted will be either BAUD=9600 or BAUD=19,200. This will indicate to the user to change to the identified new baud rate before communications can resume. ZERO READING COMMAND The Zero Reading command (*ddZN) will take a magnetic reading and store it in the HMR2300's microcontroller. This value will be subtracted from subsequent readings as an offset. The zero reading will be terminated with another command input(*ddZF) or a power down condition. This feature is useful for setting a reference attitude or nulling the earth's field before anomaly detection. SET/RESET AND AVERAGE COMMANDS The set-reset function generates a current/magnetic field pulse to each sensor to realign the permalloy thin film magnetization. This yields the maximum output sensitivity for magnetic sensing. This pulse is generated inside the HMR2300 and consumes less than 1mA typically. The Set/Reset Mode command (*ddTN or *ddT) activates an internal switching circuit that flips the current in a "Set" and "Reset" condition. This cancels out any temperature drift effects and ensures the sensors are operating in their most sensitive region. Fluctuations in the magnetic readings can be reduced by using the Average Readings commands (*ddVN or *ddV). These commands provide a low pass filter effect on the output readings that reduces noise due to Set/Reset switching and other environmental magnetic effects. The two figures below show the average readings effect for step and impulse responses. Switching the set-reset state is not required to sense magnetic fields. A single Set (or Reset) pulse will maximize the output sensitivity and it will stay that way for months or years. To turn off the internal switching, enter the command *ddTF or *ddT. In this state the sensors are either in a Set or Reset mode. If the HMR2300 is exposed to a large magnetic field (>10 gauss), then another set pulse is required to maximize output sensitivity. In the Set mode, the direction of the sensitive axis' are shown on the enclosure label and the board dimensions figure. In the Reset mode, the sensitive field directions are opposite to those shown. By typing *dd], the user can manually activate a Set or Reset pulse. The S/R pulse commands can be used the continuous read mode to flip between a Set and Reset state. Note that the first three readings immediately after these commands will be invalid due to the uncertainty of the current pulse to the sensor sample time. DEFAULT AND RESTORE COMMANDS The Defaut Settings command (*ddD) will force the HMR2300 to all the default parameters. This will not be a permanent change unless a Store Parameter command (*ddSP) is issued after the Write Enable command. The Restore Settings command (*ddRST) will force the HMR2300 to all the stored parameters in the EEPROM. www.honeywell.com 9 HMR2300 OUTPUT SAMPLE RATES The sample rate can be varied from 10 samples per second (sps) to 154 sps using the *ddR=nnn command. Each sample contains an X, Y, and Z reading and can be outputted in either 16-bit signed binary or binary coded decimal (BCD) ASCII. The ASCII format shows the standard numeric characters displayed on the host computer display. Some sample rates may have restrictions on the format and baud rate used, due to transmission time constraints. There are 7 Bytes transmitted for every reading binary format and 28 Bytes per reading in ASCII format. Transmission times for 9600 baud are about 1 msec/Byte and for 19,200 baud are about 0.5msec/Byte. The combinations of format and and baud rate selections are shown in the above Table. The default setting of ASCII format and 9600 baud will only transmit correctly up to 30 sps. Note the HMR2300 will output a higher data settings, but the readings may be incorrect and will be at alower output rate than selected. For higher sample rates (>60 sps), it is advised that host computer settings for the terminal preferences be set so a line feed is not appended to the sent commands. This slows down the reception of data, and it will not be able to keep up with the incoming data stream. INPUT SIGNAL ATTENUATION Magnetic signals being measured will be attenuated based on the sample rate selected. The bandwidth, defined by the 3dB point, is shown in the above Table for each sample rate. The default rate of 20 sps has a bandwidth of 17Hz. The digital filter inside the HMR2300 is the combination of a comb filter and a low pass filter. This provides a linear phase response with a transfer function that has zeros in it. When the 10 or 20 sps rate is used, the zeros are at the line frequencies of 50 and 60 Hz. These zeros provide better than 125 dB rejection. All multiples of the zeros extend throughout the transfer function. For example, the 10 and 20 sps rate has zeros at 50, 60, 100, 120, 150, 180, ... Hz. The multiples of the zeros apply to all the sample rates against the stated notch frequencies in the above Table. COMMAND INPUT RATE The HMR2300 limits how fast the command bytes can be recieved based on the sample rate selected. The above Table shows the minimum time between command bytes for the HMR2300 to correctly read them. This is usually not a problem when the user is typing the commands from the host computer. The problem could arise from an application program outputting command bytes too quickly. CIRCUIT DESCRIPTION The HMR2200 Smart Digital Magnetometer contains all the basic sensors and electronics to provide digital indication of magnetic field strength and direction. The HMR2300 has all three axis of magnetic sensors on the far end of the printed circuit board, away from the J1 and J2 connector interfaces. The HMR2300 uses the circuit board mounting holes or the enclosure surfaces as the reference mechanical directions. The complete HMR2300 PCB assembly consists of a mother board, daughter board, and the 9-pin D-connector (J1). The HMR2300 circuit starts with Honeywell HMC2003 3-Axis Magnetic Sensor Hybrid to provide X, Y, and Z axis magnetic sensing of the earth's field. The HMC2003 contains the AMR sensing bridge elements, a constant current source bridge supply, three precision instrumentation amplifiers, and factory hand-selected trim resistors optimized for performance for magnetic field gain and offset. The HMC2003 is a daughter board that plugs into the HMC2300 motherboard, and the hybrid analog voltages from each axis is into analog multiplexors and then into three 16-bit Analog to Digital Converters (ADCs) for digitization. No calibration is necessary as the HMC2003 hybrid contains all the compensation for the sensors, and the set/reset routine handles the temperature drift corrections. A microcontroller integrated circuit receives the digitized magnetic field values (readings) by periodically querying the ADCs and performs any offset corrections. This microcontroller also performs the external serial data interface and other housekeeping functions. An onboard EEPROM integrated circuit is employed to retain necessary setup variables for best performance. The power supply for the HMR2300 circuit is regulated +5 volt design (LM2931M) with series polarity power inputs diodes in case of accidental polarity reversal. A charge pump circuit is used to boost the regulated voltage for the set/reset pulse function going to the set/reset straps onboard the HMC2003. Transient protection absorbers are placed on the TD, RD, and V+ connections to J1. 10 www.honeywell.com HMR2300 APPLICATIONS PRECAUTIONS Several precautions should be observed when using magnetometers in general: The presence of ferrous materials, such as nickel, iron, steel, and cobalt near the magnetometer will create disturbances in the earth's magnetic field that will distort the X, Y, and Z field measurements. The presence of the earth's magnetic field must be taken into account when measuring other magnetic fields. The variance of the earth's magnetic field must be accounted for in different parts of the world. Differences in the earth's field are quite dramatic between North America, South America and the Equator region. Perming effects on the HMR2300 circuit board need to be taken into account. If the HMR2300 is exposed to fields greater than 10 gauss, then it is recommended that the enclosure/circuit boards be degaussed for highest sensitivity and resolution. A possible result of perming is a high zero-field output indication that exceeds specification limits. Degaussing wands are readily available from local electronics tool suppliers and are inexpensive. Severe field offset values could result if not degaussed. NON-FERROUS MATERIALS Materials that do not affect surrounding magnetic fields are: copper, brass, gold, aluminum, some stainless steels, silver, tin, silicon, and most non-metals. HANDLING PRECAUTIONS The HMR2300 Smart Digital Magnetometer measures fields within 2 gauss in magnitude with better than 0.1 milli-gauss resolution. Computer floppy disks (diskettes) store data with field strengths of approximately 10 gauss. This means that the HMR2300 is many times more sensitive than common floppy disks. Please treat the magnetometer with at least the same caution as your diskettes by avoiding motors, CRT video monitors, and magnets. Even though the loss of performance is recoverable, these magnetic sources will interfere with measurements. DEMONSTRATION PCB MODULE KIT The HMR2300 Demonstration Kit includes additional hardware and Windows software to form a development kit for with the smart digital magnetometer. This kit includes the HMR2300 PCB and enclosure, serial port cable with attached AC adapter power supply, and demo software plus documentation on a compact disk (CD). The figure below shows the schematic of the serial port cable with integral AC adapter. There will be three rotary switches on the AC adapter. These should be pointed towards the positive (+) polarity, +9 volts, and 120 or 240 VAC; depending your domestic supply of power. D9-F D9-F data 2 3 2 3 data 5 5 ground 9 9 GRY +9vdc BLK AC adapter www.honeywell.com 11 HMR2300 ORDERING INFORMATION Ordering Number Product HMR2300-D00-232 HMR2300-D00-485 PCB Only (No Enclosure), RS-232 I/O PCB Only (No Enclosure), RS-485 I/O HMR2300-D20-232 HMR2300-D20-485 Flush-Base Enclosure, RS-232 I/O Flush-Base Enclosure, RS-485 I/O HMR2300-D21-232 HMR2300-D21-485 Extended-Base Enclosure, RS-232 I/O Extended-Base Enclosure, RS-485 I/O HMR2300-D20-232-DEMO HMR2300-D20-485-DEMO HMR2300-D21-232-DEMO HMR2300-D21-485-DEMO Demo Kit, Flush-Base Enclosure, RS-232 I/O Demo Kit, Flush-Base Enclosure, RS-485 I/O Demo Kit, Extended-Base Enclosure, RS-232 I/O Demo Kit, Extended-Base Enclosure, RS-485 I/O FIND OUT MORE For more information on Honeywell's Magnetic Sensors visit us online at www.magneticsensors.com or contact us at 800-323-8295 (763-954-2474 internationally). The application circuits herein constitute typical usage and interface of Honeywell product. Honeywell does not warranty or assume liability of customerdesigned circuits derived from this description or depiction. Honeywell reserves the right to make changes to improve reliability, function or design. Honeywell does not assume any liability arising out of the application or use of any product or circuit described herein; neither does it convey any license under its patent rights nor the rights of others. U.S. Patents 4,441,072, 4,533,872, 4,569,742, 4,681,812, 4,847,584 and 6,529,114 apply to the technology described Honeywell 12001 Highway 55 Plymouth, MN 55441 Tel: 800-323-8295 www.magneticsensors.com 12 Form #900139 Rev J January 2012 (c)2006 Honeywell International Inc. www.honeywell.com