[SOLVED] How to bind spektrum sat to nano (328P)

Post Reply
Cereal_Killer
Posts: 221
Joined: Fri Mar 06, 2015 5:44 am

[SOLVED] How to bind spektrum sat to nano (328P)

Post by Cereal_Killer »

Hey guys, second post here (it is going a bit better than my first attempt...)

I'm using a clone arduino nano with a 328P and on-board serial-USB using a CH340G iC. I'm not able to get my orangeRX (model R615) to bind. I'm not sure I fully understand the process in the first place but let me describe what I know.

I'm using MW 2.4 (also note I have no other orange / DSMX / DSM2 equiment so I cant simply bind some other way then move it over to the MW...)
Devo 7E with Deviation (running the 3/5/15 nightly)
Arduino nano clone w/ 328P
This is the Rx section of code (as-is while I'm trying to bind)

Code: Select all

  /**************************************************************************************/
  /********                       special receiver types             ********************/
  /**************************************************************************************/

    /****************************    PPM Sum Reciver    ***********************************/
      /* The following lines apply only for specific receiver with only one PPM sum signal, on digital PIN 2
         Select the right line depending on your radio brand. Feel free to modify the order in your PPM order is different */
      //#define SERIAL_SUM_PPM         PITCH,YAW,THROTTLE,ROLL,AUX1,AUX2,AUX3,AUX4,8,9,10,11 //For Graupner/Spektrum
      //#define SERIAL_SUM_PPM         ROLL,PITCH,THROTTLE,YAW,AUX1,AUX2,AUX3,AUX4,8,9,10,11 //For Robe/Hitec/Futaba
      //#define SERIAL_SUM_PPM         ROLL,PITCH,YAW,THROTTLE,AUX1,AUX2,AUX3,AUX4,8,9,10,11 //For Multiplex
      //#define SERIAL_SUM_PPM         PITCH,ROLL,THROTTLE,YAW,AUX1,AUX2,AUX3,AUX4,8,9,10,11 //For some Hitec/Sanwa/Others

      // Uncommenting following line allow to connect PPM_SUM receiver to standard THROTTLE PIN on MEGA boards (eg. A8 in CRIUS AIO)
      //#define PPM_ON_THROTTLE

    /**********************    Spektrum Satellite Reciver    *******************************/
      /* The following lines apply only for Spektrum Satellite Receiver
         Spektrum Satellites are 3V devices.  DO NOT connect to 5V!
         For MEGA boards, attach sat grey wire to RX1, pin 19. Sat black wire to ground. Sat orange wire to Mega board's 3.3V (or any other 3V to 3.3V source).
         For PROMINI, attach sat grey to RX0.  Attach sat black to ground. */
      #define SPEKTRUM 1024
      //#define SPEKTRUM 2048
      #define RX_SERIAL_PORT 0    // Forced to 0 on Pro Mini and single serial boards; Set to your choice of 0, 1, or 2 on any Mega based board (defaults to 1 on Mega).
      //**************************
      // Defines that allow a "Bind" of a Spektrum or Compatible Remote Receiver (aka Satellite) via Configuration GUI.
      //   Bind mode will be same as declared above, if your TX is capable.
      //   Ground, Power, and Signal must come from three adjacent pins.
      //   By default, these are Ground=4, Power=5, Signal=6.  These pins are in a row on most MultiWii shield boards. Pins can be overriden below. 
      //   Normally use 3.3V regulator is needed on the power pin!!  If your satellite hangs during bind (blinks, but won't complete bind with a solid light), go direct 5V on all pins.
      //**************************
      //   For Pro Mini, the connector for the Satellite that resides on the FTDI can be unplugged and moved to these three adjacent pins.
      #define SPEK_BIND             //Un-Comment for Spektrum Satellie Bind Support.  Code is ~420 bytes smaller without it.
      #define SPEK_BIND_GROUND 4
      #define SPEK_BIND_POWER  5
      #define SPEK_BIND_DATA   6

    /*******************************    SBUS RECIVER    ************************************/
      /* The following line apply only for Futaba S-Bus Receiver on MEGA boards or PROMICRO boards.
         You have to invert the S-Bus-Serial Signal e.g. with a Hex-Inverter like IC SN74 LS 04 */
      //#define SBUS     PITCH,YAW,THROTTLE,ROLL,AUX1,AUX2,AUX3,AUX4,8,9,10,11,12,13,14,15,16,17  // dsm2 orangerx
      //#define SBUS     ROLL,PITCH,THROTTLE,YAW,AUX1,AUX2,AUX3,AUX4,8,9,10,11,12,13,14,15,16,17  // T14SG
      //#define RX_SERIAL_PORT 1
      //#define SBUS_MID_OFFSET 988 //SBUS Mid-Point at 1500

    /******************************* HOTT RECIVER ************************************/
    /* Graupner Hott HD */
    //#define SUMD PITCH,YAW,THROTTLE,ROLL,AUX1,AUX2,AUX3,AUX4
    //#define RX_SERIAL_PORT 1


So when I try to bind I disconnect the MPU6050 board from A4/A5 (the only I2C port on the 328P based nano) and un-comment the 4 bind lines above (do I need to comment out "#define SPEKTRUM 1024" and "#define RX_SERIAL_PORT 0 " while I'm trying to bind with the other 4 lines active?). I then plug in the orange Rx to A4, A5 and A6, compile, upload, power off, power back up and open the GUI, connect and try to hit bind but nothing happens, no lights flash or anything and because the MPU6050 is now disconnected all the readings on the GUI go crazy (and I get an ever rising I2C error count) but that's it. Also note (as I believe it should be) the purple/blue "RX BIND" button appears on the lower left of the GUI only when the 4 bind lines are active, if I comment those back out the button isnt there.

I've got no idea what I'm doing here, I have tried to speculate what the issue is but everything I look into, thinking it's going to be it isnt it and I get no closer, I've been working at this a few days now. I'm not ready to fly, still finishing up my 3D printed frame and waiting on new props but I have it all setup on the bench and it should be fine for testing (especially just for getting this thing bound).

Thanks in advance for any help!


edited to add: Also note I found this post on RCG, while I wasn't comfy giving it 5v I did use my bench PS to give the orange sat unlimited 3.3v, it could of drawn up to 2A if needed, so I know that's not the problem.
Last edited by Cereal_Killer on Fri Mar 27, 2015 12:49 am, edited 1 time in total.

Cereal_Killer
Posts: 221
Joined: Fri Mar 06, 2015 5:44 am

Re: cant figure it out! How to bind spektrum sat to nano (32

Post by Cereal_Killer »

Any thoughts on this guys?

Been at it pretty much continously the last 24h and still havent got it to bind :(.

I'm thinking I should cut the traces to the CH340 USB converter, would that help me? Or go ahead and give it 5v (note if that bricks it I'll be done testing till I can get another rx, I only have the one on hand).

Hoppsan_84
Posts: 51
Joined: Thu Jul 10, 2014 2:13 pm

Re: cant figure it out! How to bind spektrum sat to nano (32

Post by Hoppsan_84 »

I Think you have to connect it to the serial port and when you do you can't connect to it any more.
I am not 100% shure of this but petty shure.
I think this is only suitable if you have a i2c display to program your fc whit.

Don't connect it to 5 volt you Will brick it that I am Shure of.

Cereal_Killer
Posts: 221
Joined: Fri Mar 06, 2015 5:44 am

Re: cant figure it out! How to bind spektrum sat to nano (32

Post by Cereal_Killer »

Hoppsan_84 wrote:I Think you have to connect it to the serial port and when you do you can't connect to it any more.

Yea that's what I think too, which is why I connect it to 4, 5 & 6 (the one serial port on the nano [328P] is A4/A5). Do I need to comment out the MPU6050 sensor (since it connects over serial) while I'm binding? I haven't tried that, I will now.

Edit: Are you saying I have to leave it on the serial port in use, that I cant use the single wire PPM connection? Cause that's no bueno for my setup! I dont mind moving it there (or any other ports) while I initially bind it but I cant leave it there, I have to have a gyro!

Hoppsan_84 wrote:I think this is only suitable if you have a i2c display to program your fc whit.

I dont, I bought a cheap china OLED and can not find it's i2C address to get it working, not a huge deal tho as I don't really care to have a screen. In that case [of me not using a display at all] what do I need to do?




What is the possibility of using a bind jumper like on AlienWii? That way I dont have to do this "plug it in somewhere else to bind" step and could simply ground a spare pin to put it into bind mode?

Cereal_Killer
Posts: 221
Joined: Fri Mar 06, 2015 5:44 am

Re: cant figure it out! How to bind spektrum sat to nano (32

Post by Cereal_Killer »

Got it working!

I found this page-http://redigital.org/wp/wp-content/uploads/2012/10/189478565X846863X48.pdf

The issue (as I knew about) was that it cant talk to the USB converter and the satellite at the same time, they both require the serial RX pin (D0). Therefore what you do is0 comment this line (as well as all the other Rx lines for now):

Code: Select all

    #define SPEKTRUM 1024


And Un-comment these 4 lines below:

Code: Select all

      #define SPEK_BIND             //Un-Comment for Spektrum Satellie Bind Support.  Code is ~420 bytes smaller without it. 
      #define SPEK_BIND_GROUND 4
      #define SPEK_BIND_POWER  5
      #define SPEK_BIND_DATA   6


Then you compile, flash, connect your board to your computer and go threw the GUI setup. You move the sat over to pins 4, 5 and 6 (GND, 3V3 and signal) so you're able to go threw the GUI's SPEK BIND process.

After you've got your board setup you then go back into the arduino IDE, comment the 4 lines out and activate the #define SPEKTRUM 1024 line (or 2048, whichever you need), recompile and reflash and you're ready to fly.

Post Reply