Reports.HM55BCompass History
Hide minor edits  Show changes to output
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 
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 9091 from:
pointed nothwest
to:
 pointed nothwest 
Changed lines 9495 from:
pointed north
to:
 pointed north 
Changed lines 9798 from:
pointed northeast
to:
 pointed northeast 
Changed line 101 from:
 pointed east 
to:
  pointed east 
Changed lines 105106 from:
pointed southeast
to:
 pointed southeast 
Changed lines 108109 from:
pointed south
to:
 pointed south 
Changed lines 111112 from:
pointed southwest
to:
 pointed southwest 
Changed lines 114115 from:
pointed west
to:
 pointed west 
Deleted line 90:
Changed lines 9296 from:
5  12  +x  +y  12/5  20
3  13  +x  +y  13/3  40
4  12  +x  +y  12/4  30
4
to:
 5  12  +x  +y  12/5  20 
 3  13  +x  +y  13/3  40 
 4  12  +x  +y  12/4  30 
 3  13  +x  +y  13/3  40 
 4  12  +x  +y  12/4  30 
Changed lines 97100 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 
 9  0  +x  +y  0/9  0 
Changed lines 101108 from:

pointed east
12
11
12
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 
 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 110113 from:
24
to:
 23  2  x  y  2/23  0 
 24  4  x  y  4/24  0 
 24  4  x  y  4/24  0 
Changed lines 114116 from:
26
to:
 27  7  x  +y  7/27  0 
 26  8  x  +y  8/26  0 
 26  8  x  +y  8/26  0 
Changed lines 118120 from:

to:
 20  18  x  +y  18/20  0 
 20  17  x  +y  17/20  0 
 20  17  x  +y  17/20  0 
Changed lines 122125 from:
to:
 9  20  x  +y  20/9  20 
 10  21  x  +y  21/10  20 
 10  21  x  +y  21/10  20 
Changed lines 8889 from:
 x  y  +x  +y  abs(y/x)  =abs(y/x)
to:
 x  y  +x  +y  abs(y/x)  =abs(y/x) 
Added lines 8788:
 x  y  +x  +y  abs(y/x)  =abs(y/x)
Deleted lines 8990:
Deleted line 2:
Changed lines 56 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 line 128:
* The compass is small enough to work nicely with wearable projects.
Changed lines 8892 from:
5  12  +x  +y  12/5  200
3  13  +x  +y  13/3 400
4  12  +x  +y  12/4 300
3  13  +x  +y  13/3 
4  12  +x  +y  12/4 
to:
5  12  +x  +y  12/5  20
3  13  +x  +y  13/3  40
4  12  +x  +y  12/4  30
3  13  +x  +y  13/3  40
4  12  +x  +y  12/4  30
Changed lines 99101 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
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 121122 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
10  21  x  +y  21/10  20
Changed lines 126128 from:
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.
* 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 7683:
!!!Work Arounds for ArcTan in PICBasic Pro
* Use PIC C
* Make a lookup table
* Buy a [[http://www.parallax.com/detail.asp?product_id=60400030a  Floating Point Coprocessor IC]]
* Try to use vector math
* Arctan()  [[http://www.emesystems.com/programs/cordicatn.bse  bit shifting code]]
* Learn [[http://www.dattalo.com/technical/software/software.php  assembly ]]
* Use PIC C
* Make a lookup table
* Buy a [[http://www.parallax.com/detail.asp?product_id=60400030a  Floating Point Coprocessor IC]]
* Try to use vector math
* Arctan()  [[http://www.emesystems.com/programs/cordicatn.bse  bit shifting code]]
* Learn [[http://www.dattalo.com/technical/software/software.php  assembly ]]
Changed lines 8586 from:
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
@]
[@
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 7275 from:
[=[[Code.myCodeSample  Code
to:
PICBasic Pro compass code does not provide angles, it simply finds NORTH, SOUTH, EAST & WEST.
[[Code.HM55BCompass  Code Sample]]
[[Code.HM55BCompass  Code Sample]]
Changed lines 34 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 4041 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 15 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 dualaxis 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 6pin 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 dualaxis 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 6pin 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.
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 dualaxis 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 6pin 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 1415 from:
to:
* Mobile robot direction sensor
* Handheld electronic compass
* Weathervane indicator for remote weather stations
* Audible compass for the visually impaired
* Automotive electronic compass
* Handheld electronic compass
* Weathervane indicator for remote weather stations
* Audible compass for the visually impaired
* Automotive electronic compass
Changed lines 2126 from:
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 microseconds)
* 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 xaxis tells us (field strength) * cos(@) and the yaxis 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! MICROTELSA!
** 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×105 T) and on the equator at a latitude of 0° is 31 µT (3.1×105 T).
* 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 microseconds)
* 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 xaxis tells us (field strength) * cos(@) and the yaxis 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! MICROTELSA!
** 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×105 T) and on the equator at a latitude of 0° is 31 µT (3.1×105 T).
Changed lines 4951 from:
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
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 7071 from:
to:
http://itp.nyu.edu/~js3646/sensors/compasshookup.jpg
Added lines 133:
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 dualaxis 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 6pin 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.
This [[http://www.parallax.com/detail.asp?product_id=29123  Compass Module ]] made exclusively by [[http://www.parallax.com  Parallax]] is a dualaxis 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 6pin 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.