Это видео недоступно.
Сожалеем об этом.

Let's build an Arduino electronic Compass using the HMC5883L and a Ring of LEDs - Tutorial

Поделиться
HTML-код
  • Опубликовано: 16 авг 2024
  • In this follow up tutorial, we will build an electronic Compass using an Arduino, the HMC5883L module and a RGB WS2812 Ring of 16 Leds
    Check out our tutorials page at : brainy-bits.co... to get the schematic and more information on this tutorial.

Комментарии • 61

  • @sakisv4138
    @sakisv4138 6 месяцев назад

    The library here didn't help but the idea of mapping the crazy readings (I did for every quadrant) was brilliant, it worked for another library!

  • @kevinfox2413
    @kevinfox2413 4 года назад +1

    The screwdriver has a magnetic tip to hold screws. That is why it affects the magnetometer.

  • @KR0tG5fk
    @KR0tG5fk 9 лет назад +1

    You come up with the best Projects, I learn a lot from your Arduino sketchs

    • @BrainybitsCanada
      @BrainybitsCanada  8 лет назад

      +Ron Henderson Great to see our videos are helping! Thanks for your comment and watching of course :)

  • @joymakerRC
    @joymakerRC 3 года назад

    thanks so much , i have been working for a few hours on this with the wrong library, works perfect now , on Beitian BN-880 dual GPS/Compass module, running on Arduino DUE, now gonna work on the altimeter with the barometer sensor.

  • @bc65925
    @bc65925 2 года назад

    This should help me with my most recent request from my blind Ham Radio friend. He want's voice direction indication of his antenna. So instead of your 16 LED's I'll be using the 8 different sound files from an Adafruit sound board.

  • @borayurt66
    @borayurt66 6 лет назад

    HMC5883 module has a 3.3V regulator on it. So, you don't need 3.3V to power it. Actually, it would be better to run it with 5V because of the voltage drop of the regulator IC.

  • @uengel5755
    @uengel5755 4 года назад +1

    Hallo,
    ich habe den Sensor wie beschrieben angeschlossen und das Calibration Programm auf den UNO geladen. Kompilieren und Hochladen funktioniert fehlerfrei. Aber scheinbar lässt sich der HMC5883L nicht initialisieren. Im serial monitor wird nur "Start compass!" alle 1/2 Sekunde angezeigt.
    Was mache ich falsch?

  • @eletronica-2002
    @eletronica-2002 5 лет назад

    Great design, congratulations! I'm doing a totally analog and homemade rotary sensor magnetometer.

  • @hhs5005
    @hhs5005 4 года назад +1

    How can we make a compass not be affecting from its environment, unlike your compass? Do you have any reference for us?

  • @heyitsdrew
    @heyitsdrew 5 лет назад +1

    your declination formula is off. you don't minus the minutes from the hours in degrees. you convert your degrees to radians first. and add or subtract depending on east or west

  • @peterdlynes
    @peterdlynes 8 месяцев назад

    Where is the code and where can I get the hardware kit ? What is currently the best magnetometer for doing a compass project ? I have a BNO085 and a HC5883 and a LSM303AGR and I am still struggling. Thanks for sharing your project.

  • @FOTIS1969
    @FOTIS1969 7 лет назад +1

    Excellent !!!
    I was planning to create such a project to show me the direction of my directional yagi (HAM) antenna. I think that if I turn away the 5883 from the other items and put it on the (wooden) antenna mast to the direction of the antenna boom, it will be OK. Of course with a small change to the code (when the antenna (with its mast and 5883) turns clockwise the leds must "run" clockwise too, not unticlockwise).
    The question is : how far from arduino can 5883 work well? I 'm planning to use 10-15 meters UTP cable (just 3 wires). Do you think it will work perfect?
    Congaratulations and regards.
    Fotis

  • @jacksimple3766
    @jacksimple3766 5 лет назад

    nice! what about using servo to point to direction? leds cannot seen at direct sunlight

  • @bc65925
    @bc65925 2 года назад

    My HMC5883L will not get past initialization. Any thoughts other than it's bad?

  • @GionataGatto
    @GionataGatto 7 лет назад +1

    Hi, thanks for the video. If I might ask, do you have an idea of how/where I could purchase the components for this project in europe, or at lest get them to be shipped in Europe? Thanks, Gionata

  • @QuyenLe-zd5gz
    @QuyenLe-zd5gz 7 лет назад +1

    I tried your code, it seems to upload fine but I only get all the LEDs stay lit very bright (white) What do you think that I have done wrong? I used WS2812B instead.

  • @thienongxuan6200
    @thienongxuan6200 7 лет назад +1

    when it is tilted on side. i saw angle change how can i fix that. i need use it on boat. on sea when wave big my boat often shacking and tilted. Thank Brainy-Bits.

    • @akshaysai1109
      @akshaysai1109 3 года назад

      I'm no expert in this field, but how about adding a 2 axis brush less gimbal to the compass? One axis for roll and the other one for pitch. So the compass will measure only the yaw.

  • @federicosagun4615
    @federicosagun4615 4 года назад

    I put one of this mag module and incorporated with gps in my drone. tested ok. Fly the drone again after a week. The weather was clear. decided to land the drone. when i hit rth my drone gone to eratic flight like ufo then fell off from the sky. Asses the damage then i learnt that the wire from scl came off the solder pad. So for info grab. Solder your wire properly. My $450 drone is gone down the drain.

  • @theplaidgamer1653
    @theplaidgamer1653 Год назад

    I added the library but i can't find the calibrate code. where is it located?

  • @tejasmalkar8337
    @tejasmalkar8337 5 лет назад

    help me with an code in place of leds, to show direction of stepper motor
    thanks for your code

  • @rhjiv4
    @rhjiv4 8 лет назад

    The calibration returns many different values, none of which generate compass headings that work. How do I diagnose/fix this?

    • @BrainybitsCanada
      @BrainybitsCanada  8 лет назад

      +Bob Jones Sorry for the delay, did you ever find out the solution to your problem?

  • @allwincomputers3580
    @allwincomputers3580 6 лет назад

    And el light is 12v i believe ...so what we have to do??

  • @royalflush13
    @royalflush13 9 лет назад

    Glad to encounter someone else who had the problem of the compass being sensitive for certain headings. I am incorporating this compass for a project where I steer a robot based on angles specified by the user (not headings). So say if the user wants the robot to turn 90 degrees. It rotates by getting the current heading and adding 90 to set the destination heading. Problem is like you said the compass is more sensitive in certain directions. How would I fix this problem?
    P.S. - Really hope you reply

    • @rhjiv4
      @rhjiv4 8 лет назад

      +royalflush1391 I am trying to do the same thing, but I cannot get calibration to provide me with numbers that work. What happens is that the calibration code returns lots of different numbers (not just one pair) and the numbers returned do not produce a compass that reliably points to N, E, S and W (0,90,180,270). Steering my robot requires reliable compass headings. Did you encounter anything like this? Did you get your robot running well?

    • @BrainybitsCanada
      @BrainybitsCanada  8 лет назад

      +Bob Jones Sorry for the late reply guys... I've made this tutorial quite a while back, so can't remember it fully right now. Now you are correct that these compass are more sensitive in some headings, but if you figure out the numbers, you can then use the MAP function to compensate for those. For example if the values 0 to 45 represent 0 to 90 in reality you could map(0,45,0,90) not perfect but easier to work with.

    • @BrainybitsCanada
      @BrainybitsCanada  8 лет назад

      +royalflush1391 Sorry for the late reply guys... I've made this tutorial quite a while back, so can't remember it fully right now. Now you are correct that these compass are more sensitive in some headings, but if you figure out the numbers, you can then use the MAP function to compensate for those. For example if the values 0 to 45 represent 0 to 90 in reality you could map(0,45,0,90) not perfect but easier to work with. This is front the top of my head btw :)
      Thanks for Watching!

    • @nayanablinks917
      @nayanablinks917 7 лет назад

      hi. i am really lost now. have you solve yours? i need a gidance. i am working on my final year project. please help me. i need this to help solving the maze. notice me please.

    • @Sabhail_ar_Alba
      @Sabhail_ar_Alba Год назад

      I've had the same problem while making a boat steering system and found this device is hopelessly unstable and inaccurate. It's OK for playing about
      with but it's not a serious compass.

  • @KnightRiderGuy
    @KnightRiderGuy 8 лет назад

    Why do I get this error message? I downloaded the library files as instructed.
    Arduino: 1.6.5 (Mac OS X), Board: "Arduino/Genuino Uno"
    Build options changed, rebuilding all
    HMC5883L_calibrate.ino: In function 'void setup()':
    HMC5883L_calibrate:26: error: 'class HMC5883L' has no member named 'begin'
    HMC5883L_calibrate:32: error: 'class HMC5883L' has no member named 'setRange'
    HMC5883L_calibrate:32: error: 'HMC5883L_RANGE_1_3GA' was not declared in this scope
    HMC5883L_calibrate:35: error: 'class HMC5883L' has no member named 'setMeasurementMode'
    HMC5883L_calibrate:35: error: 'HMC5883L_CONTINOUS' was not declared in this scope
    HMC5883L_calibrate:38: error: 'class HMC5883L' has no member named 'setDataRate'
    HMC5883L_calibrate:38: error: 'HMC5883L_DATARATE_30HZ' was not declared in this scope
    HMC5883L_calibrate:41: error: 'class HMC5883L' has no member named 'setSamples'
    HMC5883L_calibrate:41: error: 'HMC5883L_SAMPLES_8' was not declared in this scope
    HMC5883L_calibrate.ino: In function 'void loop()':
    HMC5883L_calibrate:46: error: 'Vector' was not declared in this scope
    HMC5883L_calibrate:46: error: expected ';' before 'mag'
    HMC5883L_calibrate:49: error: 'mag' was not declared in this scope
    HMC5883L_calibrate:50: error: 'mag' was not declared in this scope
    HMC5883L_calibrate:51: error: 'mag' was not declared in this scope
    HMC5883L_calibrate:52: error: 'mag' was not declared in this scope
    Multiple libraries were found for "HMC5883L.h"
    Used: /Users/michaelknight/Documents/Arduino/libraries/HMC5883L
    Not used: /Users/michaelknight/Documents/Arduino/libraries/Arduino-HMC5883L-master
    'class HMC5883L' has no member named 'begin'
    This report would have more information with
    "Show verbose output during compilation"
    enabled in File > Preferences.

    • @andymouse
      @andymouse 6 лет назад

      I had a load of problems too. Turns out the cheap magno I bought from E-Bay was a "QMC5883" not a "HMC5883" now I no this and use the DF Robot library all is well

  • @jefersonnl
    @jefersonnl 7 лет назад

    Can I use this (HMC5883L) to control Yaw stabilization on a quadricopter, helicopter or model airplane without the need of a separated module, like the MPU-6050? Or is it best to use the HMC5883L only to replace the biased, ever-drifting and shitty non-accelerometer assisted Z-Axis output that comes from the MPU-6050?? They say the accelerometer in the MPU-6050 is excellent(I certainly can testify for that in static testing) and can correct very well the drifts on its gyros (X and Z axis). However, when we take into account a vehicle that accelerates too much or even turno into near horizontal flights, the manufacturer of MPU-6050 is quite clear in saying that due to lateral G-Forces this, in a certain given time, can take away from the unity the source/point of reference, that its accelerometers use to un-bias the gyros, earth's gravity.

    • @samueldeccache6667
      @samueldeccache6667 3 года назад

      you can use yaw stabilization with HMCL and a girometer.

  • @mossadsamaha4952
    @mossadsamaha4952 3 года назад

    Is it able to read the all axis or only x and y?

  • @KnightRiderGuy
    @KnightRiderGuy 8 лет назад

    This is awesome and thanks for sharing this information. I am working on doing a Unity3D app that I would like to use this with 4 button inputs, two of which are for turn signal indicators but I would like all four to put out the values for N W S E into Unity3d to make the appropriate indicators (Animated Sprites) light up.
    Can you offer any advice or tips on how bets to proceed with something like that?
    Thanks :D

  • @fitrijuhairi
    @fitrijuhairi 8 лет назад

    is it possible if I use a bigger WS2812 Ring with 24 LEDs

  • @Naveenkumar-te6ii
    @Naveenkumar-te6ii 9 лет назад

    nicely done.

    • @BrainybitsCanada
      @BrainybitsCanada  8 лет назад

      +Naveen kumar Thanks for the comment and for watching!

  • @MrCruizydude
    @MrCruizydude 6 лет назад

    I would like to use this but a servo instead of leds. I have been trying but i cant seem to find how..

    • @MrSHADEKILLA
      @MrSHADEKILLA 10 месяцев назад

      Did you ever figure it out?

  • @FicaSimplesJoinville
    @FicaSimplesJoinville 4 года назад +1

    GREAT DESIGN, YOU ARE THE BEST MY FRIEND.
    CAN YOU HELP WITH THIS:
    - WORK ON A PLAN WITH X AND Y AXES;
    - DIVIDE A RING IN 6 PARTS, WITH ANGLE OF 60 DEGREES, TOTALING 360 DEGREES.
    - EACH 60 DEGREES TURN, I NEED TO ACTIVATE THE LED MATCHES THIS POSITION.
    OTHER LEDS MUST BE OFF.
    WOULD YOU HELP ME?

  • @Suursaaadik
    @Suursaaadik 9 лет назад

    So If I want to make one I should see coordinates ! is there any possible way to make a general code for any place on earth ? as smart system to know the direction wherever you are !

    • @Gremlin87
      @Gremlin87 9 лет назад

      +Sa'ed Qaryab
      You say coordinates and that makes me think of a GPS. Please note, this sensor is not a GPS but instead only shows direction, not position.
      But I don't see any reason it will not work anywhere on earth.

    • @BrainybitsCanada
      @BrainybitsCanada  9 лет назад

      +Sa'ed Qaryab This sensor reads magnetic fields, since these are different depending on where you are on earth, you need to tell it where you are so it can make it's calculations based on that location. Like Gremlin87 said, a GPS gets that information in real time from orbiting satellites. Thanks for watching!

  • @jonyjohan8958
    @jonyjohan8958 9 лет назад

    good job nice project i wanna do it

    • @BrainybitsCanada
      @BrainybitsCanada  8 лет назад

      +jony johan That's great! Thanks for the comment and watching!

  • @maqeelqureshi
    @maqeelqureshi 5 лет назад

    What if I flip this box?

  • @paulhenryson254
    @paulhenryson254 7 лет назад

    does it need ADC like MCP3008?

  • @allwincomputers3580
    @allwincomputers3580 6 лет назад

    Hello brainy bits i need some of your help.......sir....
    I have ardriuno and will connect with Hmc5883l magnet sensor & will el ( Electroluminescence) light
    So when the direction come to west. It lights up
    The el light will glow
    Please help and guide me
    Thanks subscribed to your channel ;)

  • @dragonphoenix94
    @dragonphoenix94 6 лет назад

    how to get full rotation? anyone please help me

  • @rapideye101
    @rapideye101 5 лет назад

    what kind of laser cutter (model) did you use for your housing? the cuts look pretty clean.

    • @BrainybitsCanada
      @BrainybitsCanada  5 лет назад

      It's a chinesieum 60W laser cutter, the kind you find on Ebay or Aliexpress :)

    • @rapideye101
      @rapideye101 5 лет назад

      @@BrainybitsCanada thanks for your fast reply! it looked like a DIY set made of aluminium profiles on the first glance, but a 60W laser comes probably in a solid enclosure.. should be a bit too expensive for a hobbyist i guess :)

  • @rhjiv4
    @rhjiv4 8 лет назад

    How did you make the box?

    • @BrainybitsCanada
      @BrainybitsCanada  8 лет назад

      +Bob Jones Hi Bob, the box was made on a Laser Cutter using this online tool for creating the plans: www.makercase.com/ Thanks for Watching!