How to build the YMFC-32 GPS hold quadcopter - With free Arduino code and schematics
HTML-код
- Опубликовано: 3 окт 2024
- In this video I explain how to build the YMFC-32 autonomous flying GPS hold quadcopter. You can download the free Arduino code from my website.
The YMFC-32 is a very simple and easy to understand Arduino project that will help you to develop your own autonomous flight controller. Because the code is fully explained in various videos and kept as easy as possible, everybody should be able to further develop this code.
A detailed build tutorial can be found here:
www.brokking.ne...
The complete YMFC-32 playlist:
• YMFC-32 | a DIY 32-bit...
Setting up the Arduino IDE for uploading programs to the STM32:
• Getting started with t...
About my test quadcopters:
www.brokking.ne...
You can download the free Arduino code here:
www.brokking.ne...
Compass calibration:
• YMFC-32 - Compass impl...
Tuning the YMFC-32 settings:
• Tuning the YMFC-32 set...
Your project is getting an amazing shape. So much to learn from these videos. Thank you!
Electronoobs plz make such a arduino gps drone as I can understand u bur not this shit
Thanks Electronoobs
SAHNI 8055 As I explained in my video "If you are looking for fun and easy, stop watching" Hope you did.
On this topic, Joop knows way more thay I do...
I respect your hard work and efforts and your intelligence but u need to improve your teaching skills a bit😊
No more Netflix, only RUclips movies about the possibilities of the STM32 by Joop Brokking. Really amazing job. The last one was even fun to watch, because of the fun. Haha, keeps your mind in control to understand it all. Thank you again for this learning process.
Finally! You did it ... even you could not! You yourself one of the best when it comes to low cost drones! God bless your intelligence and charity Joop! A big hug!
Honnestly Mr Joob, we must all pay you back for all the videos and the hardwork u made,
Please check out my donation link here: www.brokking.net/donation.html
A great respect for a person like you who share his time and knowledge to those who wish to learn but can't have the enough time to learn it in school, don't have enough money to have things and don't have a good teacher but only the internet. I don't have any background in education about computer programming back in the days but with a person like you I can understand now at least a bit about programming like arduino. Thanks a lot and keep up the good work.
Hi, I have built your YMFC-AL last year. You are doing such a great job. Thank you.
You are really amazing. That word gets thrown around too much, but I am truly amazed. I just finished the YMFC-AL. I wanted to pay you, so I clicked the donate link only to find you're even more of an awesome dude than I thought.
Thank you for your work! I used it to build a self flying drone for my scool project and got rewardet with the best grade possible. The documentation allowed three 18 year olds to develope an own variant of your quadcopter, which confirms this series value. Our formal goal was to build a "pollination" drohne and endet up with a quadcopter that tilts to a circle. Nevertheless i am proud on the outcome and thankful for your help. I am just at the beginning of learning and wish to continue. Thanks for making the beginning as smooth as possible :) ~Tim
Hey I need help ,please contact if you complete the autonomous drone already...the website is down and there no aid ..
Thanks for all your hard work Joop! I have been looking forward to seeing the outcome of your 32 bit project. Your video series has been such an excellent learning tool.
Finally! You did it ... God bless your intelligence and charity Joop! A big hug!
yeah , Finally I made it. and It is flying robust...you are just great...I hope i could say thanks to you.. Many many love from Bangladesh.....
Thanks for releasing this. Just put your previous YMFC-32 together and I really like it!!!
Hi Joop. Do you plan on adding waypoint capability to your next build?
Hi Joop. You consider teensy 3.6 for your next build? It's an F4 arduino board.
These videos are amazing !!!
A nice feature would be to detect the % of battery left.
If the battery reaches a certain lvl, the drone makes a save auto landing.
Good for if you lose control of the drone high up. -justr wait for the battery to run out
and it making a self land on flat and open space with some juice to spare.
Also a nice feature would be a way to clap your hands or (button) and then open your palm, so
that the drone finds it's way to your hand to make a landing on.
Thank you for all the effort and time Mr. Brokking.
Your videos are quite impressive and the amount of details shown on them is amazing. Congratulations and thanks a lot for sharing.
Finally!!! You are awesome. You inspired me since 2016, and have changed the course of my life and interest significantly. Thank you so much for inspiring people with such great projects. :)
Finaly the code and all the configs. Lets burn the oil of midnight . Joop to convert the configs and test sketch to Processing would be another great job. Congratulations.
The great JOOP BROOKING......you are the best
Great Project, Well explained. I am just starting on the project to get upto this point but i was thinking of adding more sensors like ultra sonic and crash prevention sensors, Camera and charging dock where as the unit can land and recharge, possibly hopps from dock to dock, wireless relay between them etc. and lighting like on an aircraft etc. Also a weather dome would be good to protect the electronics from the rain. My thoughts where to set up docks on several roofs of my family that live several miles apart. The other thing i wanted to do was to be able to sit at home and set GPS coordinates to the drone and be able to see information via its camera. Other ideas i had where to add Audio alerts and small item evasion like cables and birds etc. Another good one would be to shield the blades as this drone looks like it can do some serious damage. I am just spitting out ideas for anyone to come up with. I am working on building a landing pad outside my window (I am on the 4th floor) and have it alert me that it has arrived. Maybe even tapping on my window lol. Keep up the good work.
You are a great master. Thank you from spain for your great job. I will construct your model for sure.
you seems like get a lot of comments about too complicated. But!! please doing these video! I've learnt so much from these videos!! Love ya
I will try to keep complex things as simple as possible ;-)
Really love the intro the set the curve.
Thank you for all your hard work and dedication. Your work is much appreciated and i hope you continue to improve on the project (adding camera ect..).
Thanks a lot for all the work you have put into making these videos. Really appreciated.
Had a problem with two different GPS/compass modules that I tried. The first was identical to the one you used.
To cut a very long story short, I got both to work by installing 4.7k pull resistors on the I2C connections. That sorted the compass problem. I built your circuit without the use of an FTDI adapter so that I could program the STM32 directly via USB but with the GPS/HMC module connected to the serial ports A2 and A3, I could not connect to the GPS. That was solved by changing 'Serial1' to 'Serial2' in your code. This was all done on the breadboard, just hope it works when built.
had you made it?
thank you brother ,you are not selfish like the other.this really helps us.
Thank you very much! And Goodluck for you, Mr. Brokking!
This is an amazing project! I learn a lot. I hope you still read the comments now and then....I have a question: in the video there is a third, i think multicolor led in the tail of the quadcopter. i can't find it annywhere in the scematics. I asume it is a 2 color led instead of the green and red one on the PCB? I don't see them working anymore in the video.
Again... amazing work. Thanks for sharing.
Thank you for this great project !!
Hi Mr Joob, finally it's done, autonomous quadcopter, really extraordinary work, however I do have a VERY IMPORTANT REMARK that you never talk about, it's about reprogramming (refreshing) the ESC's, means to increase its respond frequency. This step could improve remarkably the MOTOR"s behaviour and therefore the quadcopter behaviour. I THINK the ESC's (the yellow ones) that you used are refreshed (see 07:15). So, plz can you give us a comment (may be a video) about this POINT.
The Yellow ESC's are not reliable enough for flashing new firmware because there are various versions on the market. Flashing them with new firmware can easily ruin the ESC's.
I did however flashed the older DJI ESC's: ruclips.net/video/ZXkKc1Mhzxo/видео.html
But yes, fast reacting ESC's will improve the flight stability. I currently have two test quadcopters as you can see here: www.brokking.net/bain_test_quads.html
For one I use DJI E300 ESC's and this one flies more stable because the ESC's react faster and more precise.
I appreciate your answer, thank you
FANTASTIC!!!!! CONGRATULATIONS!!!!!
Finally. Thanks a lot for good explanition . Well done
Hi Joop,
I have built up the first YMFC-32 self leveling and fly's well. Now I have start on the GPS model hope to have finish soon, will let you know how it goes. By the one I have design my own PCB for the latest GPS drone project that you have completed and if anyone wants a free sample PCB let me know. Your projects are excellent
well done.
I would be interested in a pcb as I would like to keep the original soldered board for comparison and testing my flying being a noob pilot. I would also encourage Joop or yourself to make the gerbers available so others can order their own or for a group. I know you and he invested some time and thought in designing these. It probably doesn't make a lot sense to order as an individual but it is possible for a group to get enough to make sense. That relieves the hassle of shipping and figuring how many to order etc. Thanks for the offer.
Hi James I made also the first YMFC-32 self leveling and all work fine. Now I am having some issue with the last one, problably because is very difficult to make lot of connection in on the same side of the board. So, I would like to have your PCB if possible. Tks
nice work, a nice feature would be to add Esp8266 NodeMCU (wifi) and SD card. which would make storing various bit of data like PID, telemetry, ect. In fact once I get started on making this I'll add it, It looks like a great project to make.
Awesome project! I learn a lot with your videos with this project.
What is the maximum altitude the drone can obtain and hold?
As always Joop, Hats off🙌🙌🙌
thanks very much for sharing your project. I've learnt a lot from your videos thanks a lot.
Great video! Will a more advanced flight controller work with your code? Or just the YMFC-32 board?
You're incredible man.Thanks in advanced
Great project, decided to give it a go as I have a few of the exact same ST32 boards looking for work...
One question, I've gone for a different transmitter/receiver setup but they do support CPPM so they should work right?
Just to add (after reading some comments), the video and your site detail everything necessary to build the project... I very much appreciate all the hard work...
I'm not 100% sure as I have not tested the YMFC-32 with the CPPM signal. However, in theory it should work fine.
Thanks for video sir
I have one question
If we used NRF24l01 as tx and rx instead of ready to run tx and rx then what change in programming.
Plz help me .give suggestions
To build drone tx and rx using arduino nano,HC05 and NRF24l01
Hi Mr.joop, i am watching your project from the start and i must admit that i learned a lot of stuff about my hobby too. I am really happy that there is people like you that can teach you so many things...I got a question tho, i built it all like you everything working perfect but when i connect my gps everything freeze or going really slow.. Any thoughts? Keep your work is amazing, thanks in advance!!
Is the LED on the STM32 flashing as shown in this table: www.brokking.net/ymfc-32_auto_main.html#9.0
its blinking at 5hz, but just for a bit then every led is off, i tried motors too and its working in mode 1 but after 2-3 sec it still working but receveir is not responding...
@dhrutidhara behera unfortunately not i am trying to disable the gps from the code right now to see the results
@dhrutidhara behera yes i am working on it when i complete it i will contact you
while watching your video I wonder that why don't you use the receiver to power the arduino?
I mean battery connect to esc then esc connect to receiver from there we can drawn the power out without using any resistor?
Hope you answer me
Thank you a lot for sharing this amazing project and code, but I almost shat in my pants when you started the drone next to your hand without removing the propellers first at 7:15
Indeed ,you are write about this tutorial not nice and easy. A good reader and researcher is the person that can make this work. For me, I could not get two hardware ( receiver and transmitter , and GPS ) types so I had to make my own work by adjusting the code to accommodate my module.
So many things to learn ... Great project, wonderfull sharing
Hi Joop Brokking. I start working with Arduino a month ago. I'm an IT guy that worked on Linux and window servers. Today I hand change control for the data center. I took programming in college a long time ago.
Questions:
I want to build my quad copter. I watched your video YMFC-AL and taught you did a great job but then I saw this video YMFC-32 GPS & Return to Home.
My main goal is to get back to coding, improve the code and have fun flying the drone. Down the road I would like to make a 5 inch racing drone.
So do you still recommend making this YMFC-32 or is there something better?
If I get slightly higher speed motors does this impact your code?
How do you know how much power is required to purchase the correct battery?
Any books or sites you recommend on obtain knowledge so I don't waste time and money.
Thank you, Hope you continue making video...
Miguel
Hi, sir, thank you very much for your great contribution. Under your guidance, I just tested my YMFC-32 GPS hold quadcopter, everything works fine, GPS location keeps great, thanks to my great teacher.
In addition, I want to ask a question. Sometimes I can't turn off the motor when I turn it on. Thank you.
Too excited, I actually made a drone, thank you very much.I admire you so much.
Thank you for sharing your story and great to hear that it is working. Can you please tell me in what country/city you are flying. This would be of great help to me and the project.
If you can't turn of the motors you need to make sure that the throttle is set to 1000 when in the lowest position.
From guangzhou, China
Whether can add a key to go home function?
May I get your ymfc32 auto codes?. I have problem with codes of joop. Error 2, time loop exceeded..
Is the orientation of the compass relative to the quadcopter (like with the accelerometer) relevant? Or does it just need to be flat / horizontal?
Could you please link to some information about setting up the Flysky transmitter (and receiver) for this particular drone , this would be extremely useful!
Thanks for your countless hours of work and dedication!
The compass is in the GPS module and needs to point to the front. Check the GPS module for markings.
I added an overview on my website: www.brokking.net/ymfc-32_auto_main.html#4.3
And made a video about the FST6: ruclips.net/video/RPDRjUhy2l0/видео.html
@@Joop_Brokking Thanks for the answer!
I am using a separate compass and GPS module. I don't quite understand your answer, how do I need to orient the compass? Simply level in respect to the Drone or do I need to install it at a 45° angle like in the complete module (with the point on the IC pointing in the front direction?)?
Sorry for being not specific enough, I am using a Flysky FS-i6 Transmitter and I was wondering about how to set up the receiver via it's built-in interface.
Thank you for this great project !!
Thank you for sharing. And Godspeed
Thanks!
Great job , and what is the next? I recommend that an optimised PCB can be designed , it will effect flight time I think .
Do you think add something more? Or create a community to improve with contributions like betaflight?
Next steps will be:
- controllable when in GPS hold mode
- return to home
And as always: as simple as possible. But this will take some time. For now it's just as it is.
*Hey Joop It's really lovely project.*
thank you so much, I really appreciate your work, sir!
Thank you sooo much sir for all the knowledge
Joop, congratulations for your project !! Very good!! I am a Master's student in Mechatronics here in Brazil and I also developed an autonomous drone only with arduino and raspberry pi, your project helped me a lot in the development of my drone. Now I wanted to ask some questions / suggestions for future implementations in your project.
1 - Is it possible to use the neo6mv2 GPS instead of the Ublox M8N? I ask this because neo6mv2 is easier to find at a more affordable cost.
2 - An idea I am suggesting is in future versions to use a Esp8266 for the telemetry system since it can send the data directly via WIFI to the computer! It would be a new challenge! What do you think? And the APC220 modules are very expensive at least here in Brazil.
Thank you very much for sharing your knowledge! Congratulations!!!
1) In theory the NEO-6M should work. As explained in my GPS video it needs to accept the ublox protocol. I used an LEA-6S in the past and it worked great.
2) You can use any telemetry module you want within the following limits:
- The voltage on pin B0 cannot exceed 3.3V.
- The communication speed at both the telemetry receiver and the flight controller must be 9600bps.
- Use the Arduino protocol for start- stop- and parity (8N1).
As you can see you can modify this project very easily. The reason I use the APC220 modules is because they are very reliable at long range and easy to implement.
Hi @Leonardo,how are you?May I get your email ID or wechat or something to discuss further?
Really like your project a lot Joop! Thank for sharing knowledge.
Even I still have some problem with YMFC-32 but I plan to do YM FC-32 auto too. For YMFC-32 auto you mention about signal converter PWN to PPM. For this part I don't understand it well. As I saw the schematic I didn't see any part of this PWN to PPM converter circuit at all. if I use FS-iA6B receiver so I don't need that converter right? if I use FS-iA6B receiver instead of FS-R6B receiver can I still use FS-T6 as transmitter?
The FS-iA6B does not work with the T6. A full description for the PWM to PPM converter for the R6B can be found here:
www.brokking.net/bain_pwm_to_ppm_for_r6b.html
Thank you so much! Hope to get hardware to work on this project soon!
Sir your project and videos are amazing also I have seen your ymfc al quadcopter and want to but also I can't fly it because I don't know how to control it
,in your website I have seen always to take off after turning it on I also do the same but still my drone at the lowest throttle starts flying or sometimes it remains on ground but goes here and there please help also can I use neo 6m in this project of this video
Thanking you
Hi Joop, Thank You for the great detailed build of this quadcopter. Have watched and read your build details for several hours now. Am going to start purchasing components to build identical setup. Have learned much electronics and getting fascinated by this.
Question: Shouldn't it be possible to get a very rough idea once your build is complete, to do a bench test,, , or outside test, drone weighted down of course to calculate how much flight time you are going to have with say a 3000mah battery , by simply doing a current draw with a multimeter inline with props running say 50% power for maybe 5 minutes ,just to get a balllpark figure? I realize there is nothing like 'real world' figures,but is my theory , way off? I am going to add camera for videoing capabilities. Is there any way possible to get 25 minutes flight time out of a drone this big? Thanks again. Barry
Joop sir, you are a great person...
"if you're looking for something fun and easy, you can go and watch a different video " .
That's a wonderful project. Thanks for your labors. Can you prepare a user manuel in simply sape to use for this project?
Thanks...
Hiiiiiii Joop I'm a big fan of your work! I'm a junior high student and I also want to create this drone for my school project. But the codes you put on the website are not available :
Thank you so much for share your valuable knowledge with us!! recently I made a flying wing, is your code is possible to use for fixed-wing airplanes? or do you have any suitable code for such an application?
Has the drone unit been assembled so where can I get it, how much does it cost?
Awesome videos , keep up the great work , i would like to ask where can i find the code for the normal STM32 quadcopter ? not the autonomous , i checked your website but on the download section for the normal stm quadcopter there is no code zip file .
Thank you
Hlo sir I’m having problem with the battery voltage
It is showing 12.0v even when battery is full 12.6v
I used exact same schematic as of yours
And because of that battery warning is coming early.
Must I use this framework for my drone
Woohoo! Yippee!
Graag gedaan Bobby Richardson
Hi joop,you have done exceptional work you, deserve congratulations.
I want to ask you this, in your code you have set the limit of the pid output in 400.
How does this value came up?With what criteria was chosen?This value has to do with angular velocity,with transmitter,with what?
How do we define this limit?
Thanks.
This will limit the PID output. So it will never exceed +/-400. This value was chosen because under normal circumstances the PID controller will not exceed +/- 400.
Thanks for the clarification.
I still have a question, you write "pid_i_mem_roll += pid_i_gain_roll * pid_error_temp;" the I term is usually calculated "pid_i_mem_roll = (pid_i_mem_roll + pid_error_temp) * pid_i_gain_roll ;" there is some reason you do not write it like that??
I ask you why he worked a lot better in me writing "pid_i_mem_roll = (pid_i_mem_roll + pid_error_temp) * pid_i_gain_roll ;".
Hi Joop,
Is it possible to connect to/use the inbuilt telemetry of a Taranis 9xd plus? I'd love to start this build but it'd be a waste of time if I had to build the telemetry... Love your channel - loads of new info! :D
Great videos. I made this project and even made a PCB board for it. I also made a version using a Maple Mini (since I was having difficulty programming the Blue Pill Boards). Problem is that neither version will consistently display the data on the serial monitor when running the setup program. I have tried on Windows XP, 7, and 10 machines with little success. And when I do see it on the Serial Monitor, sometime it doesn't move to the screen to test the functions as if it isn't communicating with the receiver (even though the receiver is connected and in PPM mode). All pathways on the board check out with continuity test and are in agreement with your schematic. I've tried many boards. Any ideas? Should I use a MacBook?
love the video
Yo i am finding it hard to follow the schematics can someone help me
nice job joop !
i wish that is arrives the level of world professional level
Great video.
I can't find the video on where you assembled the robot
The HardWire library itself is not included in the file, which is confusing. How did you solve it?
I have a question about the power supply in your YMFC Al drone. If you are using lipo 3s 30c, its max output voltage is 12.6V which is more than the max input voltage rating for Arduino UNO. So, how did you manage it? What can I do to prevent it from damaging my Arduino UNO.
Great job! You said this drone is autonomous and have a mode called "GPS Hold". So, can I set a route and, in this mode, the drone will fly autonomous following the commands that I have set previously?
I will shortly upload a video that will show that kind of feature. Please watch my channel the upcoming days.
please suggest alternate of ACP220 or can we use NRF24L01?
Time to learn again something new
Did you bought that frame or did you print it ?
Hey Joop,Thanks for your excellent videos.I built a YMFC-AL quadcopter based on Arduino Uno and works fine, but I have problems with the new one based on YMFC-32 video tutorials.I have checked all the hardware functions as explained in the video uploading the hardware test program to the STM32. During startup and flight the quadcopter is extremely unstable. I changed PID settings but this behavior remains. Any idea about it? and thank you again for this learning job.
Hi, Joop. Nice project. Thank's for shared. I would like to know if there are big change in the project if i put a Neo-6m + a module hmc5883l?
... or own M8N GPS but without module compass built-in because here where i live it's easier to find it.
Sir can u please make a video on how to create serial to i2c module for GPS which is compatible with multiwii
Hi Sir, can we use two GPS to improve the positioning accuracy to 50cm?
thanks bro this what I'm looking for, why not put on git or another subversion bro?
Please reply , can I make my non gps drone to gps drone?????
I am confused, what does the GPS module do again?
Does it have a return home feature?
Joop, many thanks for your splendid work, once again !! Just a little question about the LEDs. In the video (@7:55), we see three leds, a green and a red on top of the board and a (multicolor) led on the side. This led does not appear in the schematics.... Did you replace the red and green led by one multi/bi-coloured ?
Yes, I used a multicolor LED for better vision from the ground. The red and green LEDs are disconnected.
@@Joop_Brokking Thanks Joop for the quick reply
I wonder the phantom 4 pro have stereo vision sensor would this processor is that much fast to able to catch the motion and can be implemented in your ymfc autonomous flight controller?
Why is the MS5611 barometer not listed with the other components in the bill of materials for the flight controller? Or is it listed elsewhere and I have just over looked it?
hi joop, thank you for awesome serials videos. i learned a lot from them, it takes my hat off. but here has one question, my RC not supported PPM mode sending to my receiver, so can i use bonding other PINs to solve this problem? thank you again!
No, the YMFC-32 autonomous only supports PPM signals. You can buy a PWM to PPM converter.
Don't use software serial as it will mess-up the interrupts. You need an PWM to PPM converter to get it to work.
Joop Brokking got it, thank u sir.
Hi Joop, started building this version and all looks good. With everything but the esc connected - just on test board - I don't have the Telemetry coming in... Is there a way tot test the telemetry procedure ? Many thanks
I can’t figure out why the telemetry does not work.... When I use Joops ‘serial’ code in a small test program ( same hardware) it works ( i can see the correct output on a serial monitor on tx RX side) but the same code in the flightcontroller and it does not... When replacing Joops code by a single serial.write the telemtry works ??? Can it be a timing issue ? How to troubleshoot... I’m already using a logica analyer but I don’t see any light in the tunnel... Some ideas ?
I have all the parts put together to build this excluding the electronics. However I will be using FrSky SBUS so how can I post my changes to your code? I was expecting a github repo, not a zip file.
Also I'm in the U.S. so have ordered some 915mhz UART comm's Lora modules to use instead of the APC220, so I will make changes to the telemetry code also.
You can start your own Github with the changes you made. Make sure to add a link to your source that you used (YMFC-32).
I'm not using Github but I will further develop the code in a simple and understandable way.
Come on, go on...
Realy loved it.
Can i get your permission for copying your code to my project sir?
Thanks before, i'am very noobs for this kind,.
Regrads
Excellent
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?