A newb’s attempt at flight

Well, the title says it all! I finally hooked up everything and decided to see what would happen if I set uniform speeds on all four rotors without a control algorithm behind it all… Not a very good idea. I was fairly lucky in that nothing severe happened to me, the other “innocent” bystanders, nor the quadrotor. The only damage was to one of the propellers. For those who haven’t experienced it before… No matter how hard you try, there will always be some imbalance so the quadrotor will just fly off to the side. I left it on for just about a second or two (indoors) and the times when I set the speed high enough to lift off, it crashed. For those who have already achieved flight, forgive my noobishness!

Okay, so let’s go back a bit to the attaching of the various components. The motors attached using screws. Make sure you firmly fix the propellers. Usually, there is some sort of tightening mechanism. In the case of my motors, it works like so:

Fixing the Propellers

Fixing the Propellers

So what next? The motor drivers of course. You may need to take off the motor to solder the wires to the motor driver. Three (thick) wires connect the two. If you connect the first first of the ESC to the BLDC, the second to second and the third to third, the motor will rotate in one direction. If you flip any two (Or invert the order itself which is what I did by placing the ESC upside down), the motor will rotate in the opposite direction. Make sure two are in one sense of rotation and the other two are in the opposite sense. You can only determine the exact direction by running the motor. Put the two on one sense on opposite ends. Run them and adjust the blades accordingly such that all four motors push the air down. MIT’s Aerospace Controls Lab has made and implemented a variable pitch propeller. Check it out here: http://www.youtube.com/watch?v=Vy5Ky50eGJs

I attached the ESCs to the chassis using these connectors (Cable Ties):

Cable Ties for ESCs

Cable Ties for ESCs

I actually had to couple a pair of them to get the required size but it is very firm provided you tighten it well enough. You can also see in the image above the wire connections. I soldered the wires (A little painful due to the thickness) and then used heat shrink to make the joint more stable. Don’t forget to put the heat shrink before you solder!

The next thing I thought I would need was a custom cape for the sensors and a transistor for the microcontroller to transistor interface. I used 2 male to male connectors (40×2) and placed them on a PCB and soldered it. It fits snugly on the Beaglebone. I also soldered some female connectors on to the PCB for use with other components. I then added female connectors for the two sensors to sit on and simple transistor inverter to convert the 3.3V output to 5V output for the ESCs. Granted, the polarity gets inverted but there is a polarity option in the BB’s  PWM module which you can just invert. The finished product looks something like:

Cape Top 1

Cape Top 1

Cape Bottom 1

Cape Bottom 1

I took these pictures before the test flight and before I finished soldering the connections for the sensor. I’ve done that now but these pictures are higher resolution and the difference isn’t too major. It’s a bit sloppy here but it works really well.

Here is a picture of the cape with the Bone (Bone below).

Cape with All Connections

Cape with All Connections

The transistors. Why did I need them? I test the motors with a 5V PWM from a arduino and it worked. Then I test with the transistor logic converter from 3.3V to 5V from the BB and it worked. I used the transistor but with a 3.3V logic and it still worked. I connected the BB directly and for some strange reason, the BB switched off! Maybe it was drawing too much current (I had checked the average current with the transistor and it was nearly 0) or maybe it was just a coincidence. That pin still works but I wasn’t willing to take risks and so the transistors. The ESC wires are the four that are sticking up on the cape. Make sure you fix them properly such that they don’t move and can’t be pulled and don’t hit the blades. This is VERY IMPORTANT.

One mistake I had made in one of the earlier posts was that the PWM control was based on the frequency. It’s not. You set the frequency constant. You then vary the duty cycle. In my case, I set the frequency to 50Hz (Specified: 50-60Hz). Varying the duty cycle (In terms of ON time) from 1ms to 2ms varies the speed from 0 to maximum. You may have to calibrate the ESCs initially. Some ESCs are even programmable. Mine is but I haven’t played around with those options yet.

BB Attached

BB Attached

I attached to the BB to the chassis on the location they provided with four screws. I used some foam padding as you can see in the image above.

The last thing is to attach the battery. I did in the mount below. You can see the blue thing in the image above. That’s the battery. I attached it using the same cable ties. All the wires may not fit in the battery so you may need to combine them. Some people, I’ve heard use two batteries but I’m not sure about how they distribute them.

So put it all together and what do you get!?

Fully Hardware Ready

Fully Hardware Ready

I’m currently working with the sensors. While I had them working well, I did not have the angles exactly. It’s fairly easy to get the angles from the accelerometer but you need to correct them with the gyroscope because the accelerometer doesn’t respond well to noise. I’ll post an update when I get it working problem. I’ll probably  have to implement Kalman filtering in the end.


About ajaykumarkannan

I am a final year student pursuing my Bachelor's degree in Electronics and Communications Engineering at IIT Guwahati. I am currently on semester break. View all posts by ajaykumarkannan

9 responses to “A newb’s attempt at flight

  • Vinay Kashyap

    nice work 🙂 Had done something similar ! good work with Bb ! I used a atmega!

    • ajaykumarkannan

      Thanks 🙂
      You made a quadrotor? If so, there are a couple of things I could use some help with 😉
      This is my second attempt. Had used a ATMEGA the first time too. The earlier one, the chassis was pretty bad so this time, I decided to upgrade the board too.
      What are you upto these days? Your FB says Communication and Signal Processing at Arizona. Masters or PhD?

  • Abraham

    Hey I am working on a quadrotor too. 🙂 If you are running into trouble with angles, you could look into DCM algorithm.

  • antodoms

    heyy….am working on the same project too… But i am kinda in middle of nowhere now…. having some trouble with the mechanicals , seems like the frame i made is quite heavier and it doesnot fly… can u give me some suggestion for a good light weight frame…. Also am planning to completely convert to beaglebone black as a flight controller and a 10DOF IMU sensor… is that possible ??

    • ajaykumarkannan

      I would suggest using either aluminium rods or carbon fibre to make the frame, preferably carbon fibre. Otherwise, you can purchase a fully constructed frame outright. That would make things easier as it comes with the mounts and everything. I’m not sure about the IMU. If it supports either SPI or I2C, it should be relatively easy to interface.

  • Rodolfo Ocon Rico

    hi i’m working a project like that.
    have you manage beaglebone to read pwm inputs on rc transmitter?

    • ajaykumarkannan

      I had used a Xbee Module and I was able to hook up the Beaglebone to it. I haven’t tried to read a PWM input ever though.

      • antodoms

        Guys , sorry for late replies …i had managed to complete my projwct 8 months back..i had used BBB pru for reading pwm signals and writing pwm signals to esc..and it wrked quite well except sme stability issues while flying…

        Here is my project source which you can check out..


        If you guys got any improvement in code please do a pull request to my github repository…or any doubt anywhere just open up a issue in it…i will be happy to help…


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: