RC Transmitter/Receiver

I want to build a custom rc controller for a model aircraft carrier I want to build. I think a good way to do this is to take inputs from the controller and output them via Serial.print or write, like this:

30 | 21 | 100 | 245 | 50
J1X J1Y J2X J2Y Buttons

The four joystick values are their respective analogreads/4 (example values given), and the 8 Buttons are going to be bit shifted to compress into one byte of data.

I have been up and down the internet looking for something that can send all of this at once at a speed similar to or better than some commercial controller. When I look for something cheap, I get stuck with almost no range, and when I find something with range, I'm looking at paying for all this extra capability I do not think I really need. I just want to make a cool toy that I can take down to the lake or coast. Once I figure out how to actually set up my controller/receiver, I'll venture into FPV cameras and the like.

I would really appreciate it if anyone knew of a cheap, minimalistic (does what I need it to), super long range data transmitter I could use to send simple strings of data rapidly in succession.

I started using arduino about 1 month ago and started my project 1 week ago.

I've tried pulseIn from an old pre-made receiver/transmitter, but that does not work if I want to have if clauses that do different things when combinations of buttons are pressed; it takes time, and pulseIn is all about time. RC receivers send out PPM signals that servos use to get positioning, a 1ms-2ms pulse in a cycle of ~20ms with some wait time after that, each channel fires off its pulse respectively, and a servo uses its length out of 20ms to determine positioning (at least I think that's how it works).

I've tried interrupts from the same setup, but once again 20ms is taken by incoming data and that means only 2-3ms can be dedicated to the rest of the code. I've grown to hate PPM signals.

I found out I need my own custom made controller and receiver for all my functions, and need to send that data in a text string of numbers that my receiver can read and use, not some stupid timed PPM signal. Again, much appreciation would go out to anyone who can help me find what I'm looking for!

You know, a regular RC transmitter and receiver probably work over the range you want and they often have joysticks too! There must be a billion of them available online for little money.

If you want to do something specifically Arduino-y on board the boat, then connect a pulseIn() type function to one or several spare servo outputs on the receiver.

For my RC planes I use XBee Pro S1 modules. They are super reliable, transmit via serial, and have a range up to 1 mile.

What range do you need?

I have tested the cheap nRF24L01+ 2.4GHz transceivers (with the PCB antennas) outdoors and they were still working a range of 110m. I could not test for a longer range because I could not see if the motor I was controlling was working :slight_smile: There are also high power versions with external antennas for longer range.

I got my nRF24s working with this Tutorial

I suggest you use the TMRh20 version of the RF24 library - it solves some problems from the ManiacBug version

The pair of programs in this link may be useful. They are derived from my model train control system.

To my mind the advantage of having an Arduino at each end of the wireless link is that you can send data and not just pulses so a great deal of extra functionality is easy to achieve. And it can be fine-tuned by modifying the programs.

You can also have two-way communications - my trains send back their battery voltage.

...R

Reply to MorganS:

I tried that but in order to make more complex actions happen on a vanilla RC transmitter and receiver I need to send everything through the arduino, that checks all the conditions and executes a specified command. For example, when throttle is off, and right or left is executed, the boat would use its motors to help turn on point, but when the throttle is on, left and right would only activate the rudder. The problem with doing this is that the receiver sends a new batch of data before pulse in can be called again. The timing becomes off and maybe every few seconds a good batch of data is collected.

The problem with interrupts is that they interrupt. Any if checking gets stopped by new data and the motors get confused signals.

Reply to Power_Broker:

I did read a bit about XBees, and I know they will perfectly fit into my project, but they are expensive and I am cheap. Is there anything else that transmits via serial with equal or better range, at lower cost?

Reply to Robin2:

I need the longest range I can get; I want to take it down to the coast somewhere and sail it out a few miles, maybe even until I can't see land, and just enjoy the FPV exploration at the comfort of a beach. Those nRF24s you are talking about would work and are cheap, yes, but the problem is unfortunately range. I am not exactly quite sure how range works, though. Is it possible to have a large antenna at controller side and have a natural size antenna for the model? I know that radio stations play out of one or a few big antennas and it goes for miles, to be picked up by even the smallest radios. Is RC the same? Could I just attach a huge antenna and power supply to my controller with a cheap nRF24 and have a small antenna on the model? I guess that would be sacrificing the ability to send data back from the model if its tiny antenna can not reach me, though.

Maybe this will help? Build a wireless RC unit Arduino - FREE CODE - YouTube

The bigness of the antenna doesn't help. An FM radio station transmitting 50kW (fifty thousand watts) is still using the same wavelength and making the antenna 5 wavelengths long doesn't make it radiate any better.

A properly tuned 1/4 wave or dipole antenna is best for the boat. For your beach situation, you can use a directional antenna on the land. You don't want to waste any power going towards the sand dunes, so you do have the option to choose an antenna with "gain" that focuses more power in one direction.

This also helps the reverse channel because even though the boat is radiating in all directions (it doesn't know which way to the beach) your directional antenna on the land will be much more sensitive in that direction. It's called "reciprocity" which means that if a transmission of a fixed power works in one direction, it will work equally well in the other direction, even with totally unequal antennas.

The curvature of the earth will be a problem. For an antenna just one or two feet above the water, you will be behind the curve in just a mile or so. There are online calculators that can work this out for you. So you will probably need to put your beach antenna up very high. 20 or 30 feet (10m) will probably get the range you are looking for. That's why radio and TV transmitters are usually placed on the highest local mountain or building.

Steve,

There are many things you need to consider for your project, but let's go with order.
You have at least three problems:

  1. control your boat with the RC
  2. send camera information from the boat back to the monitor on land.
  3. Implement the control of your bot in an efficient way

Of the two RC issues the former is the "easy" one, as it requires to send only small bits of data and the low bandwidth required is more compatible with a cheap solution.
In your case the camera data are likely to be the limiting factor. I am excluding power supply issues for sake of simplicity.
The third issue is the one you should approach first as no RC can drive the boat for you if the receiver is not able to interpret and execute the commands properly.

If I were you I would start with any cheap, short range transmitter, even a long wire might be a cheap solution to test if your program is doing well.
Than you have to define if you have an arduino on the boat and how you program it. In this case you need just to send a small bit of data and a normal RC would do the job, you can get 2.4GHz pairs for a few bucks. Just connect the receiver to the arduino board, timestamp the data and collect them in a buffer using e.g. the serialEvent() or an interrupt callback, maybe add a timestamp, so that you know if you want to process the data or discard them. Then the loop processes the data taken from the buffer without suffering from the interrupt. As a general rule the interrupt should be re-entrant and the current activity should continue as if there was no interrupt happening in background.
See an example for serial protocol here, the article contains a number of links to interesting articles on wikipedia that can help you understanding how to extend the example. In your case you might need to reimplement a protocol compatible with the receiver you are using. and reimplement the interrupts to be re-entrant. Once you fixed those two issues you' ll a great improvement in your project.

The antenna part will come afterwards as it is a really advanced topic, unless you have sound money to spend. Just a tip, never add and hand made antenna to a transmitter unless you really know what you are doing. It tends to get quite expensive in a matter of milliseconds.

Good luck with your project.