How to program a quadcopter GPS hold function part 2 - YMFC-32 - The STM32 - Arduino quadcopter

Поделиться
HTML-код
  • Опубликовано: 16 сен 2018
  • In this video I will explain how I implemented and programmed the GPS hold function in the YMFC-32 quadcopter flight controller code.
    The YMFC-32 playlist:
    • YMFC-32 | a DIY 32-bit...
    The YMFC-32 project page:
    www.brokking.net/ymfc-32_auto_...
    Modifying the FlySky T6 transmitter:
    • Modifying the FLYSKY T...
    The ublox document for the NMEA protocol:
    www.u-blox.com/sites/default/...
    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...
    The PWM to PPM converter for the R6B receiver:
    www.brokking.net/bain_pwm_to_p...
  • НаукаНаука

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

  • @AppliedMetaphysician
    @AppliedMetaphysician 5 лет назад +25

    Joop, your analytical and problem-solving skills are beyond compare. It would not surprise me to discover that engineers from DJI watch your videos religiously. :)

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

    As usual, a clear & interesting presentation of a non-trivial problem. This is real time, digital control loops at its best, and great production graphics!

  • @archanaatawane8489
    @archanaatawane8489 5 лет назад +6

    Probably the best man on youtube I have seen

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

    I've never found any of your videos too long!

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

    Waiting for 21st sep. And very good explanation, Thank you

  • @franciscomartinho1749
    @franciscomartinho1749 5 лет назад +6

    Great work. Tutorial worthy of master
    If all this were written it would be an excellent drone-building manual

  • @crescenciolara2279
    @crescenciolara2279 5 лет назад +2

    Mr:Brokking
    Finally I got everything working using the STM32 (drone)and this is thanks to your tutorials
    Now also Satellites are shown on the LCD.
    Drone is flying beautiful.
    Thank you very much.
    God bless you
    Crescencio California

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

      Hello, could you tell me where did you buy a fonctioning GPS module with compass please ?

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

      @@peacequest69 Banggod...

    • @bohaman.
      @bohaman. 4 года назад

      Hello, I have a hard time getting the GPS working in the auto test program. I tested it with u-center and default is at 9600 @ 1Hz but when I run the test program I just got a string of questions in return. I even adjusted the baud rate and the data rate to 56700 @ 5Hz but still no luck with the main program. If I could get some pointer that would be really awesome.

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

    You have come to change our life in technology. thank u

  • @spotdoit6047
    @spotdoit6047 5 лет назад +2

    What a explanition very nice mr. Joop thanks a lot

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

    A great video to understand the concepts efficiently.

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

    You are really doing an amazing work. Hope you teach more such new things.. Thanks alot !!

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

    Very well explained, hats off!

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

    Great video. Really good explanations of the code. Love it !!

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

    great explanation and I have learned a lot from this

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

    You are terrific ! Terrific video
    Thank you again for share your knowledge

  • @fpv4all631
    @fpv4all631 5 лет назад +2

    Waiting for it.. Thumbs up

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

    Good job . Can't wait to try code.

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

    Great Videos, please keep making videos!

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

    Hello Mr Joop
    Your videos are packed with so much information that it is hard to keep in with required pace. It will be really wonderful if you write a summary on your website. Thanks

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

    Solved LCD Readings shown after adjusting potentiometer .is located top left of LCD
    Green plastic square with a Phillips slot screwdriver I turned it approx.10 turns clockwise
    👍(of course you have to have the proper connections explained by Mr.Brooking)

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

    Nice explain every small think :))

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

    Its a good learning channel , give a thumb up

  • @sidharthtalia
    @sidharthtalia 5 лет назад +2

    great work! the position hold is not bad for an only-gps based system! I will be putting up a video about filtering position (kept simple enough for everyone to understand) using kalman filters (no code, but i will explain it in such a way that you should be able to write your own code pretty easily. I promise not to use matrices and explain the relevance of each variable ;) ).

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

    Great vid! Noticed you haven't mentioned any code routine for validating the receivers current ephemeris and Almanac data?
    How are you handling GPS multipath/ reflected signal scenarios?

  • @martinminkoulou840
    @martinminkoulou840 3 года назад +2

    Hello sir
    Joop Brokking, really thank you for your wonderful work, I learned a lot from YMFC-AL, which I am currently mastering. I recently developed the YMFC-32 with GPS, normal flight works fine, but I am having difficulty maintaining altitude and position, I have already traveled a wide range of PID values ​​for GPS and altitude. The altitude still works but is not always stable, my real concern is position hold, when I activate it the drone lands on its own, then the propellers stop after 5s. Please answer items.

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

    Why not disable the RMC, VTG and GLL statements for even faster reading of GPS signals..?
    Amazing video as always.

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

    For state Estimation ,here the gps+IMU fusion is happening with Kalman Filter or EKF ...?

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

    I'm curious to see how your quadcopter will react when lat or log drop below 10º. I bet it will be spectacular! 😁

  • @nelsone.1472
    @nelsone.1472 4 года назад

    Hello great video you did really a good job! , I have one question, why you did'nt use a PID controller? is better the PD in this case?

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

    could be a good Idea if you disable gps hold position wenn moving sticks? would be possible? to do this in the code i mean?

  • @Ka-uv1hn
    @Ka-uv1hn 3 года назад

    Hi, great work. Your 50Hz simulation. Simulated position late for one measurment(200 ms) from real position. Is it true?

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

    super !

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

    Wonderful explanation. But need some help on the problem I'm facing. My communication with MPU6050 is going in to a bad state after running for some time. Iam continuously getting BUS BUSY error and unable to find any proper solution. I wanted to know if you have ever faced it and how did you fix it if faced it or any information on this problem

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

    I saw were beta flight software now has altitude and position hold. Have you tried it? Or is beta flight to simplistic for you to use? I want to use it but I can find any videos on how to activate it. I’m sure someone in the cli has to be typed in and changed or added. Are you familiar with this?

  • @tedelctro6849
    @tedelctro6849 5 лет назад +2

    hi joop i am a big fun of you you are best at what you do when i see your videos i always wonder how you got that knowledge please please tell me sth about you where do you live ,where do you work ,whats your education states and other things i really want to know . i am from Africa Ethiopia i am an electrical engineer graduate please tell me sth to become knowledgeable person like u what should i do .i have some experience in pic micro controller thank you for your videos they are excellent

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

    8:19 where do i find telemetry software.

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

    What if use sscanf function to parse coords from nmea string?
    Does it make sense?

    • @Joop_Brokking
      @Joop_Brokking  5 лет назад +2

      It probably makes sense. But the sscanf function brings extra code that is hidden in the background. This way you can clearly see what is going on.

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

    I have a question sir: Why did you substract every incoming_message by 48 ? for example
    number_used_sats = ((int)incomming_message[46] - 48) * (long)10; //Filter the number of satillites from the GGA line.
    number_used_sats += (int)incomming_message[47] - 48;

    • @Ka-uv1hn
      @Ka-uv1hn 3 года назад

      You receive package in hex number. Zero in ASCII table is 0x30 in hexadecimal and 48 in decimal. So it's a shift for correct calculation after that.

  • @bohaman.
    @bohaman. 3 года назад

    Would someone please help me? I got everything working and the LAT and Long showed on my telemetry. However, my quadcopter doesn't hold the position. I don't know how to start troubleshooting since everything is working fine and no error code shown.

  • @pramod_Kumar..
    @pramod_Kumar.. 5 лет назад +4

    Will you add GPS return to home ?????

    • @Joop_Brokking
      @Joop_Brokking  5 лет назад +3

      Not for now. I probably will add it in the future but right now I simply don't have the time to implement a return to home function.

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

    I need help for my GPS .I am already flying my Quad but looking to my LCD I can see altitude /Battery voltage but can not find any satellites somehow it does not change to the capital S.
    I check the GPS module with my PC using the U-Center and I can see it searches the satellites and I can see activity on the Tex console .what am I missing ?
    do I have to re-configure the GPS module?or it comes ready to use right out of the package or may be replace gps module battery?
    any help would be appreciated.
    Crescencio, California
    Thank you

  • @drscience3353
    @drscience3353 2 года назад +1

    Hello Joop; I very much appreciate all your work on this project.
    I have a question about the details of the serial communication with the gps module. Looking at the overall Autonomous Flight Control program, in which many subprograms are called, one of those is read_gps(). Each loop of the Flight Control program is supposed to take under 4 ms. The read_gps program seems to be called once in each loop. The read_gps program reads the characters in the NMEA string from the gps module at a baud rate of 57,600 bits/sec. into an array. But the $GNGGA string contains 74 characters including the '$' & '*'. Each character requires a serial transfer of 10 bits (8 for 1 byte + 1 start + 1 stop). So at 57.6 kbps, the transfer of just the characters (740 total bits) in the GGA string requires more that 12 ms. How can this be reconciled with the entire loop being limited to 4 ms. Many, many other events also have to be done in each loop. Joop - or anyone else, please, what am I missing? I would appreciate any help at better understanding this seemingly puzzling contradiction. Thank you.

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

      57600kbps means 57600 bytes per second, so it should be 74/57600 = 1.2ms, not 740/57600

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

      by the way, do you know what the rotating buffer implemented in the code to calculate the derivative part of the PID is? I am not quite clear about that part. if you know something about it, please share it with me, I will be grateful

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

      My conclusion was that the code was separated into multiple functions that each take less than 1ms. For each time the function is called, its index increases by 1 and it does something different

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

    Hello can l use arduino uno in your code of project instead of stm32

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

      Check question 5: www.brokking.net/YMFC-32_auto_qanda.html

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

    Trully Engineer

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

    hello guys,
    I am getting Error 4 (GPS watch dog exceeded) when I activate gps hold function
    can anyone help me with this
    the quad copter tilts and moves along one direction continously in gps hold mode
    And also did anyone ran into this issue

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

    Does this work with an Arduino Uno controller?

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

      No, the Arduino does not have the power to do the calculations in time.

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

    Hello, Jimit here! I am working on GPS POS hold mode last 4 weeks and now I am frustrated, when I activate GPS mode drone tilt and goes random direction, I don't know why this happened, I use same code as Joop brokking sir did, can you please help me community?

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

      I am also having the same problem

    • @chethankumar2021
      @chethankumar2021 2 года назад +1

      did you find any solution

    • @jimitjaishwal
      @jimitjaishwal 2 года назад +1

      @@chethankumar2021 yeah I have solution, check your gps are not give you 5hz it gives you 1 hz, check out your gps signals

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

      @@jimitjaishwal thank you i will try

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

    Joop why ain't you changing gyro angle with respect to GPS position rather than speed

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

    Way to long? WAY TO GOOD!