Programmed Flight Arduino Quadcopter

I have recently started a new project, I have been doing tons of research and have learned a lot so far. My idea is to created a quadcopter, that has a 9 Dof Sensor stick SEN 10724. That can control the quadcopter and keep it level. I am going to use an arduino uno as the flight controller. I also have ordered 4 multistar esc and 4 brushless motors. I have already found a great code on git hub, that is supposed to be a self leveling system for my exact sensor. The problem I have right now is I don't know how to code my arduino, so that it will run the motors through the esc. I would appreciate help on figuring out how to program my quadcopter to fly just using code, not a controller, that will still use my SEN 10724 sensor stick. I will also post links to the code I've found and my parts list. If I get this to work I will be the first person in Fab Lab Stoughton to create a quadcopter. :slight_smile:

Stoughton Site-Sign in - Google Accounts

My Site-Sign in - Google Accounts


Arduino Uno-
9Dof Sensor Stick-
ESC Program Card-Radio Control Planes, Drones, Cars, FPV, Quadcopters and more - Hobbyking
Multistar ESC-
Cables for ESC-https:

Has no one really tried to do this?

My son and I are doing something similar with a Mega 2560. It's unlikely that you'll find someone using exactly the same combination of parts as yourself, but some of the stuff is pretty similar between devices. A snippet of code that helped us get our escs going was here.

Has no one really tried to do this?

Thousands of people have done it, and there are several open source projects that provide hardware and software. I'm astonished that Google didn't find them for you. Look for DIY drones and Arduplane as starting points.

Ok, thanks so much for the reply, I will search Google some more. Right now my problem is getting the quadcopter to fly, like moving left right forward backward, but still using the 9Dof sensor to keep it level.

Right now my problem is ...

That's hardly surprising, because it's an extremely challenging problem which has taken people years to solve. Fortunately, now that it's been solved you don't have to reinvent that particular wheel.

I have just made a huge jump in the programming of my quadcopter. I just found this software called MultiWii, Basically what I've found out is that it will turn my Arduino into a flight controller, I am pretty sure I will need a transmitter to use this software, I also don't know if it is compatible with my sensor yet. Let me know what you guys think.

If that's a 'huge leap' then presumably you haven't researched DIY drones and Arduplane yet.

How am I supposed to use DIY Drones, their software isn't compatible with my arduino. Also how does Arduplane have anything to do with a quadcopter?

How am I supposed to use DIY Drones, their software isn't compatible with my arduino. Also how does Arduplane have anything to do with a quadcopter?

DIY Drones is a very active community focused on the development of DIY drones. You're asking for help making your own drone. The relevance should be obvious. There are several open source autopilot projects such as Arduplane, Arducopter that you should make yourself familiar with. The basic concept of how to read sensors and apply a feedback control algorithm is similar, and separate from the issue of how you go about controlling the airframe (i.e. by varying the speed of lift motors, or moving servos etc). For example you can use this code as the basis for controlling a ground vehicle, by making relatively small changes to tell it how to control the speed and direction of your particular vehicle (i.e. by turning wheels or moving legs).

How am I supposed to use DIY Drones, their software isn't compatible with my arduino

Haven't you discovered the Ardupilot project yet?

You listed a set of propellers that are inappropriate for a quadcopter. You want the "slow fly" ("SF") propellers that come in packs of four, two of which will be RH and two LH ... and then you'll want to buy three or more packs - DAMHIKT.

On a quad you need two of the props rotating in one direction and two in the other direction. If you don't have that then your copter will yaw uncontrollably.

Also suggest you consider a power distribution board for the ESCs instead of the cables. Half the weight and a lot more organized.

I still don't see how to use ArduPilot, that software requires a GPS, which I will not be using, that software appears to be for autonomous flight, I want to do either programmed or r/c flight. Right now I am experimenting with multiwii, I am having issues getting the sensor to communicate with the GUI. I realized I need to give the arduino code to run, duh, I will be testing this more tomorrow, here is the site I found it on.

I will look into changing my props if they have to be slow flying, but if you look closely at the picture, that pack comes with 3 clockwise and 3 counter clockwise props.

While going through the setup for the code to use the multiwii GUI, I have just confirmed that all 3 of my sensors on my 9 DoF sensor stick should be compatible. The only thing I should need now is a r/c controller that is compatible with my setup and the multiwii.

I have run into another problem, I need to get a r/c transmitter hooked up to my arduino, let me know if you guys have a link or way to do it. The transmitter needs to be under 100$.

I get the impression that you have got a very different idea of how this is going to be controlled than I am imagining.

Given what you’re trying to achieve, I think that what you want is an onboard autopilot which manages the onboard IMU and implements the closed loop feedback algorithms needed to maintain stable flight. Then you have either an external controller, or an internal pro-programmed sequence, which directs the autopilot either in terms of positions, or attitudes, or speeds, or whatever other level you want to control it at. If you use an external controller, I don’t think you want to be thinking in terms of providing real-time direct control over the lift motors to stabilise the vehicle yourself.

Based on my understanding as outlined above, the hard part is managing the sensor inputs and doing the complicated math to implement the feedback controls. The autopilot projects mentioned in this thread all address that problem. Implementing your own solution from scratch would be a massive undertaking. Trying to fly a drone without one would be a recipe for disaster unless you already have experience of flying drones and know you are able to take direct control of the drone. The commercial multirotor drones that you’ll have seen in the last few years all provide onboard autopilots - that’s the only reason it has become practical to fly such small and unstable vehicles.

Using a standard bought RC transmitter/receiver pair to carry a signal from the ground to the vehicle is not especially difficult - you would connect each output channel from the receiver to a different I/O pin on the Arduino, and measure the length of the incoming pulse.

If you want to have your transmitter transmit signals from some other device instead of joysticks built into the transmitter I suspect you would need to use a transmitter with a teacher/buddy input, and send the ppm signal from whatever remote controller you plan to use.

Really questions about that sort of thing should be aimed at a DIY drones forum, not the general Arduino forum.

If any of you guys see this forum post, or are still interested, you can check out this form, RcGroups. You can see all the success I am having, if I stay on track, the body should be printed by next week, and test flights will begin. :slight_smile:

Have you considered the Ardupilot and Arduplane setup?
(it's the same name for quads, heli's, buggies, and planes)

I have used this for a few years and now there is a 2.6 upgrade making this even more awesome and capable. I use it for full autonomy in my quads, plane, buggy and boats.

Get the full setup with the uBlox GPS and you will have amazing accuracy to less than one meter.

Out of the box this works great with the APM programming GUI and is very hack-able with your own code as well.

It's a pretty solid way to go and saved me about 5 years backlog to just buy into this setup.

JR :money_mouth_face: :roll_eyes: