|Terms of service|
|Let's keep it simple
YMFC-32 | The Arduino - STM32 quadcopter | Update
This page contains the full script that I used for making this video.
This is the YMFC-32 quadcopter that I have been working on for a couple of months now. It's a follow-up project of the Arduino based YMFC-AL quadcopter that I made earlier. And Yes, I have a GPS installed on this one. But more on that later.
The main goal of this project is to create a fully autonomous quadcopter that can hold its position without any inputs from the pilot. When finished I will post the code for free on my website. Same as I did with the YMFC-AL
......and the balancing robot that you can see here. This, by the way, was also a very interesting and educational project.
Please note that I'm not trying to make a fantastic flight controller. My goal is to make the code as simple and understandable as possible so everybody can use it as a reliable source and try to improve the code themselves.
A lot of my viewers already made the YMFC-AL as a school project for example. And that motivates me even more to finish the YMFC-32.
Some months ago I already got the YMFC-32 to fly with the auto-level function. As you can see it works very well. I will put a link to the full playlist in the description.
On my website you can find the code that I made, a list of materials and a detailed build instruction. And you can also download the STM32 for Arduino add-on that I used.
In this video I would like to give you a quick update of what I'm currently working on.
A lot of my viewers requested a GPS-hold version of the YMFC-AL. However the YMFC-AL is an Arduino based quadcopter and the ATMega328P is not powerful enough to handle all the code.
That is why I switched to the cheaper and easily obtainable STM32 BluePill. And thanks to the work of Roger Clark and the volunteers that helped him the STM32 can simply be programmed with the Arduino IDE.
Ok, so what is needed to get the YMFC-32 to fly autonomous.
First we need to make sure that the quadcopter can level itself. And if you have seen my previous videos you know that this is already working.
The second step for autonomous flight is an altitude hold function. This function will also make further testing and tuning much easier.
One of the things that is essential during test flights is a reliable telemetry system. So let's put that on number tree.
The fourth step, and the most forgotten one is a compass. As you might already know GPS coordinates are given from north to south and west to east. Without compass the quadcopter has no idea of its heading and it cannot hold its position.
And with the compass available we can also create an head lock mode. This means that steering left will always make the quadcopter go left regardless of the direction of its nose.
And finally on step five we can work on the GPS hold function. This function will hold the quadcopter at the same GPS coordinates when the GPS hold function is activated.
Ok, in the past moths I already got the altitude hold function to work. In my humble opinion this is one of the most difficult functions to program. But, as you can see it's working quite nice. To keep the code as simple as possible I only used a barometer for this.
After that I start working on a telemetry system that allows me to see the flight mode, errors, battery voltage and a battery alarm, flight time, altitude, heading, maximum altitude, roll and pitch angle and total flight time. And when needed I can always add more functions in the future.
Next thing on the to do list is the compass. And yes, this one is also ready. To get it to work I used one of these GPS modules that are normally used for the Ardupilot. These modules are easy obtainable and relatively cheap.
And now that the compass is working it's also possible to program the head-lock mode. At startup the heading is stored. During flight the controls from the receiver are converted based upon the current heading and the stored heading. And as you can see the heading-lock also works very well.
The next thing on the to do list is the GPS-hold function. This is the part that I have not finished yet. But as explained in the beginning I'm really motivated to get it to work so other people can use this code and improve it for their own purpose.
But still, the most time consuming part is making proper videos where I explain the implementation of the various functions. However, I'm currently working on the altitude hold video that I hope to release in a couple of weeks.
Last thing that I would like to show are these PCB's. I have these made so I don't have to manually wire the prototype board like this one. I can now solder the BluePill, MPU-6050 and some headers directly on the PCB.
The headers will make it much easier to connect the ESC's, the barometer, receiver and the GPS module. And of course there is also a connector for the telemetry system.
The main difference is that this board uses a PPM signal instead of 6 individual PWM signals. But this will all be explained in individual videos.
And that wraps it up for this video. If you like this project please give this video a thumbs up. Thank you for watching and see you next time.