Honeywell HMC5843 3-axis compass troubles

Have questions about a SparkFun product or board? This is the place to be.

Moderators: phalanx, TS-Tim

The_Todd
Posts: 65
Joined: Wed Jan 02, 2008 12:31 am

Honeywell HMC5843 3-axis compass troubles

Post by The_Todd » Sun Mar 22, 2009 10:24 am

I am having difficulties getting proper readings from the honeywell HMC5843 3-axis compass.

The device is connected in single supply reference design (3.3v) as shown in the datasheet. And an STM32 microcontroller for I2C Comms all on a single pcb. I have tried two chips from digi-key and they both have the same results.

I am able to properly connect and read / write registers over the I2C bus at 100khz (i.e. the Config Registers A,B and Mode as well as ID Registers 'H43' set & read fine).

The problem is the X,Y,and Z axis readings are bogus. When in continuous sample mode with sensitivity at default +-1 Gauss, the readings I get in ADC counts are: x-axis about +-4, y-axis +-5, z-axis +20
When in self test operation as described in the datasheet readings are X:~40, Y:~40, Z:~60, though they should be close to 715 ADC counts. Different sensitivity settings don't achieve different results.

Has anybody had any success with the HMC5843?

lamont
Posts: 7
Joined: Mon Jun 02, 2008 4:16 pm

Post by lamont » Mon Mar 23, 2009 1:15 pm

I was about to order one from digikey, so I can't help you with your question yet, but I was hoping you could help answer mine.

The datasheet calls it a PLCC-20 footprint, with 0.5mm spacing between pin centers. However, every PLCC-20 adapter I could find seems to think the standard is 0.05", aka 1.27mm.

Am I confused about PLCC, or is the honeywell datasheet incorrect? (or some awesome combo of both) I guess I can order the chip then make a custom PCB for it, but I was curious what you used to mount and test it, since you're obviously getting an i2c signal in and out.

Thanks.

The_Todd
Posts: 65
Joined: Wed Jan 02, 2008 12:31 am

Post by The_Todd » Mon Mar 23, 2009 3:37 pm

I couldn't find any PLCC adapters which were correct either. I just risked it and made my own PCB through batchpcb (It was a 2.5 week turnaround for me during February) which worked out.

Be very careful with the honeywell datasheet, and make sure you have the most current one. The initial Honeywell datasheet was completely wrong with I2C comms.

Also note that the footprint pin numbers in the Honeywell data sheet are the BOTTOM view, so you need to reverse your brain to get the pinout right. I can post an image of my footprint and layout when I'm back on my pc, remind me of this.

I think you will likely get the same issue with the chip as me, my belief is digi-key has a bad batch of chips. I have contacted Honeywell about the issue and RMA'd my chip back to them and hopefully get one from a new batch. They were out of stock so it has taken approximately 3-4 weeks waiting for a new chip from them.

Hopefully between us and the other people on this board this issue will get worked out. The HMC5843 is the most cost effective and accurate integrated compassing solution I have seen.

-Todd

lamont
Posts: 7
Joined: Mon Jun 02, 2008 4:16 pm

Post by lamont » Mon Mar 23, 2009 3:41 pm

Thanks for the update. I'm ordering a few of the chips from digikey now, so we'll find out.

Meanwhile, someone else got a response back from epboard.com, who agreed that it was no PLCC he'd ever seen, but said:

"Our E20-0095, QFN 20 pins (4mm x 4mm, 0.5mm lead pitch) to DIP 20 pins IC Adapter, can fit your IC very well."

Their adapter is $10 and looks to be a good fit from the PDF. I have no idea what honeywell is/was smoking.

The_Todd
Posts: 65
Joined: Wed Jan 02, 2008 12:31 am

Post by The_Todd » Wed Apr 01, 2009 1:22 pm

Update: I have recieved (finally) my replacement IC from Honeywell and it works fine, and as expected from the datasheet without any changes to my code or PCB.!

I've only been reading the ADC XYZ Counts from it so far, but will post results of accuracy once I get the filtering and heading code written.

However, I believed Digi-Key (and possibly other suppliers) have a bad batch of defective HMC5843 IC's. I had ordered another IC from Digi-Key while waiting for honeywell, and it had the same defect as the first, which I believe is too much to be coincidence.

Lamont, let me know if you have any luck! Contact Honeywell if you have the same issue.

Todd

lamont
Posts: 7
Joined: Mon Jun 02, 2008 4:16 pm

Post by lamont » Thu Apr 02, 2009 2:48 pm

Possibly due to your report, digikey is out of the HMC5843 and backordered till 5/30. I canceled my order with them.

I'm seeing if I can get some friends to go in on the minimum 5 needed to order from honeywell. Hopefully it won't be 8 weeks for the order to go through.

lamont
Posts: 7
Joined: Mon Jun 02, 2008 4:16 pm

Post by lamont » Thu Apr 02, 2009 5:39 pm

ok, forget that. Honeywell wanted 8 weeks for delivery and $40 per chip, not the $19 that digikey was charging. I'll just backorder two and wait. Sigh.

jlcortex
Posts: 1
Joined: Tue May 26, 2009 11:24 am

Post by jlcortex » Tue May 26, 2009 11:52 am

i was bought 2 units last 11-May-2009.
i have solder in a professional PCB assembler.

I am getting problems with this units, we are unable to read correct values from this units.

I'm getting exactly the same problems with my two equal prototype boards. I2C works perfect, I can write control registers and read everything to verify but the data registers seems reflect a fixed value.

I've tried continuous and single conversion and I always read RDY bin low (status = 0x04).
Curiously, DRDY pin is high, maybe It should be marked _DRDY (active low) as It seems to have reverse polarity of the status bit.
If I try to read the registers I always get 0x0020 for all three channels (even in self-check mode!).

I've tried to wait for RDY bit to enable upon initialization, with no luck either.

Any known problem with this units?

Thanks
Jose Luis
SportDevices SL
Spain

psilva
Posts: 1
Joined: Fri Sep 11, 2009 7:49 am

Post by psilva » Fri Sep 11, 2009 7:57 am

Hi jlcortex,

I'm having the exact same problem as you are. Have you managed to resolve it?

Pedro

voiceafx
Posts: 2
Joined: Mon Dec 21, 2009 7:16 pm
Contact:

Post by voiceafx » Mon Dec 21, 2009 7:18 pm

@psilva and @jlcortex,

I had the same problem as you guys. If you haven't figured it out yet (this was a few months ago, after all), what you are seeing is a CAP problem. I put a .47uF CAP in parallel with a big 100uF electrolytic, and the problem went away completely.

sebmadgwick
Posts: 254
Joined: Wed Oct 17, 2007 12:17 am

Post by sebmadgwick » Tue Dec 22, 2009 9:06 pm

I can second that. My HMC5843 is working just fine BUT I removed the 4.7u cap and put on a 220uF.

This is a well discussed issue that has appear in a another larger thread. Sparkfun know about it and are 'looking into it'.

tz
Posts: 148
Joined: Sun Aug 23, 2009 10:40 pm

Post by tz » Sat Dec 26, 2009 9:11 am

Different but possibly related problem - Mine apparently has a second cap, at low I2C rates it works correct returning register values, but I can't get a valid conversion even if I try writing (and the device ACKs!) and the status register indicates it is asleep. At 400Hz, it acks but returns 0xff for successive bytes, e.g. the ID bytes will be 48 ff ff instead of 48 33 34.

sebmadgwick
Posts: 254
Joined: Wed Oct 17, 2007 12:17 am

Post by sebmadgwick » Tue Jan 05, 2010 2:16 am

tz, It sounds like you've got the same problem as everyone else. The HMC falls over (e.g. not ACKs, resets, send incorrect data) when you request a conversion or a conversion is triggered by its timer due to a an unsustainable current demand by the device. I measured that the undesirable behaviour observed on the power rails during this, to last ~40ns. Its not an immediately obvious problem.

If you've triple checked your code and comms protocol; try new caps until one works. I've found this one works fine:

Name: TPS3 Series Low ESR Chip Tantalum Capacitor
Value: 100uF
ESR: 75mOhms
Size: SMD 6 x 3.2 x 2.6 (mm)
RS part number: 406-9851

I am searching for a smaller package solution; if anyone has any suggestions?

tz
Posts: 148
Joined: Sun Aug 23, 2009 10:40 pm

Post by tz » Tue Jan 05, 2010 5:21 am

Have you checked digikey.com or mouser? They have some surface mount caps - fortunately you don't need a lot of capacitance or voltage, just low ESR. I'm using a standard electrolytic cylindrical type and it works.

(for a while - something is loose and I think I need to reflow since if I push down it restarts).

tz
Posts: 148
Joined: Sun Aug 23, 2009 10:40 pm

reCap-acitor

Post by tz » Thu Jan 14, 2010 9:46 pm

digikey PCC2395CT-ND

Panasonic ECG 10uF 6.3VX5R 0603.

Tiny and the thing makes it work well.

I should also note that the earlier electrolytic 47uF would run for several minutes but stop. This one has been going for a half hour with no signs of stopping.

Post Reply