Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Arduino RC Receiver USB Adapter

A topic by GregNau created Aug 04, 2016 Views: 8,424 Replies: 18
Viewing posts 1 to 7
(5 edits)

Wireless RC Adapter v2.1

馃幃 Arduino USB-Joystick adapter for RC receivers with PWM and PPM modulations up to 8 channels.

Making possible to play wireless by connecting the RC receiver directly to the computer/console/tablet/smartphone device like a regular joystick or game controller. It is already supporting the PWM and PPM protocols at 16bit resolution and without any lag. There is no need to hook the radio transmitter with cables to the simulator anymore, just plug your receiver with this adapter in the USB port and play! It is compatible with a wide range of devices, like the ones running Windows, Mac, Linux or Android/iOS, literally almost anything whats have an USB port. Aimed to be fast and simple to use.

Since the last update it is not just one board supported anymore, so i suggest you to visit the https://wireless-rc-receiver.github.io for more! This is a completely free and open-source stuff with an extensive Wiki, which is easy to build for anyone! No soldering skills needed at all 馃槑

Developer(+1)

Awesome work, thanks for sharing!

I'm glad you like it.

Freerider is also awesome simulator!

Excellent, but how does it communicate to the USB? there are only 2 wires to the usb connector Gnd and Vcc. Am I missing something or do you use the USB from the pro micro also?

Thanks in advance.

(1 edit)

Simply connect the pro micro with the usb cable, as you would for uploading a sketch from the arduino ide. It is recognized as a game controller, you can check it on joy.cpl in windows.


Or if you mean the extra usb connector on the wiring.png, thats for extra power. Earlier i was trying to fit it with 8ch receiver, but there were power issues. I'm going to remove that extra connector soon from the wiring.

Great thanks, I ended up making a UnoJoy adaptor as I didn't have the ProMicro, it uses the Arduino UNO with the bootloader flashed in DFU mode, and works well. I had a couple micro's arrive yesterday and got to work on yours also to compare.

Yours took a little more to get it to work and calibrated (more driver issues than anything... Win 10), but I managed it and it works quite well. If you attach the positive power from the receiver (+) to the high side of the fuse just above the USB port, you can do away with the extra USB plug that you are using to power the Rx, I have done it, and it works well so far. All you are doing is powering the proMicro and the RX off your PC USB port, nothing it can't handle if you don't try and power servos or anything. ;-)

Anyway, Just thought I'd share that with you, and thank you for your plans, it works very well. Great work.

Hi, I would love to give it a try! But the link seems to be broken, could you upload it again or sent it to me please? Thanks!

I'm afraid that is not available anymore.

You can use instead the source from https://github.com/gregnau/wireless_rc_adapter

(1 edit)

Hi!

I have more or less the same setup for my controller, only difference is that I am reading the serial (IBUS) signal instead of reading the PWM.  However, FPV Freerider does not recognize my arduino micro as a usb-device. Or something similar.. There is no stick response in the calibration setup. It used to work before, and works in other simulators (Velocidrone). It is also recognized as a USB-game controller in Windows, where all axis behave as expected.

Would love to this controller in FPV Freerider as well, as it runs a lot better on my lower end computer than other simulators. 

I have uninstalled vJoy and SmartPropoPlus which I used with an older audio trainer cable. 

Is there any other known fixes out there? Otherwise it would be great if there was an option for choosing which USB device to use for input, in case there are more devices connected

Developer

You could try uninstalling vJoy and SmartPropoPlus and see if that helps. They install a custom driver that sometimes conflicts when using a USB connected controller.

Thanks for the reply. To my knowledge I have already uninstalled both vJoy and SmartPropoPluss. 

Inwas wondering now if the problem is that I'm sending a 16bit value from my current Arduino receiver, instead of the more usual 8bit signal. Any ideas?

[Fixed]

I can confirm that joystick values in 8-bit format works with FPV Freerider! I'm using a Joystick library from Heironimus, he has two versions, the older one works with this simulator. However, the channels "Throttle" and "Rudder" do not register in the calibration menu. Using for example Z-axis and X-rotation for throttle and yaw works. 

Developer (3 edits)

Glad you got it working! Thanks for sharing the solution.

(Oh, and if my last reply seemed strange it's because I misread your last post, my brain didn't see that you had in fact already un-installed vJoy and Smartpropoplus)

Take a look on this commit: https://github.com/wireless-rc-adapter/wireless-rc-adapter/commit/48b4f95b1d0053...

It was done to improve compatibility and seems a solution for your issue. Reading your post i assume you don't need further explanation, but if you do than i'm glad to help, just open a issue on the git repo.

Awesome work! I did a simpler version of it, but simple pulsein instead of interrupts. I have two questions about it: 
-Is there any reason for the particular pins selected? Wouldn't it make more sense / is it possible to use pins next to each other? 4, 5, 6, 7, 8, 9 for example?

-Is it normal, that it has a slight play? A like it's a little shaky? Did you think of some kind of noise filtering?

One extra question, but maybe I'll need to contact Freerider dev about it: On mac and android it is totally fine, but on windows it is strange and unusable: The only a portion of the stick movements work, and sometimes it's inverted. Like the upper third of the throttle, and the rightmost quarter of the roll. I'll make a vid of it when I'll get to a Windows machine.

Thank you for sharing it, I love it :)

Developer (2 edits)

Mac and Android uses some Linux input system I believe, which is a bit different than Windows'. At least Unity's input manager (used for development of Freerider) sometimes works better in one combination of OS/Input device, an not the other. That's why it is necessary, for example - when using a Taranis, to make the endpoint adjustments according to the Taranis setup document on Windows, but not on Mac/Android. (Range from 0 to +100 instead of range from -100 to 100). Make that info can help you find a solution.

(1 edit)

Glad to see it is so popular and hoping it is not too late for giving some support!

The pins were selected based on the manual of the PinChangeInterrupt library, which is being used in place of the pulseIn() function. It is a very nice, lowlevel interrupt library and makes it possible to use the code on more different boards. Although not every port register is supported on every board, especially on the 32u4 ones (like Pro Micro, Leonardo, etc), so that is why pins are not in order. For example on a Leonardo or Micro (not the Pro Micro!) only 4 channels can be found on the side of the boards, the rest two is on the ICSP header. It would be only possible arrange the pins on 328p (Uno,Nano) or Mega boards, but those are missing the USB-HID support.

Slight play comes from the adapter, since it have to process those values, while acting also as a joystick for the computer or tablet. Usually this shaking is very low, i would say acceptable until the diff is not more than 1 or 2. With pulseIn() i managed to get a concrete-stable input, but that was working for only 4 channels at a time.

The issue on Windows is seems like calibration is necessary, but make sure you have not made some mixing or so on the transmitter. Most of the time weird errors come from forgotten mixes.

EDIT: Ok, i've just read Freerider's comment and it is a great idea to check!

(2 edits)

Edit: I managed to compile & run it on a Leonardo board, but I don't have pins 14/15/16, as it is a different board.
What pins do I map it to? Right now I have set it to pins 3 to 8 and all I see is TX/RX constantly orange, nothing happens and the device doesn't show up as a joystick in Windows 10.

On Leonardo or Micro boards only the 8-9-10-11 are usable, so only 4 channels you have and have to modify the source code according. Not just the pins, but watch out for the array sizes and so. Right now i'm working on a solution, where also these boards can have 6 channels working, without any modifications to the source code. In case you are interested, look for the dev branch on github in a few days from now.