A mate and I are building a drone for our school project. The drone is Arduino R4 WiFi based and the goal is to make it fly (first of all) and have it detect obstacles and make it fly around them. We've been messing around with an MPU6050 gyro/accelerometer but we've encountered some issues with it. For one the measurements aren't accurate and it's very hard to program with, we also can't get any yaw values from it as you'd need a magnetic field sensor with it additionaly.
We're mounting our components on the Plastic Beast from Thingiverse, a 3D-printed frame with an X-configuration. The motors we're using are the Emax RS2205's controlled with 20A brushless ESCs on BLheli_s interface. This is all powered by a 3S LiPo battery which we're directing through our power distribution board. The obstacle detecting will be done with HC-SR04 ultrasonic sensor.
With the MPU acting up and the deadline getting closer and closer, we've opted for going with a flight controller, saving us a lot of work and allowing us to focus on our actual goal. We are however rather inexperienced when it comes to flight controllers, programming and finding good components. We're situated in Europe, looking for something compatible with Arduino and it can't be too expensive. We've seen controllers ranging from €15 to €150, we'd like that number to be on the lower side of the spectrum, anywhere around 20-30 would be optimal.
We are looking forward to hearing your suggestions, and thank you in advance.
I can only read this far right now, but you do not need a magnetic field sensor for yaw. That you have come to this conclusion calls some things into question.
The gyroscope in the IMU is the only thing without which you cannot do. As far as flying goes. For a autonomous GPS directed or even an obstacle avoiding quadcopter, the accelerometer will also come in handy.
The MPU6050 is relatively old technology. I suggest using something modern. I have no specific part on my fingertips, I will try to check later but you know google is your friend.
If you want to fly rather than all the other things that must be done in order to fly, you could use a purpose-built quadcopter FC board running an open source flight control program.
Betaflight is mature and will have you in the air with very little trouble following well-trod paths.
That would still leave the Arduino to do some control mediation based on anything you had it doing - flight path, obstacles and so forth.
Designing, building and programming a quadcopter is, as you are discovering, not a small project.
I'll take a peek at that frame, but you could tell everyone what the material is, the wheelbase, what propellers you have chosen and your target all-up-weight.
We’ve deduced from the research we’ve conducted that you in fact do need for example a magnetic field sensor to acquire accurate yaw values. The yaw values are calculated based on a reference point in space, the North Pole in case of the MFS. We’d like for our values to be more accurate than what they’d be with the MPU6050 and as you’ve said yourself, it’s dated tech.
Thank you for suggesting Betaflight, it’s something we can look into. We’ve tried googling but have found very little information about Arduino compatible FCs, that’s why we’ve come here.
Our mind is now set on using an FC, our deadline is drawing ever nearer and we can’t be bothered with more technical difficulties. I will add the frame specs to this reply later, if you deem it absolutely necessary for proper FC selection.
No. Any modern FC that runs Betaflight shoukd be fine.
If you have room, the ones that fit 30.5 mm corners are easier to work with.
Make sure it is able to handle the full battery voltage you plan to use. These days most will work up to 6s, but be sure.
Also there are details about what connectors there are or whether you solder stuff on or not.
And of course there are FC boards that go way beyond, and get spendy, that have other electronics on the same board.
This from getFPV
is the kind of thing I have in mind.
You can get ESC boards that do four motors, and make the electronics into a stack. You'll see stacks if you poke around the electronics section at getFPV or racedayquads, both places I shop fearlessly.
I've always used separate ESCs mounted on the arms, mainly to make a blown ESC a little less painful to repair… one broken ESC on a 4-in-1 board and you looking at replacing the hole thing, although I did one repair of such a thing just by using a separate ESC for the busted part of the 4-in-1.
Your FC should and almost certainly will have video in and out, so it can paint your OSD informations over your camera view.