User Manual RM3000-f Evaluation Board 3-Axis Geomagnetic Sensor Module
Table of Contents 1 2 3 COPYRIGHT & WARRANTY INFORMATION .................................................................. 2 INTRODUCTION................................................................................................................. 3 SPECIFICATIONS .............................................................................................................. 4 3.1 RM3000-F EVALUATION BOARD CHARACTERISTICS ........................................ 4 3.2 TYPICAL OPERATING PERFORMANCE ......
1 Copyright & Warranty Information © Copyright PNI Sensor Corporation 2011 All Rights Reserved. Reproduction, adaptation, or translation without prior written permission is prohibited, except as allowed under copyright laws. Revised February 2014: for the most recent version visit our website at www.pnicorp.com PNI Sensor Corporation 2331 Circadian Way Santa Rosa, CA 95407, USA Tel: (707) 566-2260 Fax: (707) 566-2261 Warranty and Limitation of Liability.
2 Introduction Thank you for purchasing PNI Sensor Corporation’s RM3000-f Evaluation Board (pn 13094). The RM3000-f Evaluation Board is a plug-and-play version of PNI’s RM3000-f Geomagnetic Sensor Suite, principally intended for quickly evaluating and prototyping PNI’s geomagnetic sensor technology. The primary components of the RM3000-f Evaluation Board are two SenXY-f sensor coils, one Sen-Z-f sensor coil, and PNI’s 3D MagIC ASIC controller.
3 Specifications 3.1 RM3000-f Evaluation Board Characteristics Table 3-1: Absolute Maximum Ratings Parameter Minimum Maximum Units Analog/Digital DC Supply Voltage (AVDD & DVDD) -0.3 +3.7 VDC Input Pin Voltage -0.3 VDD + 0.3 VDC Input Pin Current @ 25C -10.0 +10.0 mA Storage Temperature -40° +85° C CAUTION: Stresses beyond those listed above may cause permanent damage to the device. These are stress ratings only.
3) Sensitivity is the inverse of gain, and a single “cycle count” is equivalent to the least significant bit or “LSB”. System noise limits useable sensitivity such that above ~200 cycle counts there are diminishing returns on useable sensitivity. 4) The maximum sample rate and the gain are inversely related, such that higher sample rates can be obtained by reducing the number of cycle counts, but this also results in diminished gain and sensitivity. Also see Figure 3-1 and Figure 3-2.
3-Axis Maximum Data Rate (Hz) 1000 900 800 700 600 500 400 300 200 100 0 0 50 100 150 200 250 Cycle Counts 3-Axis Current Consumption @ 12 Hz Sample Rate (µA) Figure 3-2: 3-Axis Maximum Sample Rate vs. Cycle Counts 300 250 200 150 100 50 0 0 50 100 150 200 250 Cycle Counts Figure 3-3: Current Consumption vs.
3.
4 RM3000-f Evaluation Board Overview & Set-Up 4.1 PCB Orientation and Output Polarities The arrow printed on the RM3000-f Evaluation Board indicates the module’s reference direction. The sensors are arranged in a north-east-down (NED) coordinate system, and the arrow is parallel to the x-axis sensor. When the module is pointing directly magnetic south the x-axis reading will be maximized and the y-axis will be zero.
SCLK (SPI Serial Clock Input) SCLK is a SPI input used to synchronize the data sent in and out through the MISO and MOSI pins. SCLK is generated by the customer-supplied master device and should be 1 MHz or less. One byte of data is exchanged over eight clock cycles. Data is captured by the master device on the rising edge of SCLK.
Note: If a new command sequence is started before the previous measurement has completed (before DRDY goes HIGH), the previous command will be overwritten. This will also stop the measurement cycle. If you try to send a new command during the readout phase, after DRDY goes HIGH, the command will be ignored until all 16 bits have been clocked our or the CLEAR pin is set HIGH (then LOW again).
Figure 4-1: SPI Timing Diagram Table 4-2: SPI Timing Specifications Symbol Description Min Max Units tSSDV Time from SSN to Command Byte on MOSI 1 us tDBSH Time to setup data before active edge 50 ns tDASH Time to setup data after active edge 50 ns tSHZD Time from SSN to data tri-state time 100 ns 4.
5 Operation The basic functions to be performed when operating the RM3000-f Evaluation Board are: Setting the values in the Cycle Count Registers, and Taking sensor measurements. The user should first establish the number of cycle counts to be measured for each sensor by writing to the Cycle Count Registers. This is followed by sending a command or series of commands to make the sensor measurements.
be repopulated unless the user wants to change the values or the system is powered down (in which case the default values would populate the register fields when powered up again). See the Appendix for code examples, including how to set the cycle count registers. To initiate a read or write from the Cycle Count Register, send the Command Byte: 7 6 RFLAG=1 R/W 5 4 0 0 3 2 1 0 ADR3 ADR2 ADR1 ADR0 R/W: Read/Write HIGH signifies a Read from the addressed register. LOW signifies a Write operation.
Send 0x64 (value for the LSB for the Y axis - pointer automatically increments) Send 0x00 (value for the MSB for the Z axis - pointer automatically increments) Send 0x64 (value for the LSB for the Z axis - pointer automatically increments) Set SSN to HIGH 5.2 Single-Axis Measurement (SAM) Operation The SAM Command Byte initiates a sensor measurement on a single sensor, and automatically sets up the RM3000-f Evaluation Board to output the measured values on the MISO line.
Table 5-2: SAM Axis Select Bits Description AS1 AS0 No axis measured 0 0 X axis (Channel 1) 0 1 Y axis (Channel 2) 1 0 Z axis (Channel 3) 1 1 5.2.3 Making a Single-Axis Measurement The steps to make an interrupt-driven single-axis sensor measurement are given below. The 3D MagIC will return the result of a complete forward-reverse measurement of the sensor in a 24-bit 2’s complement format (range: -8388608 to 8388607). SSN pin is set LOW. This enables communication with the master device.
5.3 Multi-Axis Measurement (MAM) Operation An initial MAM Command Byte initiates a sensor measurement for up to 3 sensors. After the measurements are made and the DRDY line goes HIGH, another MAM Command Byte sets up the RM3000-f Evaluation Board to output the measured values on the MISO line. See the Appendix for code examples. 5.3.1 MAM SPI Activity Sequence The SPI activity sequence is given below for MAM operation. SPI timing is discussed in Section 4.3. The Return Byte is 0x9A.
5.3.3 MAM Axes Select Byte The MAM Axes Select Byte establishes which axes are to be measured and initiates a multi-axis measurement. It is defined as follows: Bit # 7 6 5 Value 0 0 0 4 3 AAX1 AAX0 2 1 0 0 0 1 Table 5-3: MAM Axes Select Bits Axes to be Measured AAX1 AAX0 Axes Select Byte X, Y, and Z 0 0 0x01 X and Y 0 1 0x09 X only 1 0 0x11 No axis measured 1 1 0x19 5.3.
Send 0xC9 on the MOSI pin. This is the MAM Command Byte to read from the MSB of the X-axis measurement results register. The register data is clocked out on the MISO pin, and once the X-axis MSB is clocked out the next register will clock out, and so forth. Each sensor reading consists of 3 bytes of data, clocked out MSB first. X-axis data is presented first, then y-axis data, then z-axis data. The first nine (9) bytes represent a complete 3-axis measurement.
Appendix – Sample Code /******************** (C) COPYRIGHT 2013 PNI Sensor Corp ***************** * File Name: ThreeD_magIC.
/************************************************************************* * Function Name : spi_1_go_0_phase_0_pol * Description : changes phase and polarity of the SPI bus to 0/0 * Input : None * Output : None * Return : None *************************************************************************/ void spi_1_go_0_phase_0_pol(void) { //Set SPI Clock Phase and Polarity to 0/0 } /************************************************************************* * Function Name : spi_1_go_1_phase_1_pol * Description
/************************************************************************* * Function Name : mag_sample * Description : Sample the magnetic sensors and get measurement in "count" * Input : None * Output : None * Return : None *************************************************************************/ void mag_sample(void) { unsigned char axis; // // change the phase and polarity to be 0/0 // spi_1_go_0_phase_0_pol(); SPI_tom_CS_LOW(); usec_delay(1); //Send 0xC9 on MOSI pin to initiate reading the measurement
/************************************************************************* * Function Name : ThreeD_magic_init * Description : initializes the 3D MagIC.
/************************************************************************* * Function Name : DataReady() * Description : Check DRDY pin, return true if high, otherwise false.