University of Minnesota Magnetic Compass Design Increasing Accuracy with Multiple Sensors 5-13-08 Prof. Beth Stadler Dr. Andrzej Peczalski Beckvall, Daniel P Ellson, Marcus P Hermans, Patrick M Aymond, Jeffrey A Albersman, Patrick B Table of Contents Abstract ......................................................................................................................................................... 4 Motivation & Background ............................................................................................................................. 4 Prior Work & Solutions ................................................................................................................................. 4 Requirements & Specifications ..................................................................................................................... 6 Concept Design & Description ...................................................................................................................... 7 Sensor Selection ........................................................................................................................................ 7 Hardware Overview .................................................................................................................................. 8 Initial Design.............................................................................................................................................. 8 Final Design ............................................................................................................................................... 9 Main Board................................................................................................................................................ 9 Daughter Board ....................................................................................................................................... 10 Software Overview.................................................................................................................................. 11 Compass Firmware Concept Design ................................................................................................... 11 Compass Firmware Design Description .............................................................................................. 12 Control Computer Concept Design ..................................................................................................... 15 Control Computer Design Description ................................................................................................ 16 Design Evaluation........................................................................................................................................ 17 Prototype ................................................................................................................................................ 17 Test Methods .......................................................................................................................................... 17 Accuracy .............................................................................................................................................. 17 Precision .............................................................................................................................................. 18 Repeatability ....................................................................................................................................... 18 Results ..................................................................................................................................................... 19 Conclusion & Recommendations ................................................................................................................ 20 Project Review ........................................................................................................................................ 20 Future Work ............................................................................................................................................ 22 Reflection ................................................................................................................................................ 22 Research References ................................................................................................................................... 24 Related documents ................................................................................................................................. 24 Appendices.................................................................................................................................................. 24 Data sheets ............................................................................................................................................. 24 Page | 2 Page | 3 Abstract The purpose of the team’s project is to increase the accuracy of a single AMR IC compass by incorporating multiple ICs. The goal is to increase the accuracy of a magnetic sensor by the number of multiple ICs used. This is done by obtaining data from within the most accurate regions of operation for each sensor and applying a weighted averaging algorithm. Sensors and test equipment were provided by Honeywell and the University of Minnesota’s Electrical Engineering Department. Motivation & Background Magnetic sensors are used in navigations systems, magnetic hard drives, proximity sensors, position sensors just to name a few areas of applications. With this said, it is becoming more and more important to minimize the size of such sensors while maintaining or increasing accuracy and resolution. A proposed method of decreasing sensor size is to use nanowire technology, which has the potential to create much smaller IC’s than in use today. However, these individual nanowires are not very accurate. The question then becomes whether or not combining multiple nanowire bridges together would boost accuracy to match or exceed current IC sensors while still being much smaller in overall size. With this being the motivation, the group’s task is to determine whether multiple sensors can be combined to give a significant increase in accuracy and resolution. Due to the fact that nanowire technology is still in its early stages and requires highly sophisticated equipment and procedures, the project can be simplified to a proof of concept using alternate sensors. With personal navigation becoming more and more in demand amongst today’s consumers it has sparked the interest of many magnetic IC sensor companies to create chips for use in various types of compasses. For example, Honeywell manufactures several ICs with the sensitivity required to measure the earth’s magnetic field and provide electronic developers with the ability to sense direction accurately. These magnetic and compass ICs are very small and fairy low cost which will work well for the group’s proof of concept. The goal of the team project is to combine many independent magnetic or compass ICs together to significantly increase the resulting accuracy and resolution. Since this is a proof of concept size, cost, power consumption, and the like are not important in the final product. It is assumed that the outcome of combining multiple ICs to increase accuracy will be the same for combining multiple nanowire bridges in the future. If all goes well, this will have produced reasonable evidence and algorithms that combing multiple nanowire bridges with low accuracy can be combined to create a highly accurate and small magnetic sensor solution. Prior Work & Solutions Since the project was proposed to us by Dr. Peczalski, there was no previous work for this specific project. To the best of the group’s knowledge and research, no one has done any research on using nanowires for the construction of wheatstone bridge. Furthermore, to the best of the group’s knowledge no other devices current use multiple IC chips in various orientations to increase performance. However, within some IC sensors multiple magnetoresistive wheatstone bridges are used Page | 4 to broaden overall range and in some case increase accuracy. The extent of this while remaining coplanar has been limited to two bridges and therefore has not yet been fully explored as this project does. It is important, however, to have an understanding of how other digital compasses and similar navigation devices have been designed. Due to the fact that anisotropic magnetoresistive (AMR) sensors will be used for this test of concept, the scope of this description will therefore be limited to AMR sensors and the IC’s which use them. AMR sensors measure the orientation of a magnetic field by means of a differential voltage that is produced by a wheatstone bridge configuration of four magnetoresistive elements. The wheatstone bridge is shown below in Figure 1.0, where the pink strips are the magnetoresistive elements, and the voltage measured across the center is the differential voltage produced. Figure 1.0: AMR Wheatstone Bridge This configuration works to create a differential voltage that varies with respect to the direction of the applied magnetic field due to that fact that the resistive properties of the individual magnetoresistive elements change resulting in different voltage drops around the bridge. The output differential voltage as a function of the applied magnetic field direction with respect to the bridge orientation is shown below in Figure 2.0. Figure 2.0: AMR Wheatstone Bridge Voltage Output Page | 5 From Figure 2.0 above there are a few points of interest. First, it is important to note that there is a window from -45 degrees to +45 degrees before all output values are repeated. This means there is only a 90 degree window for which a magnetic field direction can be determined using only one bridge. It is also important to note that this function is not linear. This means that at some positions a small change in magnetic field direction will cause a large voltage change than at others. Obviously, where the voltage change is greatest for the smallest direction change the more accurate the sensor will be. This happens during the linear region shown from roughly -35 degrees to +35 degrees. These items of interest need to be taken into account when formulating a working compass and compensated for. Other designs have compensated for the limited 90 degree range by introducing multiple bridges and Hall Effect sensors to specify which quadrant or hemisphere the measured magnetic field is within. As a bonus, this also easily increases accuracy by creating more linear regions which can be staggered to create effectively one continual linear range. Figure 3.0 below shows the plot of a device using two bridges positioned 90 degrees apart with an addition of a Hall Effect sensor. Figure 3.0: Dual Bridge with Hall Effect Sensor Using Figure 3.0 above it can be seen that whenever sensor A or B is outside its linear region the other sensor has entered it linear region, always supplying a very accurate voltage reading. Furthermore, using the different signs from each of the bridge output and the Hall Effect sensor the resulting direction can be placed within the correct quadrant extending the range to a full 360 degrees. To further increase the complexity of using these devices is the fact that the output voltages produced are fairly low, less than 1 volt. Therefore, amplification is generally required to allow for sufficient accuracy. This often posses an additional challenge because the amplifiers need to be tuned with great precision. Fortunately, this has been perfected and there are many devices available that will perform the amplification needed and many that also provide a digital output that can easily be interfaced to a microcontroller for processing. Requirements & Specifications The requirements for the final product are straight forward and simple. It should consist of two compasses or the equivalent, from which one will be composed of a single AMR sensor and the other of Page | 6 multiple identical AMR sensors. The performance specifications for each compass should be determined accurately and identically for each device to be used for comparison purposes. Specifically, each compass should be tested for repeatability, precision, and accuracy with the goal to increase each by X-fold, where X represents the number of chips used in the multiple IC compass design. Because this project is a proof of concept there are no strict restrictions on power consumption, overall size, or budget. The only requirement is that the direction should be computed and displayed within a reasonable time frame, such as within approximately 1 second. When the product is completed and testing is done to determine the specs for each compass a final conclusion should be made as to whether multiple sensors can significantly increase accuracy over an individual sensor. Furthermore, if the proof of concepts passes some thought should be done to determine if this concept will/should hold true for nanowire sensors in the future. Concept Design & Description Sensor Selection The bulk of this design revolves around the AMR IC sensor selected. Andy has given us the choice to use any of three sensors made by Honeywell; the HMC1042I, the HMC105x series or the HMC6352. After many in-depth data sheet reviews and debates were placed over the conclusion was made to go with the HMC6352. One of the main reasons the HMC6352 was selected by the team was its I2C capabilities. I2C is a communication protocol that allows you to communicate to multiple devices using their addresses as a way to distinguish one from another. In the case of the HMC6352, each chip can calculate its own heading, voltage readings, or (X Y) coordinate. This will allow us to greatly simplify the circuit. Without these capabilities the team would be forced to have many analog to digital conversions along with several operational amplifiers. The processing capabilities far outweigh its only foreseeable down side, its field range of measurement. It field range can measure magnetic fields anywhere from 0.10 to 0.75 gauss. This is fine for applications such as navigation systems because the earth’s magnetic field around the upper Midwest is around 0.6 gauss. The only foreseeable problem is getting a constant magnetic field to test in. If the team were using another sensor that can measure fields at ± 6 gauss the team could cancel out any of the earth’s magnetic field with a stronger artificial magnetic field created by winding coils. The last reason that the HMC6352 was chosen was that its accuracy is slightly less than the other available sensors. The HMC6352’s specs say that it is accurate to within 2.5 degrees. This is less accurate then the other sensors that are accurate within 1 degree. This is good because it will allow the team to see more definitive results. Although the team has a highly accurate rotational table that will allow for us to measure precision, other resources like a highly accurate directional gauss meter might be needed to see significant improvement in accuracy. With less accuracy the team will be able to Page | 7 answer the general question about using multiple sensors more definitively. With everything taken into account the team settled on the HMC6352 as the sensor that would be used in the final circuit. Hardware Overview The basic concept of the hardware design is to use two separate boards, one containing a microcontroller as well as power and the proper communication circuitry needed to interface with a PC, and the other containing the array of sensors and a laser for demonstration purposes. This idea of using two separate boards serves multiple purposes. First, having the components on separate boards makes each board smaller and less bulky. This will be important when it comes time to mount the product to the rotation table for testing. Having the microcontroller on one board and the AMR IC’s on the other will enable the daughter board to be remained mounted while the main board can be removed and have its flash updated or modified. Separate boards also serve as a safety net; if one boards fails, or has been constructed incorrectly, the entire project is not lost. As an added bonus if the desired orientation or layout of the AMR IC’s is to be changed a new daughter board can simply be constructed. The design will also allow for variations in number of IC’s as well as orientations without the reconstruction of the main board. Using two boards should also make the group’s testing and configuration processes easier. Having the sensors on a separate smaller board will allow us to more easily use reflow soldering on the sensor array. This will help the sensors align more accurately to their PCB pads. Once the sensors are mounted to their board, the daughter board as a whole can be treated like an individual sensor which will allow for easier breadboard level testing and calibration. Initial Design Our initially proposed design is shown below as a block diagram layout in Figure 4.0. As can be seen, it consists of two separate boards connected by an 8 wire cable. The main board on the right contains the microcontroller that will be used to control the various devices and compute a direction to be displayed. Also on this board are all the peripherals the team feels are required to accurately gather data and troubleshoot any problems that may arise. The daughter board contains the array of AMR IC chips used to gather data about the direction of the applied magnetic field. It also contains other minimal hardware required to operate the IC’s and a laser to precisely depict and set the orientation of the daughter board. A multiplexer is needed to provide power to each sensor individually. This MUX creates several advantages. First, this configuration saves power. Since only one sensor is needed at a time, it is wasteful to have any other sensors powered on. Second, this achieves isolation of the communication bus. This will allow us to change the address of any sensor if needed, and simplifies troubleshooting, since we do not have to worry about any problems arising from the other sensors, since they are not powered. Finally, a voltage regulator and 9V battery are needed to provide power for the board. Page | 8 Figure 4.0: Proposed Block Diagram Layout Final Design Several changes were made to the initial design of the daughter board. First of all, the 9V battery and voltage regulator have been removed, as we have decided to feed power and ground through the parallel connector from the main board. Second, we have removed the power MUX and applied power to all the sensors at the same time. This was done because we found that we cannot leave the unpowered sensors connected to the I2C communication bus, because they interfere with communications. In the future, we would have to face the problem of how to isolate communication between one sensor and the main board on the I2C bus, because this is the only way to assign a unique address to each sensor. This can be done in two ways. One way would be to use a burn-in socket to address the sensors one by one prior to assembly onto the daughter board. Another way would be to add a jumper next to each sensor to open/short the I2C connection between the sensor and the bus. Main Board The main board shown in Figure 5.0 contains the all the equipment to control and collect data from the AMR IC’s located on the daughter board. Great lengths have been taken to ensure that this board can handle everything required while at the same time be very versatile and adaptable in case something has been overlooked or requires a change. Page | 9 Figure 5.0: Main Board Layout The microcontroller is the key component to this board and the entire project. It will be used to communicate over I2C to the AMR ICs as well as to a computer running hyper terminal or LabVIEW via a serial connection. At the same time it will also be required to display pertinent data to the onboard LCD and status LEDs. To increase the usability of the board a built in programming port has been added along with an area to probe various control lines and pins for troubleshooting purposes. Other hardware that can be found on the main board includes an optional EEPROM to be used if extra memory is needed, 3 status/debugging LEDs, 3 diagnostic pushbuttons, and an RS-232 converter chip. The parallel connector will require a minimum of 5 signals to be sent to the Daughter Board. They are as follows: 1 for laser control, 2 for I2C, 1 for power, and finally 1 for ground. Daughter Board The daughter board, shown in Figure 6.0, contains the AMR ICs that will be used to determine the magnetic field direction. An onboard laser can be used to pinpoint the board direction from which it can be calibrated. Page | 10 Figure 6.0: Daughter Board Layout The layout of the board is pretty easy to follow as the design is very basic. Surrounding each sensor are the following: one power LED with current limiting resistor, one decoupling capacitor, and two optional R-C feedback networks (one for each axis) that can be used to tune the sensitivity of the sensor. These R-C networks are not populated on our final design, because they are not needed. If we wanted to experiment, however, they could be added in the future. It is important to note that there are two potentiometers in the top right corner that are in series with the two resistors on the R-C feedback network of sensor 11, which is located on the top right of the board. Since this is our extra or “control” sensor, we can investigate the use of sensitivity by changing the resistance provided by the potentiometers. Software Overview Compass Firmware Concept Design Based on our collective professional and academic experience we decided to wire our compass firmware in C. All of us have had at least one class use C as a native programming language and many of us have actually worked with it in the field. Once the platform was decided we needed to determine how we were going to translate our high level C into a .hex programming file for the microcontroller to use. We had access to different compilers that would translate our C for Microchip’s microcontrollers. We decided that we would use the default C18 compiler unless we ran into trouble in the development stage in which case we could try our CCS compiler. Page | 11 We developed different methods to process the sensor headings using an iterative process that dissociates X and Y bridges from one another and then iterates them against one another using arctangent amongst other trig functions. The function is shown below with the 2 bridge voltages represented by X1 and X2 and their respective displacement from the azimuth, or their offset, represented by θ1 and θ2. We also came up with a method for calculating headings that simply used the associated X and Y bridge voltages and a weighted sum that gave sensors which were closest to their linear region the highest weight. Below is a graph of the sensor weights Sensor Weight X Voltage -180 -135 -90 Y Voltage -45 0 Sensor Weight 45 90 135 180 Compass Firmware Design Description Due to problems we were having with I2C communication we elected to use the CCS compiler. After several stages of data gathering with our dissociated bridge algorithm we decided to implement the weighted arctangent. This decision was reached based on our time frame and the quality of the data we were gathering from the actual sensors. For an operating system structure we decided to do a do a non-real-time system that waits for a request before doing any data gathering or heading calculations. A description is below: Page | 12 Device is turned on Initialize device Hyper-terminal or VB interface? VB Indicate to VB that Compass is ready to receive commands Begin Running Loop Hyper-terminal Print Menu for User Receive “Get Heading” Command Communicate with sensors to get their seen voltages Apply our tuning offsets and normalize voltages Calculate headings Using ArcTan Apply Weighted average priority based on voltages and determine weighted average VB Send heading to VB to be displayed Hyper-terminal End Running Loop Display Heading to Hyper-terminal Page | 13 The most critical portions of our code were the data acquisition from the sensors and the bridge voltage processing. The sensor data acquisition portion is below. This code segment first gets the correct sensor address from the sensor address array to use as the address to send to for the rest of the function. It then modifies a variable in the sensor RAM to indicate to the sensor that it should return headings. We then tell the sensor that we want to take a reading using the hex 0x41 command. We then wait for 7ms as indicated in the data sheet to allow for the sensor to get a heading. After the delay the read command is sent to the sensor and we then send clocks over I2C recording two consecutive bytes into two variables. These storage variables are then concatenated together and converted to floating point values for eventual heading processing. This same process is done when collecting the bridge voltage values, the only difference is the command sent to the sensor RAM; 0x03 for X voltage and 0x04 for Y voltage. The other important portion of our code is the actual heading calculations. Our calculation code first runs through all the sensors applying arctangent to their voltages and then converts from radians back to degrees. Because arctangent gives a value from -90 to 90 we then need to adjust certain heading readings based Page | 14 on the sign of their respective X and Y voltages. After the heading is correctly adjusted we remove the rotational offset from each sensors heading so that it is referencing the same azimuth. We then check to see if the individual sensors heading is the max or the min for error checking purposes. The sensors weights are then computed using the function we derived during conceptual design. The weight is determined first as a value between zero and one, then scaled and offset on the next line allowing us to tune the values during testing. We ultimately ended up using sensor weights from 1 to 50. Each sensors weight is then added to a sum for eventual averaging. After our loop has run through all sensors we check to see if the difference between the maximum and minimum heading is greater than 340. If this is the case then we know that sensor array is crossing the 0-360° border and in order to average properly we need to add 360 to the headings around 0. We then reset the master heading and calculate a new one by summing up products of each sensors weight with its heading. After summing we then divide off the total of all the weights in accordance with standard averaging mathematics. We then check to see if each heading is bogus (greater than 360 or less than 0) for both the individual sensor headings and the overall processed heading. As is true with all software development our compass firmware went through many revisions. Control Computer Concept Design We determined that there were multiple different development environments that could use to interface our compass and rotational table to a host PC. The first platform we considered was LabVIEW due to its flexibility, fancy graphics and possibly pre-written code. We also realized that Visual Basic (VB) could be easily set up to communicate over serial and parse off incoming ASCII. Other than controlling the rotational table, the biggest job of our host PC software was to gather data for display we also considered recording the compass’ output while controlling the rotational table to allow for automated data acquisition. Page | 15 Control Computer Design Description Again due to our collective experience, we decided to use VB for our controlling computer. VB allowed us to easily communicate to the compass and the rotational table allowing for implementation of automated testing routines and general data acquisition. Above is a screenshot of our controller for the rotational table. Our team was able to get a hold of a manual that allowed us to control many aspects of the table that can’t be controlled using the standard on-board button interface. To the right is a screenshot of our compass control interface. Most of the data is passed directly into the background code using ASCII so there are not as many controls on this screen when compared to the rotational table interface. Page | 16 Design Evaluation Prototype As described previously our protoype consists of a separate main board and daughter board components. As shown in the photo below the daughter board is mounted on top of the high accuracy rotational table by means of a PVC pedestal. This places the daughter board containing the magnetic sensors directly in the middle of the magnetic field generated by the two large Helmoltz Coils, ideal for simulating a consistent magnetic field. It is important to note that the daughter board is also firmly attached to the rotational table which will be used to accuratly rotate the device to known positions for data aquistion and testing. Test Methods In order to meet the remainder of the requirements stated above, the following testing procedures have been determined and implemented into the VB software to compute the specs for both the individual IC and multiple IC compass readings. The following test plan describes what has been implemented and the exact code can be found in the Appendix. Accuracy Definition: Accuracy is most easily understood and is usually reported as maximum possible difference from the true value. In the team’s case with a compass it can be expressed as how near to the true reading it is, for example ±5 degrees. Method: First determine true north and set the PMC table to 0 when pointing in this direction. This is done by rotating each bridge until its output is zero, and recording the position for each of the 20 bridges. Use each known bridge placement offset to determine north with respect to sensor 1 bridge x. Once the VB program has found this position it moves there and sets the PMC heading to 0. Now the PMC represents the absolute correct position and can be compared to computed headings from the compass. For our purposes we then rotated the compass a full 360 degrees stopping every 1 degree to Page | 17 take compass readings. The data was then analyzed to determine the minimum, maximum, average, and standard deviation of the readings from the PMC. Precision Definition: Precision can be defined as the smallest unit increment a product can measure. For example, if the team’s compass is rotate a known 10.0 degrees and the compass readout changes by 10.1 degrees it could be said to have a precision of 0.1 degrees. This is different from accuracy in the sense that it may have a very precise reading, let’s say within tenths of a degree, but may have a large offset representing bad accuracy. Method: 1. VB will request the compass headings and the PMC position and write them to a text file. 2. The table is then rotated 10 degrees and VB will again request the headings and the PMC position and save them to the text file. 3. Repeat steps 1 and 2 for an entire 360 degrees. 4. The data file can then be imported into Excel and analyzed. The amount moved is the difference in PMC positions and should be identical to the change in headings. Any discrepancy here is classified as ‘precision’, here again the minimum, maximum, average, and standard deviation will be computed. Repeatability Definition: Repeatability may seem as if it is a function of accuracy and precision but it is not. The best way to describe this is with an example. Assume the compass at hand has an accuracy of ±5 degrees and a precision of 0.1 degrees. Now assume that when positioned at 0 degrees the compass reads 4.1 degrees, very inaccurate but with moderate precision. Now rotate the compass around and then place it again facing 0 degrees. If the compass were to now read 4.2 degrees it would have good repeatability of 0.1 degrees, if it now read 2.1 degrees it would have bad repeatability, of 2 degrees. Method: 1. The rotational table is stopped and held in one place and VB request compass headings and saves them to a text file. 2. VB pauses for 1 second and then requests compass headings which are appended to the text file. 3. Repeat step 2 ten times. 4. Move the rotational table 10 degrees and repeat steps 2 and 3. 5. Repeat step 4 until a full 360 degree range has been covered. 6. The data file can then be imported into Xcel and analyzed. The amount of variation between readings at any given location is then considered the range of repeatability. Example: 4 readings taken are 10.0, 10.2, 10.2, 9.9, the max variation is 10.2-9.9=0.3, and therefore the repeatability here is +-0.15 Page | 18 degrees. The repeatability is computed at each stop and then minimum, maximum, average, and standard deviations are computed for the full 360 degrees. Results It was determined that multiple sensors working together can indeed increase the precision, accuracy, and repeatability of the system. The table below shows the overall improvements in each of these areas. This shows that this type of implementation is very feasible and could potentially lead to more accurate digital compasses in the near future. Results Single Sensor Sensor Array Improvement Accuracy 2.169 1.135 47.65% Precision 0.162 0.078 51.69% Repeatability 0.174 0.096 44.70% The graphs below depict the accuracy, precision, and repeatability over a full 360 degree range to get a further understanding of where the above numbers come from. Page | 19 From the graphs it is obvious that our results have some sort of sinusoidal error to them. This may be due to manufacturing inaccuracies. The x and y bridges are assumed to be 90 degrees apart making them sine and cosine waves with respect to each other. In practice we found that they are actually 93 to 98 degrees apart and therefore are not actually outputting sine and cosine data points. Plugging this into arctangent as our heading computation does produce the oscillation around the true value as we see in our accuracy plot. Now that this is known, a better algorithm can be computed to account for the true bridge positions. Unfortunately, we were unable to increase accuracy by tenfold as desired. It was however, proven that multiple sensors can improve accuracy substantially. Throughout the process problems and data plots have given rise to ideas for better algorithms and a better understanding of what is really happening. This provides room for future improvement in algorithms and methods used. It is also important to note that it should be much easier to increase accuracy with a device much less accurate than trying to improve an already high accuracy device as we have done. All in all, the future for nanowire implementation appears to be promising if the results of this feasibility test have any validity. Conclusion & Recommendations The team did not meet the tenfold accuracy improvement goal that was set at the beginning of the term. The team was able to achieve about 2 fold improvement on all of the areas of interest outlined in the test bench; accuracy, precision and repeatability. This inability to achieve tenfold improvement will be discussed in detail. Project Review Besides the obvious cost of man hours, the main cost of the project was in the three unique boards that the team designed and populated. These boards were the main board, the daughter board and the translation board. Below are the costs of the parts to populate the boards as well as the cost of the boards themselves. Page | 20 Part Supplier Part Location Cost to TEAM HMC6352 Honeywell (10) Daughter Board 0.00 PIC18F4520 Microchip (sample) Main Board 7.90 GDM 1602K Sparkfun Main Board 15.95 74HCT4067DB DigiKey Daughter Board 2.37 Programming Jack DigiKey Main Board 1.63 Serial Jack DigiKey Main Board 1.90 Connection DigiKey Main\Daughter Board 8.48 Laser D6505I DigiKey Daughter Board 9.00 12.0V Power Supply DigiKey Main Board 13.38 Power Switch DigiKey Main Board 5.30 PCB manufactured Ultimate Electronics N/A 66.66 Serial Jack (2) DigiKey Main Board 2.80 Voltage Regulator DigiKey Main Board 1.66 Power Connector DigiKey Main Board 0.42 Toggle Switch DigiKey Main Board 1.03 BJT (laser) DigiKey Daughter Board 0.59 Other Circuitry DigiKey All Boards 8.21 Total 147.28 Though the cost of the entire project well exceeded 147.28 dollars, if the team wanted to replicate the boards, it would only cost 147.28 dollars to do so. It should be noted that each sensor costs 35 dollars but the team was given a total of 12 HMC6532 sensors (one breakout board) to use for free. These sensors were provided by Honeywell. The design strengths of the daughter board and mother board were by far their flexibility. This flexibility allowed the team to complete the tasks in multiple ways. For example, the team was not able to display the results on the LCD screen due to timing issues. However, the group had planned multiple ways to display. The final solution the team used to display was on a PC that ran a VB script. Another example of flexible engineering was in the daughter board design. When designing the daughter board, traces were made so that if a RC network could be placed on each axes so that the gain could be brought down. This allowed the team to order the PCBs without finalizing the testing environment (the magnetic range). These two examples showed the team’s greatest strength in design. The biggest weakness was the design of the sensors on the daughter board. After testing the team realized that a 0-180 orientation would have suited the groups daughter board the best. This was due to the unknown double sinusoidal error seen in the results. Though it was not possible to realize without full testing, the chip placement is permanent and could be improved upon. Page | 21 Future Work If one was to redo the project two main recommendations would be made; place the sensors in a 0-180 degree fashion and add jumpers to the I2C bus. First, placing the sensors in a 0-180 degree fashion would significantly reduce the error because it is now known to be double sinusoidal. This is because if the sensors were placed from 0-180 degrees, for every sensor that has a positive error there will be another sensor that has about the same negative error. This offsetting of two equal errors along with the weighting system will significantly minimize the false displacement from the true direction of the magnetic field. The figure below shows the placement of sensor 0-180 degrees. Secondly, the team realized that the internal workings of the HMC6532 included a PIC16F819 core. This knowledge is useful in designing the I2C bus. The problems described earlier could be avoided by powering all the chips and having jumpers on the I2C bus. This would allow the team to address each sensor individually. A sensor would be connected to the I2C bus via a jumper and then readdressed. This process would be repeated until every sensor was readdressed properly. Reflection Looking back at the design process a lot of things were learned. The biggest thing that was learned was “anything that can go wrong will go wrong” (Murphy’s Law). This was realized in many aspects of the project. The team had problems with the PMC for the rotational table, the I2C bus and the Honeywell sensors just to name a few. The team learned that there will be problems that you can see coming and ones that you may not. With a little perseverance everything will turn out fine. Managing our time was another lesson learned. The timeline was useful because it helped map out the progress and realize the critical path. A milestone in the project was the manufactured PCBs. This was on the critical path and special attention was given to it when it was delayed. This helped the team successfully complete the project on time. Page | 22 Figure 7.0: Project Gantt Chart In conclusion, the team was successful in completing the project. Though the team did not meet the goal of tenfold improvement, the team did successfully build and tested the magnetic compass. The team was able to achieve twofold improvement and has great insight on how to improve in the future. Page | 23 Research References Related documents 1. A New Perspective on Magnetic Field Sensing. Michael J. Caruso, Dr. Carl H. Smith, Tamara Bratland, Robert Schneider. May 1998. Honeywell International Inc. Feb 2008. http://phermans.com/w/images/4/4d/Magnetic_sensing.pdf 2. Linear / Angular / Rotary Displacement Sensors. Aug 2000. Honeywell International Inc. Feb 2008. http://phermans.com/w/images/b/b6/Hmc15011512_displacment_AMR_sensor.pdf 3. APPLICATIONS OF MAGNETIC POSITION SENSORS. Jan 2002. Honeywell International Inc. Feb 2008. http://phermans.com/w/images/9/9f/Appl_note_for_position_sensing.pdf 4. High Resolution Compass with Multiple Anisotropic Magnetic Sensors. Daniel Beckvall, Marcus Ellson, Patrick Hermans, Jeffery Aymond, Patrick Albersman. Feb 2008. University of Minnesota EE 4951 Group 4. Feb 2008. http://phermans.com/w/index.php?title=High_Resolution_Compass_with_Multiple_ Anisotropic_Magnetic_Sensors Appendices Data sheets 1. 2-Axis Magnetic Sensor HMC1042L. Nov 2006. Honeywell International Inc. Feb 2008. http://www.ssec.honeywell.com/magnetic/datasheets/hmc1042L.pdf 2. 1, 2 and 3 Axis Magnetic Sensors HMC1051/HMC1052/HMC1053. Mar 2006. Honeywell International Inc. Feb 2008. http://www.ssec.honeywell.com/magnetic/datasheets/HMC105X.pdf 3. 2-Axis Compass with Algorithms HMC6352. Jan 2006. Honeywell International Inc. Feb 2008. < http://www.ssec.honeywell.com/magnetic/datasheets/HMC6352.pdf> Page | 24 4. PIC18F2420/2520/4420/4520 Data Sheet. 2007. Microchip Tech. Inc. Feb 2008 < http://ww1.microchip.com/downloads/en/DeviceDoc/39631D.pdf> 5. HD44780U (LCD-II). Dec 2001. Hitachi. Feb 2008. http://www.sparkfun.com/datasheets/LCD/HD44780.pdf Page | 25