getting HM55B Compass to work
compuwiz
Posts: 20
Hi I'm Matt. I'm a sophomore in high school and for my science project I'm creating a mobile autonomous robot. It's a boe-bot chassis and Education board with a spin stamp. It will use 3 ping sensors and a compass and gps to navigate to a given coordinate. It also has the 2x16 nonbacklit serial lcd. The compass is wired correctly and it supposedly initializes but all I get for x, y, theta, or degrees are zeros. I'm stumped and my projects due next week anyone have any ideas? Code is attached.
Comments
in the HM55B Compass Module DEMO V1.0
democode the wiring shows supply-voltage 3.3V
your code shows supply-voltage 5V
if connected directly to 5V the propeller-chip might be damaged
you have to use 1k resistors between Prop-IO-Pin and a 5V device
as a current-limiting resistor
@Parallax:
the doc http://www.parallax.com/Portals/0/Downloads/docs/prod/compshop/HM55BModDocs.pdf
says minimum supply-voltage 4.8V
the HM55B Compass Module Asm.spin-file says 3.3V
so what's valid ???
the docs say
Do not apply magnetic fields in excess of 300 μT to the Compass Module. Magnetic fields
stronger than 300 μT can permanently damage the sensor.
• Mount the Compass Module as far away as possible from magnetic field disturbances. These
include magnets (including compass needles), motors, power cords, coils, metal boxes, and
sometimes the ground.
best regards
Stefan
The OBEX has been updated with version 1.2 to indicate a proper 5V supply to the compass.
Initially I had used the compass with a 3.3V supply without any problems, but after re-visiting and studying the documentation more thoroughly, I decided that with 3.3V I was just barely within the operating margin of the compass.
(See a recent E-mail reply below)
Jeff Martin,
I think it's ok to run the compass at 3.3V, but "just" ok ... I did look at the datasheets. I have powered the compass at both 3.3V and 5V and have not observed any measurable difference.
The integrated circuit datasheet indicates that the minimum voltage to the compass should not go below 2.7V and that the maximum current for the compass is only 13mA (typically 9ma). (Hitachi HM55B Integrated Circuit Datasheet)
The compass documentation (Hitachi HM55B Compass Documentation) datasheet uses a low dropout regulator that has a maximum dropout of 1.2V at 100mA.
pdf1.alldatasheet.com/datasheet-pdf/view/8863/NSC/LM3480IM3-3.3.html
Since the Compass is only using a maximum of 13mA the maximum dropout is about 1V (at 10mA) with a typical dropout of 0.7V.
This equates to the compass seeing something between 2.3V to 2.6V with a 3.3V supply. As the ambient temperature increases the voltage that the compass "sees" actually improves. Likewise it worsens at the ambient temperature decreases.
All said, I updated the OBEX with the same file attached to this E-mail.
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Web: http://www.parallax.com
Email: bschwabe@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 1/28/2009 9:18:07 PM GMT
I'm glad that you got it working, but please follow the current limiting resistor suggestion between the Compass and the Propeller so that you do not damage one of the Propeller and/or Compass I/O pins.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
I connected my Compass at 3.3 V and no resistors and it works well. If you have any questions, let me know.
Matt
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"I have always wished that my computer would be as easy to use as my telephone.· My wish has come true.· I no longer know how to use my telephone."
- Bjarne Stroustrup
That's great!! do you have a link or any pictures of the event?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
a project on the viscosity of alternative fuels. This the third year she was doing her project and her father is the president of a research lab. My teacher said I would have won but I undersold how much work I put into my project. Ah well, not bad for a first year sci research kid who was finishing his project literally the morning of.
First, congratulations! We have a place for you on the Parallax web site:
http://www.parallax.com/Education/WinnersCircle/tabid/359/Default.aspx
The Winner's Circle. If you are interested in being shown please provide some pictures and the explanation. We'll send you some free hardware of your choice.
Ken Gracey
Parallax, Inc.
It's amazing what you have already accomplished.