Quadrotor help

Hello all!

I am a newbie to quadcopters and I am trying to build a one.
I have used a 3 axis analog accelerometer and a 2 axis analog gyroscope to get the roll-pitch values, and am using an  Arduino UNO as the controller. I've used a complementary filter to fuse the 2 sensors' readings.

I've been facing a very peculiar problem. I set the zero roll (or pitch) point using my arduino serial monitor and have also verified it many times, however, when I turn the motors ON and then try to measure the roll angle, it turn out to be a non-zero value even when I hold it forcibly in the 0 position. The angles are varying wildly, but they soon turn to 0 as soon as the motors are switched off.

Now, is this due to the vibration of the craft, or any other issue? Please help.

may be the magnetic field

may be the magnetic field create by the motors ?

There will always be some

There will always be some amount of noise on those analog signals, but here are a few things you can do to minimise it:

• Keep sensors and sensor wiring away from your motors and high-current wires.
• Use shielded cable for your analog signals, and mount them away from the motors and their wires.
• If the signal is noisy but the noise is low, use an averaging routine to smooth out the readings.

Oh thanks. I did a few tests

Oh thanks. I did a few tests today, and I confirmed that the interference was due to the high current wires. Speaking of the shielding my analog signal cables, I have actually constructed a PCB just for the sensors. What do you think I can do to “shield” them?

Are there any signal cables

Are there any signal cables running between your sensor PCB and your Arduino? If so, you should use ‘shielded cables’ which have a few wire cores wrapped inside a mesh or foil sheath which, when properly grounded, protects the cores from interference.

The best thing to do is to try to route the high current cables away from your sensitive analog stuff, including any cables used for transferring those analog signals. Also make sure to include some noise protection capacitors across the power lines, especially near your sensors.

Where do your sensors get their power supply from?

Actually, I’ve made a shield

Actually, I’ve made a shield for arduino with the sensors on that shield, so no such wires.
The problem with our design seem to be that the high power cables are directly underneath the arduino and the sensors, with 2 boards of wood in between (which forms the quad’s so-called “body”). We’ve basically drawn long sets of cables from the quadcopter, so that we can have the battery in our hand while testing, so that we can quickly disconnect when something goes wrong (it does always). 

And that is where the sensors get their supply from. Actually, the 11.1V LiPo battery is given to 4 ESCs, which have an inbuilt battery eliminator circuit, basically like a regulator, which powers the arduino and hence the sensors.

 

Ok, having the sensors close

Ok, having the sensors close to the Arduino is good, definitely start with making sure you have noise suppression capacitors included on your sensor board.

To protect against the interference from the power cables, a grounded metal box would normally be a good option, but obviously the extra weight will cause issues for a quadcopter. What you can do instead is try wrapping the Arduino and sensor shield in either a metal foil or preferably a metal mesh that covers it on all sides. Connect this new shield to ground, and make sure it cannot come into contact with any of your electrical connections. You might need some spacers (double sided tape, nylon stand-offs, etc) to keep the shield from touching the Arduino or sensor shield directly.