super helpful vid! i've been struggling with PID tuning for the past week, i'm hopeful some of ur suggestions will help. especially adding padding for the imu!
Hello Pratik, Great content and effort as always. I am also developing an ESP32 based flight controller on my undergrad thesis. As in your program, the MPU registers are like Carbon_aeronautics, what is done here is that some registers are written again and again in the loop section before taking MPU reading but it is not necessary. You can set the mode of the registers just once in the setup and it will be fine as done by Joop Brokking. It will save some time I guess. But Brokking's register modes are different than Carbon Aeronautics. Also you can use the another core of ESP32. (I am trying to do this but getting some issues)
Hey that’s a good idea, yeah I should keep the initialisation of gyro outside the loop will definitely save some clock cycles. I want to experiment with the 2nd core as well, I think it’s primarily used for WiFi and Bluetooth application. Seems very handy for sending flight data to a rf module.
I am trying to create a drone using the receiver part of this program using wifi such as espNow, but the drone is not stable. Is it difficult to control the drone's pid while using the esp32's wifi function?
No it’s not that difficult, since now the drone is pretty stable, I think you can proceed with a WiFi fc remote on your phone, but be careful, it has a lot of destructive energy.
Excellent work You mentioned that you use Kalman filter technique for control.. What I care about is whether you did all the mathematical calculations, I mean studying the stability of the system and choosing the control technique and the extent of the system's response to control mathematically or only through experimentation.. I care to know this because I am interested in the field of control theories good luck
I refered the kalamn filter implementation from carbon aeronautics and also from the matlab tutorial on kalman filters, i understood the bigger picture was wasnt able to implement it by only myself. You can refer the sources i mentioned above and youll be good to go!
@pratikphadte. Just a thumbs up for your project. Can your code be used for a bait boat as well? Bait boat will have one motor, one servo for the rudder and one servo for the bait drop bucket. It would be wonderful if one can add a GPS for RTH function on a bait boat. Which I can code ..... :-(
Yes, you could use this code with some chat gpt to write a firmware for your boat. Progress on GPS is currently on hold asI am super busy with college. Thank you for your kind words ♥️
bro i am a student of class 10 and i am trying to code my own flight controller and i made a angle mode flight controller which was easy but when i made it angle mode i am facing issues a lot can u help me please, when i start the drone from a leveled position(in pid stand) it try to stabelize but when the drone is tilted and i arm it it dosent stop at 0 degrees it just flip, after some debuging i noticed that as the i term of inner loop is about 2.1 the i is increasing so fast and then the I start increasing as drone is tilted the speed of 2 motors increases but when the drone rich 0 degrees the i dosent dicrease but when i force drone to be at 0 degrees the i term just stop chaging with a larger value like 345 causing 2 motors to increase the speed even when drone is at 0 degrees and the speed of motos dicreases when the drone is now tilted in another direction with 40 degrees for atleast 5 second, please help i have writen the code many time from starting but issue is not resolving
I am not sure if I understand you clearly, but I would suggest to start again step by step. Your pid values should be in range of 0 to 5 for the eps32FC
Is it possible to add a GPS to the drone to provide additional functionalities like autopilot and auto-landing, or would that be too difficult to code?
yes that should be possible. May not be that difficult to code as there are resources available but might be difficult to test and make perfect. A good FC such as pixhawk is recommeded for more reliability.
Very very thanks for this video, Can you give a whole series of esp32 flight controller for beginners, in which you teach about the codes that you used in the flight controller in very detailed manner Please please please 🙏
Thank you for your kind words, actually this work has been done by a guy named carbon aeronautics and even joop brokking, imho they have done a really good job at it.
In f450 the motors and escs need to use good as the frame is not optimised and giving the more vibrations or tune the drone to best to use Carbon fiber props
bro i am making the same exact thing and I tested it but the esc just fried and started emmiting smoke also i am using the 2200KV motors with 11 inch propellers ...any change which could be helpful
the higher kv(speed) the lesser prop length is required i think. As you need less torque when you increase speed. I dont know why the ESC is burning, maybe check ratings of motor and battery and select the esc?
CAN U USE ESP32 4G GSM MODULE ? IF YOU USE ,WILL IT BE ABLE TO GET A VERY LONG RANGE ON THAT CASE ? IF THROUGHOUT THE WHOLE FLIGHT PATH THERE IS A GGOD 4G NETWORK?
You could do that I suppose, as we have that option for Arduino, I’m not so aware about esp32😅 but there could be a few solutions. Search on the browser 💪
how are you sure that code has no errors and wont just fly to oblivion when u take it outstide i personally have this fear response appreciated like if u have some checks that you do for confirmation ,, love your project
Good question, we put limits on the motor input values to prevent that, also we can infer from the Imu data if the drone is toppled so that we cut off the propellers. There are plenty limits you could put, that’s why a standard ardupilot or px4 firmware is always better!
hi im from GEC TE student , found your channel by accident , then found out that you're an alumni , so happy to see my seniors building great stufff .
@@akshaygogare3590 thank you for your kind words Akshay, Appreciate it
Thank you, you even open sourced it.
This is fantastic!
Thank you 🙏
Im loving these videos dude. You gotta make more
Thank you so much for your kind words, genuinely means a lot to me!
Thank you so much ! Such an inspiring video for me. Electronics engineering student :)
I am happy to hear that! Best of luck for your studies!
@@pratikphadte :)
And lots of good wishes for you.
Thank you! Wish you best for your undergrad thesis!
super helpful vid! i've been struggling with PID tuning for the past week, i'm hopeful some of ur suggestions will help. especially adding padding for the imu!
Great Going man, definitely tell me if i can help you in any way
Hey, thanks, I appreciate it.
Hello Pratik, Great content and effort as always. I am also developing an ESP32 based flight controller on my undergrad thesis. As in your program, the MPU registers are like Carbon_aeronautics, what is done here is that some registers are written again and again in the loop section before taking MPU reading but it is not necessary. You can set the mode of the registers just once in the setup and it will be fine as done by Joop Brokking. It will save some time I guess. But Brokking's register modes are different than Carbon Aeronautics. Also you can use the another core of ESP32. (I am trying to do this but getting some issues)
Hey that’s a good idea, yeah I should keep the initialisation of gyro outside the loop will definitely save some clock cycles. I want to experiment with the 2nd core as well, I think it’s primarily used for WiFi and Bluetooth application. Seems very handy for sending flight data to a rf module.
Hey, great job ! Can you detail which components did you use ? Or make a video on the build :) Have a good day !
Hey! It’s there on my GitHub under resources folder
I am trying to create a drone using the receiver part of this program using wifi such as espNow,
but the drone is not stable.
Is it difficult to control the drone's pid while using the esp32's wifi function?
No it’s not that difficult, since now the drone is pretty stable, I think you can proceed with a WiFi fc remote on your phone, but be careful, it has a lot of destructive energy.
Amazing Pratik 🎉🎉
Thank you man! Appreciate it!
You are great guy!
Thank you for your kind words!
Can u give a entire full length video on how u built this
Hello, I think there are plenty videos on how to make drones, my main focus was the esp32 flight controller.
Can you give esp32 flight controller full video series for beginners
Excellent work
You mentioned that you use Kalman filter technique for control.. What I care about is whether you did all the mathematical calculations, I mean studying the stability of the system and choosing the control technique and the extent of the system's response to control mathematically or only through experimentation.. I care to know this because I am interested in the field of control theories
good luck
I refered the kalamn filter implementation from carbon aeronautics and also from the matlab tutorial on kalman filters, i understood the bigger picture was wasnt able to implement it by only myself. You can refer the sources i mentioned above and youll be good to go!
@pratikphadte. Just a thumbs up for your project. Can your code be used for a bait boat as well? Bait boat will have one motor, one servo for the rudder and one servo for the bait drop bucket. It would be wonderful if one can add a GPS for RTH function on a bait boat. Which I can code ..... :-(
Yes, you could use this code with some chat gpt to write a firmware for your boat. Progress on GPS is currently on hold asI am super busy with college. Thank you for your kind words ♥️
Thanks for your reply
bro i am a student of class 10 and i am trying to code my own flight controller and i made a angle mode flight controller which was easy but when i made it angle mode i am facing issues a lot can u help me please, when i start the drone from a leveled position(in pid stand) it try to stabelize but when the drone is tilted and i arm it it dosent stop at 0 degrees it just flip, after some debuging i noticed that as the i term of inner loop is about 2.1 the i is increasing so fast and then the I start increasing as drone is tilted the speed of 2 motors increases but when the drone rich 0 degrees the i dosent dicrease but when i force drone to be at 0 degrees the i term just stop chaging with a larger value like 345 causing 2 motors to increase the speed even when drone is at 0 degrees and the speed of motos dicreases when the drone is now tilted in another direction with 40 degrees for atleast 5 second, please help i have writen the code many time from starting but issue is not resolving
I am not sure if I understand you clearly, but I would suggest to start again step by step. Your pid values should be in range of 0 to 5 for the eps32FC
Is it possible to add a GPS to the drone to provide additional functionalities like autopilot and auto-landing, or would that be too difficult to code?
for that you will
need a better flight controller but yeah u can add gps feature in it without any problem hopefully
yes that should be possible. May not be that difficult to code as there are resources available but might be difficult to test and make perfect. A good FC such as pixhawk is recommeded for more reliability.
Hi sir, i loved your job 😊 ,can you please make a video in wich you are programming the flysky transmitter 😊
Hello, thank you for you kind words♥️, we don’t program the transmitter, do you mean the receiver?
wow great
Thanks!
Very very thanks for this video,
Can you give a whole series of esp32 flight controller for beginners, in which you teach about the codes that you used in the flight controller in very detailed manner
Please please please 🙏
Thank you for your kind words, actually this work has been done by a guy named carbon aeronautics and even joop brokking, imho they have done a really good job at it.
@@pratikphadte thanks for giving references
In f450 the motors and escs need to use good as the frame is not optimised and giving the more vibrations or tune the drone to best to use Carbon fiber props
Oh yes you’re right, the frame bolts gets loose with time. Yes it’s not that great of a frame, but does the job.
can we control using html ? for low range drone fly
Yes you can!
@@pratikphadte how about using esp8266 for drone. with mpu or bno055 as gyro ? can you share tips or tutorial?
bro i am making the same exact thing and I tested it but the esc just fried and started emmiting smoke also i am using the 2200KV motors with 11 inch propellers ...any change which could be helpful
Use a 1000 or 900kv motor
the higher kv(speed) the lesser prop length is required i think. As you need less torque when you increase speed. I dont know why the ESC is burning, maybe check ratings of motor and battery and select the esc?
Do not use PWM control, there is a nice library available for Dshot on esp32 based MCUs. It works much better!
I suggest to design a pcb with esp32 and sensors this will add more values in the copter design and have less emi emissions
Yeah I have been planning to do that but I don’t have that much of a time to work on it. But it’s a good idea. 👍
CAN U USE ESP32 4G GSM MODULE ? IF YOU USE ,WILL IT BE ABLE TO GET A VERY LONG RANGE ON THAT CASE ? IF THROUGHOUT THE WHOLE FLIGHT PATH THERE IS A GGOD 4G NETWORK?
Oh I haven’t experimented with gsm module, but definitely a good thought to increase range, thanks you for this suggestion!
@@pratikphadte welcome sir , I will wait for your project.
How much did this flight controller cost in total?
Only the Fc costs like 800 rupees
Bro what is the maximum flight time of your drone with the battery u use? in minute?
I think approximately 15mins
Can I program esp32 using my phone via Arduinodroid?
So that I don't have to use a computer because I don't have one.
You could do that I suppose, as we have that option for Arduino, I’m not so aware about esp32😅 but there could be a few solutions. Search on the browser 💪
@pratikphadte OK, thank you
Have you tried controlling drone using mobile??
No not yet, tried with a nano drone but didn’t make it perfect
Did you get this drone from India? How did they allow you through the airport?
@@manojkonar3969 hey Manoj! I got it dismantled and shipped it here via a separate shipping agency.
@@pratikphadte ohh nice move!
how are you sure that code has no errors and wont just fly to oblivion when u take it outstide
i personally have this fear
response appreciated like if u have some checks that you do for confirmation ,,
love your project
Good question, we put limits on the motor input values to prevent that, also we can infer from the Imu data if the drone is toppled so that we cut off the propellers. There are plenty limits you could put, that’s why a standard ardupilot or px4 firmware is always better!
Thank you for your kind words!
@@pratikphadte thanks could you make a separate video for that🙏
@@avirupsaha4701 yes I will think about it. Fail safe for drones is a must.
use betaflight configurator
I believe there is a GitHub repo that does that, might experiment.
Ei man I am doing something similar, porting the esp-drone to a custom flight controller I made. If you want to know more, reply to this comment! 😊
Thanks
Bro if i subscribe the premium video for 1.5k rupee, could i talk to u in instagram or patreon... Or ill have to pay seperatly for patreon?....
We can discuss that on the mail. No separate payment. Only via RUclips.
@@pratikphadte im going to subscribe u in patreon, utube is expensive, ill reach u next week
Please communicate via email