Espritmodel.com Telemetry Radio
Reply
Thread Tools
Old Oct 09, 2011, 09:18 PM
Flys with Thumbs
Danal Estes's Avatar
Frisco, TX, USA
Joined Sep 2001
1,858 Posts
Quote:
Originally Posted by JussiH View Post
Does this support both 11-bit and 10-bit streams?
No. 10 bit = 1024 mode, and 11 bit = 2048. This code supports only 1024.

I have no plans to support 11/2048 bit, ever, because the internal code throughout the Multiwii base effectively operates at a resolution of 1000 steps. The multiwii code carries all RC information, regardless of whether it comes from a standard receiver via 4 or more pins, or a serial PPM, or my code... it carries any source as a number that ranges from 1000 to 2000 with 1500 defined as center. That is a range of 1000. This is in literally hundreds of places in the code. So, a 2048 bit resolution would just have to be divided down to the 1000 range anyway. Therefore, no point.
Danal Estes is offline Find More Posts by Danal Estes
Reply With Quote
Sign up now
to remove ads between posts
Old Oct 20, 2011, 08:48 AM
Registered User
Joined Jul 2011
188 Posts
Hi Danal,

is the latest code already included in devr313 (http://code.google.com/p/multiwii/source/browse/#) or do I need to download it here (http://code.google.com/p/multiwii/so...8%2BSpektrum)?

Your work is highly appreciated by all Spektrum users! And ... it will save us lots (!) of money (I'm using a 1hoch4 SpektrumtoPPM at the moment ....)!

So, when Paul releases his new toy (http://www.rcgroups.com/forums/showp...postcount=2250) I will grab one and put an Orange satelite on it --> lightwight and only min. wiring needed; perfect for indoor fun!

Rgds
aBUGSworstnightmare
aBUGSnightmare is offline Find More Posts by aBUGSnightmare
Last edited by aBUGSnightmare; Oct 20, 2011 at 09:09 AM.
Reply With Quote
Old Oct 20, 2011, 01:00 PM
Flys with Thumbs
Danal Estes's Avatar
Frisco, TX, USA
Joined Sep 2001
1,858 Posts
Both of the links above land me in the same spot on google code (may have something to do with being logged in as a developer). So:

Any/all versions in my branch have flyable Spek Sat code.

Alex's dev 2011 10 17 also has it, I just downloaded and checked.
Danal Estes is offline Find More Posts by Danal Estes
Last edited by Danal Estes; Oct 20, 2011 at 01:11 PM.
Reply With Quote
Old Oct 22, 2011, 09:26 PM
Flys with Thumbs
Danal Estes's Avatar
Frisco, TX, USA
Joined Sep 2001
1,858 Posts
Announcing 2048 support.

Announcing 11ms support.


Both available in my branch at R316 or above.


I said earlier in this thread I would not support 2048. I changed my mind because I discovered that every (or nearly every) receiver shipping from Spektrum today is 2048 capable. Therefore, it is getting very difficult to bind a satellite in 1024 mode. Thus, the change.

11ms because 2048 mode actually sends 11ms frames if the TX is capable of more than 7 channels (whether they are used or not).


This is ALPHA code. Bench tested but NOT flight tested. Having said that, it is actually a very small change because I wrote the code to support variable bit frame widths to begin with. There are more #ifdef changes then there are code changes... Nonetheless, test carefully, and on a copter you are willing to crash!
Danal Estes is offline Find More Posts by Danal Estes
Reply With Quote
Old Nov 20, 2011, 01:28 PM
Registered User
Joined Aug 2011
17 Posts
Got a problem ))
My sat+Arduino Mega working.After i making some changes on Multiwii config and when i pressing write I geting freezed app and nothing responding .And arduino Mega Rx led blinking till I reset board.I using multiwii 1.9 .Help... Tried disconnect sat but nothing.
asteroidas is offline Find More Posts by asteroidas
Reply With Quote
Old Nov 21, 2011, 10:43 AM
Flys with Thumbs
Danal Estes's Avatar
Frisco, TX, USA
Joined Sep 2001
1,858 Posts
Quote:
Originally Posted by asteroidas View Post
Got a problem ))
My sat+Arduino Mega working.After i making some changes on Multiwii config and when i pressing write I geting freezed app and nothing responding .And arduino Mega Rx led blinking till I reset board.I using multiwii 1.9 .Help... Tried disconnect sat but nothing.
PC GUI is connected to serial 1 on Arduino Mega, correct? And/or via USB.

Try a compile & upload with the //#define SPEKTRUM commented out. See if you can write from the GUI. Then, un-comment #define SPEKTRUM, upload again, and try the exact same thing from the GUI.

Let me know.
Danal Estes is offline Find More Posts by Danal Estes
Reply With Quote
Old Nov 21, 2011, 02:36 PM
Registered User
Joined Aug 2011
17 Posts
Hi,
Connected via USB (this board http://www.dfrobot.com/index.php?rou...product_id=458 ) .Sat receiver connected to Rx1.But i was disconnected everything (include SAT receiver) from arduino and i geting freezed GUI after trying to write setings.When i upoading with //#define SPEKTRUM then GUI working OK.But with //define SPEKTRUM 1024 or 2048 GUI freezed.
asteroidas is offline Find More Posts by asteroidas
Reply With Quote
Old Nov 22, 2011, 10:11 AM
Flys with Thumbs
Danal Estes's Avatar
Frisco, TX, USA
Joined Sep 2001
1,858 Posts
Quote:
Originally Posted by asteroidas View Post
Hi,
Connected via USB (this board http://www.dfrobot.com/index.php?rou...product_id=458 ) .Sat receiver connected to Rx1.But i was disconnected everything (include SAT receiver) from arduino and i geting freezed GUI after trying to write setings.When i upoading with //#define SPEKTRUM then GUI working OK.But with //define SPEKTRUM 1024 or 2048 GUI freezed.
OK, I will double check it on an Arduino Mega.

One more question: With that DFrobot board, what do you set in the Arduino IDE when you are doing uploads, in the Tools>Board menu?
Danal Estes is offline Find More Posts by Danal Estes
Reply With Quote
Old Nov 22, 2011, 01:59 PM
Registered User
Joined Aug 2011
17 Posts
I set arduino Mega 2560 .
But anyways this board working well with //#define SPEKTRUM.If i make wrong settings in Tools>board i geting error.
asteroidas is offline Find More Posts by asteroidas
Reply With Quote
Old Nov 27, 2011, 05:43 AM
Flys with Thumbs
Danal Estes's Avatar
Frisco, TX, USA
Joined Sep 2001
1,858 Posts
I just:

1) Downloaded a fresh copy of 1.9
2) Attached an Arduino Mega board to my PC via a USB A-B cable.
3) Set my Arduino-022 environment to Arduino Mega 2560 and the appropriate com port.
4) Uploaded - note no changes to config.h

The GUI runs fine like this.

5) Uncommented the #define SPEKTRUM 1024
6) Uploaded

The GUI runs fine like this as well.



Can you check to ensure you have the latest download of 1.9, the latest download of Arduino 022, and the latest USB port drivers for the Mega board?
Danal Estes is offline Find More Posts by Danal Estes
Reply With Quote
Old Nov 27, 2011, 11:27 AM
FPV really is fun.
Scotth72's Avatar
Sedona, Az
Joined Sep 2001
899 Posts
What happened in 1.9 that won't allow me to change the serial port like you showed my a while back? I get a void vector error. I am trying to use Rx 2 on my Flyduino V1. Thanks!
Scotth72 is online now Find More Posts by Scotth72
Last edited by Scotth72; Nov 27, 2011 at 11:52 AM.
Reply With Quote
Old Nov 27, 2011, 04:58 PM
Flys with Thumbs
Danal Estes's Avatar
Frisco, TX, USA
Joined Sep 2001
1,858 Posts
Quote:
Originally Posted by Scotth72 View Post
What happened in 1.9 that won't allow me to change the serial port like you showed my a while back? I get a void vector error. I am trying to use Rx 2 on my Flyduino V1. Thanks!
In def.h, change:

Code:
#define SPEK_SERIAL_VECT           USART1_RX_vect
#define SPEK_BAUD_SET              UCSR1A  = (1<<U2X1); UBRR1H = ((F_CPU  / 4 / 115200 -1) / 2) >> 8; UBRR1L = ((F_CPU  / 4 / 115200 -1) / 2);
#define SPEK_SERIAL_INTERRUPT      UCSR1B |= (1<<RXEN1)|(1<<RXCIE1);
#define SPEK_DATA_REG              UDR1
To:

Code:
#define SPEK_SERIAL_VECT           USART2_RX_vect
#define SPEK_BAUD_SET              UCSR2A  = (1<<U2X1); UBRR2H = ((F_CPU  / 4 / 115200 -1) / 2) >> 8; UBRR2L = ((F_CPU  / 4 / 115200 -1) / 2);
#define SPEK_SERIAL_INTERRUPT      UCSR2B |= (1<<RXEN2)|(1<<RXCIE2);
#define SPEK_DATA_REG              UDR2
And, in serial.pde, change:

Code:
  #if defined(USART2_RX_vect) && defined(UDR2)
    SIGNAL(USART2_RX_vect)
    {
      unsigned char c = UDR2;
      store_char(c, &rx_buffer2);
    }
  #elif defined(SIG_USART2_RECV)
    #error SIG_USART2_RECV
  #endif
To delete or comment the entire code block. Remember that /* blah blah */ can be used to comment an entire block. Suppressing the equivalent code for USART0 or USART1 is done with a more complex set of #ifdefs in the distributed code... no need for the complexity if you are always using RX2. Just comment the whole block.
Danal Estes is offline Find More Posts by Danal Estes
Last edited by Danal Estes; Nov 27, 2011 at 05:04 PM.
Reply With Quote
Old Nov 27, 2011, 09:02 PM
FPV really is fun.
Scotth72's Avatar
Sedona, Az
Joined Sep 2001
899 Posts
I had the defines part, just missed the serial.pde part. Thank you very much.
Scotth72 is online now Find More Posts by Scotth72
Reply With Quote
Old Dec 05, 2011, 03:36 PM
If it flies, I will crash it
mxspode's Avatar
USA, CO, Westminster
Joined Jan 2008
3,017 Posts
Danal, a question regarding satellite usage. I have been working on a new shield for the Arduino Nano and I am incorporating connectors for some of the new developments recently added to the MultiWii project, one of which I would like to have being Spektrum Satellite support. In reading back through this thread I noticed at one point you mentioned in this post, that boards like the classic Arduino, the Uno, the Duemilanove would not work due to the built in USB. Can you confirm that the Nano would fall into this group?

I had wanted to use the Nano for a couple of reasons, one being the existence of a 3.3v output pin. The other being the convenience of built in connectivity. I am designing this for a couple of friends that would be better off not having to deal with an FTDI if you know what I mean. I have the Nano resting on a Proto board and I will do some testing as soon as I can find my satellite.

Thanks,
Rob...
mxspode is online now Find More Posts by mxspode
Reply With Quote
Old Dec 05, 2011, 07:47 PM
If it flies, I will crash it
mxspode's Avatar
USA, CO, Westminster
Joined Jan 2008
3,017 Posts
OK, pretty much answered my own question. I had a schedule change this afternoon so I had some time and went ahead and proto'd out this setup. I hooked up the satellite as described and powered it with the 3.3v pin on the Nano. This worked fine. I then downloaded a copy of MultiWii1.9 and configured it for Bi-copter, then uploaded it to the Nano. This went OK so I fired up the GUI and everything seemed to be working OK. I then hooked up a couple of servos and powered the setup with an RX battery to confirm that the WM+ was working. The servos moved so on to the next step.

I re-opened the 1.9 sketch and un-commented Spektrum 1024 support, re-compiled and uploaded. I then disconnected the USB cable and plugged in the satellite. Power up the TX and powered the board with the battery. Again it worked fine, stick movement resulted in the desired motion from the servos and they responded to gyro movement as well.

So it looks like it should work. Obviously this is not flying a quad but I have enough confidence to move forward and bodge out a prototype board for testing.

Rob...
mxspode is online now Find More Posts by mxspode
Last edited by mxspode; Dec 05, 2011 at 07:51 PM. Reason: Added photo
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Sold OrangeRX/Satellites Spektrum DSM2 Compatible 6 Channel 2.4 GHz JimG_AZ Aircraft - General - Radio Equipment (FS/W) 8 Sep 05, 2011 09:50 PM
Sold 2 (two) Spektrum Remote Satellites nizee Aircraft - General - Radio Equipment (FS/W) 0 Feb 12, 2011 09:30 PM
Sold 1 left NIP Orange RX 6 channel receivers with satellites, Spektrum Compatible new1200 Aircraft - General - Radio Equipment (FS/W) 11 Feb 03, 2011 09:35 PM
Wanted WTB: 2 Spektrum satellites jpinn Aircraft - General - Radio Equipment (FS/W) 0 Oct 31, 2010 11:06 AM
Wanted WTB: 2 Spektrum satellites jpinn Aircraft - General - Radio Equipment (FS/W) 0 Oct 20, 2010 09:04 PM