HM55B Compass Problems
matthew2
Posts: 5
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
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
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.
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.
Enable: 60 kHz pulse
Clock: 180 kHz pulse
Data: 2.2 MHz pulse
Note: All the pulses are pretty dirty.