SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Aug 07, 2011, 10:05 AM
Registered User
hungary
Joined Jan 2011
113 Posts
Build Log
neRecv - Solo/Solo Pro TX as HID Joystick or PPM simulator controller

I wanted a have a TX to control an RC simulator and I only have a Nine Eagles Solo Pro transmitter. So I decided to make a receiver that will read the stick position information sent out by the SoloPro TX, and pass that over to a simulator through either USB or PPM.

The device draws power from USB and has two modes of operation which are controller by the PPM/HID jumper.

HID Joystick mode

If the PPM/HID jumper is open when powering up the device or after reset, the device will run in HID joystick mode. It introduces itself to the operating system as a standard HID Joystick. It doesn't need any drivers since Windows/Linux/MacOS already have the necessary drivers for HID joysticks. However, you have to go through the joystick calibration procedure of the OS before using the device. NOTE: remember to do the joystick calibration in double rates (full circle) on the TX!

I have tested this mode with ClearView and Heli-X and it works as expected. I have also tried FMS, but for some mysterious reason FMS does not recognize one of the channels during calibration.


PPM mode

If the PPM/HID jumper is closed after power up or reset, the device will run in PPM mode. In this mode neRecv receives data from the TX and converts it to PPM. The USB connection will not send or receive any data but the device still needs to be plugged in USB for power. The generated PPM signal is sent out through a 3.5mm jack. The voltage of the signal is limited with a 3.6V zener diode. The PPM frame duration is 22ms, with the 4 channels mapped to pitch, rudder, elevator and aileron in that order. The duration for each channel is the standard 1-2ms with a 0.3 ms pulse. neRecv can generate both positive and negative PPM. This is configured in the firmware with the NEGATIVE_PPM preprocessor definition.

I have tested the PPM mode with Phoenix RC and RealFlight G5. It works.


The hardware

The hardware is built around a 28 pin AVR micro controller running at 12MHz. I use an ATmega88, but it should also work with ATmega48, ATmega168 or ATmega328. The device uses the SparkFun nRF24L01+ module for communicating with the TX. I have used the version with the chip antenna http://www.sparkfun.com/products/691. The version with the duck antenna can also be used and should have a better range. http://www.sparkfun.com/products/705 However, this extra range is not really necessary since you are not likely to stand more than 10 meters from the PC and the receiver.

The USB connection in HID joystick mode is implemented with V-USB.

The device has 3 LEDs. One is the power indicator, the other indicates that the device is receiving data from the TX. The third LED is not currently used. This could change in a future update. For instance it could be a bootloader indicator.

One jumper is for PPM/HID mode selection and the other is not used. It could be used in future updates to activate a bootloader.

Please note that since version 1.0 I have rotated the orientation of the SparkFun module to simplify PCB routing. I have also changed the AVR programming interface from 6 pins to 10 pins. I have also added a reset push button.

The design also contains a 4 pin serial interface that I used for debugging. This is not needed for normal operation of the device.


The TX protocol

The TX sends data out in 7 byte packets on address 0x3443101001 about 110 times each second. Is uses the 250kbps data rate and it cycles through channels 10, 30 and 50. The data packet can be represented with the following C structure:

Code:
typedef struct
{
    // stick position. the range of these is 0 - 0x7f
    uint8_t pitch;
    uint8_t rudder;
    uint8_t elevator;
    uint8_t aileron;
	
    uint8_t     packet_type;    // 0x55 for sticks data
	
    uint16_t    tx_id;          // id of the TX
} nePacket_t;
The first 4 bytes are pitch, rudder, elevator and aileron respectively. The TX uses the 7 least significant bits of each byte to send out the data.

The next byte contains the packet type. This is 0x55 for normal stick position. The last 2 bytes contain the ID of the TX. This is used for binding to the heli receiver. Binding the TX to the neRecv device is done automatically by the firmware. neRecv will 'bind' to the first TX it sees after power up and listen to only this TX until reset. The signal from any other TX received after this will be ignored.

neRecv should work with any NE Solo Pro or compatible TX. I have tested with a standard Nine Eagle TX and a TX that comes with the rebranded Merlin Tracer 90.


The firmware

Brief description of the source code files:

neRecv.c

This file contains the main() function. In turns on the power LED, reads the status of the PPM/HID jumper and branches into functions PPM_Output() or HID_Joystick() accordingly.

nRF24L01.h and nRF24L01.c

These contain functions and definitions used for communication with the SparkFun module.

neRX.c and neRX.h

Contains functions RX_Init() and RX_ReadSticks(). The first puts the SparkFun module in receive mode. The seconds reads the data from the last received packet into the neSticks structure. It returns 0 if no data was available.

HID_Joystick.c and HID_Joystick.h

Contains the HID_Joystick() function which is called by main(). It configures the USB connection and runs neRecv in HID joystick mode.

PPM_Output.c and PPM_Output.h

Contains the PPM_Output() function which is called by main(). It configures and runs neRecv in PPM output mode.

avr_serial.c and avr_serial.h

Function init_serial() initializes the serial port of the AVR micro to 57600 BAUD. This allows debug output with the printf() function. These are not necessary for the normal functioning of the device.


Although neRecv works perfectly for me, I'm sure that people with more experience can spot flaws in the hardware design (or maybe even firmware). I appreciate any advice you might have about things that could be improved. Come to think of it, my main motivation to build this was to learn about electronics and microcontrollers. Flying the virtual helicopters is just an added bonus.

I have attached the EAGLE schematics, the PCB board and the firmware source code.


Enjoy!
kile is offline Find More Posts by kile
Last edited by kile; Aug 18, 2011 at 05:49 PM. Reason: Upgraded to v2.1
Reply With Quote
Sign up now
to remove ads between posts
Old Aug 07, 2011, 11:50 AM
Registered User
United Kingdom, Bristol
Joined Aug 2008
1,774 Posts
Very nice, thanks
SadSack is offline Find More Posts by SadSack
Reply With Quote
Old Aug 18, 2011, 05:45 PM
Registered User
hungary
Joined Jan 2011
113 Posts
I finished version 2.1 which can output a PPM signal for Phoenix RC/RealFlight. I have edited the first post and attached the new schematics and firmware.
kile is offline Find More Posts by kile
Reply With Quote
Old Sep 15, 2011, 07:57 AM
Registered User
Joined May 2009
2 Posts
Quote:
Originally Posted by kile View Post
I have attached firmware source code.
Thank you!
Unfortunately, I have the skills to work only in CodeVisionAVR. You can get a compiled HEX for ATmega88?
Or, please tell me - what kind of environment I can compile the source?
EagleB3 is offline Find More Posts by EagleB3
Reply With Quote
Old Sep 15, 2011, 01:36 PM
Registered User
hungary
Joined Jan 2011
113 Posts
Quote:
Originally Posted by EagleB3 View Post
Thank you!
Unfortunately, I have the skills to work only in CodeVisionAVR. You can get a compiled HEX for ATmega88?
Or, please tell me - what kind of environment I can compile the source?
I have attached the the HEX for ATmega88 you asked for. Don't forget to set the fuses!

You can compiled the source with the free WinAVR toolchain.
http://winavr.sourceforge.net/
kile is offline Find More Posts by kile
Reply With Quote
Old Sep 15, 2011, 10:46 PM
Registered User
Joined May 2009
2 Posts
Thank you so much!
EagleB3 is offline Find More Posts by EagleB3
Reply With Quote
Old Sep 19, 2011, 11:47 AM
Registered User
Joined Sep 2011
2 Posts
Thank you kile
That's an awesome DIY for Solo Pro !

I was wondering , how did you decode the Tx protocol ?

Thanks
geekATheart is offline Find More Posts by geekATheart
Reply With Quote
Old Sep 19, 2011, 02:48 PM
Registered User
hungary
Joined Jan 2011
113 Posts
Quote:
Originally Posted by geekATheart View Post
I was wondering , how did you decode the Tx protocol?
I stumbled upon a Russian website that claimed the transceiver chip used on the SoloPro is Nordic nRF24L01. It made sense, so I got the documentation for the chip and started reading. A few weeks later a bought a Saleae Logic analyzer (very, very nice little tool, highly recommended). One of the best features of the Logic analyzer software is that it allows the user to write custom protocol analyzers. So I wrote an analyzer for the chip and attached the probes to the pins of the transceiver module in the TX. The rest was easy because the protocol is really simple. The nRF24L01 commands that the TX sends to the module are a little confusing and redundant, but not hard to decode.
kile is offline Find More Posts by kile
Reply With Quote
Old Sep 23, 2011, 07:56 AM
Registered User
Joined Sep 2011
8 Posts
Hi,

This is very interesting, thank you for sharing.

Would it be possible to make just the opposite, in other words make a compatible module (taking PPM in), so it can be used with module transmitters like the JR PCM9x or 9303 ?

All my birds are on the PCM9x DSM2 module, it would be cool if I could ditch the little NE transmitter and have only one TX to take on vacation.

Thank you.
Catseyes is offline Find More Posts by Catseyes
Last edited by Catseyes; Sep 23, 2011 at 08:15 AM.
Reply With Quote
Old Sep 23, 2011, 08:41 AM
Registered User
hungary
Joined Jan 2011
113 Posts
Quote:
Originally Posted by Catseyes View Post
Would it be possible to make just the opposite, in other words make a compatible module (taking PPM in), so it can be used with module transmitters like the JR PCM9x or 9303 ?
Yes, it would be possible. Channel mapping and binding would have to be worked out, but I don't think that would be a problem. And some calibration would be necessary. Also, EPA and subtrim would probably not work. At least not easily.

It would be strange to fly a Solo Pro with a 600$ TX
kile is offline Find More Posts by kile
Reply With Quote
Old Sep 23, 2011, 10:11 AM
Registered User
Joined Sep 2011
8 Posts
Quote:
Originally Posted by kile View Post
It would be strange to fly a Solo Pro with a 600$ TX
Yup I know but it's a pain to have to take one more TX with you every time, and since I have 1 RTF and 2 BNF, I could part with the RTF, it would make a nice gift for a friend.

But after looking at your code, and the points you raise, I think it would be more than I can chew, a man must know his limits .
Catseyes is offline Find More Posts by Catseyes
Reply With Quote
Old Oct 06, 2011, 06:08 AM
Registered User
Gabek's Avatar
Magyarország, Baranya, Pécs
Joined Feb 2008
423 Posts
You did something great! Nice!

It is also a bit hard for me to even understand it....

Let me ask you one thing. It is a bit different, but pretty close to this.

Is it possible to make a module out of a original nine eagle transmitter for a Futaba transmitter? Like is there a module inside?

Thx
Gabek is offline Find More Posts by Gabek
Reply With Quote
Old Oct 06, 2011, 09:06 AM
Registered User
hungary
Joined Jan 2011
113 Posts
Quote:
Originally Posted by Gabek View Post
Is it possible to make a module out of a original nine eagle transmitter for a Futaba transmitter? Like is there a module inside?

Thx
Yes, there is a transceiver module inside the TX. It looks just like this:

Actually, the antenna cord in the Solo Pro TX is a little shorter than the one on this image but everything else seems to be the same. The module contains only the nRF24L01 chip and the supporting electronics, so it will not be possible to just take this module and plug it into a Futaba TX without (lots of) additional electronics.

So, making a plug-in Futaba/JR TX module would not be easy. It's possible, I'm just not sure it is worth the trouble.

Üdv
kile is offline Find More Posts by kile
Reply With Quote
Old Oct 06, 2011, 09:10 AM
Registered User
Gabek's Avatar
Magyarország, Baranya, Pécs
Joined Feb 2008
423 Posts
Quote:
Originally Posted by kile View Post
Yes, there is a transceiver module inside the TX. It looks just like this:

Actually, the antenna cord in the Solo Pro TX is a little shorter than the one on this image but everything else seems to be the same. The module contains only the nRF24L01 chip and the supporting electronics, so it will not be possible to just take this module and plug it into a Futaba TX without (lots of) additional electronics.

So, making a plug-in Futaba/JR TX module would not be easy. It's possible, I'm just not sure it is worth the trouble.

Üdv
THX!

Have enyone managed to actually make one?
Is there a howto, or anything?

I knew that it would be complicated, but need to know how complicated it really is.

THX again!
Gabek is offline Find More Posts by Gabek
Reply With Quote
Old Oct 10, 2011, 08:18 AM
Skilled crasher
Ukraine, Kyiv city, Kiev
Joined Oct 2010
81 Posts
You need to make a PCB with a micricintroller that will read the transmitter's PPM, recode it into NE's format and send it to antenna chip. Also, you'll need a voltage stabiliser, as the chip runs on 3.3 volts - it will burn at 5. Not too complicated electrically but very complicated at firmware part.
sashaNar is offline Find More Posts by sashaNar
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
For Sale ForceFly joystick feedback system, Immerson RC tracker system, Force 3D Pro joystick airmcn_3 FPV Equipment (FS/W) 10 Dec 08, 2013 05:05 AM
Sold FS/FT Nine Eagles Solo Pro also the same as Revell Proto Max like a blade msr gaaunapoi Aircraft - Electric - Helis (FS/W) 5 Aug 03, 2011 06:05 PM
For Sale FS/FT Nine Eagles Solo Pro also the same as Revell Proto Max like a blade msr gaaunapoi Aircraft - Electric - Helis (FS/W) 4 May 25, 2011 03:30 PM
For Sale FS/FT Nine Eagles Solo Pro also the same as Revell Proto Max like a blade msr gaaunapoi Aircraft - Electric - Helis (FS/W) 5 May 25, 2011 12:30 PM