in

RC Plane Transmitter Receiver Arduino Part 2 of 2

In the previous part I explained all the components used in RC Plane Transmitter Receiver Arduino and some basic configurations and testing of the components. In this post, I will show you how I assembled all the components mentioned above and explain the working of RC Plane Transmitter, Receiver and their circuits. I highly recommend you to go through the first part if you are new to it and get a better understanding of the whole project.

What we are Looking At

You like this video, click the subscribe below to subscribe my youtube channel for future updates.

The Transmitter

Before proceeding, I highly recommend you to use a breadboard before making a PCB. As mentioned in the previous post, it will be easy to build and troubleshoot the circuit.

Our transmitting unit consist of an Arduino Nano connected to a HC12 Wireless communication module and the Joystick. We can supply a voltage of 5 V to both Joystick and HC12. You can do that whichever way you want. I powered up arduino nano using a power bank for mobile phone through its mini USB port and used its +5V out to power the Joysticks and the Transmitter.Shown above is the block diagram of the transmitting unit. There are two analogue out for one joystick. Which means we need four analogue pins to connect two joysticks to the arduino.  To know how a joystick work and to test it, please go through my previous post.

The Code

Given below is the arduino code that is to be uploaded to the arduino nano of the Transmitting unit. You can download the entire code by clicking the download button below.

Click Below to Download The Code Download

I used analog pins A0, A1, A5 and A7 to get the analog reading of the joysticks. These values varies from 0 - 1023. But these values are changed from 0-1023 to 0-180, the reason of doing this conversion will be explained in the coming steps. These values will be stored in the variables "thr" ( for throttle), "ail" (for aileron), "ele" (for elevator) and "rud" (for rudder). These values will be sent to the transmitter one by one seperated by a coma (,) like show below

25,45,81,40

25,45,81,40

26,45,78,41

29,45,60,45

In the transmitting part, I have used software serial library so that you can view the output in arduino serial monitor while transmitting the data to the HC12. But let me tell you that software serial is not stable. Some times it may cause problems with arduino clones. In the receiving part when I tried the software serial library, it caused malfunctioning and I had to change the entire code.

The Receiver

In the receiving part of RC Plane Transmitter Receiver, I used a LiPo battery so that we can drive the brushless motor and two servo motors which will draw considerable current from the source. In this LiPo battery is connected to the ESC of the brushless motor, which will be powering the arduino, HC12 Wireless communication module and the two servo motors via its 5 V output.Shown above is the block diagram of the receiving unit. The HC12 module receives the data from the transmitting unit and will pass the signals to the arduino via the serial communication port (0 and 1). The signal will be a long string of decimal numbers separated by comas. These values are separated and stored in different variables. These values will be used to create PWM signals which are later fed to Servo motors and the ESC which will drive the Servos and the brushless motor.

If you have trouble configuring or do not know how to, check out my previous post where I explained everything about the ESC and its calibration. I have made a simple sketch to automatically calibrate the ESC (which will work with most of the ESC).

The Code

Given below is the arduino code that is to be uploaded to the arduino nano of the receiving unit. You can download the entire code by clicking the download button below.

Click Below to Download The Code Download

In the receiving unit, I used Arduino nano clone which caused some difficulty during the testing phase and due to that reason, I did not use the pins used for software serial. First we read the data coming from the receiving module to a variable named 'input'. This 'input' is a long string of decimal numbers separated by comas. This string is broken down into smaller smaller numbers and are then stored in separate variables.

Here we use servo.h library to drive the brushless motor and the servos. Driving the brush-less motor is similar to that of servo motor. We provide PWM signals to the signal input pin of the ESC which is connected to the brushless motor using functions inside the servo.h library.

Take Off

RC Plane Transmitter Receiver Arduino is now set. Once the code is uploaded to both transmitter and receiver arduino boards, you can test it. You can power the Transmitting unit using a power bank or any other regulated 5 V power supply. Once it is ready, it will start the transmission (you can see the red LED blinking).

In the receiving unit of RC Plane Transmitter Receiver, as mentioned earlier, can be powered using a 12 V LiPo battery. The power regulation is done by the ESC which will provide regulated, stable 5 V supply to the servo motor, arduino and the HC12. When this unit is powered up, it will automatically configure the thresholds, you will hear "beep beep beep ......beeep ...beeep ......beeeeeeeeeeeeeeeeep". The long "beeeeeeeeeeeeeeeep" means the ESC has been calibrated successfully. Then the brushless motor will start to spin at half the maximum speed (140 angle) for one second.

If you have trouble configuring or do not know how to, check out my previous post where I explained everything about the ESC and its calibration. I have made a simple sketch to automatically calibrate the ESC (which will work with most of the ESC). After the automatic initial calibration, you can use your joystick to control the brushless motor and the servos. You will find all the codes in the links mentioned above. With a little bit of tweaking, you can control any RC vehicles like RC cars, Trucks, Boats, Helicopters or anything using this low cost DIY remote controller. The video tutorial will be uploaded in my you tube channel. Click the subscribe below to subscribe my youtube channel for future updates.

If you have any doubts regarding RC Plane Transmitter Receiver Arduino, need clarifications or you want help in modifying the codes, please let me know in the comments. If you find this useful share this project. If you have any doubts, need clarifications or you want help in modifying the codes, please let me know in the comments.

Rate the Project

Did you find this page useful? Help us to improve by rating this page.

Rating
RC Plane Transmitter Receiver Arduino Part 2 of 2 Overall rating: 4.5 out of 5 based on 53 reviews.

What do you think?

0 points
Upvote Downvote

Total votes: 0

Upvotes: 0

Upvotes percentage: 0.000000%

Downvotes: 0

Downvotes percentage: 0.000000%

Comments

Leave a Reply
  1. Is this parsing of csv are reliable as distance between transmitter and receiver increases or chances of error in receiving signal are poasible?

  2. Is there a particular reason why you are not using an arduino pro mini?
    That one has uart which should allow you to circumvent the whole software serial problem. It is smaller too and the clones are like 2-3$ shipped.

    • depends up on the size broo..
      coreless motors are used where you want to quickly change the direction of rotation or speed. this is due to low inertia.
      for aeroplanes, it would be better to use brushless motor

  3. How are you wiring the ESC to the Arduino? I am trying to follow your instructions, but that part is giving me some headache.

    Thanks for posting this, it has been so helpful.

    Thanks

      • I am most concerned with not having the proper connectors. For example, I am getting a ESC Brush-less motor combo, but the they comes with bare wires, no connectors. So, I want to make sure I get everything I need so I can connect everything.

        Thanks for your explanation.

  4. I think this is a great tutorial, but I would like to see pictures of the Arduino connections and wiring diagrams, fritzing or something like that, just to let readers visualize better.

    I’m excited to try this on an old 4×4 rc I have kicking around.

    Thanks

  5. Can you please help me to change the code to work with two DC motors. i simply need to one joystick for each motor or even just one pot for each motor. I know most of the coding it is just the HC12 transmitting and reciving that i cant do. Thanks a lot.

  6. Can we control 3 motors and it 2 using arduino nano? Because the on the other end I have a arduino mega but for the transmitter end will it be okay?

  7. Hi.
    I am totally ignorant in electronics but find it so interesting.
    What I am interested in is a 2 channel Tx/Rx for rudder/elevator only or elevons (flying wing) gliders.
    How complicate would it be to make or what modifications from this project will it request?
    Tks for your interest

Leave a Reply

Your email address will not be published. Required fields are marked *

Loading…

Comments

comments

RC Plane Transmitter Receiver Arduino Part 1 of 2

Top 5 Best Anti Virus Free Downloads for 2018