YMFC-32 - Compass implementation| The STM32 - Arduino DIY GPS drone | Free Arduino code

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ส.ค. 2018
  • In this video I explain the implementation of a compass in the YMFC-32 flight controller code.
    The YMFC-32 autonomous is a DIY GPS hold quadcopter that can be built for only €200. This includes the telemetry system, GPS, battery, transmitter, frame, motors, ESC’s etc. You can find a complete parts list on my website.
    The YMFC-32 playlist:
    • YMFC-32 | a DIY 32-bit...
    The YMFC-32 autonomous drone project page:
    www.brokking.net/ymfc-32_auto_...
    Setting up the Arduino IDE for uploading programs to the STM32:
    • Getting started with t...
    About my test quadcopters:
    www.brokking.net/bain_test_qua...
    You can find the compass implementation documents here:
    www.brokking.net/ymfc-32_auto_...
    The maps can be found here:
    www.ngdc.noaa.gov/geomag/WMM/...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 72

  • @ZeedijkMike
    @ZeedijkMike 5 ปีที่แล้ว +1

    I really love your clear and interesting way to explain the workings of the compass. You even make the math understandable.

  • @omy2295
    @omy2295 4 ปีที่แล้ว

    I have built the self-leveling two-wheeled robot and the the YMFC-AL with success, thanks to you. And I am now testing components for the YMFC-auto. I am very excited to get that project going. I want to tell you that just like a conductor of an orchestra that is able to create a perfect piece of music by almost perfectly lining up the right notes from a number of musicians, you are able to make all these devices work together with such precision to create the almost perfect quad-copter flight. Wow!!! I believe now that some people are out of this world because they possess a more than normal amount of depth in thinking, planning, analyzing, processing, testing and executing. You are one of them my friend.

  • @MrAdamsmario
    @MrAdamsmario 5 ปีที่แล้ว

    I want to motorize my telescope with some steppers, arduino and a mpu9250. And this is the first video that explains very clear the way the sensor works and why to calibrate. Well done

  • @AppliedMetaphysician
    @AppliedMetaphysician 5 ปีที่แล้ว +17

    Your video's are the highlight of my day! When I get a notification I stop whatever I'm doing to watch.

  • @user-qo3sm9fz3o
    @user-qo3sm9fz3o 9 หลายเดือนก่อน

    Those videos are pure gold. So much cool stuff simply explained.

  • @dhruslab9563
    @dhruslab9563 5 ปีที่แล้ว +4

    Sir officially you are the" god of drone" and all we are great devotees of yours.

  • @maciejkorman226
    @maciejkorman226 5 ปีที่แล้ว +1

    Very inspiring. I used the knowledge in my other projects. Thank you!

  • @vishal01mehra
    @vishal01mehra 5 ปีที่แล้ว

    Great Work!
    Was waiting for it.
    Keep up!

  • @antonveldhuizen3740
    @antonveldhuizen3740 5 ปีที่แล้ว

    Fantastic!!! Your project has cleared up so many of my questions. You are really doing an excellent job and I applaud you. I take it that you will at some time post the complete code on your site. Have a nice day and keep up the good work.

    • @Joop_Brokking
      @Joop_Brokking  5 ปีที่แล้ว

      Yes, the complete code will be available on my website when I have uploaded all my videos. My guess is end of September.

  • @ajaypranav1390
    @ajaypranav1390 5 ปีที่แล้ว

    Awesome work bro, your video is very inspiring

  • @javiergarindo6898
    @javiergarindo6898 5 ปีที่แล้ว

    Very good, the best explanations in the network.

  • @adelashour3253
    @adelashour3253 5 ปีที่แล้ว +1

    a new video from
    Brooking , i am all listening ^_^ , go on ......

  • @rage_alpha
    @rage_alpha 5 ปีที่แล้ว +1

    Bro just you are a god. Love from India

  • @ahmedallam9612
    @ahmedallam9612 5 ปีที่แล้ว

    Hi Joob, I was really waiting for this video, great, I'm using GY-88 10-dof imu, which includes the discused compass HMC 8583L, so I will have to manage covering the whole IMU in isolated box,

  • @sameerat8
    @sameerat8 5 ปีที่แล้ว

    Great tutorial again :) Thank you very much

  • @tejasarlimatti8420
    @tejasarlimatti8420 5 ปีที่แล้ว

    you are a such a big inspiration

  • @stevenlee1726
    @stevenlee1726 5 ปีที่แล้ว +2

    Keep on going Joop. Waiting you to build your own drone start-up.

    • @sukhee5
      @sukhee5 5 ปีที่แล้ว

      Hello . I need your help.

  • @tooa115
    @tooa115 4 ปีที่แล้ว

    Thank you for your video, it helped a lot.

  • @divyanshu_harkhka
    @divyanshu_harkhka 5 ปีที่แล้ว +6

    A great and informative video. However, I'd like to inform that there's a software available named "mag master" which I use to calibrate my compass. It is designed for HMC5883L and removes both hard iron and soft iron errors and after calibration, a "perfect sphere" can be obtained. There's also a visualizer in the software which is used to plot a 3D graph of compass data and can be used to verify whether the compass is calibrated properly or not.
    Also, can you please provide Gerber files of your flight controller PCB?
    In my flight controller PCB, I use an SMD ATmega328 coprocessor which is used to send telemetry data to the APC220 module. It receives telemetry data from STM32 via I2C interface. In this way, I can use lower baud rates for increased range without sacrificing the valuable loop time as I2C needs approx 25us to send one byte of data so 75us in total (address + telemetry counter + data).
    Thanks a lot.
    Divyanshu

  • @franciscomartinho1749
    @franciscomartinho1749 5 ปีที่แล้ว

    Hi Jood
    I'm following your projects with great enthusiasm.
    I'm starting to build YMFC - AL but I saw on your site the YMFC 32 project autonomous, and I think I'm going to switch to YNFC 32 autonomous.
    I have a Futaba 8FG super with R6208HS receiver
    My question is: Why have I to convert the S.bus transmitter to PPM; and if necessary how to do this.
    Sorry my english and my lack of knowledge

  • @autodidactamm7625
    @autodidactamm7625 5 ปีที่แล้ว +7

    the master...

  • @domoledlight
    @domoledlight 2 ปีที่แล้ว

    hello sir , thanks a lot for your amazing tuto can you explaint us the formula angle yaw -= course devation do you just declare the variable course deviation or calculate before

  • @briandowns6263
    @briandowns6263 3 ปีที่แล้ว

    My FS-i6X is set with the controls in mode 2 which is the same as the the control settings on the H36 mini drone which I have been using to practice my flying skills. I assume your controls are set to Mode1 because moving both sticks to the top right position will only result in calibration with these control settings. I simply changed the settings in the calibration software to reflect my controls.

  • @JoaoNelsonLima
    @JoaoNelsonLima 4 ปีที่แล้ว

    Thanks you. Great job.

  • @meltonermeltoner
    @meltonermeltoner 2 ปีที่แล้ว

    hello great video! did you have an lcd screen on the remote control? how have you hooked that? does it enable you to send arbitrary data from the arduino to the receiver via the ibus? if so would glad to show me the direction so i can also do it . thanks in advance,

  • @joergy2
    @joergy2 3 ปีที่แล้ว

    Dear Joop, when you calibrate the compass, you only rotate (in principle) the copter around the x- and y-axis. Wouldn't it be important to rotate the copter around the z-axis too?

  • @joergy2
    @joergy2 3 ปีที่แล้ว

    Again thanx for your extraordinary work. Concerning only the compass I tried Your code and rewrite it completely, but in both versions of the code I still see a strange behaviour of the HMC5883L. If I move the sensor flat on the ground without rotating it, the raw values for x,y and z change after only a few cm. They shouldn't because the direction of the magnetic pole doesn't change much on these moves. There surely is no iron within a radius of 1m. If I rotate the sensor, it gaves me almost a perfect xy-circle (rotation around z-axis), which I expected.
    Do you have a hint for me? The HMC5883L sits together with a MPU6050 and a MS5611on a breakout board (gy-86). Probably thats the Problem. Motors are off.

  • @yaodonghu2422
    @yaodonghu2422 2 ปีที่แล้ว

    hi, could you please explain why you add a minus in the angle_pitch when you calculate compass_x_horizontal

  • @ChaitanyaKrishnabodduluri
    @ChaitanyaKrishnabodduluri 5 ปีที่แล้ว

    waiting for your video....joop

  • @pramod_Kumar..
    @pramod_Kumar.. 5 ปีที่แล้ว

    Can covering the high power circuit with faraday cage helps to reduce the interference in GPS and campass ?? Man great video learned from it!

    • @GhVost
      @GhVost 5 ปีที่แล้ว +1

      Since the magnetic, not the electric interference is of major cocern - the faraday cage won't help you much. I would suggest to replace the schielding with a mu-metal or a permalloy foil. Those with high permeability and the smallest coercivity. You can also look for the sprays with nickel particles. Good luck!

  • @user-rn4ky5tq4y
    @user-rn4ky5tq4y 5 ปีที่แล้ว

    why isn't this video included in the ymfc-32 playlist?

  • @tetradb_
    @tetradb_ 5 ปีที่แล้ว

    Notification, Like, Watch, Enjoy!

  • @spotdoit6047
    @spotdoit6047 5 ปีที่แล้ว

    Excellent

  • @haydenkim1580
    @haydenkim1580 5 ปีที่แล้ว +2

    Good morning my Drone professor!
    If you establish drone Academy anywhere I will apply !
    Thank you for making video !
    From South Korea!

  • @yxhankun
    @yxhankun 5 ปีที่แล้ว

    Would you mind turn on the autotranslation please?

  • @arnavmarchareddy1831
    @arnavmarchareddy1831 5 ปีที่แล้ว

    Hey Joop, have you ever had the situation in which you completely lower the throttle but the quad copter keeps going higher. Where the lowest point on the throttle still make all the motors spin too fast!!!

    • @Joop_Brokking
      @Joop_Brokking  5 ปีที่แล้ว

      Only with a DJI Naza. This was because the frame was way to light. This can also happen when the ESC's aren't calibrated correctly for the flight controller.

  • @saikatpaul8303
    @saikatpaul8303 5 ปีที่แล้ว

    Thanks bro

  • @joergy2
    @joergy2 3 ปีที่แล้ว

    Dear Joop, I probably found another small mistake in the code. When it comes to calibrating the compass you wrote:
    compass_offset_y = (((float)compass_cal_values[3] - compass_cal_values[2]) / 2 - compass_cal_values[3]) * compass_scale_y;
    compass_offset_z = (((float)compass_cal_values[5] - compass_cal_values[4]) / 2 - compass_cal_values[5]) * compass_scale_z;
    According to this You are scaling the offsets. And when You apply the offsets, You wrote:
    compass_z += compass_offset_z;
    compass_z *= compass_scale_z;
    So you apply the scaling factor twice ...

  • @shehabmansoor4693
    @shehabmansoor4693 3 ปีที่แล้ว

    Friends, I still have problem with compass I get twice red light everytime i turn on the drone , everything work amazing in test code .

  • @milioncer1223
    @milioncer1223 4 ปีที่แล้ว

    also with sbus ???

  • @ammarkaskas7013
    @ammarkaskas7013 5 ปีที่แล้ว

    Hallo, how can i control this quadcopter by my iPhone with Bluetooth hm-10?
    1- I need the sketch of Hm-10 for complete quadcopter.
    2- and the app witch belongs to this project.
    Can anybody help me please?

  • @sukhee5
    @sukhee5 5 ปีที่แล้ว

    Hello guys. I need help. I'm from Mongolia, sorry my bad English. But now I'm in Taiwan. Taiwan declination angle is -4. I changed the only code /float declination = -4;/ and calibrated compass. But quadcopter steel cant hold the GPS position. Turning on copter after always automatically flying to the south. Please help me to solve this problem. Where do I change the other code and angles?.

  • @dhruslab9563
    @dhruslab9563 5 ปีที่แล้ว

    Sir It's my sincere request that put a rgb led function on drone so that it will easy to fly in night and also put follow me mode and automatic return to home.

  • @Kongfufrank
    @Kongfufrank 3 ปีที่แล้ว

    Gy-86, não reconhecido, poderia me ajudar?

  • @najeeben9491
    @najeeben9491 5 ปีที่แล้ว

    hai can you make this code to support bmp280 barometric pressure sensor instead of the costly ms5611

    • @Joop_Brokking
      @Joop_Brokking  5 ปีที่แล้ว

      No, I will not include the bmp280.

  • @najeeben9491
    @najeeben9491 5 ปีที่แล้ว

    can you make a video on barometric sensor

    • @Joop_Brokking
      @Joop_Brokking  5 ปีที่แล้ว

      Already did: th-cam.com/video/2BLb6qUKikI/w-d-xo.html

  • @Hadadoh
    @Hadadoh 4 หลายเดือนก่อน

    are you still there?

  • @BobLeeSwagger8264
    @BobLeeSwagger8264 5 ปีที่แล้ว

    Hey Joop, I am not able to connect to the link to download the zip file for the non-autonomous software package(or the arduino copter for that matter). Is there a known reason for why people can't connect or is there an alternate location to download. Thanks

    • @BobLeeSwagger8264
      @BobLeeSwagger8264 5 ปีที่แล้ว

      This is the same issue for downloading the code for any project

    • @AlvaroPandolphousa
      @AlvaroPandolphousa 5 ปีที่แล้ว

      From His Web site:
      "This project is currently under development. My goal is to release the software September 2018. You can check its current status on my TH-cam channel."

    • @BobLeeSwagger8264
      @BobLeeSwagger8264 5 ปีที่แล้ว

      Alvaro Pandolpho I am not talking about the “autonomous” software. I am talking about the Arduino project as well as the original stm32 quadcopter software that already has the code released. I just happened to comment on the most recent video so maybe I could get a reply helping.

    • @Joop_Brokking
      @Joop_Brokking  5 ปีที่แล้ว

      Hello SwampBewdy, unfortunately my server is down due to some technical difficulties :-( I hope to get it up and running next week.

  • @PoGamer97
    @PoGamer97 5 ปีที่แล้ว

    I want to make Drone you help me

  • @connorb.3796
    @connorb.3796 5 ปีที่แล้ว

    Hallo Joop, zoals je ondertussen waarschijnlijk al weet ben ik de YMFC-AL aan het bouwen. Helaas wil mijn arduino niet booten op de batterij, ik heb het voltage op de Vin pin gemeten en dat was op dat moment 11.7V. Ik heb hierbij een foto toegevoegd, aangezien ik de fout niet kan vinden in het circuit, ik heb het schema dat je online hebt staan exact nagebouwd. (PS: Ik weet dat mijn circuit nog erg rotzooiig is, dus ik kan het begrijpen als je de oorzaak er niet uit weet te halen) imgur.com/a/WVwXq4a Edit: imgur.com/a/YD6maji
    - Connor

    • @Joop_Brokking
      @Joop_Brokking  5 ปีที่แล้ว

      Als je 11.7V hebt op de Vin, is er dan ook 5V op de 5V pin aanwezig?

    • @connorb.3796
      @connorb.3796 5 ปีที่แล้ว

      Nee, ongeveer 1.6V uit mijn hoofd.

    • @connorb.3796
      @connorb.3796 5 ปีที่แล้ว

      Er branden dan ook verder geen lichtjes op de arduino.

    • @Joop_Brokking
      @Joop_Brokking  5 ปีที่แล้ว

      Dan is de spanningsregelaar van de Arduino defect. Je kan er voor kiezen om een externe 5V voeding op aan te sluiten of de Arduino te vervangen. Wel eerst controleren of je niet ergens een sluiting hebt.

  • @innovativeminds4806
    @innovativeminds4806 5 ปีที่แล้ว

    please provide the circuit and code also

    • @Joop_Brokking
      @Joop_Brokking  5 ปีที่แล้ว +1

      The complete code will be available on my website when I have uploaded all my videos. My guess is end of September.

    • @innovativeminds4806
      @innovativeminds4806 5 ปีที่แล้ว

      Joop Brokking thanks

  • @briandowns6263
    @briandowns6263 3 ปีที่แล้ว

    Just flew my drone for the first time today and it immediately dived forward and into the ground. Guess what? My pitch lever was connected the wrong way round. So my previous comment was in error.

  • @gurpreetsingh-de3bs
    @gurpreetsingh-de3bs 5 ปีที่แล้ว

    can you guve your email.. i have questions regarding electric skateboard dc motor based

  • @satyananda4389
    @satyananda4389 ปีที่แล้ว

    English Substitle Please

  • @nonameguy1427
    @nonameguy1427 3 ปีที่แล้ว +1

    Hello guys, maybe I am a bit late, but i was recently trying to build this quadcopter. Unforteuately, i got a loop_timer warning. After some time I narrowed the problem down to the hmc5883L compass, which for some reason randomly takes 3000us instead of 1500us during HWire.requrstfrom(....)
    I tried everything I can imagine (Pullunder resistors, testing the hmc5883l seperately) , I am just stuck at the moment. any ideas?