HMC5843 3 axis Magnetometer wrong axis labeling

Testing my code for the HMC5843 turns out that the labeling for the axis may be wrong. The sign directions are different too. I checked against the Board from Sparkfun. Looking at the datasheet, the components axis described there are  when you look at the bottom of the device. The schematic pictures is mirrored upside down to show a view from the top.

 

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • What exactly do you mean when you say that there is lot of work?

    Hi Fabio,

     

    Well, when you get older many things get more and more complicated :-)

    The days I started my programmer career as hobbiest, DOS 3.1 was cutting edge technology.

     

    Calculating 3D vectors and such thing are very new to me. Reading source code of others and googling for education videos helps me to understand a bit more.

    I found out that I have to calibrate values from the sensors to get valid results on the processing code.

     

    Thanks to everybody helping with information and knowhow here!

  • Chris,

    I already double checked the solder jumper, It´s connecting the center pad with the pad labeled 5V.

    I´ll record the values supplied by the board and show in a time-stamp graph for a better understanding of the problem.

    I´m thinking to make a non-sense trying: set-up the 5843 board to 3V and connect to the Arduino board through a logic level converter (Sparkfun)!

     

     

  • Hello dears

    I would like to report a problem that I'm having with the HCM5843 from DIY Drones.
    I connected the HCM5843 board to Arduino´s Duelmilanove I2C (pins A4=SDA and A5=SCL). The code that I´m using is copy from ArduIMU ("Compass").
    When I turn on the Arduino and the HCM5843 boards, everything works good, but after ~30 seconds the heading value become crazy (oscillating to much). The HCM5843 and Arduino both are working with 5V.
    The problem I described above is similar to the reported by Fabio Varesano on the Arduino forum: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1291403700
    Pull-up resistors: I've tried no pull-up resistor and values of 10K, 3.3K 4.7K and it works stable for a little more time with high values pull-up resistors.
  • Please note, you have v1.1 pic which is also different from the previous ver. which I have that has two removable sides. (4 holes)

     

    Also, did you notice that your right hand digram is inverted? Also in that diagram is an X vs. a Dot which indicates out rather than in... or up vs down I believe.

  • Developer

    Yes, I believe you are correct.  You're not the first one to find this problem but you are the first one to illustrate it with a picture so clearly!  It's up to Jordi to fix this one on an upcoming batch.

     

    Of course I don't know exactly how you're using the compasses, but if you're using Arduino + the AP_Compass library then the orientation can be set with the set_orientation call and there are a bunch of predefined constants for both boards which makes it easy to get it working properly.

     

    https://code.google.com/p/arducopter/source/browse/#svn/trunk/libra...

    https://code.google.com/p/arducopter/source/browse/trunk/libraries/...

This reply was deleted.

Activity

DIY Robocars via Twitter
How to use the new @donkey_car graphical UI to edit driving data for better training https://www.youtube.com/watch?v=J5-zHNeNebQ
Monday
DIY Robocars via Twitter
RT @SmallpixelCar: Wrote a program to find the light positions at @circuitlaunch. Here is the hypothesis of the light locations updating ba…
Saturday
DIY Robocars via Twitter
RT @SmallpixelCar: Broke my @HokuyoUsa Lidar today. Luckily the non-cone localization, based on @a1k0n LightSLAM idea, works. It will help…
Nov 25
DIY Robocars via Twitter
@gclue_akira CC @NVIDIAEmbedded
Nov 23
DIY Robocars via Twitter
RT @luxonis: OAK-D PoE Autonomous Vehicle (Courtesy of zonyl in our Discord: https://discord.gg/EPsZHkg9Nx) https://t.co/PNDewvJdrb
Nov 23
DIY Robocars via Twitter
RT @f1tenth: It is getting dark and rainy on the F1TENTH racetrack in the @LGSVLSimulator. Testing out the new flood lights for the racetra…
Nov 23
DIY Robocars via Twitter
RT @JoeSpeeds: Live Now! Alex of @IndyAChallenge winning @TU_Muenchen team talking about their racing strategy and open source @OpenRobotic…
Nov 20
DIY Robocars via Twitter
RT @DAVGtech: Live NOW! Alexander Wischnewski of Indy Autonomous Challenge winning TUM team talking racing @diyrobocars @Heavy02011 @Ottawa…
Nov 20
DIY Robocars via Twitter
Incredible training performance with Donkeycar https://www.youtube.com/watch?v=9yy7ASttw04
Nov 9
DIY Robocars via Twitter
RT @JoeSpeeds: Sat Nov 6 Virtual DonkeyCar (and other cars, too) Race. So bring any car? @diyrobocars @IndyAChallenge https://t.co/nZQTff5…
Oct 31
DIY Robocars via Twitter
RT @JoeSpeeds: @chr1sa awesomely scary to see in person as our $1M robot almost clipped the walls as it spun at 140mph. But it was also awe…
Oct 29
DIY Robocars via Twitter
RT @chr1sa: Hey, @a1k0n's amazing "localize by the ceiling lights" @diyrobocars made @hackaday! It's consistently been the fastest in our…
Oct 25
DIY Robocars via Twitter
RT @IMS: It’s only fitting that @BostonDynamics Spot is waving the green flag for today’s @IndyAChallenge! Watch LIVE 👉 https://t.co/NtKnO…
Oct 23
DIY Robocars via Twitter
RT @IndyAChallenge: Congratulations to @TU_Muenchen the winners of the historic @IndyAChallenge and $1M. The first autonomous racecar comp…
Oct 23
DIY Robocars via Twitter
RT @JoeSpeeds: 🏎@TU_Muenchen #ROS 2 @EclipseCyclone #DDS #Zenoh 137mph. Saturday 10am EDT @IndyAChallenge @Twitch http://indyautonomouschallenge.com/stream
Oct 23
DIY Robocars via Twitter
RT @DAVGtech: Another incident: https://t.co/G1pTxQug6B
Oct 23
More…