Shop OBEX P1 Docs P2 Docs Learn Events
HM55B Compass Problems — Parallax Forums

HM55B Compass Problems

matthew2matthew2 Posts: 5
edited 2009-04-14 16:55 in General Discussion
Hi, I'm having a problem using the HM55B Compass with the Propellor Controller. Here's my setup:

Compass Pin
Din(1) -- Dout(2) --> P16 on Propellor
--> R 1kOhm to Gnd
Gnd(3) -- Gnd
Clk(4) --> R 1kOhm --> P15 on Propellor
En(5) --> R 1kOhm --> P17 on Propellor
Vdd(6) --> 5Vdc

Originally I didn't have the resistors in and it worked fine. Now its being a little bit of a problem. The problem was that it (using the HM55B Serial Demo Object) it would read North and about +-30 Degrees, but then would wrap around instead of going around the circle. To examine To try to fix this, I changed Din and Dout to be connected to a 1kOhm resistor in series to the Propellor. This didn't do anything to fix the problem and the o-scope thing still happened too.

Next I tried changing the Din/Dout resistor to be connected to Gnd instead of in series. It is still doing the same thing as before but the o-scope thing doesn't fix it.

Note: I have a decoupling .1 uF Cap right off the Compass, and there is no motor or anything running to affect it. It also does the same thing if the battery pack (about 4 in) or a Power Supply (4 feet) is powered on. Anybody have any ideas?

Thanks,
David

Comments

  • Ole Man EarlOle Man Earl Posts: 262
    edited 2009-04-13 22:51
    I was working on my project that uses the HM55B today also. I found the Din and Dout need to go to the Data pin on prop without resistors. Other than putting it in a 6 pin socket and plugging it in backwards once, I thought I fried it because it smelled like I did. It worked fine afterward.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-04-13 23:49
    transdot.gif
    matthew2,

    You don't need a resistor to ground, but you must have a resistor between the HM55B and the Propeller since the HM55B is a 5V device, and the Propeller is a 3.3V device.· Otherwise you will damage the Propeller and/or the HM55B.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
    1117 x 514 - 136K
  • matthew2matthew2 Posts: 5
    edited 2009-04-14 14:44
    Beau - I agree and will put it back, but on the datasheet it has a 2.2k on the DIn line and a 330 on the Dout line?
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-04-14 16:33
    matthew2,

    You are looking at the module datasheet. The HM55B that Parallax provides includes those resistors on the HM55B circuit board.... So you could eliminate the 1K resistor. It's just good practice (even if your voltage levels are the same) to place a current limiting resistor of some kind on any Data Output for two reasons. 1) If the voltage levels are different, and 2) If the data is being driven and does not agree with your I/O pin.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • matthew2matthew2 Posts: 5
    edited 2009-04-14 16:55
    Now with either the 1k in or out it works the first time the program loops through but it won't get new data. By probing the lines I get the following data:

    Enable: 60 kHz pulse
    Clock: 180 kHz pulse
    Data: 2.2 MHz pulse

    Note: All the pulses are pretty dirty.
Sign In or Register to comment.