HMC6352 response 0
perekist
Posts: 2
Hi,
Since a few days I'm trying to read the heading from the HMC6352 (product #29323) with my Propeller Robot Controller, but the only result I get is 0. I used the example code on the Parallax product page for this sensor.
Example code: HMC6352-Propeller-Examples-V1.0.zip
I tried the module on my BSP2, using the example code on the product page, and it worked fine. So the sensor is probably working according to the specs.
The wiring on the prop-board is:
- using 2 ports (14,15) of the board, i connected the SDA to the signal port of connector 14, and the SLC, VDD and GND to connector 15.
As far as I understand, it could be the wiring or the clock frequency of the prop which doesn't account for a 100khz I2C connection, as is implemented in the example code. I tried a modified version of the I2C connection as well, which implements delays in read and write procedures, but the reading was always 0.
Modified version of the I2C driver in: hmctest_-_Archive__Date_2008.09.02__Time_20.50.zip
Could anyone help me out with the wiring and/or give advice on the I2C prop code to use?
Thanks,
Peter
Since a few days I'm trying to read the heading from the HMC6352 (product #29323) with my Propeller Robot Controller, but the only result I get is 0. I used the example code on the Parallax product page for this sensor.
Example code: HMC6352-Propeller-Examples-V1.0.zip
I tried the module on my BSP2, using the example code on the product page, and it worked fine. So the sensor is probably working according to the specs.
The wiring on the prop-board is:
- using 2 ports (14,15) of the board, i connected the SDA to the signal port of connector 14, and the SLC, VDD and GND to connector 15.
As far as I understand, it could be the wiring or the clock frequency of the prop which doesn't account for a 100khz I2C connection, as is implemented in the example code. I tried a modified version of the I2C connection as well, which implements delays in read and write procedures, but the reading was always 0.
Modified version of the I2C driver in: hmctest_-_Archive__Date_2008.09.02__Time_20.50.zip
Could anyone help me out with the wiring and/or give advice on the I2C prop code to use?
Thanks,
Peter
Comments
I hope you did not really connect all three lines (SCK, Vcc, GND) to one pin! That would short Vcc to GND.
Did you remember to add 10K pull up resistors from pin 15 to Vcc, and pin 15 to Vcc?
Thanks for your quick response. I am quite new to the electronics in general, as you might have noticed. Any help is much appreciated!
I was a bit confused about the pull up resistors, because the wiring diagram in the documentation didn't show any:
http://www.parallax.com/Portals/0/Downloads/docs/prod/sens/29323_HoneywellHMC6352Compass-v1.0.pdf
No, i did not connect the (SCK, Vcc, GND) to one pin. The prop board has separate GND and Vcc at each I/O pin. The SCL is connected to pin 14, the SDA to pin 15, the Vcc has pull up resistors to SCL and SDA. The attachment shows my new wiring diagram with the 10k resistors, as I think they should be.
Unfortunately, I still get a reading of 0, using the standard propeller demo program. I hope the diagram helps to explain my struggle. Is there a difference to which GND and Vcc is being used on the prop board? I use the prop robot controller board.
Stupid question maybe, but why does the sensor give good readings at my BoeBot board, without the pull up resistors?
Many thanks in advance!
Peter
If I were you, I'd send an email to Parallax support... they are great about supporting their products.
Did you ever resolve the issue with this sensor? I have the same problem and haven't had a lot of time to work on it, but I was having exactly the same problem.
By the way, the raw sensor needs pull-up resistors but the part sold by parallax already has the pull-up resistors on the pcb, along with a decoupling capacitor.
Today it works but is all over the place. Skips from 89 to 106 and 180 to 300.
Tried calibration and that worked for a while but calibration according to honeywell is only 2.5 degrees.
Read a post by some who said parallax wrote the demo wrong, how can u tell its all so complicated. Lol
My little red breakout board is by sparkfun, said to be made by parallax and has 3 10k resistors on it, sda to 3.3 and scl to 3.3 cant make out what the third one does
Had two of these compass working on my arduino, but need it here due a different arduino problem.