Terms of service
Brokking
 
 
.net
Let's keep it simple
 

 
   Home
   Projects
 

   Articles
 

   Donation
         
 
 
 
 

 
Brokking.net - Video: Building a new frame and flying waypoints - YMFC-32 Arduino drone

Building a new frame and flying waypoints - YMFC-32 Arduino drone

Hello and welcome to another one of my videos. In my previous videos I made this, the YMFC-32 autonomous flying quadcopter. The YMFC-32 is a flight controller platform that I programmed with the Arduino IDE and uses an STM32 microcontroller.

And as you can see it's all build together on a basic frame with open electronics. So basically one well targeted raindrop can bring it down. Now, there is nothing wrong with this frame and it flies fine as you can see here.

However, I was wondering if it would be possible to find a more professional looking frame that I could use as a base for the YMFC-32. So I started my search on the internet and after a while I found this. The upper and lower part of the Hubsan X4 Pro. After some research I found out that this quadcopter almost has the same outside dimensions as my Phantom 4.

So I started to look for more parts to make the frame complete.

In short I needed the upper and bottom shell parts, landing skids, this plastic thingy that goes in the front and these light covers. Together they cost me around 50 euro's.

And that is what I ordered.

Together these parts weight around 320 grams. That is approximately 50 grams more than the basic F450 frame.

The frame comes without any screws as it is a replacement part. If you want to put this frame together yourself you could do this with the metric screws that are also used for the DJI F450 frame. I had some spares laying around and they fit nicely.

But first I had to figure out how to put all the pieces inside this small center piece. As you can see, it doesn't offer a lot of space.

First challenge was to figure out where the flight controller should go. I wanted to use this printed circuit board that I have made earlier to save weight and space.

Now there is still some room above the batteries but it's very limited.

First things first, I needed a base plate that I could fit above the battery. So I created this baseplate in LibreCad. After some paper test fits I made it from 1mm carbon fiber on my Stepcraft router.

And now it's time to test fit the PCB with the use of 10mm standoffs.

This worked out great and it was time for the second problem.

The batteries that I normally use will not fit this frame as they are way too long. Another problem is that the sides of the battery compartment are spaced 47mm apart and that the maximum length of the battery is around 120mm.

Long story short, only the original 7000mAh Hubsan battery will fit nicely and I could not find another battery that would fit this frame.

However, I didn't want to order this battery as I always try to get my batteries locally. I might try it out later but for now I was searching for an alternative solution.

Ok, it's time to think creative...

The solution is actually quite simple. Two 2200mAh batteries will fit this frame nicely as they almost have the same dimensions as the original Hubsan battery.

With a piece of shrink tube and some soldering I needed to connect these two batteries together so I can charge and discharge them as one.

The weight of the finished battery is approximately 331 grams.

With 600mAh more it's only 24 grams heavier than this 3800mAh battery. So that's not bad at all.

I still can't believe that the original Hubsan battery is even 2600mAh's more in almost the same package size and weight. I really have to try these'in the future.

But for now I will fly with these self-made batteries. And as you can see it fits perfectly.

With the flight controller PCB and the battery in place I will now focus on the motors and ESC's.

The motors that I will use for this frame are the DJI 2212 920kV motors from an E300 power set. These motors fit perfectly and run very efficient in combination with the 9443 props.

The ESC's that I will use for this quadcopter are these Little Bee 20A OPTO's. I also used these for my octo copter and they work very reliable. They are also very light as you can see here.

After some test fitting it was time to solder everything together.

For the main power supply to the ESC's I used 1,5 square millimeter or 15 American wire gauge silicone wire.

With the main power supply in place it's time to start working on the flight controller PCB.

To safe some weight and space I'm using this small PPM receiver.

Because the ESC's are OPTO, meaning that they don't have a battery eliminator circuit, I need an external 5V power supply. For this I'm using this small 1 amp 5 volt voltage regulator.

Last thing that I will add inside the center piece is the MS5611 barometer. As explained in my YMFC-32 videos I will use the 3.3V I2C bus connections.

And with everything installed it looks like this.

Because the inside is completely full I needed to place the telemetry transceiver on one of the landing skids. Not a very elegant solution but for now I will leave it as it is.

Ok, very important.... the GPS module.

When you buy the original Hubsan X4 Pro the GPS module is inside the frame. And the compass is tugged away in the landing gear.

The GPS module that I want to use has an onboard compass module.

If you have watched the YMFC-32 build videos you know that the compass can be influenced by high current wiring.

So, long story short, I will mount the GPS module on top of the frame away from the high current wiring.

After some thinking I came up with the idea to use a small aluminium standoff.

And finally, this is the finished work.

Time to upload the YMFC-32 autonomous software. To get to the connections on the PCB I created an extension connector.

I already tested the hardware with the YMFC-32 test software so I will step right into the flight controller code.

As a starting point I will use the same settings as for the F450 frame. Very important, when using the YMFC-32 autonomous software for the first time you need to set the manual throttle to 1500. This will disable the auto take-off function and you have full manual control.

On my website you can find detailed information about the YMFC-32 flight controller, including schematics, a detailed built tutorial and all the needed Arduino software.

After calibrating the compass and the accelerometers it's time for the first flight.

And I was very impressed. Without any modifications in the software the YMFC-32 flight controller performance is very good.

Now that I know that everything is working correctly it's time to activate the auto take off detection and do some further testing.

As you can see here I'm using the Flysky i6S for this quadcopter. The main reason is that it has a self-centering throttle stick. This makes flying a lot more relaxing as it always returns to the center position after changing the altitude.

Ok, time for the final test. I will activate altitude and GPS hold. I can now start the motors and release the throttle stick. The quadcopter will automatically take off and start to hover.

Well, everything seems to work.

My laptop also has an telemetry transceiver. With my own flight monitor program I can check various parameters and the location of the quadcopter.

Don't worry, I will explain this software in another video as it has some nice features like flying waypoints.

For now I will use the waypoint click function. This means that I can click on the map and the quadcopter will fly to this location.

And there it goes.

And now I can toggle the return to home switch and the quadcopter will automatically fly back to the home location, land and turn of the motors. I have already shown this in my other video. Because I have not tested this with this new frame I will not perform an auto land and deactivate the return to home when it arrives at the home location.

Ok, I think it's time to finish the video here. In the next video I will explain the software that I made and show the waypoint features.

Thank you for watching and see you next time.