Reports.HM55BCompass History

Hide minor edits - Show changes to output

Changed lines 3-4 from:
Attach:image.jpg
to:
Attach:foo.jpg
Added lines 3-4:
Attach:image.jpg
Changed line 89 from:
||! x || y || -+x || -+y || abs(y/x) || =abs(y/x) ||
to:
||! x ||! y ||! -+x ||! -+y ||! abs(y/x) ||! =abs(y/x) ||
Changed line 89 from:
|| x || y || -+x || -+y || abs(y/x) || =abs(y/x) ||
to:
||! x || y || -+x || -+y || abs(y/x) || =abs(y/x) ||
Changed line 94 from:
|| pointed north |||||||||||||
to:
|| pointed north ||||||||||||
Changed line 97 from:
|||||| pointed northeast |||||||||||||
to:
|||||| pointed northeast ||||||||||||
Changed line 100 from:
|| pointed east |||||||||||||
to:
|| pointed east ||||||||||||
Changed line 104 from:
|| pointed southeast |||||||||||||
to:
|| pointed southeast ||||||||||||
Changed line 107 from:
|| pointed south |||||||||||||
to:
|| pointed south ||||||||||||
Changed line 110 from:
|| pointed southwest |||||||||||||
to:
|| pointed southwest ||||||||||||
Changed line 113 from:
|| pointed west |||||||||||||
to:
|| pointed west ||||||||||||
Deleted line 99:
|| ||
Changed line 94 from:
|||||| pointed north ||||||||
to:
|| pointed north |||||||||||||
Changed line 97 from:
|||||| pointed northeast ||||||||
to:
|||||| pointed northeast |||||||||||||
Changed line 101 from:
|||||| pointed east ||||||||
to:
|| pointed east |||||||||||||
Changed line 105 from:
|||||| pointed southeast ||||||||
to:
|| pointed southeast |||||||||||||
Changed line 108 from:
|||||| pointed south ||||||||
to:
|| pointed south |||||||||||||
Changed line 111 from:
|||||| pointed southwest ||||||||
to:
|| pointed southwest |||||||||||||
Changed line 114 from:
|||||| pointed west ||||||||
to:
|| pointed west |||||||||||||
Changed line 90 from:
||pointed northwest ||||||||||||
to:
|| pointed northwest ||||||||||||
Changed line 90 from:
|| || || pointed nothwest ||||||||
to:
||pointed northwest ||||||||||||
Changed line 90 from:
|| |||| pointed nothwest ||||||||
to:
|| || || pointed nothwest ||||||||
Changed line 90 from:
|||||| pointed nothwest ||||||||
to:
|| |||| pointed nothwest ||||||||
Changed line 90 from:
|| || || pointed nothwest || || || ||
to:
|||||| pointed nothwest ||||||||
Changed line 94 from:
|| pointed north ||
to:
|||||| pointed north ||||||||
Changed line 97 from:
|| pointed northeast ||
to:
|||||| pointed northeast ||||||||
Changed line 101 from:
|| || pointed east ||
to:
|||||| pointed east ||||||||
Changed line 105 from:
|| pointed southeast ||
to:
|||||| pointed southeast ||||||||
Changed line 108 from:
|| pointed south ||
to:
|||||| pointed south ||||||||
Changed line 111 from:
|| pointed southwest ||
to:
|||||| pointed southwest ||||||||
Changed line 114 from:
|| pointed west ||
to:
|||||| pointed west ||||||||
Changed line 90 from:
|| || || pointed nothwest || || ||
to:
|| || || pointed nothwest || || || ||
Changed line 90 from:
|| pointed nothwest ||
to:
|| || || pointed nothwest || || ||
Changed lines 90-91 from:
pointed nothwest
to:
|| pointed nothwest ||
Changed lines 94-95 from:
pointed north
to:
|| pointed north ||
Changed lines 97-98 from:
pointed northeast
to:
|| pointed northeast ||
Changed line 101 from:
|| pointed east ||
to:
|| || pointed east ||
Changed lines 105-106 from:
pointed southeast
to:
|| pointed southeast ||
Changed lines 108-109 from:
pointed south
to:
|| pointed south ||
Changed lines 111-112 from:
pointed southwest
to:
|| pointed southwest ||
Changed lines 114-115 from:
pointed west
to:
|| pointed west ||
Deleted line 90:
[@
Changed lines 92-96 from:
5 | 12 | +x | +y | 12/5 | 20
3 | 13 | +x | +y | 13/3 | 40
4
| 12 | +x | +y | 12/4 | 30
to:
|| 5 || 12 || +x || +y || 12/5 || 20 ||
|| 3
|| 13 || +x || +y || 13/3 || 40 ||
|| 4
|| 12 || +x || +y || 12/4 || 30 ||
Changed lines 97-100 from:
8 | 0 | +x | +y | 0/8 | 0
9 | 0 | +x | +y | 0/9 | 0
to:
|| 8 || 0 || +x || +y || 0/8 || 0 ||
|| 9
|| 0 || +x || +y || 0/9 || 0 ||
Changed lines 101-108 from:
-1 | -9 | -x | -y | 9/1 | 90
-
1 | -10 | -x | -y | 10/1 | 100

pointed east
-12
| -11 | -x | -y | 11/12 | 0
-11
| -12 | -x | -y | 12/11 | 10
-12
| -11 | -x | -y | 11/12 | 0
to:
|| -1 || -9 || -x || -y || 9/1 || 90 ||
|| -1
|| -10 || -x || -y || 10/1 || 100 ||
||
||
|| pointed east
||
|| -12
|| -11 || -x || -y || 11/12 || 0 ||
|| -11
|| -12 || -x || -y || 12/11 || 10 ||
|| -12 || -11 || -x || -y || 11/12 ||
0 ||
Changed lines 110-113 from:
-23 | -2 | -x | -y | 2/23 | 0
-24
| -4 | -x | -y | 4/24 | 0
to:
|| -23 || -2 || -x || -y || 2/23 || 0 ||
|| -24
|| -4 || -x || -y || 4/24 || 0 ||
Changed lines 114-116 from:
-27 | 7 | -x | +y | 7/27 | 0
-26
| 8 | -x | +y | 8/26 | 0
to:
|| -27 || 7 || -x || +y || 7/27 || 0 ||
|| -26
|| 8 || -x || +y || 8/26 || 0 ||
Changed lines 118-120 from:
-20 | 18 | -x | +y | 18/20 | 0
-
20 | 17 | -x | +y | 17/20 | 0
to:
|| -20 || 18 || -x || +y || 18/20 || 0 ||
|| -20
|| 17 || -x || +y || 17/20 || 0 ||
Changed lines 122-125 from:
-9 | 20 | -x | +y | 20/9 | 20
-10 | 21 | -x | +y | 21/10 | 20
@]
to:
|| -9 || 20 || -x || +y || 20/9 || 20 ||
|| -10
|| 21 || -x || +y || 21/10 || 20 ||
Changed line 88 from:
%border=1%
to:
||border=1
Changed line 88 from:
%border=1
to:
%border=1%
Added line 88:
%border=1
Changed lines 88-89 from:
|| x || y || -+x || -+y || abs(y/x) || =abs(y/x)|
to:
|| x || y || -+x || -+y || abs(y/x) || =abs(y/x) ||
Added lines 87-88:

|| x || y || -+x || -+y || abs(y/x) || =abs(y/x)|
Deleted lines 89-90:
x | y | -+x | -+y | abs(y/x)| =abs(y/x)
Deleted line 2:
%rframe% http://www.parallax.com/images/prod_gif/29123.gif | '''Parallax Compass Module'''
Changed lines 5-6 from:
to:
%rframe% http://www.parallax.com/images/prod_gif/29123.gif | '''Parallax Compass Module'''
Changed line 90 from:
nothwest
to:
pointed nothwest
Changed line 96 from:
north
to:
pointed north
Changed line 101 from:
northeast
to:
pointed northeast
Changed line 105 from:
east
to:
pointed east
Changed line 110 from:
southeast
to:
pointed southeast
Changed line 115 from:
south
to:
pointed south
Changed line 119 from:
southwest
to:
pointed southwest
Changed line 123 from:
west
to:
pointed west
Added lines 88-89:
x | y | -+x | -+y | abs(y/x)| =abs(y/x)
Changed lines 18-19 from:
to:
* Compass jacket, pants or jewerly
Added line 128:
* The compass is small enough to work nicely with wearable projects.
Changed lines 88-92 from:
5 | 12 | +x | +y | 12/5 | 200
3 | 13 | +x | +y | 13/3 | 400
4 | 12 | +x | +y | 12/4 | 300
to:
5 | 12 | +x | +y | 12/5 | 20
3 | 13 | +x | +y | 13/3 | 40
4 | 12 | +x | +y | 12/4 | 30
Changed lines 99-101 from:
-1 | -9 | -x | -y | 9/1 | 900
-1 | -10 | -x | -y | 10/1 | 1000
to:
-1 | -9 | -x | -y | 9/1 | 90
-1 | -10 | -x | -y | 10/1 | 100
Changed line 104 from:
-11 | -12 | -x | -y | 12/11 | 100
to:
-11 | -12 | -x | -y | 12/11 | 10
Changed lines 121-122 from:
-9 | 20 | -x | +y | 20/9 | 200
-10 | 21 | -x | +y | 21/10 | 200
to:
-9 | 20 | -x | +y | 20/9 | 20
-10 | 21 | -x | +y | 21/10 | 20
Changed lines 126-128 from:
Describe your own application of the sensor. Link to any external documentation of your project, and discuss how you got the sensor to do what you needed it to.
to:
* Made a portable compass that indicates N, S, E, W with one LED always illuminated to indicate North.
* Processing application would be nice, maybe that will be next.
* Would like
to get the angles and arctan working in the PICBasic Pro environment.
Added line 73:
Added lines 76-83:
!!!Work Arounds for ArcTan in PICBasic Pro
* Use PIC C
* Make a lookup table
* Buy a [[http://www.parallax.com/detail.asp?product_id=604-00030a | Floating Point Coprocessor IC]]
* Try to use vector math
* Arctan() - [[http://www.emesystems.com/programs/cordic-atn.bse | bit shifting code]]
* Learn [[http://www.dattalo.com/technical/software/software.php | assembly ]]
Changed lines 85-86 from:
Describe the behavior of the sensor when you use it to sense something. Note any peculiarities that you had to work around, or things that might affect someone else's use. Graphs and images are useful here.
to:
Sample data from the PICBasic Pro code:
[@
nothwest
5 | 12 | +x | +y | 12/5 | 200
3 | 13 | +x | +y | 13/3 | 400
4 | 12 | +x | +y | 12/4 | 300


north
8 | 0 | +x | +y | 0/8 | 0
9 | 0 | +x | +y | 0/9 | 0


northeast
-1 | -9 | -x | -y | 9/1 | 900
-1 | -10 | -x | -y | 10/1 | 1000

east
-12 | -11 | -x | -y | 11/12 | 0
-11 | -12 | -x | -y | 12/11 | 100
-12 | -11 | -x | -y | 11/12 | 0

southeast
-23 | -2 | -x | -y | 2/23 | 0
-24 | -4 | -x | -y | 4/24 | 0


south
-27 | 7 | -x | +y | 7/27 | 0
-26 | 8 | -x | +y | 8/26 | 0

southwest
-20 | 18 | -x | +y | 18/20 | 0
-20 | 17 | -x | +y | 17/20 | 0

west
-9 | 20 | -x | +y | 20/9 | 200
-10 | 21 | -x | +y | 21/10 | 200
@]
Changed lines 72-75 from:
Give a code sample for the microcontroller you developed the example on. Link it to the Code group of the wiki, formatting the link like this:

[=[[Code.myCodeSample | Code
Sample]]=]
to:
PICBasic Pro compass code does not provide angles, it simply finds NORTH, SOUTH, EAST & WEST.
[[Code.HM55BCompass |
Code Sample]]
Changed lines 3-4 from:
http://www.parallax.com/images/prod_gif/29123.gif
to:
%rframe% http://www.parallax.com/images/prod_gif/29123.gif | '''Parallax Compass Module'''
Changed lines 40-41 from:
http://itp.nyu.edu/~js3646/sensors/angles.jpg
to:
%cframe% http://itp.nyu.edu/~js3646/sensors/angles.jpg
Deleted line 48:
Changed line 63 from:
But the 4 wire should work fine.
to:
But the 4 wire hookup works fine too.
Changed lines 1-5 from:
Initial report by [=[[~js3646 | John Schimmel]]=], 25, Oct, 2005

This [[http://www.parallax.com/detail.asp?product_id=29123 | Compass Module ]] made exclusively by [[http://www.parallax.com | Parallax]] is a dual-axis magnetic field sensor built around the Hitachi HM55B IC. Parallax has made this compass IC accessible by providing Hitachi’s surface mount sensor chip with a 3 V onboard voltage regulator and resistor protection, all in a 0.3” wide 6-pin DIP module. The Hitachi HM55B Compass Module is compatible with the BASIC Stamp microcontroller’s 5 V supply and signal levels. Acquiring measurements from the module is made easy with a synchronous serial interface, and even easier with the commands SHIFTIN and SHIFTOUT.
to:
Initial report by [[~js3646 | John Schimmel]], 25 October 2005

http://www.parallax.com/images/prod_gif/29123.gif

This
[[http://www.parallax.com/detail.asp?product_id=29123 | Compass Module ]] made exclusively by [[http://www.parallax.com | Parallax]] is a dual-axis magnetic field sensor built around the Hitachi HM55B IC. Parallax has made this compass IC accessible by providing Hitachi’s surface mount sensor chip with a 3 V onboard voltage regulator and resistor protection, all in a 0.3” wide 6-pin DIP module. Acquiring measurements from the module is made easy with a synchronous serial interface, and even easier with the commands SHIFTIN and SHIFTOUT. '^This paragraph is pulled from the [[http://www.parallax.com/dl/docs/prod/compshop/HM55BModDocs.pdf | parallax compass documentation]]^'


The compass module is ideally made for the Parallax's Basic Stamp but remember that the Stamp is just a glorified PIC! So anything you can do on a Basic Stamp you can do on a typical PIC with PICBasic - for example the SHIFTIN and SHIFTOUT commands are identical, along with many other commands.

The documentation that Parallax provides is incredibly useful, read it completely - several times. The first problem you'll encounter is that the code written for the Basic Stamp uses the arctan (ATN) function, PICBasic Pro has no arctan() function, some alternative solutions will be provided below as they are found. So don't worry about the missing PICBasic arctan, you really only need it for applications that need precise direction/degree information.
Changed lines 14-15 from:
Describe some typical applications of this sensor. You can often get this from the datasheet, but a few examples from companies or individuals who've used it would be useful as well.
to:
* Mobile robot direction sensor
* Handheld electronic compass
* Weathervane indicator for remote weather stations
* Audible compass for the visually impaired
* Automotive electronic compass
Changed lines 21-26 from:
Put a link to the datasheet at the top. Also link any retail sources, for example if you're using a breakout board, or any other parts that making the sensor easier.

Give the voltage and amperage ranges, and any other relevant electrical data.

Describe the electrical changes when the sensor senses whatever physical changes it senses.
to:
* To find out about the compass from the manufacturer - Hitachi's [[http://www.parallax.com/dl/docs/prod/compshop/HM55BDatasheet.pdf | HM55B IC datasheet]]
* But the one you want to look at is really at is [[http://www.parallax.com/dl/docs/prod/compshop/HM55BModDocs.pdf | Parallax's datasheet documentation]]
* Buy it here at [[http://www.parallax.com/detail.asp?product_id=29123 | Parallax's online store ]]


* Voltages
** Vcc = Supply Voltage = 4.8 - 5.2 Volts (standard ITP breadboard voltage safe!)
** Icc = Average active current = 5 mA
** Icc = Standby current = 2 mA
** Icc = Peak instanteous current = 30 mA (for about 5 micro-seconds)



* Magnetic Compass Sensor
** The compass module detects the magnetic fields parallel to the internal x and y axes. Think of trig class in 10th grade, the x-axis tells us (field strength) * cos(@) and the y-axis tells of the (field strength) * sin(@).
** The sensor reports both x and y
** +X = NORTH
** -X = SOUTH
** +Y = WEST
** -Y = EAST
http://itp.nyu.edu/~js3646/sensors/angles.jpg

* TESLA! MICRO-TELSA!
** The sensors detects microteslas. Tesla is the value of a magnet's flux or power divided by the area.
** From [[http://en.wikipedia.org/wiki/Tesla_%28unit%29 | wikipedia]], in the Earth's magnetic field at latitude of 50° is 20 µT (2×10-5 T) and on the equator at a latitude of 0° is 31 µT (3.1×10-5 T).
Changed lines 49-51 from:
Give a list of the pins, and a pin diagram as appropriate. Detail the function of each pin in a short paragraph following the list.
to:
http://itp.nyu.edu/~js3646/sensors/pins1.jpg

The 6 pins include:
# Din - Data Input Pin - used in SHIFTOUT command
# Dout - Data Output Pin - used in SHIFTIN command
# GND, Vss - Ground
# CLK - Clock Pin - used in SHIFTIN & SHIFTOUT commands
# EN - Enable Pin - used in SHIFTIN & SHIFTOUT commands
# Vcc, +5 Volts power


There are two ways to wire the compass, the first model uses 3 wires instead of 4

The data lines share a line into the PIC
.
http://itp.nyu.edu/~js3646/sensors/pins3wire.jpg

But the 4 wire should work fine.
http://itp.nyu.edu/~js3646/sensors/pins4wire.jpg
Changed lines 70-71 from:
Explain how to connect the sensor to a microcontroller or computer. Include a schematic and any other necessary diagrams. Make sure to include a list of every part in the schematic.
to:

http://itp
.nyu.edu/~js3646/sensors/compasshookup.jpg
Added lines 1-33:
Initial report by [=[[~js3646 | John Schimmel]]=], 25, Oct, 2005

This [[http://www.parallax.com/detail.asp?product_id=29123 | Compass Module ]] made exclusively by [[http://www.parallax.com | Parallax]] is a dual-axis magnetic field sensor built around the Hitachi HM55B IC. Parallax has made this compass IC accessible by providing Hitachi’s surface mount sensor chip with a 3 V onboard voltage regulator and resistor protection, all in a 0.3” wide 6-pin DIP module. The Hitachi HM55B Compass Module is compatible with the BASIC Stamp microcontroller’s 5 V supply and signal levels. Acquiring measurements from the module is made easy with a synchronous serial interface, and even easier with the commands SHIFTIN and SHIFTOUT.


!!!Applications

Describe some typical applications of this sensor. You can often get this from the datasheet, but a few examples from companies or individuals who've used it would be useful as well.

!!!Electrical Characteristics
Put a link to the datasheet at the top. Also link any retail sources, for example if you're using a breakout board, or any other parts that making the sensor easier.

Give the voltage and amperage ranges, and any other relevant electrical data.

Describe the electrical changes when the sensor senses whatever physical changes it senses.

!!! Pin Descriptions
Give a list of the pins, and a pin diagram as appropriate. Detail the function of each pin in a short paragraph following the list.


!!!Microcontroller Connections
Explain how to connect the sensor to a microcontroller or computer. Include a schematic and any other necessary diagrams. Make sure to include a list of every part in the schematic.

!!!Code Sample
Give a code sample for the microcontroller you developed the example on. Link it to the Code group of the wiki, formatting the link like this:

[=[[Code.myCodeSample | Code Sample]]=]

!!!Typical Behavior
Describe the behavior of the sensor when you use it to sense something. Note any peculiarities that you had to work around, or things that might affect someone else's use. Graphs and images are useful here.

!!!Application Notes
Describe your own application of the sensor. Link to any external documentation of your project, and discuss how you got the sensor to do what you needed it to.