YMFC-32| Altitude hold programming and implementation| The Arduino - STM32 DIY autonomous drone

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ก.ค. 2018
  • In this video I explain how I programmed and implemented the altitude hold function in the YMFC-32 flight controller code.
    More about electromagnetic interference on quadcopters:
    • Electromagnetic interf...
    The YMFC-32 playlist:
    • YMFC-32 | a DIY 32-bit...
    The YMFC-32 autonomous project page:
    www.brokking.net/ymfc-32_auto_...
    You can find the example program here:
    www.brokking.net/YMFC-32_auton...
    Setting up the Arduino IDE for uploading programs to the STM32:
    • Getting started with t...
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    My dear Joop, thank you so so much for you passion and inspiration of drone and embedded programing. I was one of your big fan when I studied in university. Now I am working on software field in Japan but I can not forget the time I was in love with Arduino and AVR MCU. I think that I will comeback to my truly passion in the future. Thanks so much for your inspiration :)

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

    I am very excited about this serie.

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

    You are amazing!
    There is so much practical info in your videos. Not just theory that only works on paper.

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

    Nice to see you are further developing the project! I myself got into multicopter because of your DIY projects, both YMFC-AL and -32. My first iteration was with atmega328p using your code, and then, again from you, I discovered stm32 and got me some boards. I was having some flight stability issues, I guess because of the unstable power from the ESCs. But now with a dedicated mosfet I had laying around things are improving! I keep a log of my build on rcgroups if you want to have a giggle at my progress so far.

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

      I never giggle as I always respect others who are building their own quadcopter flight controller. If it was easy everybody could do it :-) Please share the link to your project.

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

      Well I hope this at least puts a slight smile on your face, because it sure does on mine. I very much enjoy this project :D www.rcgroups.com/forums/showthread.php?3086792-Building-my-first-quad-copter-Using-YMFC-AL

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

    Hey joop...I am a big fan of your project and your knowledge and the way you described the project it just awesome..

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

    This is a great failsafe function. Definitely getting an FC that has an baro on my next built. Those F7 boards are looking mighty-nice 👌

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

    Excellent video. Thanks a lot for the dedication you put in this project.

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

    Great project Joop. Really good ideas n developments there.

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

    What fantastic attention to detail of the sort hopefully turns this project from ‘it worked for me’ to one that should work when people build their own with different motors/ rotors/ ESCs/batteries/bregulators/arometer mounting etc. etcI built a YMFC-AL & modified the code a little. Rock solid stable in flight, but the hardest thing to do when flying was to keep it level. Although changing the throttle response on the RC transmitter helped a lot, I figured adding a barometer to YMFC-AL was doable. It didn’t work & I never worked out why - but there are at least 3 ‘gotchas’ explained in this upload.

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

    It s a pleasure to see your videos, thank you for sharing your passion :)

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

    I am happy to see your new video Mr. Joop :)

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

    Great job, and easy to follow. Thank you again

  • @jamesaddison81
    @jamesaddison81 4 ปีที่แล้ว +8

    I’ve implemented something similar using an STM32, I was taking 20 point averages of a value, after some analysis I realised a 1D Kalman Filter was more responsive, used less processing power and gave a smoother output.
    Estimate(new) = Estimate(old) + gain(0.15)*(measurement - estimate(old) ).
    Gains around the 0.1-0.3 mark have good smoothing ability without too much lag. Hope that’s useful.

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

      Hello sir, did you take Error band +/-2.5mbar of MS5611 as the measurement uncertainty and around 0.7 as the noise variance for calculating gain?

    • @jamesaddison81
      @jamesaddison81 2 ปีที่แล้ว +1

      @@kybousong4846 no error band, I just put the raw pressure data into the formula above with the gain I mentioned and got a smooth response.

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

      @@jamesaddison81 thanks you for your fast response and information, sir.

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

    Nice job! Very clear explanation!

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

    Few points:
    1. Both the I2C ports of stm32f103 are 5V tolerant, then why to worry about I2C signal levels?
    2. Try gy-86 breakout board. It contains mpu6050, ms5611 and hmc5883l all on a single board!
    Here's what I do:
    1. I request temperature with 1024 osr and pressure with 4096 osr as follows:
    -> Setup() - request temperature with 1024 osr
    -> loop 0 - read and calculate temperature, request pressure with 4096 osr
    -> loop 1 - idle
    -> loop 2 - idle
    -> loop 3 - read and calculate pressure, request temperature for next loop
    After calculating altitude I take average of 16 altitude readings and update baro_updated flag so that pid outputs are calculated only when new averaged data is available. This gives accurate altitude with 62.5Hz refresh rate and 7cm precision.
    2. When my throttle reaches hover point, I activate the altitude hold algo. When the throttle is raised I increase the setpoint of altitude hold algo and vice versa so that altitude hold algo is always running and the flight is more stable.
    Great video as always :)

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

      Great to read that you found your own method and algorithm. I tried changing the setpoint with the throttle stick but it was lagging as the PID controller needs time to react. And you always want to have the ability to react very fast (for example obstacles). That is why I have chosen this method.
      You should try my method and you might see some improvement in altitude precision and response time. As it runs on +/-80Hz.
      I kept the I2C signals at 3.3V because I could not find any level shifters in the GPS/Compass module that I use. By using this module you get the compass away from you main wiring. That is why I don't use an all-in-one and you need a GPS anyway.

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

      Joop Brokking
      Thank you for your reply sir. All I want to ask was that stm32 has 5V tolerant I2C interface and we can connect ms5611 or any other sensor directly without any problem (just like you did with npu6050 in this video: th-cam.com/video/ImctYI8hgq4/w-d-xo.html) so why to worry about I2C signal levels when connecting ms5611..?
      Yes, it's better to use magnetometer with a gps since it will be away from other electronics. That's why I use only mpu6050 and ms5611 on the gy-86 module and leave the magnetometer on it unused so that I don't have to use separate modules of mpu6050 and ms5611.
      And yeah, your algorithm is a lot more better and precise than mine :)

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

      The STM32 might have 5V tolerant inputs, but the HMC5883L in the GPS module might not have 5V tolerant inputs. As explained I could not find a level shifter so I want to be sure that the HMC5883L stays within it limits.

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

      @@Joop_Brokking
      Then why using mpu 6050 i2c lines directly..?
      Also, can we use simple resistor voltage dividers on the scl and sda lines for level shifting?

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

      As far as I know the i2c lines are specified open drain. So by switching off the internal pullup resistors at the i2c pins and using external resistors to pull up the i2c lines to 3,3 volts everything should be fine.

  • @kk-zt9ri
    @kk-zt9ri 2 ปีที่แล้ว

    Thanks,Mister I study a lot of it from you ,say Thanks from Taiwan.

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

    Thank you! It's very interesting, can't wait to repeat it by myself.

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

    nice job bro. i always new videos from you. thanks

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

    Sir I have successfully completed the ymfc-32 and it flies very well .
    Thank you so much sir

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

      That is great to hear and thank you for sharing.

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

      I am having problems with the PID configuration for altitude, I've been on it for weeks. Can you help me?

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

    Thanks joob, excellent work, I really appreciate the effort that you put on, GREAT

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

    Thanks my frinds, so good work fantastic arduino profec man.

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

    Another great work Thanks

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

    @Joop Brokking I dont know if you still read the comments, but I am building the YMFC-32 at the moment. In one of yor videos you showed the telemetry of the copter on a notebook an there was a max altitude set. I dont have found this in the code you have published. Is there any way to limit the height it can fly? In my country a restriction of 100m is given and I want to add this in the software.

  • @helimux
    @helimux 4 ปีที่แล้ว +1

    excellent contribution, I have been following your projects for a while now and I have decided to replicate your YMFC autonomus project. One question, is there any way to get the PCB that appears in the videos?
    Is there a way to buy it?
    Sincerely
    jose

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

    interesting, thanks. just curious, at the end when you are flying, on the right, is that the highest mountain in Holland?

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

    nice complicated job !

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

    very good work , thanksfor the share

  • @HungVo-ic2vm
    @HungVo-ic2vm 5 ปีที่แล้ว +1

    Great !!! I want to be like you. Thanks!

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

    Dear Joop, thanks again for this informative video. Doesn't the MS5611 have a read out of "uncompensated" pressure data? Because your FC is merely interested in changes of pressure and temperature is considered mostly stable, one probably can neglect the temperature reading and calculation. Just using the raw values ...

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

    Hi Mr. Brokking
    why when I enable alt hold quad fly up?
    hover throttle about +/- 1500 and I guarantee barometer reading is good

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

    Great work, I would like to know more on that telemetry system. Looks interesting.

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

      That will be the subject of the next video.

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

    Good tutorial! Unfortunately averaging 20 measurements seems like a lot of time with this output data rate. Ive tried median filter with 3 measurements and it gets rid of those annoying spikes aswell. Then Ive used "simple" kalman filter and complementary filter at the end (like you did). Ive noticed very fast response with smooth signal :).
    Its recommended to have very smooth and responsive signal for altitude hold. D term of altitude hold algorithm put a lot of stress on battery esc and engines.

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

      Kamil, Do you have an example of your code with kalman and complementary filter? I also feel that averaging 20 pressure readings puts a large lag in the pressure data, so am looking for a different signal filtering method. I've found that by alternating temperature and pressure readings from the 5611, the pressure values are more stable, and you don't get the "repeating spike pattern" Joop talks about in the video. With the averaging method it takes 20 * (3 * 0.004)= 240 msec for the signal to fully respond to a step change. By alternating temp/pressure readings I get a new pressure value every 2 * (3 * 0.004)= 24 msec, and I can apply a filter to that signal and likely still have faster response than 240 msec.

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

    Joop, In this video @ 2:12 you use a PCB. Any plans to publish the scheme and design? Or did I miss it?

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

    Hello Mr .Brokking .
    i have seen u r video on ms5611 , in the video u are explain 25 ms to acquire the ms5611 data . i had developed ms5611 code where i use my one loop as count each loop is 2ms , once it reaches 10 i acquire the data and it works well .I just want to know why this extra 5 ms u had used in u r code . i have seen u had made a black container to over come the light sensitivity of ms5611 , i have used a black tape ( not touching the sensor) but i see a drift in the altitude over a period of time . do the black tape cause the drift ? or drifting the air pressure is normal for me i( the diff is around 2 meter in 30 minuts ). can you share ur experience. thanks in advance .

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

    Hello sir.
    You wrote about getting the temperature of Barometer.
    "After that we can poll the pressure data and immediately request the temperature. And again we need to wait for 2 loops before the temperature data becomes available."
    Why not using the temperature value from gyro, which created in every loop.

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

    You could use lidar sensor with accelerometer (which you already have onboard) to get altitude when you're in horizontal position in x and y and use altimeter for getting altitudes beyond the lidar range.

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

      In the future GPS data will be more and more accurate. With a really good GPS receiver you only need a barometer and a GPS.

  • @Ark0Hak
    @Ark0Hak 7 หลายเดือนก่อน

    Amazing job

  • @odirileluckymohutsiwa509
    @odirileluckymohutsiwa509 2 ปีที่แล้ว +3

    Hello, Why did you use a pressure sensor instead of using the altitude value from the gps when implememting altitude hold? Is it because the gps altitude value is not too accurate or there is another reason? Thanks in advance.

    • @yo90bosses
      @yo90bosses 2 ปีที่แล้ว +3

      Ill go ahead and reply for him as this video is quite old. GPS height is very very inaccurate and slow compared to GPS position or the barometer altitude.

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

    Hi, can I use the MS5611 barometer on the stm32 the controller board (PCB) and by covering all the flight controller with a special case?

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

    Thank you. Appreciate it very much

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

    so smart, fantastic

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

    Hello,
    In the complementary filter, does the coefficient value should always add up to 1?

  • @Ais-qc1bc
    @Ais-qc1bc 3 ปีที่แล้ว +1

    I use arduino ONU and I make a quad like your ymsc-AL (see your video) how can I add attitude hold to my ymsc-Al..
    Ymsc3d is very costly for me...
    Please tell?

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

    Finally come!

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

    To get rid of the 5V level shifting you can also just desolder the two 5V pull-ups on the clock and data lines (and - if you don't have pull-ups elsewhere - add some new pull-ups to 3.3V). This is a lot easier than trying to solder wires to the 3.3V side.

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

      The MS5611 breakout board has two pull-up resistors to 5V on the board. So you have to remove them. As they are 0603 size it might be easier to just solder the wires.

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

    It will be great if you explain about AT tiny and the concept how you use that to reset the stm32 and all that connection details . Thank you sir

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

    Wow finally you decided to share it with us. Thanks for all your efforts

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

    can you please provide 3d design of that which you build in cnc machine.
    you are doing great work. but please help me.
    and also can provide the detail connection of how to connect STM and barometer.

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

    Hi. I have a project. In my project, I designed a four-engine drone. My teacher made it a condition for me to graduate. This condition is that the drone will go down at the desired speed, it will go down at 6 m/s by increasing the pwm according to the height, and I am thinking of doing this task with a pixhawk, which will fix the altitude at 100 meters. Can I change the descent speed continuously by adjusting the pwm according to the altitude? (It will be a fully autonomous system). I would be very happy if you have any suggestions.

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

    Can we connect resistors to the pins of the MS-5611 to step down 5v to 3.3v

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

    Good job.

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

    Hello, and thanks again for this wonderful fun and educational project.
    I am however confused regarding the need to power the MS5611 breakout board with 3.3 V.
    As far as I understand, the I2C pins used on the STM32 (B10/B11 - RX3.TX3) are tolerant to 5V. And indeed both the HMC5883L and the MPU6050 are power with 5V and connected to the same I2C line.
    Since both the MS5611 board and the STM32 pins accept 5V, why should we power the MS5611 board with 3.3V ?
    Thanks for any information.

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

      B10/B11 are not 5V tolerant when they are used for I2C. Both HMC5883L and MPU6050 output 3.3V even with 5V input. They do not have a step up converter for the SCL and SDA lines. Hence they can directly to connected to 5V input and SDA SCL pins directly to B10 and B11. MS5611 has a step up converter which steps up the 3.3V to 5V on SDA/SCL. This will kill the I2C bus on STM32 (know this by experience :) ).

    • @mrcheng6797
      @mrcheng6797 11 หลายเดือนก่อน

      @@askant101 bro, acturally, acouding to the datasheet, B10/B11 both are 5V tolerant.

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

    Hey Joop, as a hobbyist, recently I have been following your videos, instructions and have successfully flown auto leveling drone. Your simple and yet effective way of explaining fundamentals is amazing! After auto level, I am now trying out the altitude control. Here I have trouble working with MS5611. To experiment, I have taken snippet of your code to play with MS5611. My code reads very high raw temperature & pressure values, almost like full scale. Any suggestion what could be the issue? Could the daylight be interfering with MS5611 (i did putting the breakout in a closed box). Or could the light from LED on the GY-63 breakout interfere with pressure reading?

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

      my code
      #include
      //-----------global variables
      byteMS5611_address = 0x77;
      byte start, error;
      uint16_t C[7];
      int64_t OFF, OFF_C2, SENS, SENS_C1;
      int32_t dT;
      uint32_t raw_pressure, raw_temperature;
      float actual_pressure;
      int32_t P, actual_temperature;
      //----------setup()
      void setup() {
      Wire.begin();
      Serial.begin(57600);
      delay(350);
      Serial.println(F("testing barometer"));
      error = 0; // reset all
      raw_temperature = 0;
      raw_pressure = 0;
      actual_pressure = 0;
      actual_temperature = 0;
      Wire.beginTransmission(MS5611_address);
      Wire.write(0x1E); // reset 5611
      delay(350);
      //Check if the MS5611 is responding.
      Wire.beginTransmission(MS5611_address);
      error = Wire.endTransmission();
      if (error != 0) {
      Serial.print("MS5611 is not responding on address: ");
      while(1); // just freeze here
      }

      // get the 6 calibration values from the MS5611
      for (start = 1; start

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

      in the datasheet you can find normal/example values. You can check them with your own values. The led will not influence the pressure sensor.

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

      Thanks for the quick reply Joop. I seem to have narrowed down the problem. I get better temperature value when i make the following change to my code
      this instruction results in absolutely wrong reading -->
      program #1
      raw_temperature = Wire.read()

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

    hi where is the schematic of this case ? i would like to do it with 3d printer can i have measure i will design a .stl file and there s no other way to welded wire on CMS components ?

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

    Awesome!
    I have one notice:
    Why not to activate altitude-hold when throttle became stabilized? I mean when difference in throttle is about some value of error?
    In your case I have to remember to center stick every time.
    In my case it'll calculate altitude for any value of throttle

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

      The throttle stick has a small dead band when altitude hold is activated. So you don't have to exactly remember the center position. As explained at startup the hover throttle is registered with the accelerometers and the stick is automatically centered as hover throttle.

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

    have you thought about trying your codes on a Multiwii flight controller, your videos are very inspirational.

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

    great effort, good representatio brother.
    please make RC control with LoRa sx1276/1278 Module with arduino.

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

    I noticed that it was a little windy in the very last video. How did you keep the copter from drifting away in any direction? Some new copters use a downward facing camera to keep them from drifting.

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

      Isidro Murillo GPS if I’m not mistaken

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

      In this video I corrected it manually for wind drift.

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

    Is the VCC of the ms5611 connected to 5V or to 3.3V?

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

    Sir, is it possible to use brush motor with same code in arduino ??

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

    Thank you sir

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

    Hey Joop, I always wondered how you graph the data with the arduino software(not excel) because I want to see a live feed of sensor data.

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

      You can use the Serial Plotter. It is like the serial Monitor, only output graphs. Open it with strg + shift + l or Sketch -> tools -> Serial Plotter

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

    Is there any difference your altitude holding technique and beta flight ? I am just asking, I don't know what are the techniques used by the other stable drones and commercial versions, like DJI. Please can you enlighten me Mr. Brokking.

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

      I have no idea what altitude hold techniques other flight controllers are using. I started from scratch and never felt the need to have a "peek" at other software. I just wanted to know if I could make it work for myself so I could share it.

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

    Thanks for sharing this filtering method, I may just try something like that myself. Out of interest, would 2048 not have been sufficient resolution?

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

      Probably not. You need at least one loop after the request as the maximum conversion time is 4.54ms.

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

    Sir can i use chaper version of barometric pressure sensor

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

    i really enjoy watching your video's ! but i would really like you to explain this to a flat erather :))

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

    Only this code can be used with any flight controller?

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

    May I ask a question? ! Do you calculate PID altitude in every loop ( 4 microseconds ), or every time the actual_pressure is updated?

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

      you update date PID when barometer_counter == 3, don't u ?

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

      The PID is calculated when new pressure data is available.

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

    How can I add servos or a 12v moter to this ?

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

    Hello. I really like your project. Does the Quadcopter have enough lift to get for example a camera / gopro in the air? Which ways can you mount a camera like a gopro or a camera for fpv funcionality? Whats the flight time you can get with the battery?
    And the last question: Whats the weight of the drone?
    Thank you very much in advance.

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

      Weight of the drone that I use is around 770gram without battery. It can lift a Gopro without gimbal.

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

      Battery depends on how aggressive you fly, the wind etc.

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

      Joop Brokking okay thank you a lot. So you are basically saying that it can't lift a GoPro and a gimbal? Stronger motors will fix the problem, won't they?

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

    Sir when will you release the other videos regarding telemetry,GPS ???

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

    Sir in ymfc-32 the voltage divider wire which is connected to the only positive of the battery because ground is already connected .when that wire I touch to the 5v ..,it shows the voltage reading when I send a "E".but when that wire touch to the 12 volt that shows 0 volt instead of showing the lipo battery voltage.

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

    Nice project and excellent explanation of how works this system for hold altitud, i want suggest in the future if possible can you explaint how works a code of ESC controller without sensors, i see many tries in TH-cam but not work good, thanks for share.

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

      Building my own ESC is not my priority. Maybe in the future, but no guaranty.

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

      Thanks you

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

    Hi....May I know if you have some lessons about the openCV and image processing....I like your codes...They are easy to understand and can be readily implemented without using libraries as you explained them very well......Thank You :)

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

    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.

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

      You need to check sensors (pressure) and GPS signals values. The PID algorithm of Joop is very good but need some tolerance in some cases.

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

      @@guywatcho1641 How exactly please? Currently I have been able to perform altitude hold, but position hold is really catastrophic.

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

    Great work Joop !!!
    Can I modify and use this code on YMFC-AL (with. Arduino Mega) + GY-BMP280 Sensor ?

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

      Yes, it might be possible for the Arduino Mega to handle this code.

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

      Dear Sir, Brokking. What about Arduino Uno? Can it be handle the code when I modify on YMFC-AL with Arduino UNO? Regards.

  • @DatLe-zk3gv
    @DatLe-zk3gv 5 ปีที่แล้ว

    Thank you.

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

    sir it will be great if you put headless mode in ymfc-32 because sometimes its hard to control the drone.
    i saw in youtube that ,you have put headless mode in one of your drone then why dont you explain that one.
    Thank you so much sir

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

    can you calculate average time of 1 mesure of altitude ?

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

    Hello brooking sir!! I am trying to develop a flight controller by stm32f4 (according to our future requirement)..i have already spent 9 months on it, to only fail..so could we use the same stm32f1 code for stm32f4 (by changing the timer configurations accordinh to stm32f4 add on and necessary pin outs)..and yes how much do i need to change the timer configuration..

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

      Yes, you could use the YMFC-32 code for the F4 as a base. Just make sure that the main program loop is running at 250Hz. But you might want to build it with the F1 first to get familiar with the code and after that transfer it to the F4.

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

      Thank you sir ,I had already started with the F1,
      I face problems on getting a Wire.h library for the F4 board.

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

    GREAT!

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

    Why can't you use timer interrupt to get data from pressure sensor ? Or does the sensor itself offers some interrupt??

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

      It has a fixed maximum time that I used. Using an interrupt is possible but not necessary in this case.

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

    Can ultrasonic module be used for the purpose of altitude hold

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

      Only for the first few meters. Above that you need the pressure sensor.

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

    Sir what type of IC you have used to programme the stm32 without changing the boot jumper pin .sir can you please explain?

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

      Programming is done with the FTDI converter. The boot and reset are performed with an ATtiny.

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

      Joop Brokking sir make a video of that

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

      From the description:
      Setting up the Arduino IDE for uploading programs to the STM32:
      th-cam.com/video/MLEQk73zJoU/w-d-xo.html

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

      Joop Brokking sir I want know the connection and all details of that AT tiny to the stm32 for bootand reset

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

    Thumbs up.

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

    can i use one battery only for arduino and the other only for motors?

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

      Yes but you need to ground them together

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

    Sir what type of telemetry system are you using???can you please explain sir

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

      I will explain it in the next video. Hoping to release that video in the upcoming days.

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

      Joop Brokking thank you sir

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

    Sir can we use FS -CT6B transmitter for YMFC-32 ? This transmitter has no LCD display that's why you you need to set the end points by computer software .many times I changed the value but not got a good result like FS-T6 so can you please sir explain what is the problem?
    I will really greatful to you if you give me the solution
    Thank you sir

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

      If it is possible to set the endpoints and center positions of the sticks it should be possible to use the CT6B. Try to find examples on how to setup the transmitter on TH-cam.

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

      Joop Brokking OK sir I will
      Thank you sir

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

    MS5611 - How many meter can hold altitude?. It can hold in the 30 or 40 to 100 meter?.

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

      The air pressure changes almost linear the first few km or so. This means that it will work up to 1km without any problem.

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

      @@Joop_Brokking thank you.

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

    Sir I am not able to access the content in the website sir.
    It says 404 ERROR
    what to be done
    Please reply

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

      I am having the same problem. Could you fix this and reupload your schematics and code?

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

      @@yourileenman8403 What is the problem? I cannot recreate, check it now.

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

      We have to come together and help each other , we are on our one the matrix don't want us to have this intelligence...

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

    I made a quadcopter with P I D method. But even at the best p i d values, it doesnt balance well its position. 2-4 degree vibration. 2-3 vibration per second. What can i do to fix this? ;(

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

      Make sure you calibrate the gyro before you use the gyro values.

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

    Hello sir I am Sourav. Sir can I use arduino uno or mini instead of Stm32

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

      No

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

      Check: th-cam.com/video/dWnF3sAvONM/w-d-xo.htmlm52s

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

    Can I purchase the MS5611 case from you?

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

      Unfortunately not.

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

      @@Joop_Brokking Nae bother, ill have something along the same lines printed. Thanks anyway.

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

    Can I use an bmp180 or BMP 280 instead of 5611

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

      The bmp 180 has a resolution of 30 cm. I dont know, what will happen, but imagine your sensor doesnt recognize, if the Quad dropped 30 cm. It would drop to -30 cm overcompensate to +30 cm and your Quad behaves like a bunny on drugs. (I dont know, if it would really happen, but no, you cant. I had to upgrade my bmp180 for this reason)

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

    Sir I have another question ,I have completed the ymfc-32 but when I increase the throttle the drone flies but the red led blinks which is a sign of low voltage where my battery is fully charged.sometimes the red led and green led both are solid.sir is it normal or anything else??

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

      A low battery alarm produces 1 blink. If you have multiple blinks you could have another error.
      Check this page for the LED status (step 8):
      www.brokking.net/ymfc-32_main.html

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

      Joop Brokking sir sometimes when I increase the throttle ,the drone starts to hover but suddenly the motors stop and the gyro again start calibrating

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

    if im using ultrasonic sensor instead of the barometer how do i change the code ?

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

      what im usuing for this
      Arduino uno
      Ultrasonic sensor HC-SR04
      Gyro MPU 6050
      and blutooth model
      still facing issues in writing the code

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

      Florian Ehrhardt thanks for replying n thanks for sharing your hard amazing hard work step by step with ❤
      Actually it's my final year project to design " stable altitude automatic control of a quadcopter" they asked for 1 m altitude with ultrasonic sensor
      And they said I have to put the pic for roll and pitch as zero is it possible ?

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

      did you make any progress in altitude hold with ultrasonic? I'm also doing the same thing.

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

    Sir when I upload altitude test programme it showed an error but when I changed the line from :TwoWire Hwire(2, I2C_FAST_MODE); to HardWire Hwire(2,I2C_FAST_MODE);
    It worked fine

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

      It depends on what STM32 add-on you use. The older ones used the HardWire. The latest STM32 add-on uses the TwoWire line.

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

      Joop Brokking thank you sir

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

    Sir i want to know when yiu will release code

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

      End of September is my goal.

  • @kopazwashere
    @kopazwashere 4 ปีที่แล้ว +1

    why not use an IR sensor/camera/ultrasonic module instead of this? IR and ultrasonic is unaffected by light changes, you could have ultrasonic for low altitude and IR for above.

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

      Even I have the same doubt. Do let me know if you got the answer.

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

    👍👍👍👍