Code + hardware question

Hello everyone.

I need some advice. I want to write a C++ software that can talk with a remote control of an RC plane / quadcopter. In my understanding, transmitters of this kind have resistors inside, and when I do something to one of the knobs, the resistance changes.

My question is, how do I go about connecting this remote to the computer and writing commands in C++ that would change the resistance behind each knob on the remote?

From what I understand, I need some sort of "box" that would translate my compiler's commands into the remote by converting computer language into hardware language.

Hope this makes sense. Any ideas appreciated.
The knobs that are physically attached to your remote are probably attached to a potentiometer, or "pot". That's a variable resistor (i.e., a voltage divider) whose resistance changes predictably when adjusted by physically changing the amount of resistive material between two contacts.

The way you adjust the a potentiometer is by moving the wiper; there is no computer involved. If you really wanted to accomplish what you said, you could tack a motor onto the front of your remote.

Note -- communication between your computer and hardware can be accomplished through a proxy micro-controller that reads commands from (e.g., a serial port) and adjusts the circuitry attached to it directly.

In your case, you may be able to find a compatible radio transmitter which can be controlled directly through a computer. If you choose to go about this the hard way, you, can pick up an appropriate transmitter from an electronics supplier and control it via USB or serial using a proxy microcontroller. I've had success in the past with Atmel's AVR series MCUs, which are nice because there is a C++ compiler for them.
Last edited on
Thanks for responding.
When I start looking for a "proxy microcontroller" that reads commands from the serial port and adjusts the circuity attached to it (like you said), what do I look for in one? I have my transmitter and receiver and we can assume that there are 6 channels. Would I need to open the transmitter and wire every 'potentiometer' into this proxy microcontroller?

Do I need to make sure the microcontroller can read C++ specifically?
Last edited on
Does that mean you want to make your own?
If you don't care about that and only want the end result, you should consider getting a USB RF transmitter and writing your program to control the RF transmitter without any of the hardware stuff.

But otherwise, this is a cool project.

When I start looking for a "proxy microcontroller" that reads commands from the serial port and adjusts the circuity attached to it (like you said), what do I look for in one?
A microcontroller is just a tiny computer, like this one:
http://www.mouser.com/search/ProductDetail.aspx?R=0virtualkey0virtualkeyATMEGA328-PU
Selecting the one you want is hard to say without planning. It's normally considered a good idea to draw your circuit diagrams before purchasing components. You will be able to select hardware and components once you have a good idea of what your circuit will look like and an idea of the required tolerances and features.

I have my transmitter and receiver and we can assume that there are 6 channels. Would I need to open the transmitter and wire every 'potentiometer' into this proxy microcontroller?
It's unlikely that opening your remote and attaching your circuit to the components inside the knobs is going to work. It would likely take significant reverse-engineering skills (or third-party knowledge) to successfully reuse your remote. I'd guess it would be much easier to start from scratch -- but you would have to look.

Do I need to make sure the microcontroller can read C++ specifically?
You need to make sure that the vendor supplies a C++ cross-compiler for the particular series of MCU you're using, yes. C++ compilers are relatively uncommon, C compilers are more common. Almost all vendors provide an assembler at least.

From the questions you're asking, I'm assuming you're a beginner to electronics, and perhaps to C++, too.
I'm lucky enough to go to an excellent school with full electronics laboratories (and lots of helpful students), but if you're a complete beginner and you don't have the required equipment, you're looking at a long, tricky, and potentially expensive project to fly your drone by computer.

This being said: you don't need expensive equipment if you're clever enough. It will just be harder.
Last edited on
so with an RF transmitter (like this http://www.abacom-tech.com/%2FMulti-Channel-USB-RF-Transceiver-RF-USB-P93372.aspx) you're saying I can link it to my regular receiver (inside the plane) and connect the piece into my computer's USB and control it through my C++ compiler?

thanks for all the info by the way. I'm not really new to C++ (i know most of what I'm doing and most of the altitude and speed hold modules are complete) but I am pretty unfamiliar with electronics.. which is a problem.
Last edited on
Yes -- as long as you send the right signal at the right frequency, the reciever won't be able to tell which transmitter it comes from. Probably the transmission frequency is labelled on the remote or on the drones.

One final question: lets say I found an RF transmitter and receiver (i like that idea better), like this
https://wholesaler.alibaba.com/product-detail/Ebyte-E11-MLU1-1-1km-2_60456798656.html?s=p

how do I know whether the transmitter will be compatible with C++ and can receive and understand its commands? how do i start linking the compiler with the device together once I receive it?
I would suggest that you use arduino or raspberry pi for your project. This would save a lot of hardware hassle.
Topic archived. No new replies allowed.