element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Sensors
  • Technologies
  • More
Sensors
Sensor Forum Urgent - Need 3.3V tolerant Compass
  • Blog
  • Sensor Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Sensors requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 5 replies
  • Answers 2 answers
  • Subscribers 159 subscribers
  • Views 135 views
  • Users 0 members are here
  • quadcop_project
Related

Urgent - Need 3.3V tolerant Compass

screamingtiger
screamingtiger over 6 years ago

Cliffs:  Anyone know of a magnetic compass that works with the raspberry Pi, I2C and is 3.3V tolerant on the SDA/SCL?  It may need to be tilt compensated.  Please have first hand experience using it, I need it to work I cannot afford any more trial and error.  Thanks!

 

Details:

I've had some serious issues with my quadcop_project in terms of getting heading.  I've tried a mems sensor from xtrinsic but its not compatible via I2C with the Raspberry Pi 2.  It works fine with RPi B+. I digress.

 

I have an HCM5883L breakout and realized its not 5V tolerant, I think I burned it up and the data doesn't make any sense to me.  It is suppose to return a value between 0 and 255 but the registers are 16 bit with MSB and LSB being read independently.

https://www.sparkfun.com/products/10530

 

The examples from the Arduino don't make any sense.  Its really simple to use:

https://www.sparkfun.com/tutorials/301

 

You can see the values they are getting there.  A couple of odd things, the datasheet says it returns the data in 2 compliment form, which to me says I need to flip the bits but the sample code does not such thing. 

 

Regardless, I am not sure how to use this because it has 3 axis!  There is very little information on this board and no idea why I would want a 3 axis reading and how I would use that to calculate north.

  • Reply
  • Cancel
  • Cancel

Top Replies

  • screamingtiger
    screamingtiger over 6 years ago in reply to shabaz +2

    A couple things:

     

    I bought 2 of these off ebay, one is bad!!!  That keeps happening to me!

    The other thing is that it does not work with the raspberry PI.  The arduino I am using now is 5V and it works with…

  • screamingtiger
    screamingtiger over 6 years ago +1

    BTW, After tinkiering some more I got it working with the raspberry pi directly using the wiringPi library.    I am so glad I ordered two of these because one of them is way off and sends random data.

     

    The…

Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube