UART Radio project

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: UART Radio project

Post by Alexinparis »

Hi,

Thank you for testing.

So, according to the led scheme, it seems to work fine.

some more info:

UART of TX and RX is set to 115200 baud exactly like default MW boards.
57600 is the "air baud". 2 different things

In this version PPM stream from TX to RX is present even if there is no PPM source connected to the TX (last values are used).
that explains the constant pattern you see in case of no PPM signal.

in the 2.2 or last dev release, you must comment out #define RCSERIAL (this will not be required anymore for further versions)

you can't use the modules to transmit arbitrary data. the code is made to transmit only valid MSP frame. everything else is just discarded.

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: UART Radio project

Post by wilco1967 »

Hi Alex,

Thanks for your fast reply....

So my misunderstanding was the 57600 v.s. 115200.... set everything back to 115200, and suddenly the datalink works..... :P Yeah !!!!
Did not have to #define RCSERIAL.... in fact, could not even locate it in the source anymore.... (I remember seeing it in previous versions).


But problems surface:

On my tricopter, with flyduino mega 2560 board, I can see sensor data perfect in the GUI, apparently without errors (any faulty data may be ignored, I don't know) but the RCserial data is extremely jittery.... it is received, but jumps from 1500, to whatever the transmitter is sending, back to 1500, many times per second, on all 8 channels.

Took power for the OrangeLRS receiver from +5V / Gnd of the multiww serial port (connected to one of the servo plus on the TX.... i.e NOT to the orangeLRS serial port).. Also tried taking power from any other servo pin of the MWi board... made no change (as expected).
MultiWii serial TX pin to OrangeLRS RX pin
MulitWii serial RX pin to OrangeLRS TX pin

Any idea what could cause the jittery transmitter data as visible on the GUI ? (BTW, it's also noticeble from the tail servo moving rapidly)
and more important.... any idea what I can do about it ??? :roll:


on a sidenote:
I guess I messed up my other 328P controller yesterday.... accidentely put 3.3V from FTDI on GND, and GND from FTDI to VCC of MW.... :oops:
after that initially none of my sensors worked... only I2C errors.... later they seems to work again, but sometimes the Gyro data is missing (ACC seems OK).... guess I fried something.... not 'deep fried', but 'rare to medium'... (intermitent)
However, when using the OrangeLRS on this one, the transmitter data seems to be reasonable fine....


I'm sad to hear the serial datalink only accepts MSP frames.....
Got a friend who ordered the same modules, hoping to use it for his remote weather station (meteorological data from various sensors outside to his computer indoor).... I misunderstood that this would provide a naturel serial data stream.... :? Never mind.... I'll buy the two modules off him, if he cannot use them... I'll find some purpose one way or the other...

P.S. Do you know of any project using these modules, that offers transfer of pure, unscrambled serial date.... no need for a PPM style RC control link.... just the serial link...

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: UART Radio project

Post by crashlander »

wilco1967 wrote:P.S. Do you know of any project using these modules, that offers transfer of pure, unscrambled serial date.... no need for a PPM style RC control link.... just the serial link...

Your friend should probably look for something like APC220 or APC802
http://www.ebay.com/itm/APC220-Wireless ... 3f1549fdac
http://www.goodluckbuy.com/apc802-apc80 ... tance.html
Those two works up to 19200bps air speed and enables pure serial data like "wireless cable" :)

Regards
Andrej

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: UART Radio project

Post by wilco1967 »

yea, I know about those (at least similar).....

I was just hoping the OpenLRS could do something similar....
I cannot see any reason why not, other than someone has to write some code...;-)

read some info on the original openLRS software, but that seems limited to low baudrates.... Alex's little project here has a much better speed or so it seems....
Can always buy more hardware if no luck, but try to avoid that ;-)

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: UART Radio project

Post by wilco1967 »

Allright... some more findings.

happened that my tricopter actually had a older version of the MW software.... (still had the RCserial statement in it)
updated to the latest dev 1432....

With that, at least I can read the GUI data, as long as I leave the controls through my normal Frsky receiver....
If I disconnect the Frsky, it will try to use the RCserial data coming in through the OrangeLRS, which is still very unstable.... it does not jump as bad as earlier, but still nothing sensible comes through.

Was hoping to fly with this version, as I could use the GUI in combination with my normal receiver.
However, there are some unrelated new problems with the tail servo pin being moved to HW_PWM, which have not been resolved yet in this version of the MW software.... (as is commented in the source). Even if going back to the old software pin, the tail servo moves again, but in the wrong direction....

Anyway....
I'm starting to believe this Uart radio project code / OrangeLRS is actually working fine.... The problem seems to be in the MW software.... I'm sure that will be resolved soon...

Thanks !

gompf-2
Posts: 136
Joined: Sun Jun 05, 2011 11:46 am

Re: UART Radio project

Post by gompf-2 »

Hi,
wilco1967 wrote:P.S. Do you know of any project using these modules, that offers transfer of pure, unscrambled serial date.... no need for a PPM style RC control link.... just the serial link...

"Problem" of the OLRS module is that Meli decided to use software SPI to keep the PWM pins free so the Arduino RFM22 lib (http://www.airspayce.com/mikem/arduino/RF22/) doesn´t work. The module I got can be used with hardware SPI so the "simple link" is in the libs examples ;-).
Anyways it´s possible as you just need to combine Melis driver part with an "open" tx/rx buffer. Sorry, no time yet. If I find some time for coding I first want to include some option to switch TX serial to Jeti mode and just display vbat.

Regards,
gompf

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: UART Radio project

Post by wilco1967 »

SUCCES !!!!!!! :D

Finally got the UART radio working as intended..... :P

Turned out to be a stupid mistake from myself (as usual)...
After all the back and forth testing, and changing software many times, at some point it must have stuck in my mind that the PPM in of the TX module was pin 5.... However, that's only for OpenLRSng.... the UART radio uses the first pin (marked RSSI).... :oops:

So once that was corrected, it started talking.... :P

just came back from a test-flight....
Initially used Frsky for control, and UART radio only for GUI.... flew out approx 200 meter without problem.
then moved to RCserial control. Works just fine, though sometimes it seems to 'miss a beat'....

Then I tried adjusting GPS hold PID tuning, while hovering in PH....
That did not turn out very good. At some point when uploading ('write'), the copter quit, and it fell down.... broken most of my nylon spacers, and an arm, but that 'll fix today... So probably not a good idea to 'write' while flying 8-) :lol:
Not that I think it matters, but this was while using the Frsky for control.

Anyway, I consider this UART radio project a great succes !!!!

Thanks a lot again Alex for another great addition....

Wilco.

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: UART Radio project

Post by crashlander »

wilco1967 wrote:Then I tried adjusting GPS hold PID tuning, while hovering in PH....
That did not turn out very good. At some point when uploading ('write'), the copter quit, and it fell down....
Wilco.

Been there! Done that! Wrote about it! And got mixed responses but most of them was that is probably my setup... (you can search my posts from last summer) and Dramida claimed he is doing it all the time without issues (writing PID's while flying).

Regards
Andrej

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: UART Radio project

Post by wilco1967 »

wilco1967 wrote:
Then I tried adjusting GPS hold PID tuning, while hovering in PH....
That did not turn out very good. At some point when uploading ('write'), the copter quit, and it fell down....
Wilco.

Been there! Done that! Wrote about it! And got mixed responses but most of them was that is probably my setup... (you can search my posts from last summer) and Dramida claimed he is doing it all the time without issues (writing PID's while flying).


I have an idea why it happened... not sure though...

I was using the latest DEV, and that has some new 'features' for servo / HW_PWM.
initially the tail servo was working reverse, and no proper solution to correct it.. Then I found new GUI (by PatrikE) + servomisconf.exe (by Mis, see other threat about 'general servo handler'). The new GUI doesn't recognize my bluetooth dongle for whatever reason (windows :? ). the 'normal' one does, so I was using the older GUI for flying.

First 'write' went OK, but second one caused it to disarm in mid air.
After I fixed all the mechanical damage, discovered that my servo settings, min throttle, etc. were lost (all the things the 'old' Gui does not yet know).

My guess is, the old gui has overwritten some settings it wasn't aware of, and caused it to shutdown...


BTW.
just flew again (after repairs). When flying on RCserial data, there are often glitches. Is there any kind of CRC check done on a received packet, before deciding whether it be used or not ?

other question: the GUI seems to drop gyro & mag data after some time. It also seems to slow down. Is the Gui perhaps auto adjusting for lost packets, when the link starts to give dropouts when i'm flying further out ?. Seems like it's automatically de-activating less important data, when data is lost.

Data link is still working quite reasonable at approx 300 meter out. However for flying I still prefer to rely on the Frsky link.

My goal is to get GPS 'follow-me' and waypoint navigation working.... (now need to find an excuse to buy a smartphone :roll: )
http://www.youtube.com/watch?v=nPICiiaDTnc&list=PLl4hhz1q9nhN_hmnfLlbCtomB2OrV2vOq

gompf-2
Posts: 136
Joined: Sun Jun 05, 2011 11:46 am

Re: UART Radio project

Post by gompf-2 »

Hi,

I did some mods for Jeti, now qnd coded, should be switchable at startup for serial com/jeti sensor output later. I just added jetibox.ino to the project, slightly changed decode() and removed the MW-serial part.

Seems I´ve a silly problem with variable scope/pointers I don´t see. It´s not directly realted to the UART Radio project (now) but I think it fits best here because of the file/function structure:

I use 4 arrays:
in init section_

Code: Select all

static char jetiline1[17],jetiline2[17];
static char msg[10],tm[10];

2 lines display content, 2 buffers for string modifications

They are filled during setup:

Code: Select all

strcpy (jetiline1,"VBat       0,0 V");
  strcpy (jetiline2,"TX uptime      s");


And modified later:
With every RC transfer:

Code: Select all

sprintf(tm, "%04u", millis()/1000);
    // Copy time to the string
    for (i=0; i<4; i++) {
      if (tm[i] < 32) tm[i]=32;
      jetiline2[i+10] = tm[i];
    }

With MSP_ANALOG answer from MW:

Code: Select all

while(headAIR != tailAIR) { //check for answer and decode

    if (decode(ringBufferAIR[tailAIR++])){  //1 = valid packet, starts at inBuf[0]
      switch (cmdMSP){
      case MSP_ANALOG:
        vbat=inBuf[0];//intPowerMeterSum,rssi       

        // Copy vbat to the string:
        sprintf(msg, "%03u", vbat);
        jetiline1[13]=msg[2];
        jetiline1[11]=msg[1];
        if (vbat>99) jetiline1[10]=msg[0];
        else jetiline1[10]=32; //skip leading 0
        break;


I use a define to switch serial init:

Code: Select all

#if defined (DEBUG)
  Serial.begin(9600);
#else
  JetiUartInit();
#endif


When I now switch to JetiUartInit() the LCD-frame is updated only once (as I can see "0000" at the end of jetiline2 injected by the "Copy time to the string" stuff), I checked with a jetibox and the serial monitor ("stable garbage" due to 9bit com). If I abuse JetiSensor(jetiline1,jetiline2,0,false) and write to the UART initialised by Serial.begin(9600) I see some garbage from the jeti header/missing cr/lf but the ASCII-output is OK and "alive"(seconds counting).
I just don´t get it why changing the serial init freezes the array? Must be a bloddy, silly one somewhere. If somebody else is interested in Jeti output and has some sparetime you may have a look...

Regards,
gompf
Attachments
MSP_TX2_mod_jeti-130510a.zip
(5.87 KiB) Downloaded 160 times

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: UART Radio project

Post by Alexinparis »

Hi,

I've just uploaded in the first post a new revision (RX_TX3).
This should be more stable regarding RC data, as MSP_SET_RAW_RC is ensured to be transmitted in case of congestion.

New LED semantic:

center LED (called green, but is RED on HK modules):
slow blink = no signal
solid ON = signal establish
blink = congestion. a blink = a reset of input buffer + data loss
LED next to PINs (called RED):
off = no PPM signal
on = PPM signal on first PIN for TX or PPM well received on RX

The PPM stream (via MSP_SET_RAW_RC) is now only transmitted if there is a PPM input on the TX.

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: UART Radio project

Post by wilco1967 »

Alexinparis wrote:Hi,

I've just uploaded in the first post a new revision (RX_TX3).
This should be more stable regarding RC data, as MSP_SET_RAW_RC is ensured to be transmitted in case of congestion.


Great !

just downloaded it. Seems to work fine on the bench. No flight test yet (and the weather doesn't seem like I will get another flight today)...

Flew today with the previous version, and a borrowed smartphone running EZ-GUI....
Very cool..... simply put the copter in Position Hold + baro mode, and then use the smartphone to tell it to go to various locations, just by pointing in the map. Flew out approx 300 mtrs, with stock antenna, and no problems.
Also follow-me is cool.... the copter follows you (or better, the phone), like it was a dog on a leash 8-)

Will report back once I have a flight with the new version (using RCserial for control).

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: UART Radio project

Post by scrat »

wilco1967 wrote:
Alexinparis wrote:Hi,

I've just uploaded in the first post a new revision (RX_TX3).
This should be more stable regarding RC data, as MSP_SET_RAW_RC is ensured to be transmitted in case of congestion.


Great !

just downloaded it. Seems to work fine on the bench. No flight test yet (and the weather doesn't seem like I will get another flight today)...

Flew today with the previous version, and a borrowed smartphone running EZ-GUI....
Very cool..... simply put the copter in Position Hold + baro mode, and then use the smartphone to tell it to go to various locations, just by pointing in the map. Flew out approx 300 mtrs, with stock antenna, and no problems.
Also follow-me is cool.... the copter follows you (or better, the phone), like it was a dog on a leash 8-)

Will report back once I have a flight with the new version (using RCserial for control).


What do I need to uncomment in config.h to have follow me with EZ-GUI? Thanks.

User avatar
ezio
Posts: 827
Joined: Sun Apr 01, 2012 11:03 pm
Location: Paris
Contact:

Odp: UART Radio project

Post by ezio »

scrat wrote:
wilco1967 wrote:
Alexinparis wrote:Hi,

I've just uploaded in the first post a new revision (RX_TX3).
This should be more stable regarding RC data, as MSP_SET_RAW_RC is ensured to be transmitted in case of congestion.


Great !

just downloaded it. Seems to work fine on the bench. No flight test yet (and the weather doesn't seem like I will get another flight today)...

Flew today with the previous version, and a borrowed smartphone running EZ-GUI....
Very cool..... simply put the copter in Position Hold + baro mode, and then use the smartphone to tell it to go to various locations, just by pointing in the map. Flew out approx 300 mtrs, with stock antenna, and no problems.
Also follow-me is cool.... the copter follows you (or better, the phone), like it was a dog on a leash 8-)

Will report back once I have a flight with the new version (using RCserial for control).


What do I need to uncomment in config.h to have follow me with EZ-GUI? Thanks.

#define USE_MSP_WP

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: UART Radio project

Post by Alexinparis »

scrat wrote:What do I need to uncomment in config.h to have follow me with EZ-GUI? Thanks.


First, you need to have a working conf with GPS HOLD using a serial GPS (not I2C)
+ you need to uncomment #define USE_MSP_WP in config.h

that's all

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: UART Radio project

Post by scrat »

Alexinparis wrote:
scrat wrote:What do I need to uncomment in config.h to have follow me with EZ-GUI? Thanks.


First, you need to have a working conf with GPS HOLD using a serial GPS (not I2C)
+ you need to uncomment #define USE_MSP_WP in config.h

that's all


1. GPS HOLD - I have working conf
2. I'll uncomment USE_MSP_WP

Thank you ezio and Alex.

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: UART Radio project

Post by wilco1967 »

Did a testflight yesterday with the new (ver 3) UART radio code, with mixed results. 8-)

Ranges seems to have improved.... managed to fly out 537 meter using the UART radio for control. I did not have anything communicating over the serial link (don't know if that would matter). It did not seem to loose signal during range test,
Did not fly out further as it became a dot in the sky, so could not tell anymore where it was heading. I let the RTH feature bring it back until I can see it properly again...

However, sometimes, the UART radio looses contact, even at close range (< 1 mtr) :? . It's still bound, but the red led is very weakly blinking rapidly (hardly visible). It will be on when I switch of the transmitter module. so it's definitely detecting the signal from the Tx....
The other led that normally shows traffic, is off, not showing anything....
Need to power cylce the Rx module before it will act normal again. Switching off and on again the TX does not seem to solve it.
The first version did not show this behaviour. To a noob like me it looks like it is stuck somewhere in a software loop....
But as long as it works, the range seems better than before, and no more glitching (using stock antennas).

Did not try the serial link in flight (did not bring the laptop), however on the kitchen table, that worked fine.... (did not notice the lock-out when testing indoor).

No damage done during all testing.. 8-)
Had the Frsky receiver 'on standby'.... Whenever RXserial link is lost, the MW will fall back to CPPM from the Frsky, which is set to RTH + baro mode.
I simply power up the Tx in 1-way mode, so the 2-way Frsky receiver does not get a link....
If a problem happens on the UART radio part, I can simply power down the Tx for a moment, and power up in two-way mode, to regain control through the old trusted Frsky.... That way I can test without loosing the copter....

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: UART Radio project

Post by Alexinparis »

Hi,

Thank you for testing. I understand you use the frsky backup in this case :)
So, I managed to reproduce the problem, but I'm not sure the root cause comes from the soft.

Explanation: when the RX is powered via the 5V of the FC board, It's ok
When I connect my Assan RX + serial GPS to the same board, I observe some signal glitch and even a RX lock.
The difference is mainly a higher current load due to more electronic components.
So I think the HK OLRS modules are very sensitive to the quality of the input VCC (level and voltage jitter).
I suspect the voltage jitter to disturb the frequency generator.

I decided to power the RX via an external +5V source, and no more problem in more than 1 hour with the GUI running.

So the next interesting test: could you try to reproduce some problems, but with a dedicated BEC for the HK OLRS RX.



wilco1967 wrote:Did a testflight yesterday with the new (ver 3) UART radio code, with mixed results. 8-)

Ranges seems to have improved.... managed to fly out 537 meter using the UART radio for control. I did not have anything communicating over the serial link (don't know if that would matter). It did not seem to loose signal during range test,
Did not fly out further as it became a dot in the sky, so could not tell anymore where it was heading. I let the RTH feature bring it back until I can see it properly again...

However, sometimes, the UART radio looses contact, even at close range (< 1 mtr) :? . It's still bound, but the red led is very weakly blinking rapidly (hardly visible). It will be on when I switch of the transmitter module. so it's definitely detecting the signal from the Tx....
The other led that normally shows traffic, is off, not showing anything....
Need to power cylce the Rx module before it will act normal again. Switching off and on again the TX does not seem to solve it.
The first version did not show this behaviour. To a noob like me it looks like it is stuck somewhere in a software loop....
But as long as it works, the range seems better than before, and no more glitching (using stock antennas).

Did not try the serial link in flight (did not bring the laptop), however on the kitchen table, that worked fine.... (did not notice the lock-out when testing indoor).

No damage done during all testing.. 8-)
Had the Frsky receiver 'on standby'.... Whenever RXserial link is lost, the MW will fall back to CPPM from the Frsky, which is set to RTH + baro mode.
I simply power up the Tx in 1-way mode, so the 2-way Frsky receiver does not get a link....
If a problem happens on the UART radio part, I can simply power down the Tx for a moment, and power up in two-way mode, to regain control through the old trusted Frsky.... That way I can test without loosing the copter....

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: UART Radio project

Post by shikra »

HK OLRS modules are well known for this. The standard fix is to add large capacitor on the 5v rail + a small one one after the 3v3 reg

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: UART Radio project

Post by wilco1967 »

Alexinparis wrote:Hi,

Thank you for testing.

Thank you for providing all these great projects :D
Alexinparis wrote:I understand you use the frsky backup in this case :)
So, I managed to reproduce the problem, but I'm not sure the root cause comes from the soft.

Explanation: when the RX is powered via the 5V of the FC board, It's ok
When I connect my Assan RX + serial GPS to the same board, I observe some signal glitch and even a RX lock.
The difference is mainly a higher current load due to more electronic components.
So I think the HK OLRS modules are very sensitive to the quality of the input VCC (level and voltage jitter).
I suspect the voltage jitter to disturb the frequency generator.

I decided to power the RX via an external +5V source, and no more problem in more than 1 hour with the GUI running.

So the next interesting test: could you try to reproduce some problems, but with a dedicated BEC for the HK OLRS RX.


Seems like that's indeed the case....
Powered the OLRS RX with the BEC of a one of the ESC's (nothing else connected to the BEC). The flight controller and all connected is powered by the other 2 ESC's (they have lineair BEC's, so play along nicely when connected together).

Indeed, not a single loss.... Also flew out far again, all OK 8-)

shikra wrote:HK OLRS modules are well known for this. The standard fix is to add large capacitor on the 5v rail + a small one one after the 3v3 reg


Hi shikra,
Do you perhaps have a link for that fix ?...
If it can be solved like that, I would prefer that to reserving a dedicated power supply...

<EDIT> Found it already...... http://www.rcgroups.com/forums/showpost.php?p=24497684&postcount=1037
Thanks !

ovaltineo
Posts: 15
Joined: Sun Apr 28, 2013 11:41 pm

Re: UART Radio project

Post by ovaltineo »

Am I correct in thinking that Multiwii itself can run on the HK OLRS module? It is essentially a pro mini with RFM22B. Just stick a GY-80 IMU or something similar on the I2C port and maybe an I2C GPS?
Alex, is there room to incorporate your RX code in this thread with the Multiwii code? This will be a nice all-in-one module for guys like me on a tight budget.

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: UART Radio project

Post by Alexinparis »

ovaltineo wrote:Am I correct in thinking that Multiwii itself can run on the HK OLRS module? It is essentially a pro mini with RFM22B. Just stick a GY-80 IMU or something similar on the I2C port and maybe an I2C GPS?
Alex, is there room to incorporate your RX code in this thread with the Multiwii code? This will be a nice all-in-one module for guys like me on a tight budget.


Hi,
This idea is not new, it was done some time ago with this board:
#define OPENLRSv2MULTI // OpenLRS v2 Multi Rc Receiver board including ITG3205 and ADXL345
http://www.flytron.com/openlrs/170-open ... ition.html
Before, Melih did this directly with an RX module and a wiimotion plus (see comments):
http://www.flytron.com/openlrs/146-open ... er-v2.html

The original OPLRS code is in multiwii in RX part.
there wouldn't be a lot of thing to do to adapt this code by the one of this thread

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: UART Radio project

Post by Alexinparis »

wilco1967 wrote:Indeed, not a single loss.... Also flew out far again, all OK 8-)


super !
too bad the module is so voltage sensitive, just something to care about in the setup.

kipkool
Posts: 30
Joined: Mon Jun 25, 2012 9:21 am

Re: UART Radio project

Post by kipkool »

What about using the rmf22B/rmf23bp modules directly plugged through ISP fc and feeding rc&serial data directly ?

This should optimise delays of the last step serial>ppm>fc conversion.

Those RF modules cost less than 15$, this would make a really cheap & effective solution. No need of another PCB.

This would free a serial port either.

power67
Posts: 33
Joined: Wed Aug 22, 2012 8:37 pm

Re: UART Radio project

Post by power67 »

Hello, I need some help getting started with this project

I am having trouble getting a connection with a futaba 10c transmitter.

I have uploaded the 2 codes to the boards and have a steady LED on the tx and a blinking LED on the rx. I have a AIOP with the secondary ftdi serial port connected to the rx serial port.

I set the tx to use futaba ppm and tapped off the ground pin (second from right) and ppm pin( first pin on left) of the module pins of my 10c.

what am I missing?

thanks

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: UART Radio project

Post by Plüschi »

I have 2 HK openlrs modules, but was quite disappointed with the performance. Seems the high data rate with stock firmware has a negative effect on the receive sensivity. I have also 2 APC220 modules and 2 RF1100 modules, but i have not range tested them yet. The slower speed promises a (much, nearly 10db) better sensivity.

There is a problem ... even a modest 8 channel 50hz transmission (uncompressed) will need more than 4800 baud. And transmitting back the GUI values needs much much more. I guess the difficult task is to drastically reduce bandwidth requirements without reducing crispness (not sending static data is one idea). Any clever ideas?

fryefryefrye
Posts: 57
Joined: Thu Apr 11, 2013 7:19 am

Re: UART Radio project

Post by fryefryefrye »

Plüschi wrote:I have 2 HK openlrs modules, but was quite disappointed with the performance. Seems the high data rate with stock firmware has a negative effect on the receive sensivity. I have also 2 APC220 modules and 2 RF1100 modules, but i have not range tested them yet. The slower speed promises a (much, nearly 10db) better sensivity.

There is a problem ... even a modest 8 channel 50hz transmission (uncompressed) will need more than 4800 baud. And transmitting back the GUI values needs much much more. I guess the difficult task is to drastically reduce bandwidth requirements without reducing crispness (not sending static data is one idea). Any clever ideas?


With a module like APC220 running on 9600bps, it can only get 1hz data refresh on EZ-GUI。 9600bps can have 500m range.

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: UART Radio project

Post by wilco1967 »

Alexinparis wrote:
wilco1967 wrote:Indeed, not a single loss.... Also flew out far again, all OK 8-)


super !
too bad the module is so voltage sensitive, just something to care about in the setup.


I think this conclusion was a little pre-mature....
Did quite a few other flights, and lost the link on nearly every battery at least once.

Tried adding 330 uF capacitor on 3.3V side (i2c bus). no change
MW board + UART radio (+ 3.3V capacitor) powered by 3A UBEC, servo powered by ESC's. no change
Uart radio powered by 1 ESC UBEC (+ capacitor), MW board by 3A UBEC, servo by remaining 2 ESC's, no change....

Sometimes I loose the link almost straight away. Other times, I can complete one battery without problem, but most times, it looses the link 2..3x per battery
Sometimes when flying far out, but also within a few meters....
Sometimes I can the link working again by shutting down the Tx, but other times I have to power down the Rx / MW

Could it be the TX module instead ? I'm powering that by the 9X, through a 5V UBEC. Might try adding a capacitor to the TX is as well. Can also try removing the bluetooth (but what good is it without bluetooth).

I tried OpenLRSng before this briefly, and did not have any problems there..... might try that again. If that proves to be reliable on a couple of flights, it would at least rule out electrical problems I guess.....

Now if time allows :roll:

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: UART Radio project

Post by wilco1967 »

power67 wrote:Hello, I need some help getting started with this project

I am having trouble getting a connection with a futaba 10c transmitter.

I have uploaded the 2 codes to the boards and have a steady LED on the tx and a blinking LED on the rx. I have a AIOP with the secondary ftdi serial port connected to the rx serial port.

I set the tx to use futaba ppm and tapped off the ground pin (second from right) and ppm pin( first pin on left) of the module pins of my 10c.

what am I missing?

thanks


Some of my experiences:

The RX led should become solid (or blinking very rapidly, as when communicating).. The slow 0.5 sec blinking is when there is no link with the TX. It should connect within 2 seconds of powering up, and go solid. No bind or anything is required.

Did you flash the MSP_RX3.ino code in the RX, and the MSP_TX3.ino code in the TX ?

Do you use a 5V ubec for powering the TX ?

PPM signal from your Futaba radio should go to the first pin (marked RSSI) with Alex's software,. This is a different pin than for example the OpenLRSng software.

Don't know futaba, but the OrangeRX module (used as a TX) will expect a 5V ppm signal (or thereabout... not sure what it will tolerate), Not every transmitter uses 5V levels (my old Graupner MX12 doesn't for example). But even without PPM signal, the receiver led should stop blinking when the radio's 'hear' eachother.

Just provide 5V power to any of the PPM +5V pins on both modules, and they should link. Do NOT put 5V on the 6pin serial port...

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: UART Radio project

Post by Alexinparis »

kipkool wrote:What about using the rmf22B/rmf23bp modules directly plugged through ISP fc and feeding rc&serial data directly ?

This should optimise delays of the last step serial>ppm>fc conversion.

Those RF modules cost less than 15$, this would make a really cheap & effective solution. No need of another PCB.

This would free a serial port either.


The last step is not so long, it's just serial -> rcdata without the ppm step.
But yes the principle would be perfect. It would need however a remapping of some pin, because currently ISP pins are used.

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: UART Radio project

Post by Alexinparis »

power67 wrote:Hello, I need some help getting started with this project

I am having trouble getting a connection with a futaba 10c transmitter.

I have uploaded the 2 codes to the boards and have a steady LED on the tx and a blinking LED on the rx. I have a AIOP with the secondary ftdi serial port connected to the rx serial port.

I set the tx to use futaba ppm and tapped off the ground pin (second from right) and ppm pin( first pin on left) of the module pins of my 10c.

what am I missing?

thanks


As wilco said, even without any ppm signal, the LED of RX&TX should be on and should not slowly blink.
It's not normal to have one which is solid on and the other which blinks.
You maybe fried one module: the FTDI port doesn't like 5V on VCC, be careful with this point.

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: UART Radio project

Post by Alexinparis »

Plüschi wrote:I have 2 HK openlrs modules, but was quite disappointed with the performance. Seems the high data rate with stock firmware has a negative effect on the receive sensivity.

the stock firmware offers a very low baudrate. really incompatible with multiwii GUI need.

I have also 2 APC220 modules and 2 RF1100 modules, but i have not range tested them yet. The slower speed promises a (much, nearly 10db) better sensivity.

I'm not investigating any more on those modules. *whatever* the settings (I tested almost all possibilities), I can't manage to have a decent baudrate with a decent latency. I think they are probably optimized for mavlink support and not well designed to carry tranparently any byte.
The result I get with OLRS modules and my code is so far much interesting.

There is a problem ... even a modest 8 channel 50hz transmission (uncompressed) will need more than 4800 baud. And transmitting back the GUI values needs much much more. I guess the difficult task is to drastically reduce bandwidth requirements without reducing crispness (not sending static data is one idea). Any clever ideas?

Using 57600k non symmetrical link, I managed to use the OLRS modules and the multiwiiconf GUI with no loss and with the same feeling I have with a direct FTDI link.

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: UART Radio project

Post by Alexinparis »

I think this conclusion was a little pre-mature....
Did quite a few other flights, and lost the link on nearly every battery at least once.

Tried adding 330 uF capacitor on 3.3V side (i2c bus). no change
MW board + UART radio (+ 3.3V capacitor) powered by 3A UBEC, servo powered by ESC's. no change
Uart radio powered by 1 ESC UBEC (+ capacitor), MW board by 3A UBEC, servo by remaining 2 ESC's, no change....

Sometimes I loose the link almost straight away. Other times, I can complete one battery without problem, but most times, it looses the link 2..3x per battery
Sometimes when flying far out, but also within a few meters....
Sometimes I can the link working again by shutting down the Tx, but other times I have to power down the Rx / MW

Could it be the TX module instead ? I'm powering that by the 9X, through a 5V UBEC. Might try adding a capacitor to the TX is as well. Can also try removing the bluetooth (but what good is it without bluetooth).

I tried OpenLRSng before this briefly, and did not have any problems there..... might try that again. If that proves to be reliable on a couple of flights, it would at least rule out electrical problems I guess.....

Now if time allows :roll:


So news are mitigated...
I'm currently rebuilding my very first tricopter to test this on the field. I hope I could reproduce and correct it.

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: UART Radio project

Post by Alexinparis »

some other news about the turnigy 9X customization:

there is an I2C port on the OLRS module, so, why not using it to display something.
IMG_20130522_192149 (1).jpg
IMG_20130522_192021 (1).jpg
IMG_20130522_191843 (1).jpg
IMG_20130522_191819 (1).jpg


Using a around 17cm antenna (lamba/4) gives better results than the stock antenna, even without ground plane according the the RSSI measurement.
Quite surprising.
IMG_20130522_191709 (1).jpg


the module before its integration inside the radio
IMG_20130519_154455 (1).jpg

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: UART Radio project

Post by wilco1967 »

Hi Alex,

nice project you got there..... will be watching....
That's one of those OLED displays, isn't it ? ..... I have one of those laying around....

I did some more bench testing this evening.
When I leave the copter powered up on the table, and the TX powered up, and do nothing (just wiggle the tail a little sometimes to check if still alright) the link will most likely not fail.
However, if I shield the TX antenna with my hand, there is some spot, where it causes interference.... the red led on the TX start to blink when packets are lost.... That are the moments where the link will very likely be lost (but not always), and will most of the time not recover, even if I take my hand away.

When the link is lost, The RX led will not start blinking as when there is no connection, but it will be kind of dimly lid (probably very fast blinking).... if I turn of the TX, it will start blinking, so it did still 'hear' the TX

I also observed some jumping data on the GUI (with control still working, although not very smooth at all).... the copter also really sees this. When armed, the motor and tail servo sometimes can jump violently.....
My copter crashed twice last week (both very near the ground, so only a prop lost), probably because of this.... The Frsky wasn't connected at the time (or not yet in failsafe mode, thus not sending PPM signals) when it happened....
one time it made a violent forward flip, before ending up in my neighbours hedge :lol: .... the second time it did a sidewards flip (as fast as it would go) :shock: .... lasted less than 1 second.

So my guess is not so much electrical trouble, but some kind of intolerance for weak / unclear / interference signals upsetting / confusing the RX.
The glitches are probably an indication that faulty signals still sometimes make it through the checksum test, and upset the copter.
It wouldn't be an issue if they were filtered out

Hope this helps.....

BTW: The range is quite OK, as long it is working.... I regulary fly out to the edge of what I can see (around 300 - 500 meter max). It's still OK at those ranges, and that's all I need without an FPV setup.

P.S, my RX antenna already broke.... it simply came off when trying to glue it to my protection box.... no real force.... Made a 1/4" dipole from some coax cable... no idea if this is better than the stock, but I can still fly out as far as my eyesight allows.

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: UART Radio project

Post by Alexinparis »

wilco1967 wrote:That's one of those OLED displays, isn't it ? ..... I have one of those laying around....

yes it is.
If you want to play with it, I've updated MSP_RX_TX4.zip
RSSI TX: the one of the TX receiver
RSSI RX: the one of the RX receiver (the most important)

User avatar
dramida
Posts: 473
Joined: Mon Feb 28, 2011 12:58 pm
Location: Bucharest
Contact:

Re: UART Radio project

Post by dramida »

I am following this topic and i am glad to see it evolving.

From OLRS experience i can tell that 433 Mhz works good outside citys, 437 even better in RO, but i had surprizing low range in the centre of Bucharest, where i lost signal at about 200m even with a Lambda/4 with ground plane antenna with tx module mounted on top of a 3m pillar.

The main problem of RFM 22B is lack of narrow band filtering in RF pre-amplifier which leads to saturation from other powerfull RF sources, even they are tens of Mhz away. So expect of having splited results, some good, some poor.

One solution would be to enchance the antena I/O with narrow band filters to reject powerefull RF emmisions in nearby bands.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: UART Radio project

Post by copterrichie »

@Dramida, don't know if this will help but here is a forum on building Notch Filters: http://www.rcgroups.com/forums/showthread.php?t=1758166

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: UART Radio project

Post by wilco1967 »

Hi,

Wasn't really conviced my problems are electrical..... So I went back to the OpenLRSng firmware.
No problem whatsover.... never lost control, without even the slightest glitch.

So I think this means, its a software issue of the UART radio code.... It works fine when there is a clear signal, but it can get confused by interference.

The OpenLRSng code is fine for just (ppm) control, but it lacks a usable serial link.... for pure control I can use Frsky.
This project is really promising, so I hope Alex can come up with a solution that makes it more reliable for control :mrgreen:

Thanks !

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: UART Radio project

Post by Alexinparis »

Hi,

I think I found at least one problem in software which leads to data inconsistency once it occurs. It should be corrected in MSP_RX_TX5.zip in the first port.
with this one, I didn't managed to reproduce a long break in the link communication.

wilco1967 wrote:Hi,

Wasn't really conviced my problems are electrical..... So I went back to the OpenLRSng firmware.
No problem whatsover.... never lost control, without even the slightest glitch.

So I think this means, its a software issue of the UART radio code.... It works fine when there is a clear signal, but it can get confused by interference.

The OpenLRSng code is fine for just (ppm) control, but it lacks a usable serial link.... for pure control I can use Frsky.
This project is really promising, so I hope Alex can come up with a solution that makes it more reliable for control :mrgreen:

Thanks !

wilco1967
Posts: 156
Joined: Thu Aug 18, 2011 6:04 pm
Location: Winterswijk, Netherlands

Re: UART Radio project

Post by wilco1967 »

Alexinparis wrote:Hi,

I think I found at least one problem in software which leads to data inconsistency once it occurs. It should be corrected in MSP_RX_TX5.zip in the first port.
with this one, I didn't managed to reproduce a long break in the link communication.



Hi Alex,

Seems to work now.....
Flew 4 batteries, without a single loss of control.... :)
Sometimes I notice a very short drop-out (less than 1 sec) when flying further out (approx 200 meters), but control always came back immediately....
Not as smooth as Frsky, but flies just fine (except the occasional twitch).
All fine when closer by.

Thanks a lot for yet another great addition !

Wilco

User avatar
NikTheGreek
Posts: 348
Joined: Thu Dec 08, 2011 4:17 pm
Location: Greece
Contact:

Re: UART Radio project

Post by NikTheGreek »

I'm waiting two of these boards because seems very interesting and promising . :D

I have two questions..
1. there is any way to increase the channels transmited from 8 to 12 or more ?
2.does anyone have blueprints of a DIY high gain antenna ?

Thank you.

crashlander
Posts: 506
Joined: Thu May 05, 2011 8:13 am
Location: Slovenia

Re: UART Radio project

Post by crashlander »

NikTheGreek wrote:2.does anyone have blueprints of a DIY high gain antenna ?
Thank you.

Basically: http://www.rcgroups.com/forums/showthread.php?t=1159968
But on RC (TX, RX) side high gain is often not really useful since it normally introduces narrow angel of radiation that is unacceptable on RX side and probably not handy on TX.
The easiest is to do "Sander style" antenna for TX and RX or a dipole (http://www.rcgroups.com/forums/showthread.php?t=1413650) or inverted V to lessen the cross-polarization issues (http://www.rcgroups.com/forums/showpost ... ostcount=8)

Regards
Andrej

User avatar
NikTheGreek
Posts: 348
Joined: Thu Dec 08, 2011 4:17 pm
Location: Greece
Contact:

Re: UART Radio project

Post by NikTheGreek »

crashlander wrote:Basically: http://www.rcgroups.com/forums/showthread.php?t=1159968
But on RC (TX, RX) side high gain is often not really useful since it normally introduces narrow angel of radiation that is unacceptable on RX side and probably not handy on TX.
The easiest is to do "Sander style" antenna for TX and RX or a dipole (http://www.rcgroups.com/forums/showthread.php?t=1413650) or inverted V to lessen the cross-polarization issues (http://www.rcgroups.com/forums/showpost ... ostcount=8)

Regards
Andrej


Thank you Andrej

Still waiting shipment from Hobbyking :(

thebgrian
Posts: 47
Joined: Sun Mar 27, 2011 4:46 am

Re: UART Radio project

Post by thebgrian »

I would like to check if somebody used Alex'es solution with the HK TX module. I ordered the set (TX/RX), not paying attention that I need two RXes. Looking at the schematic from flytron (http://www.flytron.com/pdf/openlrs-m2-module.pdf, http://www.flytron.com/pdf/OpenLRS_RX2.pdf) I see some differences in the pins used to communicate with the RFM22B and in the LEDs connections. Already tried flashing the provided sketches, but couldn't get the modules to connect at all, which is to be expected.
Thank you Alex and everybody else involved in this great project.

Update: After changing some of the pins definitions I got the TX and RX to connect to each other. Added some buzzer sound to match some of the LED notifications also.
Unfortunately while testing, I burned the RX before getting to verify the data transmission. It happened at the moment I powered up the Mega AIO, the power for the OLRS RX was connected to 5V UBEC and the Rx and Tx pins were connected to com1 of AIO. It looks like the problem is with RFM22 - after cutting the power to the breakout board I can get back the rest of the RX to work, when connected I get only 1.2V instead of 3.3V and the voltage regulator get really hot. Now back to waiting for a replacement from HK.

thebgrian
Posts: 47
Joined: Sun Mar 27, 2011 4:46 am

Re: UART Radio project

Post by thebgrian »

I got some RFM22 modules and built a receiver with an Arduino Pro Mini (from old FC) using the schematics for OpenRLS v2. It turned out a pretty compact package.
After uploading the sketches, I see the modules connected (LEDs are blinking very fast on both) but after 7-10 sec. the LEDs will start blinking slow as if there is no connection.
Is this normal since I don't have them connected to flight controller to send data or something is not working right?
Attachments
Arduino Pro mini OpenLRS.
Arduino Pro mini OpenLRS.

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: UART Radio project

Post by Alexinparis »

Hi,

the LEDs will start blinking slow as if there is no connection

This is what happen when there is no signal detected. It happens for instance if you shutdown one of the module.

Is this normal since I don't have them connected to flight controller to send data or something is not working right?

No, without any connection, the led should stay on when a signal is received.

User avatar
NikTheGreek
Posts: 348
Joined: Thu Dec 08, 2011 4:17 pm
Location: Greece
Contact:

Re: UART Radio project

Post by NikTheGreek »

Hi.
A pair of modules just arrived but the 3.3V FTDI is not. :(
While waiting the mailman i have a noobish question. :oops:

In my 9x transmitter can i take the PPM output from the back of the transmitter using an 3.5mm audio jack and then drive it to the module ?

Thank you

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: UART Radio project

Post by Alexinparis »

NikTheGreek wrote:In my 9x transmitter can i take the PPM output from the back of the transmitter using an 3.5mm audio jack and then drive it to the module ?


On mine, I removed the 3.5mm jack to have more room.
But yes I think so

User avatar
NikTheGreek
Posts: 348
Joined: Thu Dec 08, 2011 4:17 pm
Location: Greece
Contact:

Re: UART Radio project

Post by NikTheGreek »

Hello again.
My 3.3V/5V FTDI finally arrived :D !
So far i've flashed the boards (TX-RX) with the respective files and everything seems OK.
Unfortunately i don't have a bluetooth module and i wonder if and how can i connect the base module(TX) to my laptop in order to view all real time incoming data in MultiWii GUI.
Can be done ?
Thank you in advance.

Post Reply