Pages: 1 [2] 3   Go Down
Author Topic: Problems with HMC5843  (Read 4740 times)
0 Members and 1 Guest are viewing this topic.
Torino, Italy
Offline Offline
Sr. Member
****
Karma: 2
Posts: 309
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Bo, I'm sorry but I don't know what else to suggest..

I would suggest asking for a replacement board or get in touch with the support of Sparkfun and ask them if they could help you.
Logged

Singapore
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's real unfortunate. I guess many things are simply beyond prediction (like how I spent 3 weeks on the I2C when it should have taken no more than 3 days). Thanks anyway!

Anyway, I'm still hoping someone else can suggest a solution! Please help!
Logged

Worcester, MA
Offline Offline
God Member
*****
Karma: 3
Posts: 623
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It might help a little if you had a schematic we could look at. Here are a few more suggestions:

First off if you are using external pullup resistors on the I2C bus you can probably remove them for 2 reasons: 1. according to the datasheet the HMC5843 has internal pullup resistors and 2. if you are using the Sparkfun logic level converter, the active channel (the Tx channel with the MOSFET) is designed with a pullup resistor on the board. So technically if you are using an external pullup you're actually using 3 pullup resistors on the SDA line.

Next if you are using the Rx and Tx lines off one channel of the Sparkfun Logic Level Converter try switching the SCL line to the Tx on the second channel of the converter board and remove that pullup resistor also.  Basically what you are doing is using the active bi-directional channels for communication instead of just the resistor divider on the Rx side.

Finally it goes without saying, remove the other sensors from the circuit until you get the HMC5843 working correctly.

Good luck!  smiley
Logged

I2C GPS Shield

Checkout my Open Source GPS Tracker on Kickstarter

Singapore
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sparkfun sent me a sketch they use to test the board, together with some suggestions to change some parts of the circuit. I tried all of them and still NACK on transmit of address.

Wayneft, I also tried removing the external pullups, but I got the exact same thing. Without them, my other sensors don't work at all though!

I used both the TX lines on the logic shifter because I2C requires the lines to be bidirectional. I think using just the RX line for either SDA or SCL will cause the I2C to stop working.

Finally, Sparkfun reckons it might be a defective board. But I'll continue testing until the replacement arrives!
Logged

Torino, Italy
Offline Offline
Sr. Member
****
Karma: 2
Posts: 309
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

yeah, keep us posted..
Logged

Singapore
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi people,

Here's an update. I got a replacement for the HMC5843 yesterday and tested it. Very unfortunately, this piece seems to be even worse off than the other. While the previous piece gave nothing but NACKs, this one gives nothing. Absolutely nothing.

I've contacted Sparkfun again and I'm now considering the options. (another replacement or not)  smiley-sad

Bo Xuan
Logged

Torino, Italy
Offline Offline
Sr. Member
****
Karma: 2
Posts: 309
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I would say that the probability to get 2 broken breakout boards are quite low, considering that they say they test each one of the breakout boards.

I would say that's more probable you have an issue on your circuit rather that 2 not working breakout boards.

Can we have a picture of the circuit you are currently using? Would you keep it as simple as possible? Would you take the picture in a way we can see every connection?

Also, did you see the Wire based HMC5843 Arduino library I wrote?
Logged

Singapore
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I totally agree that the probability of getting two malfunctioning boards is extremely low. I'd be totally convinced the problem is with my setup if the symptoms were the same, but they aren't.

Anyway, here's the picture of the connections:
http://www.flickr.com/photos/12634034@N02/5231634336/
3.3V from Arduino, SDA and SCL pulled up (to 3.3V) using 4k7 resistors.

I still tested this board quite a bit, and somehow I managed to get a little communication with it (lasted a few seconds, output some convincing data and some gibberish). But I didn't manage to replicate that again since. I used a different setup from what in the photo. I used my voltage regulator and the logic shifter. But resetting (hard and soft) didn't manage to get me back to communicating with it.

Sparkfun suggested I measure the resistance between the pins to make sure they were "open". I got something like 3k+ Ohms between each of the pins which seems alright to me.

I frequently swap back to test with my other sensors to make sure my I2C communication with them still worked. Nothing has changed so far!

Again, I'm out of ideas!

Bo Xuan
Logged

Torino, Italy
Offline Offline
Sr. Member
****
Karma: 2
Posts: 309
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

See this post: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1291403700/7#7

That's my current connection. Which basically it's just as yours, which looks ok to me..

Try this: disconnect your wires from the arduino but not from the breadboard or the HMC5843.

Take your multimeter. Put it resistance measurement mode. 200 Ohm precision. Then measure the resistance between the cable which you had connected to 3V3 and the cable which was connected to GND. You shuold read something around 150Ohm.

Then measure the resistance between each one of the cable which was before connected to the Arduino and its relative soldered pin on the HMC5843. So, eg: measure the resistance between the cable you inserted on the Analog 4 pin and the SDA pin solder ball you have on your breakout board. You should read something like 0.5-1Ohm. Do the same for each one of your connections to the HMC5843.

After this, I'm out of ideas.
« Last Edit: December 04, 2010, 10:43:28 am by fax8 » Logged

Singapore
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok I've just tried that. The resistance between the 3.3V and GND was 500 Ohms so I had to use the 2000 Ohm setting on the multimeter. Without the pullups, this measures 300 Ohms. Wires were 0.5Ohms each.

I don't know what this implies. Is it indicative of something?
Logged

Torino, Italy
Offline Offline
Sr. Member
****
Karma: 2
Posts: 309
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have any cold solder join (google for it if you don't know what this means), then the copper on the breakout board could actually be unconnected from the female header. That's what I wanted you to check..

The 150Ohm value was what I read when measuring the resistance between breakout board Vcc and GND while it's unconnected.
Logged

Singapore
Offline Offline
Jr. Member
**
Karma: 0
Posts: 53
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I check every solder joint immediately after I make them so none of them should be cold.

Do you think the 150 Ohm difference will affect it? Anyway since all my wires have a resistance of only 0.5 Ohm, the problem still seems to lie with the breakout board..
Logged

Torino, Italy
Offline Offline
Sr. Member
****
Karma: 2
Posts: 309
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The internal 150Ohm resistance you should read measuring the resistance between GND and VCC without any wire/pullup is ok. This means that "something happens" inside the chip (eg: it's consuming current). If there where internal shorts or disconnected pins you would read a different resistance or no resistance at all.

This is one of the first test I do when creating homebrew breakout boards.
Logged

Torino, Italy
Offline Offline
Sr. Member
****
Karma: 2
Posts: 309
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Regarding to the comment which was saying that this chip has internal resistors..

This is true and the following line from the HMC5843 datasheet could let you think that they are always on:

Quote
2
Pull-up resistors are placed on the two I C bus lines. Typically these resistors are off-chip, but, to conserve board space in specific low clock speed applications, they are internal to this device.

But if you have a look at the schematics on page 5 of the datasheet and look at SDAP and SCLP you'll see that the internal pullups are enabled only if SDAP and SCLP are connected to DVDD which is not the case for Sparkfun's HMC5843 breakout board.

So, to my understanding, we do need pullup resistors when using this chip.
Logged

Worcester, MA
Offline Offline
God Member
*****
Karma: 3
Posts: 623
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's a few more suggestions:

First try powering the device from a lower voltage power source.  The datasheet says 3.3 volts is the maximum power allowed and it's not usually a good idea to run things at the max end.  If you don't have access to a separate regulator or power supply try wiring 2 AA batteries in series (3.0 volts) and powering the device from them.  

It might also help a little if you posted your code so we can see what you are doing, it could be a timing issue.  From reading the datasheet and seeing how Sparkfun wired up the IC, it looks like you're moving back and forth between Sleep mode and measurement mode so maybe some extra decoupling might be needed.  You've mention that sometimes you can communicate with the IC.  Try placing the IC in IDLE mode and then just reading the registers to see if it's stable.  From the datasheet it looks like IDLE mode powers down all the "power hungry" modules within the IC but still allows you to read the registers.  The datasheet is a little confusing about SLEEP mode because in one section it says the data in the registers is invalid but another section says after the single measurement is made the device goes into SLEEP and the data is in the output register waiting to be read?  My guess is after the data is read once the following reads will return invalid data.

I've also seen many comments in the Sparkfun comments section with people saying they had to use very large capacitors on either C1/C3 to get stable readings.

Good luck.
Logged

I2C GPS Shield

Checkout my Open Source GPS Tracker on Kickstarter

Pages: 1 [2] 3   Go Up
Jump to: