2 Arduino Powered RC plane

Written by: admin@makezilla

Hi, Welcome to my instructable on building an RC plane, fully from scratch, with Arduino.

I have wanted to build an RC plane for a while, and received the parts for building for. The transmitter and receivers, however, can be extremely expensive, I also wanted to add additional functionality after the plane is built. I decided to use arduino for the Tx/Rx system, but I had never programmed or had one before.

This instructable focuses mainly on the arduino and electronic part of the build, but the plane is scratch built from Depron Foam, the plane is the Blu Baby, plans are here, it is reltively easy to build, and only took me a few hours.

Step 1: Parts and Tools

  1. RC plane (prebuilt or scratch built) - if you have all the electronics then you are good to go
  2. Arduino Nano - For the transmitter
  3. Arduino Pro Mini - Receiver
  4. 2 Xbee module - I did not use Xbee, I used these (XRF), which are cheaper alternatives, with 500m+ range, operating on the 433-900MHz band. These breakout boards are also very cheap, (go for active as they have 3.3v regulation on the power and data lines) and you can use a serial connector to program the XRFs.
  5. USB to TTL UART connector - Used to program the Pro Mini as well as the Xbees or XRFs
  6. Perf or strip board
  7. Jumper cables
  8. LiPo battery connectors (deans)
  9. Male and Female header connectors (0.1")
  10. RC Electronics/parts (if you don't have them)
    1. Speed controller (ESC, make sure it is suitable for the motor (brushed/brushless))
    2. Motor (probably go brushless)
    3. Servos
    4. Pushrods (for the servos, can be made from bicycle spokes)
    5. Servo horns (I used balsa, cut and drilled)
    6. LiPo Battery (I used 2S, 1300Mah)

Tools

  1. Soldering Iron
  2. Various Pliers
  3. Stanley Knife
  4. Wire Strippers

Step 2: Arduino Rx

 

This is the receiver part. On the ESC there will be 3 thin wires coming out, usually coloured red, white and black. Red and black are +5v and GND, these will power the arduino.

I made a circuit board, mounting my Arduino Pro Mini and then making 5v and GND rails from the ESC, this is the red and black wire from the 3 thin wires coming from the ESC. The other wire is signal, in my code, this need to connect to pin 9. The other servos, elev, rudder, and the ailerons are connected to pin 8, 10, 11 and 12 respectively. The XRF is connected from Tx to Rx and Rx to TX, power is connected to 5v and GND.

The code is here https://github.com/Streuli273/Arduino-XBee-Remote-Control

Step 3: Arduino Tx

I purchased an old, 35MHz transmiiter with no cystals and no receiver from eBay for £16. I then opened it up and removed the old Transmitter board. I then wired the potentiometer for each control to 5V and GND, the last connection; the middle one, was connected to it's analogue pin on the arduino. If you want to incorporate more potenetiometers than 8 then you will have to use a bigger arduino or a multiplexer chip, which can get confusing.

The battery was connected to the VCC pin on the Arduino, 5V for the pots and XRF.

The code is here https://github.com/Streuli273/Arduino-XBee-Remote-Control

Step 4: Test, then fly!

 

I connected everything together and powered up the transmitter, then receiver. It worked!

Make sure the throttle is set to 0 and no prop is in when you are testing. You can test with a wired connection by connecting each arduino's Tx to Rx on the other, bypassing the XRF/Xbee. Test with just a servo first for example, then move onto more. Also, MAKE SURE YOU XRF/XBEE MODULES ARE NOT TOO CLOSE, this happened to me and it took me a very long time to realise, they cannot connect if they are too close.

You may have to calibrate your ESC to your values from the pot, refer to you instructions for that. The code is attached here, it has some commented code and other parts from testing, but the code does work, or copy and paste from the other pages.

If you face issues, check all the code and connections to the arduino, make sure the pins are correct. Try and modify the code just to test one servo first, then add more. The servo library works the same for servos as for ESCs.

In my first flight I got maybe 2 seconds of flight before I crashed, the tail snapped off... It was my first time ever flying a plane and it was very windy. My elevator was also inverted by accident and my rudder pushrod fell off!

Good Luck!

Leave a Reply