Hi, a group of us are planning on building a quadcopter as a final-year CS project with Arduino. I've been looking at many guides and videos and it seems doable with a certain learning on our part. However, I want to take it beyond it being 'just a toy' kind of project to something beyond. I was thinking maybe to make it communicate with other robots or electronics (computers, a ground-based bot, another quadcopter etc) and involve a certain degree of autonomy to it. (Continued)
My idea of autonomy wouldn't be anything Skynet-like (I guess that's a little beyond my skill and capacity for now), but something basic, like following a certain path in 3D space, avoiding obstacles, landing safely when battery is low etc. However I'm unable to find resources regarding how I should go about it. Can anyone help me with this? Or has anyone done this before? Would be great to have someone experienced help.
To program a quadcopter, you would need to learn a bit about flight mechanics and how you can influence the degrees of freedom you have. I'd suggest to get the quadcopter flying while using a joystick before you continue on with more difficult stuff, such as autonomy. Maybe look through http://www.st.ewi.tudelft.nl/~gemund/Courses/In4073/index.html It contains notes for a course centred on programming a quadcopter
I have done parts of this before... not sure of what part is problematic for you, but I'll start from the beginning. First of you need to have the rotors working in pairs this will help dividing up the stability in 2 simple axies and will help the quadcopter from spining out of controll. Next you need to make sure that the pairs are spinning in different directions, so that pair A is spinning clockwise and pair B is spinning counterclockwise, this is important because if all rotors are spiining in the same direction the quadcopter will start rotating. Next to the programming of the arduino you will need a PID(Proportional Integral Derivate) controller to keep it stable. this is quite easy to program. keep an integer with the angle you want the quadcopter to be in, could be anything from 0 to 1023 so hold the quadcopter in a stable angle and read the inputs of the gyro/acellerometer keep another integer/double for the integrative part keep one last integer for the previous error angle(|readvalue-stablevalue|) then for the controller: return the current error(|readvalue-stablevalue|) * a constant for controlling the strength of the proportional part + (|previous error - current error|) * a constant for derivative strenght + integrative part(add the error to this during every cycle)* a constant for integral strength; another good thing to note is that you need to have a fixed cyckle time to this. oh and you should have a throttle part as well, so that the motors get the PID value + the throttle. and to make it spin you simply reduce power from 1 pair and increase power to the other pair. Hope it helped..-
@slotema: Yeah, that's what we're doing right now. We're just building the copter for now and then incrementally going forward with the goals. And thanks for the link! That was helpful! :) @invidos: We haven't gotten to programming it yet. We only got approval to proceed today, but I'll heed the advice! :) Thanks!
Join our real-time social learning platform and learn together with your friends!