quadrocopter

a few weeks ago i decided to build a quadrocopter. this would be a real challange but still inside the capabilities of the pcb i made. i actually designed it with plane-uavs in mind. but there's no reason it wont be able to controll a quadrotor.here's the finished board connected to a display. the display i a cheapo 128x64 graphics lcd controlled by another atmega168 and connected with spi. i removed the yaw-gyro from the board to get to the spi bus (also needed for programming the main atmega)... always include a isp-port on every board involving an atmega!that was mainly build to port the arduino code (using crystalfontz serial lcd) to winavr/gcc (using my spi-display). i already had everything working on the arduino and could do some testing with gyro integration and sensor fusion with the accelerotmeter.
this is the frame. i used 10x8 cf-tubes and glued aluminium-profiles for mounting the motors and attaching them to the central gf-plate. the motors are TP 2410-09, supersimple 30A ESC and EPP1245 props.
here's the test-stand. these motors+props are very powerful, so there are 3 bottles of coke in the basket, so it doesnt lift off. getting it to stabilise was surprisingly simple, here's the code. this code is run whenever there's new data from accelerometer, that's 640 times per second. gyro-data is also read then//gyro_x is current gyro output//x_angle is current integrated gyro angle mixed (127/128 gyro, 1/128 accelerometer) with little accelerometer angle (fixed point 20.12)seradj[0]=(gyro_x>>1)+(x_angle>>10); //adjustment/stabilisation for x-axis, basicly a simple PI-controller//serinp[2] is the throttle channel, serout[0] is the ppm-output for the back rotorserout[0]=serinp[2]+seradj[0]; //the values are micro-seconds x2 for the ppm-outputserout[1]=2000; //left, currently offserout[2]=serinp[2]-seradj[0]; //frontserout[3]=2000; //right, currently offthat's stabilising it very nicely. would probably be good enough for flying. the angle it stabilises to isn't exactly 0, probably the accelerator isnt perfectly parallel w.r.t. the frame. ppm is only output for the 4 esc's, one after the other as fast as possible, thats 250hz update rate at idle and 125hz at full power. works great so far.TODO:- better mounting for the pcb, receiver and battery- connect serial display for debugging- stabilise roll and yaw- tons of currently unknown problems- fly :)
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • hey m making a quadrocopter can any one tell me what gyros n accelerometer are to be used.. meanin the  model numbers..
  • Developer
    Nice looking quad. I also started to build one, frame is ready and now i'm working with pcbs and others. I plan to have I2C BL's (Modified Turnigy 18A Plushes). Did you write your code totally from scratch or did you use codes from other projects as base?

    I'm planning to use AeroQuad code and try to get it working with ArduIMU and 3 axis magnetos. And maybe build one quad based on ArduIMU Quad mini code

    That your disp looks great, what interface it has? I need similar on one other project of mine.
  • great looking project.
    I added you as a friend so I could send you messages.
This reply was deleted.