SparkFun Electronics Commentsurn:uuid:214d0e4e-f1b1-d287-ce26-ac5b4c9f82492018-02-17T22:08:12-07:00SparkFun ElectronicsM-Short on SEN-07915 - Compass Module - HMC6352M-Shorturn:uuid:0b4cac4e-17d9-dfd8-9f21-e701017b6a1e2014-11-21T08:41:26-07:00<p>The Micro does have the I2C pins in a different location (D2,D3 instead of A4,A5). Make sure you are using the correct pins. If you are still having problems email techsupport@sparkfun.com</p>Customer #620352 on SEN-07915 - Compass Module - HMC6352Customer #620352urn:uuid:cab9f430-a430-d83e-2d06-e2db787a13802014-11-21T07:55:50-07:00<p>Hi! I want to use the HMC6352 for a project with Arduino Micro. Previously I tested with Arduino UNO and it worked perfectly. But for some reason it is not compatible with the Micro. Does someone know why? Thanks!</p>Customer #172027 on SEN-07915 - Compass Module - HMC6352Customer #172027urn:uuid:e48001fc-5897-6603-4d28-02626fb59c4e2014-07-03T10:06:56-06:00<p>Hi, have one problem with this board, please need help, use this sensor with a arduino UNO y work very good, but use a PIC 877, or 4550 o 30F and don&rsquo;t work. I don&rsquo;t know why.</p>M-Short on SEN-07915 - Compass Module - HMC6352M-Shorturn:uuid:2a3e3366-0a91-d21c-5c83-905ee63e7dd62014-06-13T13:27:29-06:00<p>The price is the same no matter where you order from (you can change the currency displayed though in the upper right hand corner of the page). As for shipping that depends on the method you choose. Add the item(s) to your cart and hit checkout, you should see a list of all available shipping options and their prices.</p>Customer #563108 on SEN-07915 - Compass Module - HMC6352Customer #563108urn:uuid:78139aab-8700-6b07-485a-f69de0c1d7632014-06-13T11:04:40-06:00<p>I come from Vietnam, how much when I order from Vietnam</p>nmaron on SEN-07915 - Compass Module - HMC6352nmaronurn:uuid:c2432dcd-26a5-3416-7b2b-e65ed55acaab2014-05-02T14:47:32-06:00<p>If I am using this near a metal sided building how far from the building to I need to be so that the building will not influence the accuracy?</p>diegofd on SEN-07915 - Compass Module - HMC6352diegofdurn:uuid:b7eb781d-822f-ead7-e03b-91103af249e82014-04-11T03:06:44-06:00<p>I&rsquo;ve a little <a href="https://github.com/diegofd/hmc6352" rel="nofollow" >Arduino library for hmc6352</a></p>Customer #143603 on SEN-07915 - Compass Module - HMC6352Customer #143603urn:uuid:c6afc696-e8e6-be3d-1f35-246aa73c9a572014-04-05T13:11:40-06:00<p>Hi,
the datasheet is for people that does not know how I2C works!
If you have a GOOD i2c periferal, you know that when you WRITE, address is shifted left and 0 is placed 2<sup>0</sup> and if READ then 2<sup>1</sup> = 1.
So this would cause a huge mess if you know how i2c is implemented and do not pay attention to this detail&hellip;.
So the Address for the device is not 42 or 43 IT IS 0x21.
Then write or read will shift left the command bit&hellip;.</p>
<p>Og course, if you use libs already designed.. the work has been done already&hellip;</p>Customer #393665 on SEN-07915 - Compass Module - HMC6352Customer #393665urn:uuid:87feab73-d3c7-dadd-b682-0c6f19264d092014-03-19T14:16:52-06:00<p>Wired this up okay (to Mega, using pins 20, 21 and 3.3V). Although I read about user calibration (also mentioned in the video) in the data sheet, and in some threads I even see mention of auto-calibration I see no explicit instructions here or on the Bildr tutorial. Simple, clean - but only if you know how to calibrate it?</p>Customer #66993 on SEN-07915 - Compass Module - HMC6352Customer #66993urn:uuid:c0eb3fdd-dd2a-7f50-bb36-2768f353c3ed2013-09-15T09:46:09-06:00<p>I&rsquo;ve got one of these devices here and when I query EEPROM address 0 to verify the slave address I get either 05 hex or FF hex (verified with a protocol logic analyzer). I fear the device is hosed but is there any way to perform a factory reset on this thing?</p>Customer #413932 on SEN-07915 - Compass Module - HMC6352Customer #413932urn:uuid:2b7832b7-34b8-8d7b-fe12-72bec93d3d2e2013-02-28T07:21:49-07:00<p>I could use some help. I&rsquo;ve got this chip plugged into an Arduino and was happily receiving values, but recently my program stopped working. The compass constantly returns values in the range of 1900-1700. I&rsquo;ve gone back to the example program specified here with no change in the values it&rsquo;s returning. Is there any ideas as to what&rsquo;s happened.</p>
<p>Note this is powered directly off USB so power shouldn&rsquo;t be an issue.</p>Customer #334768 on SEN-07915 - Compass Module - HMC6352Customer #334768urn:uuid:0660bccf-3772-6b43-8787-dea06251a09f2013-02-26T14:53:57-07:00<p>Hi,</p>
<p>I&rsquo;ve been buying these little compasses, and have begun noticing something when testing them. For the tests I have mounted them to a board, they are held in place with foam tape, and are interfaced with an arduino, which records their time and direction every 4 seconds. I rotate them 90 degrees every 4 seconds, and record their readings. For some of the modules i seem to be seeing a spreading of readings. Most of the readings clump together, however there seems to be a lag in measurement for some of the modules. Anything after the first 90 degree rotation produces a compounded error where they seem to lag by a few degrees each measurement until they reach 360, (where they measure about 270 degrees) however the next rotation to 90 degrees is fairly accurate, and the spreading then occurs for subsequent rotations. Does anyone have any ideas as to what may be causing this? I want to investigate this issue, but I have no idea where to begin looking.</p>Customer #334768 on SEN-07915 - Compass Module - HMC6352Customer #334768urn:uuid:220bffdb-c4ce-a706-99fd-72361dc950f62013-02-26T14:43:41-07:00<p>are you positive it isn&rsquo;t rotating 7 degrees in that distance of 6m? 7 degrees is a very small amount, the slightest vibration could cause a change of 7 degrees</p>Arjen on SEN-07915 - Compass Module - HMC6352Arjenurn:uuid:3730fc15-aa1a-41b3-7d7e-ae88912ed9692013-02-21T04:02:06-07:00<p>I have two of these and both do this (after calibration, on a flat surface, no external disturbances):
I do a measurement in direction X: compass indicates 126 degrees
After that I do a measurement 6 meters further in the same direction: compass indicates 119 degrees.</p>
<p>WHY??? Does anyone know why there&rsquo;s a difference of 7 degrees in a distance of 6 meters?</p>MikeGrusin on SEN-07915 - Compass Module - HMC6352MikeGrusinurn:uuid:194a1727-1c57-402e-2b6b-00a4a2cc9b932012-12-14T10:47:43-07:00<p>You&rsquo;re correct that generally you want only one set of pullup resistors per bus. In this case, because the pullup resistors are 10K, you could leave both sets in and the bus would still work with the resulting 5K resistance, but don&rsquo;t go much lower than that (4.7K is typical for low-speed I2C use). Don&rsquo;t forget to change one of the HMC&rsquo;s I2C addresses so you can talk to them separately on the same bus (see the datasheet). Good luck!</p>GlenZwicker on SEN-07915 - Compass Module - HMC6352GlenZwickerurn:uuid:653f7207-2c03-072e-7c33-cd2cb718c6912012-12-14T05:06:28-07:00<p>I&rsquo;m planning to mount two HMC6352&rsquo;s on my Boe Bot, one on the fixed part and one on the steerable part. They will both be connected to the same I2C bus. Should I remove the pull-up resistors from one of them?</p>GlenZwicker on SEN-07915 - Compass Module - HMC6352GlenZwickerurn:uuid:93c6e7a1-3019-9080-3e79-d1ce45bf67662012-11-28T11:27:43-07:00<p>Thanks. Mike. I was about to mount it on the vehicle and didn&rsquo;t want to get in on wrong. Thought maybe the arrow had to point forward or something. :)</p>MikeGrusin on SEN-07915 - Compass Module - HMC6352MikeGrusinurn:uuid:35662a38-d3fe-46f5-a692-4a2e28eed7b72012-11-26T13:21:40-07:00<p>This part does not have an integrated accelerometer (to determine &ldquo;down&rdquo;), so it needs to be kept flat, or you should use an separate accelerometer to eliminate the error.</p>MikeGrusin on SEN-07915 - Compass Module - HMC6352MikeGrusinurn:uuid:fd562765-065c-65e0-50e5-65c0e6bf41bb2012-11-26T13:19:55-07:00<p>That&rsquo;s 0 degrees on the chip. When the arrow is aligned with North, the output will be 0 degrees. When the arrow is pointed East, the output will be 90 degrees, etc.</p>GlenZwicker on SEN-07915 - Compass Module - HMC6352GlenZwickerurn:uuid:5998fbbb-dff7-1da3-f492-5dce8a3974d72012-11-26T12:11:58-07:00<p>How do I make use of the &ldquo;N&rdquo; and arrow printed on the board ?</p>Customer #382031 on SEN-07915 - Compass Module - HMC6352Customer #382031urn:uuid:3a606146-6bd6-52fb-24af-33f235357a032012-11-24T00:30:43-07:00<p>Hi,</p>
<p>When you read the EEPROM, you do: START, Send Address, Send &lsquo;r&rsquo;, Send #00, STOP; then to read, do you send a 43? or read the bus?, ex. START, Send 43, Set-Rx ,Read Bus, STOP? I just don&rsquo;t understand this part. Thanks.</p>
<p>Dann</p>CF Tech on SEN-07915 - Compass Module - HMC6352CF Techurn:uuid:2e799228-9e95-a23f-cf8c-2911c4183cf32012-10-30T11:44:30-06:00<p>Does this work when in tilt?</p>Customer #142608 on SEN-07915 - Compass Module - HMC6352Customer #142608urn:uuid:4012eec1-8144-6420-4ea7-716648f02e2c2012-10-04T17:57:58-06:00<p>Finally got mine working pretty well. I also tried reading EEPROM location 0x00 to get the slave address, known to be 0x42 and initially got 0xff, but I guess a lot of things could give you that. One thing to remember if you write parameters and then want to read, you must first do a Start with R/W bit clear. Follow the i2c address &amp; R/W bit with your parameter(s). Then do a Stop, then another Start, this time with R/W bit set and do as many reads as the protocol calls for. (Two, in the case of the &lsquo;A&rsquo; command, which it the typical way to read a heading.)</p>
<p>I&rsquo;m using an ATtiny4313. It doesn&rsquo;t have a TWI (I2C) module, so I&rsquo;m using bit-banging code written by Peter Fluery and tweaked a tiny bit for my MCU. The Fluery code is in assembler and designed to assemble in-line with a GCC &lsquo;C&rsquo; project.</p>
<p>Once I got it going I had a heck of a time with it being wildly inaccurate and not repeatable. Finally moved my test set-up outside on a wooden table with a wooden lazy susan on top, to allow rotation. I used a level to keep the table and lazy susan reasonably level. I&rsquo;m finally getting where I see what I think is decent accuracy and repeatability. At least at the four points of the compass, I&rsquo;m seeing the same reading at each rotation to the same marked point.</p>
<p>I think the need to be level is a pretty big deal (up to 2 degrees error for each 1 degree of tilt per the data sheet). And steel in the area is too. I&rsquo;ll have to find how how close I can be. I&rsquo;d like to put this thing on the aluminum boom of my ham beam antenna and let it report the heading. But the tower itself is steel and so may have an effect.</p>
<p>Back to code - be sure to put in delays >= the times that the data sheet says it takes to do certain operations. I also added a routine to make sure the SCL line is high before I send a request. Per I2C standards, a slave can pull it low to force the master to wait until it&rsquo;s ready.</p>
<p>Nick</p>Sora62896 on SEN-07915 - Compass Module - HMC6352Sora62896urn:uuid:61d313a4-36fb-0c47-0ab4-45b7d2f317e82012-09-25T16:22:31-06:00<p>yes i did&ndash;turns out the board had a short underneath the chip. I sent it back to sparkfun and got a refund for another one. Are you having problems with the board or has yours worked mostly fine?</p>diegofd on SEN-07915 - Compass Module - HMC6352diegofdurn:uuid:d6c0132d-4d86-2b30-82e6-729998fa9ce32012-09-25T16:11:36-06:00<p>From the datasheet:
&ldquo;Exposure of the HMC6352 to magnetic fields above 20 gauss (disturbing field threshold) leads to possible measurement inaccuracy or “stuck” sensor readings until the set/reset function is performed.&rdquo;</p>
<p>Have you tried performing a calibration?</p>Sora62896 on SEN-07915 - Compass Module - HMC6352Sora62896urn:uuid:829ffb07-048a-1665-9370-d8f0648c7cb82012-08-28T13:47:30-06:00<p>I&rsquo;m getting something a bit similar&ndash; only reading -0.10 degrees&ndash;no change at all&hellip;.I think it broke&hellip;.but I&rsquo;m not really sure</p>Customer #82727 on SEN-07915 - Compass Module - HMC6352Customer #82727urn:uuid:fc2f3344-667d-bb6f-e48c-95253e9c089d2012-08-15T09:39:01-06:00<p>I recently purchased and received the HMC6352 breakout board module from Sparkfun. I created a library of routines to access and control the HMC6352 for my CCS C compiler and PIC18LF2620 running at 19.6608MHz at 3.3VDC.</p>
<p>In monitoring the activity on the I2C bus showing interactions from the PIC to/from the HMC6352 module, my logic/protocol analyzer shows all writes to the device to be correct and acknowledged by the module but all read accesses from the device respond with 0xff. The read command and data are correctly &ldquo;ack&rsquo;d&rdquo;, though, so the addressing to the device appears to be correct. I&rsquo;ve tried to send the &ldquo;wake&rdquo; command to the device (which was correctly &ldquo;ack&rsquo;d&rdquo;) and followed it with a read eeprom address 0 (the default I2C address). The address responded with 0xff. I&rsquo;ve tried to send a different mode command (to RAM and to EEPROM) but subsequent reads of the RAM mode register (0x74) always show 0xff. ALL read requests from the device respond with 0xff. I&rsquo;ve tried running at 5.0VDC but get the same responses.</p>
<p>Has anyone else run into this problem or know if there&rsquo;s some other initialization that needs to be done to the device?</p>
<p>Thanks.</p>Customer #314184 on SEN-07915 - Compass Module - HMC6352Customer #314184urn:uuid:c30095e2-9900-2aa8-c58d-a763664469262012-08-05T07:46:07-06:00<p>It&rsquo;s possible to set the &ldquo;North&rdquo; to a different position? Thanks</p>jjniccolo on SEN-07915 - Compass Module - HMC6352jjniccolourn:uuid:e347facc-93a6-41ea-a721-e0184fbc37d82012-07-31T13:49:01-06:00<p>I loved this board until now. It reads only 180.1 to 180.9. Anyone else have this problem? Bizzare because it was working fine. Calibration doesn&rsquo;t work. Half of the pulse in the oscope looks a bit jittery so I&rsquo;m not sure if this thing is fried. Any suggestions?</p>GaryCamp on SEN-07915 - Compass Module - HMC6352GaryCampurn:uuid:56de7fe5-84c8-15c8-a60c-f625b93af1dc2012-06-29T11:42:47-06:00<p>6/29/2012, I did not have the missing ACK problem TimWhite experienced but my SNAP RF100 failed to respond to the i2cRead called on the HMC6352. After incorrectly assuming it might be SDA/SCL levels, I finally fixed my problem by increasing the i2cRead function&rsquo;s &lsquo;retries&rsquo; argument to 10. I did not characterize the exact number of retries that will work, I just tried 1 and 4 which both failed, then 20 which worked and then 10 which worked. FYI, I do a 10ms delay between the i2cWrite to the HMC6352 to request it read the heading and the i2cRead to read the HMC6352&rsquo;s response. The HMC6352 datasheet says it takes 6ms to get the heading but I just used a state machine with a 10ms hook to synchronize the i2cWrite and i2cRead.</p>GaryCamp on SEN-07915 - Compass Module - HMC6352GaryCampurn:uuid:ba22cc71-7c2f-ffa4-7e32-ea12255de4902012-06-28T21:39:50-06:00<p>I also tried the HMC6352 BOB with a SNAP RF100 (3.3v) micro and had I2C read problems. I then used it fine with a BasicMicro Nano 18 (5.0v) micro and never determined the problem. I just tried the HMC6352 BOB with a Parallax Propeller QuickStart board (3.3v) and it failed. So I connected the Propeller (3.3v) to the HMC6352 BOB (5.0v) via a BOB-08745 Level Converter using the two Tx bi-directional interfaces for SDA and SCL and it worked fine (compass must be on a jumper away from the breadboard). I retried the SNAP RF100 (3.3v) micro and got it to work with and without the level converter by increasing the i2cRead function&rsquo;s &lsquo;retries&rsquo; argument to 10. I did not characterize the exact number of retries that will work. I went back to the Propeller, using a logic analyzer this time, and determined that the HMC6352 object that I was using put the 6ms delay in the wrong location (between sending the $43 Read and reading the 2 byte heading on the I2C bus). The Propeller worked fine with 3.3v and no level converter after I moved the delay. Go figure :) I&rsquo;ve revised this comment several times and this is my last since I now have successfully used the HMC6352 with a BasicMicro Nano18 (5.0v), Synapse SNAP RF100 (3.3v) and Parallax Propeller QuickStart (3.3v w/o level converter and 5.0V w/level converter).</p>Customer #325395 on SEN-07915 - Compass Module - HMC6352Customer #325395urn:uuid:1f8197ea-1c2f-c59e-73a1-825811ca114b2012-05-17T22:22:50-06:00<p>how do i interface this with lpc 1769 using lpc xpresso and get the display on oled like :
http://www.embeddedartists.com/projects/lpcxpresso-hmc6352.php</p>Customer #311867 on SEN-07915 - Compass Module - HMC6352Customer #311867urn:uuid:241c0a6e-4564-4847-8176-ae2c07b62b702012-04-29T14:12:30-06:00<p>I have a HMC6352 compass. It is connected to PIC18F4520. I get the compass readings and send them to MATLAB through Xbee wireless modules. Frequently, the compass stops working and I2C code of PIC is suspended suddenly and consequencly an error is generated in MATLAB. I caliberated the compass repeatedly.
the compass readings are:
272.7
290.8
278.8
276.1
277.6
282.7
284.1
276.4
285.6
270.6 and so on,
It looks noisy and unstable although I mde a caliberation for the compass
Does anybody have suggestion to overcome this stunning and suspension of the compass ???</p>Ryan10 on SEN-07915 - Compass Module - HMC6352Ryan10urn:uuid:efe4ecdf-ee9c-82d4-fbce-cb3546d3f27d2012-04-16T18:23:02-06:00<p>I didn&rsquo;t check all the comments below, but I was wondering if you guys have been using the HMC6352 library http://mbed.org/users/aberk/libraries/HMC6352/lijrmf/docs/classHMC6352.html#_details</p>randymxj on SEN-07915 - Compass Module - HMC6352randymxjurn:uuid:21f06b32-38c5-eac7-307e-f15ec1fbf3522012-03-18T21:30:35-06:00<p>Updating:
I just figured out what&rsquo;s happening by analyse the I2C bus.</p>
<p>This HMC6352 will only work with 100KHz I2C clock, which was mentioned in the datasheet too. Beagleboard running a 400KHz I2C on i2c2 by default, the kernel has to be re-compiled to modify the speed.</p>randymxj on SEN-07915 - Compass Module - HMC6352randymxjurn:uuid:3a609851-e050-634a-5cd7-564e4f2e4e872012-03-15T21:41:22-06:00<p>I was trying to interface this module with a beagleboard via expansion(1.8v-3.3v level) board. The problem is when I write &lsquo;A&rsquo; - 0x41 to the module I can&rsquo;t get an ACK back. Then the reading result are all 0x00.
Does anyone knows how to interface this tiny module with a Linux based system?</p>
<p>The compass module works well with Arduino.
The Beagleboard works well with I2C EEprom and temperature sensor.</p>
<p>Thanks!</p>Xen0sys on SEN-07915 - Compass Module - HMC6352Xen0sysurn:uuid:cfa42a07-0a09-9b24-18a8-198d0b500a732012-03-01T14:51:32-07:00<p>Mine is mostly accurate but when it gets near other electronics, the reading can sometimes be off. Most likely there is a disturbance field nearby causing the compass to give somewhat inaccurate readings.</p>
<p>Depending on how you are using it, checks can be added in the software to at the very least notice if the reading seems to be jumping around.</p>Customer #62161 on SEN-07915 - Compass Module - HMC6352Customer #62161urn:uuid:1c49c39d-1683-9a20-0d15-3e37b726219d2011-12-22T22:07:00-07:00<p>The believe the MBED example has an error for the I2C pins. The source code shows p9 and p10 for SDA and SCL, while the table shows 28 and 27 for SDA and SCL. I suppose either pair can be used, for both pairs are I2C.
donde</p>Blacklab1 on SEN-07915 - Compass Module - HMC6352Blacklab1urn:uuid:1683af50-427a-affc-9c7e-3cf27ccc3eaf2011-10-22T03:06:41-06:00<p>How did it turn out ERL? Did you ever get it to work?</p>Customer #232320 on SEN-07915 - Compass Module - HMC6352Customer #232320urn:uuid:8bdd1760-0d21-54f3-6d62-0fd212676e1b2011-10-02T04:03:07-06:00<p>Before I buy this, what&rsquo;s the difference between this one and the less than half this price costing HMC5883L? Hte latter is actually in stock&hellip;</p>joshery420 on SEN-07915 - Compass Module - HMC6352joshery420urn:uuid:b18c1490-ea44-d8b7-5e05-6af721da7a072011-09-16T00:01:28-06:00<p>I&rsquo;m having the same symptoms working with a UBW32 (PIC32MX 4xx series) and I&rsquo;ve not a clue what to do about it. Anyone have any thoughts?</p>Xen0sys on SEN-07915 - Compass Module - HMC6352Xen0sysurn:uuid:6649fdec-57e8-a7eb-8354-34ff394045722011-09-14T11:00:33-06:00<p>Any idea when this will be available again?</p>WizenedEE on SEN-07915 - Compass Module - HMC6352WizenedEEurn:uuid:e6a4f1a2-92ea-cfeb-b97e-826dc013ef172011-07-10T23:04:15-06:00<p>not really</p>Customer #75914 on SEN-07915 - Compass Module - HMC6352Customer #75914urn:uuid:7001e598-ef94-4c94-1801-26e2ae34c1972011-07-04T01:08:54-06:00<p>I&rsquo;ve been playing with this chip all day and have read the data and run the calibration routine but the chip doesn&rsquo;t seem to give linear output and is off by as much as 20 degrees at some points on the compass. At 357 degrees the readout goes all over the place. Does anyone have this chip working on a PICAXE ?</p>Customer #75914 on SEN-07915 - Compass Module - HMC6352Customer #75914urn:uuid:67067c66-4967-8a44-4d5a-df63b3832b4c2011-07-04T01:06:33-06:00<p>I just read the chip docs, the address 42hex is for reading data and address 43 hex is for writting data. The data is in binary.</p>Customer #128690 on SEN-07915 - Compass Module - HMC6352Customer #128690urn:uuid:3b5e4102-cec0-a86e-1682-74772938fd2e2011-06-13T13:45:49-06:00<p>This thing is plug and play<br/>
what else can I say?<br/>
Used the Bildr Tutorial</p>WizenedEE on SEN-07915 - Compass Module - HMC6352WizenedEEurn:uuid:e0ee1775-7ac6-2569-c83d-0a6a6ddd1d132011-06-12T00:06:08-06:00<p>5V works fine.<br/>
&ldquo;2.7 to 5.2V supply range&rdquo;</p>WizenedEE on SEN-07915 - Compass Module - HMC6352WizenedEEurn:uuid:d6204bdb-4435-ed30-b43e-34a1c3ca23ea2011-06-12T00:05:45-06:00<p>No, yes.</p>godzillatron on SEN-07915 - Compass Module - HMC6352godzillatronurn:uuid:d34c818f-3a35-8f43-2ecd-ab2d45f5f0f02011-05-27T03:03:41-06:00<p>Can this be used to tell when the device is horizontal?</p>Customer #216480 on SEN-07915 - Compass Module - HMC6352Customer #216480urn:uuid:d3e47818-50f6-1996-b250-465cdfde679d2011-04-06T15:58:26-06:00<p>Can you please help in getting the compass work with PIC18F<br/>
Thank you</p>Big_Andy on SEN-07915 - Compass Module - HMC6352Big_Andyurn:uuid:5562cc0c-de48-c4c7-bc13-a02360ee35632011-02-28T06:32:04-07:00<p>Hi everyone, I&rsquo;m trying to use one of these as part of my final year project at uni but I&rsquo;m having some serious trouble getting it to behave properly. When I try to read the heading, the first byte only varies between 0 and D and the second byte is always FF. These values do not change in any meaningful way when I rotate the device to face in different directions.<br/>
As far as I can tell, I&rsquo;m following the spec. sheet but so far, no joy. My signal sequence is:<br/>
Start, Address (42), Command (41), Stop, wait 6000us, Start, Address (43), read byte 1, read byte 2, Stop<br/>
Can anyone tell if I&rsquo;m doing anything particularly stupid?<br/>
Thanks,<br/>
Andy</p>ARQuattr on SEN-07915 - Compass Module - HMC6352ARQuattrurn:uuid:8cf5fa11-941f-4d20-d235-cdfcbdfcfc9e2011-02-02T08:45:09-07:00<p>The pin descriptions on the data sheet seem to suggest that it supports SPI as well as I2C, but there isn&rsquo;t any other reference to it anywhere. Can anyone clarify this?<br/>
Thanks</p>Customer #193000 on SEN-07915 - Compass Module - HMC6352Customer #193000urn:uuid:42714cdb-e18a-03ec-8b96-2b95ee4995762011-01-17T15:28:11-07:00<p>Can anyone tell when will this product be in stock again?</p>space_man on SEN-07915 - Compass Module - HMC6352space_manurn:uuid:e1c1ab93-26cf-e1a7-82d6-7eee30805c0a2011-01-07T00:11:41-07:00<p>Hi I am really new to microcontroller programming. Could anyone give me some tips on where to start to get a microcontroller to read a sensor such as this magnetometer? After hooking up the pins correctly, what would I need to do in terms of coding? My microcontroller is this:<br/>
http://www.sparkfun.com/products/9980<br/>
and I am using MPLAB C Compiler.<br/>
Thanks</p>TimWhite on SEN-07915 - Compass Module - HMC6352TimWhiteurn:uuid:3a1286b6-12b6-e9bd-8acf-b4cb93e04f592010-12-19T14:43:12-07:00<p>So, I am interfacing this with a SNAP RF100 board. It&rsquo;s a 3.3v device. I bought four of these modules, and two of them failed to respond with an ACK when I did an I2C write to them. The third responds with an ACK between each byte of a write, but when I do a read, it sends the address with the read bit set, and the compass never starts clocking out data. If I try to do another write everything is hung until I reboot the compass board.<br/>
It feels like the compass isn&rsquo;t able to pulse the SDA line either well enough or quickly enough for my micro not to give up on it.<br/>
I note that many people seem to have had trouble with the presence / value of the pullups on this board. I&rsquo;ve turned off the on-micro pullups (and tried them on as well), but I&rsquo;m nervous about desoldering things on this board given that I&rsquo;ve already had trouble getting two of them to respond at all.<br/>
Any ideas on what I could try next?<br/>
Thanks!<br/>
Tim</p>zignig on SEN-07915 - Compass Module - HMC6352zignigurn:uuid:9969e0be-bb74-837c-de9f-2ebb6052e2302010-12-12T19:52:25-07:00<p>This compass is works really well, I was attemping to put other devices on the two wire bus and it was not working. Removed the pullups with a soldering iron and a keen eye. Now I can have a compass and a i2c eeprom. :)</p>DBACR on SEN-07915 - Compass Module - HMC6352DBACRurn:uuid:46bbb6fb-77ec-28e3-f389-dc4e1b859c2c2010-11-09T15:33:02-07:00<p>Hi! I think I finally get my compass to work with a PIC18F4550. But the meassure I&rsquo;m getting changes by even 3 degrees up and down when leaving the chip still. is this normal? or should I check the calibration? I really need a better performance. thanks a lot</p>ChipC on SEN-07915 - Compass Module - HMC6352ChipCurn:uuid:5b79a30c-1e07-950b-09a6-8d630d6e9bd22010-11-08T11:36:51-07:00<p>I think my problem was something to do with not having a common ground, as I have everything running off of one power source now and it works. The PC was acting as a common ground through the two data links, I believe. From what I can tell the compass has to share a common ground with the board it is sending data to.</p>ChipC on SEN-07915 - Compass Module - HMC6352ChipCurn:uuid:825b1429-561b-6478-e445-974521d5bc4e2010-10-22T21:29:50-06:00<p>I have an odd problem. Someone who&rsquo;s a bit smarter than me can probably figure this out pretty quickly.<br/>
I initially began testing this compass on an Arduino clone (Freeduino MaxSerial). I used the code here: <a href="http://recombine.net/blog/article/49/hmc6352-sparkfun-compass-and-arduino" rel="nofollow" >http://recombine.net/blog/article/49/hmc6352-sparkfun-compass-and-arduino</a> and it worked fine. I then incorporated it into my ArduPilot code and I was still using the Arduino board for 3.3 power since I didn&rsquo;t have a circuit yet, though data now comes through the ArduPilot. Now, I&rsquo;ve found, the compass does not send out data unless the Arduino (Not the ArduPilot!) is connected to the PC via Serial, even though data is being read by the ArduPilot board. The second the serial cable is removed, it stops sending data. The second the serial cable is added again, it sends data again. Alternate sources of power do not work, it only works with the 3.3v on the Arduino attached to a PC.<br/>
Can anyone tell me what&rsquo;s going on? What about whether or not the Arduino is attached to a PC affect the 3.3v power and the compass&rsquo;s ability to send data?</p>jhonbike on SEN-07915 - Compass Module - HMC6352jhonbikeurn:uuid:d0076881-4187-b954-b8da-98d3a43e41822010-10-19T20:01:12-06:00<p>I dont want to buy the HMC6343 Tilt Compensated, the price is very high; how is the HMC6352 affected by tilt?</p>Erl on SEN-07915 - Compass Module - HMC6352Erlurn:uuid:14e236ed-d8c9-ca21-2913-f78a2d1d94de2010-09-28T08:29:56-06:00<p>Proposal for next revision of this board:<br/>
Please make pads for the CA1, CA2, CB1 and CB2 pins available on the board!<br/>
According to the data sheet, resistors can be connected between CA1 and CA2 pins and CB1 and CB2 pins to reduce the sensitivity of the device.<br/>
I plan to use this device as a weather-sealed rotary encoder (have a permanent magnet on an axle that rotates above the chip). I think I am having issues with the magnetic field from the magnet being too strong for the device, and adding resistors between the above pins might have been able to solve my problems.</p>ChipC on SEN-07915 - Compass Module - HMC6352ChipCurn:uuid:fee048a1-f31c-e032-66e0-08869b66e1212010-09-21T19:00:51-06:00<p>I LOVE THIS COMPASS. :)</p>ChristheCarpenter on SEN-07915 - Compass Module - HMC6352ChristheCarpenterurn:uuid:5e0581d4-f990-2ce6-d1bc-55a2b930adf32010-08-24T18:37:32-06:00<p>Hey, guess what? &ndash;Sparkfun was nice enough to add the pull-ups on the board. &ndash;This I think, is the &ldquo;Picaxe problem&rdquo;. I removed the 4.7k&rsquo;s from my board and we are good to go. Now that I have used it, it seems to be very stable, simple and good.</p>ChristheCarpenter on SEN-07915 - Compass Module - HMC6352ChristheCarpenterurn:uuid:f0882040-bfea-e267-9a42-e761c9c25fee2010-08-24T17:15:36-06:00<p>Has anyone solved the Picaxe problem with the first byte coming in as a 255 and the second byte either not changing or going between 0 and about 80 or so? I have found this question in a lot of forums &ndash;Have not found an answer. BTW, I am getting 255, 66 as my two byte values and when you put them back into a word value you get 17151. These values do not change each time I ask for them.</p>spartango on SEN-07915 - Compass Module - HMC6352spartangourn:uuid:c1fe55b0-e981-d7ec-3b35-aaa407ea4eed2010-08-12T02:12:10-06:00<p>Great part! works quite well with decent sensitivity &amp; accuracy. Obviously affected by tilt, but still useable.<br/>
Btw, the price on this part has gone down&hellip;bought mine for $65 about a year ago!</p>N8B on SEN-07915 - Compass Module - HMC6352N8Burn:uuid:c2980678-77c0-7e01-605f-2855a87873c02010-07-01T16:24:40-06:00<p>Well, pin 20 is SDA and pin 21 is SCL, Vcc should be between 2.7V and 5V. If the wiring example sketch doesn&rsquo;t work:<br/>
<a href="http://wiring.org.co/learning/libraries/hmc6352sparkfun.html" rel="nofollow" >http://wiring.org.co/learning/libraries/hmc6352sparkfun.html</a><br/>
Then there could indeed be some manufacturing defect with your board.<br/>
If you would like, contact techsupport@sparkfun.com. We can test the item for you.</p>dapoofyhairdude on SEN-07915 - Compass Module - HMC6352dapoofyhairdudeurn:uuid:be16e2ea-c4c3-2ef9-252c-41b046b118682010-06-30T16:16:37-06:00<p>blah.. i&rsquo;m using the supplied code with a mega.<br/>
vcc 5v, sda to 20, scl to 21.<br/>
getting:<br/>
Current heading: 0.00 degrees<br/>
Current heading: 0.00 degrees<br/>
Current heading: 0.00 degrees<br/>
Current heading: 0.00 degrees<br/>
etc..<br/>
help?</p>RobertC. on SEN-07915 - Compass Module - HMC6352RobertC.urn:uuid:a560e166-ff3c-8734-d55a-361d4dbf68fa2010-06-09T08:08:43-06:00<p>Yes and Yes. I&rsquo;m not sure if we have a device that will directly convert I2C to a USB, but you can use a microcontroller.</p>8r13n on SEN-07915 - Compass Module - HMC63528r13nurn:uuid:033a678e-574d-d42d-f769-0d224c57f05d2010-06-08T19:09:04-06:00<p>I&rsquo;ve been looking everywhere but can&rsquo;t find a USB Compass on the market. How difficult would it be to connect this module to a Windows PC via USB?<br/>
&hellip;Could I just wire this to a USB-I2C interface and connect via serial port?<br/>
&hellip;Does SparkFun sell the parts I need to make this project happen?</p>Pearce on SEN-07915 - Compass Module - HMC6352Pearceurn:uuid:c44b8f25-78a8-ca71-fbd2-4c39588040af2010-05-14T15:27:23-06:00<p>We&rsquo;ve tested them at 5V so that shouldn&rsquo;t be an issue, you might have a defective one, I&rsquo;d drop us an email techsupport@sparkfun.com .</p>Hexagon on SEN-07915 - Compass Module - HMC6352Hexagonurn:uuid:70ec3d8e-17cb-a19d-3d65-677ab230dfd92010-05-11T23:24:22-06:00<p>So according to the description, I&rsquo;m supposed to be able to use this in a 5v system, and so I did. got some nice heading readings for about 30 seconds, then &ldquo;poof&rdquo;, puff of smoke and gone it is. quadruple checked all wiring, and everything is good, 5v is regulated and reads 4.94v on my meter. anyone have a clue why it could blow up like that? should I use 3.3v instead?</p>IDK on SEN-07915 - Compass Module - HMC6352IDKurn:uuid:e7de0385-a331-128e-41d4-8cdc1b9c15702010-05-05T10:24:06-06:00<p>do i need a level converter when connecting it to pic16f877A microcontroller which works on 5v??<br/>
and are there already pull-up resistors on the break out board??</p>RobertC. on SEN-07915 - Compass Module - HMC6352RobertC.urn:uuid:02503810-6fa8-9d19-b68c-aa1afdb32a572010-04-29T13:01:27-06:00<p>Would it be possible for you to use the 3V3 line coming off the Duemilanove?</p>calle on SEN-07915 - Compass Module - HMC6352calleurn:uuid:aea0ad6d-6944-65b2-a9f1-470d0c03db582010-04-26T04:28:03-06:00<p>Could i use this directly with the Arduino Duemilanove, it says it uses 3 V so thats bad i guess.<br/>
But Azayles mentions that i could run on 5 V is that true?</p>Azayles on SEN-07915 - Compass Module - HMC6352Azaylesurn:uuid:3b604d1d-975c-66af-02e2-d2b193c1a3e62010-03-04T12:19:18-07:00<p>I&rsquo;ve got it working on a Parallax BS2 chip with 5V logic. Think it uses Vcc as reference so it&rsquo;s compatible with 3.3V and 5V.</p>Azayles on SEN-07915 - Compass Module - HMC6352Azaylesurn:uuid:28b6bd75-4b94-d3dc-42b0-082020f478ae2010-02-28T11:41:00-07:00<p>I bought one recently and can confirm the PCB is 15mm x 15mm.<br/>
Also the solder mask is red now, not green :P</p>NXTreme on SEN-07915 - Compass Module - HMC6352NXTremeurn:uuid:e3286520-4551-b739-adb2-44fbe97082d02010-02-11T12:16:46-07:00<p>Thank you very much! I just love open source! Go SparkFun!</p>Jimb0 on SEN-07915 - Compass Module - HMC6352Jimb0urn:uuid:c629626c-985a-354b-ea1b-df3aad9d3ff82010-02-10T08:57:23-07:00<p>Sorry for the confusion, those are pull-ups on the I2C lines. <a href="http://www.sparkfun.com/datasheets/Sensors/Magneto/HMC6352-v16.pdf" rel="nofollow" >Schematic&rsquo;s</a> up now.</p>NXTreme on SEN-07915 - Compass Module - HMC6352NXTremeurn:uuid:8ca6d3d1-7a5d-4394-2b46-b8da444995192010-02-09T20:53:51-07:00<p>Well I finally just used my head (and a multimeter) and found out that yeah, it looks like there might be pull-ups installed. Would any of the SparkFun people be willing to upload the schematic/Eagle file just so that I could make sure? Because I&rsquo;d really rather not desolder them just to find out that they weren&rsquo;t pull-ups. Thanks.</p>NXTreme on SEN-07915 - Compass Module - HMC6352NXTremeurn:uuid:605e8f81-5bac-2bdc-8234-2524907d16082010-01-31T21:55:26-07:00<p>It looks to me as if this breakout already has two pullups installed already. I&rsquo;m using this with the Lego NXT which needs 82K pullups, I hope I won&rsquo;t have to desolder the two resistors installed. Can anyone verify about the pullups?</p>rossdepanfilis on SEN-07915 - Compass Module - HMC6352rossdepanfilisurn:uuid:3705432f-98e4-3fe5-bf2a-e9cd290dc3c52009-12-20T22:05:49-07:00<p>Is this just the board, or the board and the module?! kinda confused.</p>MisterMister on SEN-07915 - Compass Module - HMC6352MisterMisterurn:uuid:2277bc84-e3c9-3325-c745-89144eac3d572009-11-16T21:17:25-07:00<p>Question: anyone know if this REQUIRES 3V on the SDA and SCL lines? the datasheet is terribly ambiguous.</p>tyron on SEN-07915 - Compass Module - HMC6352tyronurn:uuid:0346f659-c0a0-b4ba-357d-04554c55bbc72009-09-09T21:54:22-06:00<p>the source code by baragans,is that for PIC?</p>EricWertz on SEN-07915 - Compass Module - HMC6352EricWertzurn:uuid:a8e859ec-58aa-ff05-878c-b5908f9d6b742009-03-23T22:24:35-06:00<p>@SpikeUK &ndash; the text appears to be correct &ndash; the datasheet says that the PLCC itself is 6.5mm on a side. Also the headers are almost always on 2.54mm (0.1") centers, and that would also sync with the text and not the picture. Whooda thought&hellip;<br/>
Unfortnately the price of the board is twice the cost of the chip from Digikey (1@$30, 25@$20). For $30+risk_of_failure it looks interesting, but $60 is sadly a stretch.<br/>
Looks like fun though.</p>BLP on SEN-07915 - Compass Module - HMC6352BLPurn:uuid:592bc155-b61d-cd7e-9621-53eba98488b52009-02-24T10:07:49-07:00<p>Excellent little board&ndash; super-simple interface &amp; very low jitter.</p>SpikeUK on SEN-07915 - Compass Module - HMC6352SpikeUKurn:uuid:199b9734-85cf-6e0a-1b23-28b62b10ce912009-02-16T04:04:40-07:00<p>Is there a problem with the images on this page? The text suggests that this PEC is 15mm by 15mm. Whereas two of the three images show it as being about twice that size.</p>joachimp on SEN-07915 - Compass Module - HMC6352joachimpurn:uuid:6a37e17d-cf8a-e0c2-0a2f-539e8442e7e82009-02-14T18:39:38-07:00<p>This is an awesome chip. Works out of the box on the arduino! See great example: <a href="http://recombine.net/blog/article/49/hmc6352-sparkfun-compass-and-arduino" rel="nofollow" >-sparkfun-compass-and-arduino</a></p>