Issues with mangetometer 5883L

Post Reply
elsinidentidad
Posts: 2
Joined: Tue Apr 24, 2012 10:26 am

Issues with mangetometer 5883L

Post by elsinidentidad »

Last week I received the magnetometer, I tried but NOT working.

I followed the https://www.loveelectronics.co.uk/Tutor ... no-library without any luck.

I did a try adding "two 'pull-up' resistors to enable I2C. For this, connect two 4.7k or 10k resistors between SDA and VCC, and SCL and VCC." without any luck.

The default program from (HMC5883L.h) is not working since the data output is helded (is displaying the same data always)

**************************************************
Starting the I2C interface.
Constructing new HMC5883L
Setting scale to +/- 1.3 Ga
Entered scale was not valid, valid gauss values are: 0.88, 1.3, 1.9, 2.5, 4.0, 4.7, 5.6, 8.1
Setting measurement mode to continous.
Entered scale was not valid, valid gauss values are: 0.88, 1.3, 1.9, 2.5, 4.0, 4.7, 5.6, 8.1
Raw: 720 1574 727 Scaled: 662.40 1448.08 668.84 Heading: 1.19 Radians 68.04 Degrees
Raw: 720 1574 727 Scaled: 662.40 1448.08 668.84 Heading: 1.19 Radians 68.04 Degrees
(.....)
Raw: 720 1574 727 Scaled: 662.40 1448.08 668.84 Heading: 1.19 Radians 68.04 Degrees
**************************************************

The sensor seems not to be working, apparently we're under a bad board. I ran a IC2 test and I was not able to detect any device attached.

Dear hernan.gc ,
Thanks for your mail.Could you please kindly submit a post on
http://www.geeetech.com/forum/viewforum.php?f=9
Please don’t worry about it,we are professional and serious seller,our techsupport team will support you,
Please kindly let us know for any of your concerns.
Best regards
User avatar
jack
Posts: 77
Joined: Sat Mar 03, 2012 2:25 pm

Re: Issues with mangetometer 5883L

Post by jack »

Hi friend;
I've tested the HMC5883L using loveelectronics library,it works well.
SDA-->A4
SCL-->A5

But when I connected SDA to A5, SCL to A4, I got the same result as you.
I suggest you checking your wring again.

Best regards,
Jack
Attachments
20120424170521875.jpg
20120424170521875.jpg (61.03 KiB) Viewed 14457 times
elsinidentidad
Posts: 2
Joined: Tue Apr 24, 2012 10:26 am

Re: Issues with mangetometer 5883L

Post by elsinidentidad »

I can confirm now that the wiring is correct, SDA-->A4; SCL-->A5. Since it's a signal wire, I ran the program with both configurations
(just to confirm that is not a an incorrect PCB naming).

There is a guy on a forum http://dsscircuits.com/articles/the-mys ... 5883l.html, saying that on some HMC5883L lots the interruption is 1E instead of 1C (declared on the library) on IC2 "#define HMC5883L_Address 0x1C" even that, the sensor is still without working-

I ran an IC2 scanner, and is not able to recognize the setup. :(

btw, I'm buying a new sensor, :S
Mirddyn
Posts: 3
Joined: Tue Jun 26, 2012 6:37 am

Re: Issues with mangetometer 5883L

Post by Mirddyn »

I have the same problem that you have. The readings are not changing as I change the board direction.

In my case I2C address is 1E. I am not using the two pull up resistors, but as I am able to change the configuration registers, I assume that I2C is working fine, and the problem has to do with the sensor itself.
Post Reply