Full Guide How to make ESP32 Quadcopter | Code and Schematic

Sdílet
Vložit
  • čas přidán 16. 01. 2024
  • Github:
    github.com/pratikPhadte/ESP32...
    In my repository in GitHub, you will find code and schematic for the flight controller. There is also a bill of materials list to refer.
    For indoor flight keep p gain of pitch and roll to be 0.6
    And for outdoor flight keep p gain of pitch and roll to be 0.75
    This is done considering the wind rush in outdoor conditions
    Patreon
    patreon.com/PratikPhadte?utm_...
  • Věda a technologie

Komentáře • 70

  • @manishkumartiruwar
    @manishkumartiruwar Před 6 měsíci +5

    i am also a fan of joop brokking. that guy is so humble . appreciate your work . pratik keep up the good work.

  • @SKHROSX
    @SKHROSX Před 5 dny +2

    OSM brother,
    really loved your piloting confidence and risking those PC.
    even though i am seeing this video, i was afraid 😁😁.
    liked your confidence even more when you takeoff again 7:30 .
    Nice Work

  • @binisol7353
    @binisol7353 Před 6 měsíci +2

    Awesome!

  • @andreykorolev136
    @andreykorolev136 Před 6 měsíci +2

    Respect!

  • @lamhe72
    @lamhe72 Před 6 měsíci +3

    one of the most stable flight 🎉🎉🎉

  • @manishkumartiruwar
    @manishkumartiruwar Před 6 měsíci +3

    try some padding for the setup (mpu6050 ) , it will help with the pid control.

    • @pratikphadte
      @pratikphadte  Před 6 měsíci +1

      Yes I’ll try the padding and see the results, thanks for sharing.

  • @techknowledge9424
    @techknowledge9424 Před 3 měsíci +1

    Sir could you upload a video of how you are making connection of soldier pcb briefly.

    • @pratikphadte
      @pratikphadte  Před 3 měsíci

      Hello, It’s a simple process, you have to just follow the schematic and place components and then solder, it’s best if you try the circuit on a breadboard and then imagine how
      It would look on a prototype board and then begin with soldering.

  • @binisol7353
    @binisol7353 Před 6 měsíci +1

    Did you make any special configuration or setup on the FS-i6X ?

    • @pratikphadte
      @pratikphadte  Před 6 měsíci

      I set it to pwm mode, and the configured the switch A with channel no4 in the Arduino code

  • @umriino3200
    @umriino3200 Před 6 měsíci +2

    Hello ive just build drone like yours but mine keep tilting forward ive change the pid setting many times but still the same..

    • @pratikphadte
      @pratikphadte  Před 6 měsíci +2

      Hello, that’s good to hear that you have built it!!.
      I have some questions about it , can u check these initially?
      1. Are all the ESC calibrated to start at the same time?
      2.Are all the motors are of the same kv rating?
      3. Did you keep the quadcopter on spirit level surface till the calibration is done?
      4. Did you check the IMU values on the serial monitor?

  • @GDub1958
    @GDub1958 Před 9 dny

    I still need to go back and watch again your PID tutorial.
    Does this system achieve anywhere close to flying a typical DJI?

    • @pratikphadte
      @pratikphadte  Před 8 dny

      Hello sir, no this quad doesn’t have a dji level flight but it’s good enough for a student to learn about flight mechanics and diy drones. Also this quad doesn’t have an altitude hold function.

  • @krishnaraval7343
    @krishnaraval7343 Před 3 měsíci

    Hey pratik .. as you are using esp- 32 (240Mhz - Clock Speed)are you see any difference in the stability compair to Arduino and STM boards during the flight ?

    • @pratikphadte
      @pratikphadte  Před 3 měsíci

      I had compared with joop brookings Arduino and stm32 F1 flight controller, turns out esp32 is better than Arduino Fc and somewhat similar to stm32f1 chip, joops code is very efficient and well written it might be more stable than esp32 code, also I am using 80Mhz clock speed only. 240Mhz option is not available on the ide. I think it’s available for higher versions of esp32.

  • @TusharJ-mr8js
    @TusharJ-mr8js Před 2 měsíci +1

    Hi Pratik, I have an ESP32 drone similar to yours, but I'm having trouble finding the right PID values. Could you tell me how you obtained yours?

    • @pratikphadte
      @pratikphadte  Před 2 měsíci +1

      Hello, so I have made a easy pid tuning via WiFi of esp32 I have mentioned here in my video
      czcams.com/video/kl3Dlm11AEQ/video.htmlsi=LJ2dC_bNEsE7YxGx
      Also if u have the same setup u can try the roll and pitch values as below
      P-0.7
      I=0
      D= 0.0085

  • @ruyi-pr9nj
    @ruyi-pr9nj Před 2 měsíci

    Hi, I'm using a f3 racing flight controller and the same esc as you, the drone just rocks back and forth.I tried pid tuning ,but didn't work.

    • @pratikphadte
      @pratikphadte  Před 2 měsíci

      I responded on one of your comment which had the same question.

  • @yacinemahboub
    @yacinemahboub Před 2 měsíci

    did you use "quaternions" for getting the position of the drone? then you control it back right?
    please answer me and thanks 🙏

    • @yacinemahboub
      @yacinemahboub Před 2 měsíci

      i mean did you apply quaternion-based model? 🙏

    • @pratikphadte
      @pratikphadte  Před 2 měsíci

      Hey, sorry for the late response, was a lil busy. No I didn’t use such method, the drone is moving solely form the inputs from the transmitter, the roll and pitch commands are converted to degrees per second and then converted to angle via a kalman filter and this angle is mapped to the motor inputs

  • @shredharpadiyachi5221
    @shredharpadiyachi5221 Před 23 dny

    Hello , i have made a drone as you showed but i am facing a problem that it is tilting also i checked the gyro rate values they are at zero i have waited for 10 , 20 sec for gyro calibration but the result was same what are the other thing i should check to see where is the problem??

    • @pratikphadte
      @pratikphadte  Před 22 dny

      Hello Shredhar, this must be the issue with MPU6050 calibration, the thing is you have to calibrate both the gyroscope and the accelerometer. just try to print accelerometer values and then remove the offset in each axis. Then print the values from gyro and just recheck if its fine. Lastly I would suggest to check the output of the transmitter, if its correct i.e range is from 1000 to 2000 and the middle value for roll pitch yaw is 1500

  • @royzafrir9861
    @royzafrir9861 Před 5 měsíci

    Hi Pratik, We are doing a project at school of a drone based on ESP32 (flight controller) and we take inspiration from your amazing project. We use a MC6RE receiver and a MICROZONE MC6C remote. Is it still possible to work with your flight controller code? Does it work with these components? (*The rest of the components are the same as yours).

    • @pratikphadte
      @pratikphadte  Před 5 měsíci

      If your receiver has pwm protocol, it can work fine. Good luck 🤞 do send me videos of your project, would like to see.

  • @user-hk9ho8uv8l
    @user-hk9ho8uv8l Před 5 měsíci

    what does Channel 6 and 5 control?? I have read the code, it is very interesting in my opinion

    • @pratikphadte
      @pratikphadte  Před 5 měsíci

      I have mapped channel 5(switch A of transmitter) to the WiFi pid tuning code, channel 6 is idle. Thanks!

    • @user-hk9ho8uv8l
      @user-hk9ho8uv8l Před 5 měsíci

      @@pratikphadte I found an error in the code and the gyroscope worked, I'm studying esp32cam and I plan to attach it as a pwm drone control thanks for the work, I'll unsubscribe as soon as I fly

  • @TrungHaiPham-p5g
    @TrungHaiPham-p5g Před 2 dny +1

    Hello Pratik Phadte, I'm Hai from Vietnam. I watched your tutorial video on making an ESP quadcopter and I really admire you. Currently, my team and I are developing a similar device but we are facing some issues with testing the PID. Could we ask you some questions to help us solve our problems? May I connect with you on some social networks like Facebook or Instagram? Thank you very much.

    • @pratikphadte
      @pratikphadte  Před dnem

      Hello Trung, thank you for your kind words. I am amazed to see that you all are working on it! And good luck to you!. I would suggest you to watch my videos and the resources in my videos carefully to solve your problems. I am available on Patreon, if you would like to get personal guidance, I am doing it only for my paid members on Patreon, due to lack of time I am unable to help everyone, please take this is a good way, thank you! And I again appreciate your comment and your words!

  • @samarthgarts1778
    @samarthgarts1778 Před 6 měsíci +2

    Can I use fs ct6b transmitter.

    • @pratikphadte
      @pratikphadte  Před 6 měsíci

      Yes you can , just make sure the transmitter is configured carefully.

    • @samarthgarts1778
      @samarthgarts1778 Před 6 měsíci

      @@pratikphadte like what configuration

    • @pratikphadte
      @pratikphadte  Před 6 měsíci +1

      @@samarthgarts1778 for the throttle channel make sure when you lower the stick, the pulses are 1000us and for roll pitch and yaw they are 1500us at idle position

  • @CodeWithMe4592
    @CodeWithMe4592 Před 5 měsíci +2

    My baud rate issu is solverd but,The drone keep tilting forward the values of mpu6050 on the serial monitor 1.50 and 1.80 is it necessary for a stable flight to have both the pitch and roll values to be 0 initially please help!!

    • @pratikphadte
      @pratikphadte  Před 5 měsíci

      Yes, so initially we keep the quad on a leveled surface for 10 seconds to get the gyro calibration, once that is done you are set to fly the quad, its mentioned in video, did you try the same?
      To be sure, try printing the values of the gyros after calibration step.

    • @CodeWithMe4592
      @CodeWithMe4592 Před 5 měsíci

      @@pratikphadte yes I tried, I'd did the same as shown in your tutorial bt still the drone is tilting
      One more thing I noticed that the motor 1 is fast when the throttle stick is slightly mover sometimes its just regulate its speed without any stick movement and sometimes its just stay steady bt when the throttle is increasing the result is same the drone just lift from the front side the ese are also calibrated.🥲

    • @pratikphadte
      @pratikphadte  Před 5 měsíci

      @@CodeWithMe4592 I think you should print the gyro rates after calibration and observe if they are zero

    • @CodeWithMe4592
      @CodeWithMe4592 Před 5 měsíci

      @@pratikphadte ohh yes it was not zero after calibrated I just adjest it does it need to be exact zero??

    • @pratikphadte
      @pratikphadte  Před 5 měsíci

      @@CodeWithMe4592 after calibration it should
      Be zero. Keep the quad stable for like 20 seconds and then see the rates

  • @Ais-qc1bc
    @Ais-qc1bc Před 6 měsíci

    any little pid problem it can damage your monitor screen! test it on safe place!

    • @pratikphadte
      @pratikphadte  Před 6 měsíci

      Yeah I’m aware, most of the tuning I had done outside for the fine tuning I was practising indoors

  • @rezwanurrahman4370
    @rezwanurrahman4370 Před 6 měsíci +1

    No Gyro sensor or Gyro module like MPU 6050 needed ??? can you make a video where you explain the code ??

    • @pratikphadte
      @pratikphadte  Před 6 měsíci

      MPU is there, it’s below the esp32, I will make the code explanation video if there is huge demand for for it 😅, other wise it’s all commented code jn the git, you can refer and understand. Any questions you can ask me.

    • @rezwanurrahman4370
      @rezwanurrahman4370 Před 6 měsíci +1

      @@pratikphadte Vai, I suggest you make the explanation video, there is a very few video out there who explains code. Your work will serve the community.
      People will love it I guaranteed.

    • @pratikphadte
      @pratikphadte  Před 6 měsíci

      @@rezwanurrahman4370 yeah I know it will be helpful but if you see there are great explanation videos already, search joopbrokking and carbon Aeronautics on CZcams, they have done an amazing job.
      If I were to do the same thing again, it might be repetitive 😅 but no harm done, you can still go through the code and let me know if you have any questions.

  • @user-uq4ly2lk1n
    @user-uq4ly2lk1n Před 5 měsíci +1

    Could you please send a link or picture of the esc?

    • @pratikphadte
      @pratikphadte  Před 5 měsíci

      robu.in/product/30a-bldc-esc-electronic-speed-controller/?gad_source=1&gbraid=0AAAAADvLFWdG4CSHI8xG6l8FjebVNsyRO&gclid=Cj0KCQiAz8GuBhCxARIsAOpzk8w6S_ndXDitLwaaBj7nbNEa6vnFOpDjhuY11oA0RuAjEn8OGXyKDi4aArgbEALw_wcB
      It’s simonk 30a ESC

    • @user-uq4ly2lk1n
      @user-uq4ly2lk1n Před 5 měsíci

      @@pratikphadte Hi, I'm going to use betaflight and SP F3 flight controller, may I know the protocol of the esc? Is it pwm , One shot, or D-shot.

    • @pratikphadte
      @pratikphadte  Před 5 měsíci

      @@user-uq4ly2lk1n i tried with INAV, there is one "standard" option for ESC, is it available on betaflight as well?

    • @user-uq4ly2lk1n
      @user-uq4ly2lk1n Před 5 měsíci

      @@pratikphadte How did you calibrate the esc? I calibrated them once for a fixed wing, now they won't work on drone. (They are NOT simonk, just some cheap off-brand.)

    • @user-uq4ly2lk1n
      @user-uq4ly2lk1n Před 5 měsíci

      @@pratikphadte betaflight has 'pwm' 'd-shot' 'multishot' 'one shot' etc.

  • @nightshowdown4178
    @nightshowdown4178 Před 5 měsíci +1

    Hello prateek i made the joop brooking arduino uno and joop brokiing and failed on both and as an idiotic foolish kid i just keep on investing money and as and just distroyed most of my parts but still didnt got any success code is so hard to understand so i would request you to try making a code because no one in india did this and it would be unique and liked also can u help me that how could i fly my stm32 drone since when i tested it it went up too fast and felt very badly on ground insatntly

    • @pratikphadte
      @pratikphadte  Před 5 měsíci

      Hello, don’t think of it as foolish, as you are trying to do something cool, it’s a very nice quality, and coming to the investment, don’t regret it as it will help you learn lot of stuff
      Yes so I have done the code part for esp32 I referred the code from CarbonAeronautics and incorporated it on esp32, and then I had to struggle a lot with pid tuning and then it became stable, I guess pid tuning might be the issue for you, you can try my code if you wish, i am open here for any help😄

    • @nightshowdown4178
      @nightshowdown4178 Před 5 měsíci +1

      @@pratikphadte okay then can u tell me whether or not esp8266 would be okay since I bought 2 of them a really long time ago and made a mini drone from it now I don't know how to use it

    • @nightshowdown4178
      @nightshowdown4178 Před 5 měsíci

      @@pratikphadte also I said foolish because I buyed low cost things made budget of 13 thousand and still I have low cost things and my budget reached 25thouand
      By the way thanx for the reply🙂

    • @pratikphadte
      @pratikphadte  Před 5 měsíci

      @@nightshowdown4178 Dw as you learnt new stuff ;)

    • @pratikphadte
      @pratikphadte  Před 5 měsíci

      @@nightshowdown4178 should be okay, try this code and you might have to change a few functions and libraries here and there.