Tuesday, July 31, 2012

My X-525 QuadCopter

This is my second trial of building a quadcopter. The first quadcopter -is the one we can see below- was totally homemade, the arms were too thin and U-shape so motors were twisting the bars and it was unstable.

early steps in building frame

My hand-made frame
My second quadcopter uses exactly the same motors and board, I decided to use Hobby King X-525 Quadcopter Frame.


Building the body was easy it took 40 min to assemble it. and another 4 hours in mounting motors and soldering connections.

rubber to reduce vibrations
Flying results was different, QuadCopter is much stable now.

X-525 Frame with folding bars
Still I need training, below was my first trial, now I fly it much better however still a beginner.



If you are interested in building your quad, below is a complete list of items you need to buy. Building a quadcopter is an interesting task, although it does not require as high skills as building a scale RC plane or a helicopter where mechanics are too complex. Quadcopter are very easy to balance as well, they mainly depends on their control board for balancing so minor mismatch in CG is not an issue at all.


Bill of Materials:
   
       - Quadcopter Frame Hobbyking X666 Glass Fiber Quadcopter Frame 666mm
   
       - Propellers you need two propellers CW & two propellers CCW. I tried both GWS 9x5 CW & CCW as well as SF 10x45 CW & CCW. if you are a newbie here, then you need to get at least extra 4 propeller of each type i.e. CW & CCW as you should expect that the first thing you will break here are propellers.

       - 4 x Brushless FC28-22

       - 4 x ESC HobbyKing 20A BlueSeries Brushless Speed Controller or Mystery 30A BEC Brushless Speed Controller (Blue Series)

       - Hobby King Multi-Rotor Control Board V3.0 (Atmega 328 PA) or the newer Hobbyking KK2.0 Multi-rotor LCD Flight Control Board with LCD and additional accelerometer sensors.

       - 1 x LIPO Battery Turnigy 2200mAh 3S 40C Lipo Pack . The quad flies for +10 min.

      - 1 x Receiver 6CH such as OrangeRx R610 Spektrum DSM2 6Ch 2.4Ghz Receiver (w/ Sat Port) it is fully compatible with Spektrum & JR yet it costs lest that 1/10 of the price of original receivers.



Other Misc. Stuff are:

       - 1 x 2mm Gold Connectors 10 pairs (20pc) These connectors are slim and very suitable for your FC 28-22 wires. You will need them to connect motor to ESC.

       - 1 x 10CM Male to Male Servo Lead (JR) 26AWG (10pcs/set) the set contains 10 pieces which are enough for the quadcopter . . . actually you will need four or five based on the control board you choose.

       - 1 x Hobby King Quadcopter Power Distribution Board This links your power wires from ESCs together to connect them to the battery. You can also use Single Male to 4 x 3.5mm Female adapter instead based on your quadcopter size.

      - 1 x Turnigy 5mm Heat Shrink Tube - BLACK (1mtr) This is important and easy to use as well. It keeps your connections tight and clean. you need a simple air drier to shrink them. It is great to isolate connectors and keep them together.

     - 1 x HobbyKing Programming card for BlueSeries Brushless Speed Controller This is important to avoid the hassle of programming your ESC using transmitters and magical beeps. The quad has four ESC, you need easy and accurate programming tool to make your life easier.
 
Extra Stuff:

      - 1 x On Board Lipoly Low Voltage Alarm (2s~4s) actually I would not say it is all extra, it is important if you plan to fly your quad high. . . you need an alarm to tell you that your battery is about to finish and you need to bring your quad down before it gets down by itself :)

    - LEDs exists in different types  RED - GREEN - BLUE they are great if you plan to fly quad at night



HefnyCopter Code

  The video below show my quad flying using my own Hefny Copter Firmware. The new feature in this firmware is that your ability to switch between X-Quad configuration and + Quad Configuration using your remote TX only. no need to reorient the board or recompile the code.





Wednesday, July 18, 2012

N-Channel Switch


What is N-Channel Switch



N-Channel Switch is a hardware device that is very much like multiplexer that takes input from two sources and based on a select signal it outputs on of these two signals.

General Function


Domains of Application

     This is a general purpose device, so it can be used in different fields; however it was specifically designed to target RC planes. 

     In UAV planes you may need to take-off and land using your own skills not autonomously using plane computer. You can easily and instantly take control from your plan. Same need when testing your UAV you need to make sure that if something went wrong you are still able to get it back again. The idea here is that this switch is completely isolated from your complex UAV logic, so if main processor hangs due to software bug you can still access this switch and get your plan back.

Another use of this switch is when trainer a new pilot on RC Planes. You no longer need to have the same type of transmitters; you can even use your FM together with his 2.4 GHz in a master slave combination.  All you need to do is to put two receivers on that plane, connect them to the switch and you can start your training session safely.


Features and Specification


  • Takes Throttle, Elevator, Rudder & Aileron input from two sources. This can be two receivers or a receiver and a UAV board.
  • Use PWM signal to switch from first input to the second. You can use gear, Aux1, Aux2 …etc. to make switching.
  • Two digital output ports can be used to turn lights or other devices on and off by using a control signal.
  • Failsafe Switching. In case one source stops sending valid data the switch automatically switches to the other source.



Pin Assignment

Input Ports

Output Ports

Circuit Diagram


Circuit Diagram

Source Code & Hex

HEX file is here
Also Source Code is here