I am on a project which nearly completed. But what remains is balancing. My project is making a quadcopter. All the programing and hardware stuff is completed. But when i fly it, it doesnt goes up, it goes to a side so i just take it down again. I tried different balancing tecniques, using mpu6050. The procedure for balancing i use is; Find the accelerometer values from mpu6050. If lets say ax is less than 0 then speed up one side motor and slow down other motor, and similarly other. But that doesnt work, Please show me how can i balancing it, because that methods are not working for me. And if i am off topic please point me where to ask this question.
I suggest you to look at Automatics and PID regulation. Your approach is not wrong, but you're missing a LOT. For instance, how do you know but what amount you should change the speed of your motors to compensate the tilt angle ? How do you make it go to a stable position in a smooth motion ? How do you optimize the time to get to a stable position ? All these questions can be answered by learning about automatics.
If you look at this scheme, consider the Setpoint as your reference-level and Output as your quad-level. Setpoint - Output = Error (ie. the angle between your quad-level and the ref-level).
Now the P gain is going to multiply your error in order to send a correction-command proportional to the error.
The I gain is going to integrate the error. Integral are sums, this terms kicks in when the error is so small that the P gain can't really do anything about it.
The D gain will multiply the derivative of your error, it will basically smooth your output command (DO NOT confuse with Output, the quad-level)
By the way, when you say 'ax' do you mean the raw value you read on the 'x-axis' of your mpu6050 ? Because that's not your reference.
You should find most of your answers by looking at the multiwii code.