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

UART Radio project

Post by Alexinparis »

Now the technology is here and cheap.
This is a little project I will develop:
Image

I hoped I could hack a current radio system for this purpose, but no RC system offers currently a transparent 2 way telemetry with high rates.

purpose/advantage:
- only one radio media and one interface to command the multi and for various telemetry&navigation purposes.
- compatible with any radio using a ppm sum stream
- can be used as a bluetooth proxy to have a full range navigation solution with a smartphone/tablet
- once developed, the MSP proxy should be stable and able to support future messages without the need to re code it
- the resulting module could be inserted as a JR/Futaba radio module or like a frsky radio hack (including bluetooth dongle)

I will start with a mega board for a prototype because I need 2 hardware UART for this project and I know well this proc.

EDIT 2013 - 04 - 22

Some updates on this project.

1) I didn't manage to get a good bidirectional connection with 3DR modules, whatever the conf on both side.
- even if the air speed is something like 56k, the real usable baud is much less
- there is some latency
I have a working code for mega board as mentioned in the first for those you want to test it with another air techno

2) following dramida advice, I get some HK OLRS RX modules based on arduino 328p + 433Mhz RFM22B modem.
http://www.hobbyking.com/hobbyking/stor ... duct=27096

I scratched my head and built 2 codes from scratch after many hours of test and spec reading:

one to use this module as a TX device
The PPM output of a radio (turnigy 9x in this case) is used to power a BEC in order to have 5V output + PPM signal.
-- even if the HK module spec can support up to 15V, it won't support a 12.4V for a long time (I fried a module) that's why I use a BEC --
The module converts PPM stream and send at 50Hz MSP_SET_RAW_RC signals toward the other RX module with the FC board.
The module can send and receive other MSP message via its UART interface. (optional)
So this UART interface is used in the photo with a bluetooth module (for smartphone apps)
IMG_20130420_201439.jpg

IMG_20130420_201415.jpg


one to use this module as a RX device
The module is just connected to a free UART port of a mega board.
-- note it is important to not supply 5V to the FTDI connectors (I fried a module like this). Instead the 5V should go to the servo PIN --
No more conventional RX receiver
IMG_20130420_201315.jpg

IMG_20130420_201242.jpg


This is for the moment a total success :)
With an air speed of 57.6k (the same speed as OLRS), I managed to have a very fluent GUI communication: ok with at least multiwiiconf, EOSBandi wingui and ezio app over bluetooth.
The communication is tuned to allow more downlink bandwidth because MSP is more hungry in downlink.
The code is for the moment based on a fix frequency but could be adapted later to support hopping.
The expected range should be the same as original OLRS code, ie something like 1 or 2km with stock antennas.

So some beta testers with a pair of RX OLRS modules are needed !

MSP_RX_TX5.zip
(12.45 KiB) Downloaded 756 times
Last edited by Alexinparis on Sun May 26, 2013 10:08 am, edited 4 times in total.

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

Re: UART Radio project

Post by ezio »

Interesting project.
I tried MSP RC Serial with my app but it doesn't work very well. I think it was due to slow refresh rate or something else.

Maybe we can use something like this http://eleres.net/
as a receiver and transmitter. I think it has uart. And it is quite cheap.

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

Re: UART Radio project

Post by copterrichie »

Recently purchased some 433mhz gear myself, looking forward to your work. Personally, I was thinking of building the transmitter from scratch. There are a number of good starters on RCG, many are using USB joysticks.

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

Re: UART Radio project

Post by ezio »

Last edited by ezio on Sun Feb 17, 2013 12:27 am, edited 1 time in total.

kataventos
Posts: 702
Joined: Sun Aug 28, 2011 8:14 pm
Contact:

Re: UART Radio project

Post by kataventos »

Hi Alex nice topic,

I am on it already but only for telemetry propose at this moment, using two 3DR 433mhz radios.
In my case, I am having some communication issues. Running them directly to GUI/OSD at 115200 and 57600 baud (tried them both) and constantly have communication fails/work´s randomly!
My Idea is to build a auto sufficient compact ground station ((e.g) OSD is on ground).
http://www.youtube.com/watch?v=63_AmjAUh0U

Think that this issues are caused by the way how Multiwii handles send/receive MSP commands...

I am too using 2 ports because of the FRSky patch that gives me some more telemetry warnings on my 9X (works great btw).

Have you really tried this with your hardware, what are your thoughts?

Cheers,
KV

Quad FRITZ
Posts: 44
Joined: Wed Apr 25, 2012 11:21 pm

Re: UART Radio project

Post by Quad FRITZ »

Sounds great!
FYI: The 433 3DR modules work good for me (telemetry, changing settings)
Greets

kataventos
Posts: 702
Joined: Sun Aug 28, 2011 8:14 pm
Contact:

Re: UART Radio project

Post by kataventos »

Quad FRITZ wrote:Sounds great!
FYI: The 433 3DR modules work good for me (telemetry, changing settings)
Greets


Nice ;) please describe speed, and software used.

Cheers

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: UART Radio project

Post by timecop »

Fucking seriously, a $19 giant MCU just because it has "two uarts"?

Get into the 21st century, even the cheapest Cortex M3 stuff has 2-3 uarts in smallest packages, plus DMA, plus all sorts of useful peripherals, tons of 16bit hardware PWM, etc etc.

Time to move on to something less retarded for small hacks like these.
Don't forget to get a 3.3V-running atmega168 on same board for level shifting.

User avatar
Rob
Posts: 77
Joined: Sun Apr 03, 2011 4:40 pm

Re: UART Radio project

Post by Rob »

Atmega644p has 2 uarts

Zulu modem max 38,400 Baud

Also with arduinen shield:
http://global-4-lvs-turing.opera-mini.n ... UINO-1.pdf

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

Re: UART Radio project

Post by dramida »

There is a open long range system hardware based on a 256kbit bi-directional modem in 433/915 Mhz.
rfm22b.jpg

The modem is called RFM22B - 100mW or there is an 1W modem upgrade called RFM 23BP
433-tx.jpg
433-rx.jpg

OLRS was initially developed by Melih from Flytron and now is sold by HobbyKing as plug & play for 50 USD combo rx+tx. Software already includes the radio link config and ppm encoder/decoder and also a transparent bi-di serial link.

The nice thing about this bi-di system is that is easely modifiable according to your needs (and has already been modified in various ways by ThUndead)

links:

http://hobbyking.com/hobbyking/store/__ ... ible_.html

http://hobbyking.com/hobbyking/store/__ ... eiver.html

http://www.flytron.com/16-openlrs

User avatar
Rob
Posts: 77
Joined: Sun Apr 03, 2011 4:40 pm

Re: UART Radio project

Post by Rob »

I have look for the max baudrate (on the uart connection) of the rfm22/23 I can't find. Because most modules work with packets for à save transmission. For long range high baudrate van be à problem.


Rob

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

Re: UART Radio project

Post by dramida »

That's the way it works on every transmission, more data you transmit, more power will take.

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

Re: UART Radio project

Post by crashlander »

Alex I really like your idea/project and I'm looking forward to it.
If you managed to get it working with eg. APC802_43 we could get cheap LR system with telemetry.
http://www.goodluckbuy.com/apc802-apc80 ... tance.html

Regards
Andrej

User avatar
Rob
Posts: 77
Joined: Sun Apr 03, 2011 4:40 pm

Re: UART Radio project

Post by Rob »

Feature of APC802:
- GFSK transceiver Module
- 433Mhz ISM frequency band
- 9.6k bps data rate
- Multiple channels
- 27dBm Max. output power
- Baud rate configurable
- 256 bytes data buffers
- Standby current < 5uA
- Supply voltage 4.7~8V


9.6k bps data rate is not much.


Rob

tj_style
Posts: 12
Joined: Mon Aug 27, 2012 5:31 pm

Re: UART Radio project

Post by tj_style »

My sugestion is using RFM22B/23 (module only) + MCU + HC05 is the great combination for this project.
If Alex will using big ATMEGA2560 for MCU, I'm more prefer to use LQFP48 STM32 like STM32F103CBT6 for more compact to be inserted as TX module.

It's just my sugestion.. so, whatever hardware will be used I realy like the Alex idea to making MSP Proxy..

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

Re: UART Radio project

Post by Alexinparis »

Hi,

Interesting project.
I tried MSP RC Serial with my app but it doesn't work very well. I think it was due to slow refresh rate or something else.

Maybe we can use something like this http://eleres.net/
as a receiver and transmitter. I think it has uart. And it is quite cheap.

I think (maybe wrong) it's similar with OpenLRS modules.

kataventos wrote:I am too using 2 ports because of the FRSky patch that gives me some more telemetry warnings on my 9X (works great btw).

Have you really tried this with your hardware, what are your thoughts?

I'm not sure we are speaking of the same thing. I think you refer to the number of UART on multiwii FC (one for frsky, one for telemetry or OSD).
In this case, the purpose is to only have one UART to communicate with FC board.
I've not tried yet because I'm waiting for a 433MHz pair module.


timecop wrote:Fucking seriously, a $19 giant MCU just because it has "two uarts"?

Get into the 21st century, even the cheapest Cortex M3 stuff has 2-3 uarts in smallest packages, plus DMA, plus all sorts of useful peripherals, tons of 16bit hardware PWM, etc etc.

Time to move on to something less retarded for small hacks like these.

Of course, using a mega for this need doesn't make sense for a final product.
We are agree, mega is bigger, more expensive and less powerfull than any M3.
I just want to make a first prototype with something I already have. I expect it to be ported after ;)


dramida wrote:There is a open long range system hardware based on a 256kbit bi-directional modem in 433/915 Mhz.

The modem is called RFM22B - 100mW or there is an 1W modem upgrade called RFM 23BP

OLRS was initially developed by Melih from Flytron and now is sold by HobbyKing as plug & play for 50 USD combo rx+tx. Software already includes the radio link config and ppm encoder/decoder and also a transparent bi-di serial link.

The nice thing about this bi-di system is that is easely modifiable according to your needs (and has already been modified in various ways by ThUndead)


I think this hardware is ready for this need. That's true.
Currently the OpenLRS code is not ready to support high data rates (at least 57k), the transparent bridge mode is designed for something like 4k.
But I'm sure it can be adapted because the layer communication is configured with 57k in OLRS 1.12
It's also interesting because the onboard proc communicates directly via SPI with the modem.
I will buy a RX couple to test it.

dramida wrote:That's the way it works on every transmission, more data you transmit, more power will take.

This is the main problem think. The more we transmit, the less we can reach in range.

tj_style wrote:My sugestion is using RFM22B/23 (module only) + MCU + HC05 is the great combination for this project.
If Alex will using big ATMEGA2560 for MCU, I'm more prefer to use LQFP48 STM32 like STM32F103CBT6 for more compact to be inserted as TX module.

Again, mega is just something I have on my desk currently. It's good enough to write some proto code, but I don't expect to see it in other modules.

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

Re: UART Radio project

Post by crashlander »

Rob wrote:Feature of APC802:
- 9.6k bps data rate

9.6k bps data rate is not much.


Rob


It can be set to 19200bps but not higher!
Andrej

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

Re: UART Radio project

Post by ezio »

Alexinparis wrote:Hi,

Interesting project.
I tried MSP RC Serial with my app but it doesn't work very well. I think it was due to slow refresh rate or something else.

Maybe we can use something like this http://eleres.net/
as a receiver and transmitter. I think it has uart. And it is quite cheap.

I think (maybe wrong) it's similar with OpenLRS modules.


Yes, it is based on OpenLRS

msev
Posts: 186
Joined: Thu Apr 14, 2011 11:49 am

Re: UART Radio project

Post by msev »

There is new firmware for Openlrs, with a lot of the bugs quenched and a lot of new improvements, its called openlrsng by Kha...Take a look here: http://www.rcgroups.com/forums/showthread.php?t=1782034
https://github.com/kh4/openLRSng

alexia
Posts: 85
Joined: Sun Jun 17, 2012 10:23 pm
Contact:

Re: UART Radio project

Post by alexia »

this project seem very promising for long range telemetrie like waypoint

Sebbi
Posts: 478
Joined: Sun Jul 08, 2012 1:08 am
Location: Germany
Contact:

Re: UART Radio project

Post by Sebbi »

What ranges are we talking about here? OpenLRS seems to use frequencies between 400 and 460 MHz. I don't know about other countries, but those frequencies are very limited in Germany (10 mW?!). You are not supposed to constantly fill those bands with data as it is a shared medium (babyphones, thermometers, etc). 430 - 440 MHz can be used by amateurs, but needs licensing as far as i know ... using those frequencies to remote control something also requires a license. And to top it off, from 2014 on 433 MHz can't be used for voice or data transmissions anymore.

I guess it is similar in other EU countries?

868 MHz is even more restricted. No device can use a channel for more than 1% of the time except for channel 11 and that one is restricted to +4dBm :/

QuadBow
Posts: 532
Joined: Fri Jan 04, 2013 10:06 am

Re: UART Radio project

Post by QuadBow »

Sebbi wrote:I guess it is similar in other EU countries?

The frequency regulations are developed and agreed by the Conférence Européenne des Administrations des Postes et des Télécommunications (CEPT, http://www.cept.org/). 48 European countries are members of this organisation, the CEPT can only recommend, nations are invited to implement the resulting regulations into national law. Thus, the regulations should be valid for whole Europe and parts of Africa and the former USSR. You can view them at http://www.cept.org/ecc/tools-and-servi ... nsultation, look for short range device (SRD).

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

Re: UART Radio project

Post by crashlander »

Sebbi wrote:What ranges are we talking about here? OpenLRS seems to use frequencies between 400 and 460 MHz

AFAIK EZuHF uses 433 (http://team-blacksheep.com/products/prod:ezuhf_tx) on 600mW that is 60 times more than specified in http://eur-lex.europa.eu/LexUriServ/Lex ... 070:EN:PDF (on page 4) and most probably it normally transmits more than 10% Duty cycle. :)
But the project is interesting since it does not enforce any frequency/technology restrictions.

@Alexinparis: If you will be using Mega2560 for prototyping you can probably avoid using AVR/Mega special instructions and stick to Arduino. With that in mind it would probably be simpler to port your code to StelarisLaunchpad + Energia (http://energia.nu/download/) (32bits, cheaper than Mega, 7 uart's... Arduino based multy-platform IDE).

Regards
Andrej

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

Re: UART Radio project

Post by gompf-2 »

Hi Sebbi,
And to top it off, from 2014 on 433 MHz can't be used for voice or data transmissions anymore

I dropped the OpenLRS stuff I build because of this, but I yet found "Die Bundesnetzagentur hat am 24. November 2010 eine neue Allgemeinzuteilung für sog. "Short Range Devices" (SRD) veröffentlicht. Die neue Allgemeinzuteilung ist bis zum 31. Dezember 2020 befristet. (wikipedia, SRD). I checked the "Frequenznutzungsteilplan 223, Eintrag 223003" and found no adittional comment.
For me the band is useless anyways as it´s often quiet full at my flight site (might be due to wind power plants etc), so I had no chance with 10mW.
Interesting is, that also the 223/223005 (500mW, RC-Control, e.g. TSLRS) is still there without comment. I thought only "old systems" are still tolerated/no new licence).
I just wrote a mail regarding to the end 2013 limit/500mW for RC to FreqP Bonn.
[/quote]
crashlander wrote:@Alexinparis: If you will be using Mega2560 for prototyping you can probably avoid using AVR/Mega special instructions and stick to Arduino. With that in mind it would probably be simpler to port your code to StelarisLaunchpad + Energia (http://energia.nu/download/) (32bits, cheaper than Mega, 7 uart's... Arduino based multy-platform IDE).

+1, I already made a basic qnd port of MW2.1:http://www.multiwii.com/forum/viewtopic.php?f=22&t=2376&start=100#p31409 and waiting for the final 2.2 now to make a more general attempt with all the options/better I2C code with error detection/....

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

Re: UART Radio project

Post by Alexinparis »

Sebbi wrote:What ranges are we talking about here? OpenLRS seems to use frequencies between 400 and 460 MHz. I don't know about other countries, but those frequencies are very limited in Germany (10 mW?!). You are not supposed to constantly fill those bands with data as it is a shared medium (babyphones, thermometers, etc). 430 - 440 MHz can be used by amateurs, but needs licensing as far as i know ... using those frequencies to remote control something also requires a license. And to top it off, from 2014 on 433 MHz can't be used for voice or data transmissions anymore.

I guess it is similar in other EU countries?

868 MHz is even more restricted. No device can use a channel for more than 1% of the time except for channel 11 and that one is restricted to +4dBm :/


Obviously, everyone should have noticed it's a pure lab project for "full range" indoor purpose and 433MHz is quoted as an example :)

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

Re: UART Radio project

Post by Alexinparis »

crashlander wrote:@Alexinparis: If you will be using Mega2560 for prototyping you can probably avoid using AVR/Mega special instructions and stick to Arduino. With that in mind it would probably be simpler to port your code to StelarisLaunchpad + Energia (http://energia.nu/download/) (32bits, cheaper than Mega, 7 uart's... Arduino based multy-platform IDE).

I've already coded a working prototype for mega2560, and it's basically based on the serial code of multiwii, ie with TX & RX interrupts and ring buffers.
I'm waiting for the radio devices to test and publish something.
So I fear it won't be generic for other proc.
It's however quite small and should be easy to port for someone who knows how to "traduce" interrupts.

Eric
Posts: 38
Joined: Thu Nov 08, 2012 7:08 am

Re: UART Radio project

Post by Eric »

I am currently use iPhone + Bluetooth serial + two 3DR radio to control my quad.
You do not even need an arduino. Just connect the Bluetooth serial to 3DR radio.
Ams1117 is used to provide 5v to Bluetooth and 3dr radio.
Attachments
image.jpg
image.jpg

fmkit
Posts: 2
Joined: Wed Jan 19, 2011 11:28 pm

Re: UART Radio project

Post by fmkit »

I've just started using MW, flew few packs to date. Because I don't know how to fly using two sticks I had to rework multiwii code to take nunchuk commands, removed all code related to PWM/ppm decoding, all stick combinations, removed serial GUI, added direct interface to UHF transceiver RFM22B, config only possible via RC link using telemetry channel. So it works but not much of MWC code left (just IMU) . I can barely stand Arduino (as timecop says Tarduino ; ), soon will get rid of CRIUS board and continue with baseflight all 32bit (TX/RX-FC). Uploaded video an hour ago:
http://www.youtube.com/watch?v=EoVSxD1pu_8

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

Re: UART Radio project

Post by Alexinparis »

fmkit wrote:I've just started using MW, flew few packs to date. Because I don't know how to fly using two sticks I had to rework multiwii code to take nunchuk commands, removed all code related to PWM/ppm decoding, all stick combinations, removed serial GUI, added direct interface to UHF transceiver RFM22B, config only possible via RC link using telemetry channel. So it works but not much of MWC code left (just IMU) . I can barely stand Arduino (as timecop says Tarduino ; ), soon will get rid of CRIUS board and continue with baseflight all 32bit (TX/RX-FC). Uploaded video an hour ago:
http://www.youtube.com/watch?v=EoVSxD1pu_8


I must say we have some talented people here :)
Which data rate are you using with RFM22B ?
managing the half-duplex communication was not so hard ?
(I say this because using 3DR 433Mhz module for a "real time" bi directional communication seems not to be very convenient)

User avatar
Gartenflieger
Posts: 65
Joined: Sat Oct 01, 2011 10:07 pm
Location: Dortmund, Germany

Re: UART Radio project

Post by Gartenflieger »

Eric wrote:I am currently use iPhone + Bluetooth serial + two 3DR radio to control my quad.


I will have to swap my beloved Android Phone for an Iphone soon. :?
I thought the Iphone would not connect to a generic Bluetooth-Serial Module? :cry:
Now I have hopes to continue using the phone to setup my MWC, how did you get that working? :?:

Regards
Christoph

Sebbi
Posts: 478
Joined: Sun Jul 08, 2012 1:08 am
Location: Germany
Contact:

Re: UART Radio project

Post by Sebbi »

iPhones need a Jailbreak to connect to SPP devices without Apples authentication chip ...

Eric
Posts: 38
Joined: Thu Nov 08, 2012 7:08 am

Re: UART Radio project

Post by Eric »

Sebbi wrote:iPhones need a Jailbreak to connect to SPP devices without Apples authentication chip ...

Yes.
But if you do not have to send too much data(the native bluetooth will die when sending too much data), you can use private API without jailbreak.

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

Re: UART Radio project

Post by Alexinparis »

Hi,

Some updates on this project.

1) I didn't manage to get a good bidirectional connection with 3DR modules, whatever the conf on both side.
- even if the air speed is something like 56k, the real usable baud is much less
- there is some latency
I have a working code for mega board as mentioned in the first for those you want to test it with another air techno

2) following dramida advice, I get some HK OLRS RX modules based on arduino 328p + 433Mhz RFM22B modem.
http://www.hobbyking.com/hobbyking/stor ... duct=27096

I scratched my head and built 2 codes from scratch after many hours of test and spec reading:

one to use this module as a TX device
The PPM output of a radio (turnigy 9x in this case) is used to power a BEC in order to have 5V output + PPM signal.
The module converts PPM stream and send at 50Hz MSP_SET_RAW_RC signals toward the other RX module with the FC board.
The module can send and receive other MSP message via its UART interface. (optional)
So this UART interface is used in the photo with a bluetooth module (for smartphone apps)
IMG_20130420_201439.jpg

IMG_20130420_201415.jpg


one to use this module as a RX device
The module is just connected to a free UART port of a mega board.
No more conventional RX receiver
IMG_20130420_201315.jpg

IMG_20130420_201242.jpg


This is for the moment a total success :)
With an air speed of 57.6k (the same speed as OLRS), I managed to have a very fluent GUI communication: ok with at least multiwiiconf, EOSBandi wingui and ezio app over bluetooth.
The communication is tuned to allow more downlink bandwidth because MSP is more hungry in downlink.
The code is for the moment based on a fix frequency but could be adapted later to support hopping.
The expected range should be the same as original OLRS code, ie something like 1 or 2km with stock antennas.

So some beta testers with a pair of RX OLRS modules are needed !

kataventos
Posts: 702
Joined: Sun Aug 28, 2011 8:14 pm
Contact:

Re: UART Radio project

Post by kataventos »

Great Alex,

I am still using the 3DR but effectively as you say, this seems to work smoother and if you tested them already and confirm OLRS range :mrgreen: awesome, because I have great "usage" Ideas for them.

Cheers,
KV

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

Re: UART Radio project

Post by gompf-2 »

Hi,

So some beta testers with a pair of RX OLRS modules are needed !

I´ve 5 very similar boards: Image
Running OLRS/thUndeadMod was just a question of changing some pins and is fine, I would like to try the same with your code.

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

Re: UART Radio project

Post by wilco1967 »

Alexinparis wrote:The PPM output of a radio (turnigy 9x in this case) is used to power a BEC in order to have 5V output + PPM signal.


Great project....
just ordered 2 Orange Open LRS Receiver modules....

may I ask, why are you using a 5V BEC ?
HK descriptions says: Voltage input: 3.7~15VDC.

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

Re: UART Radio project

Post by copterrichie »

Alex, how about using the Spektrum serial interface verse the MSP protocol to set the RX values?

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

Re: UART Radio project

Post by Alexinparis »

kataventos wrote:Great Alex,

I am still using the 3DR but effectively as you say, this seems to work smoother and if you tested them already and confirm OLRS range :mrgreen: awesome, because I have great "usage" Ideas for them.

Cheers,
KV


I think one easy usage could be to keep the OSD on the ground connected to the UART port of the TX ;)

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

Re: UART Radio project

Post by Alexinparis »

gompf-2 wrote:Hi,

So some beta testers with a pair of RX OLRS modules are needed !

I´ve 5 very similar boards: Image
Running OLRS/thUndeadMod was just a question of changing some pins and is fine, I would like to try the same with your code.


It should work if you are a little bit arduino aware. You can see in the code PIN assignment.
Until it is really well tested, I will focus only on HK or genuine OLRS modules with last rev.

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

Re: UART Radio project

Post by Alexinparis »

wilco1967 wrote:may I ask, why are you using a 5V BEC ?
HK descriptions says: Voltage input: 3.7~15VDC.


At full TX power and 12.4V input, the DC reducer of HK modules get really warm, and I finally fry a module like this.
That's why I prefer to reduce DC via a BEC.
I don't think genuine OLRS modules have this problem.

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

Re: UART Radio project

Post by Alexinparis »

copterrichie wrote:Alex, how about using the Spektrum serial interface verse the MSP protocol to set the RX values?

It would have been a nonsense to support a close protocol with no ability to be UART mixed with other info.

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

Re: UART Radio project

Post by copterrichie »

Looks pretty open to me and uses a UART: http://www.dogfight.no/2011/01/spectrum ... duino.html

The WMC already supports, why not just build upon what is already there?

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

Re: UART Radio project

Post by copterrichie »

I am sure you are aware, all of these devices like Bluetooth, Wifi and the 433mhz are Half-Duplex and the latency comes into focus by raising and lowing the signal. I believe we want to sent as many packets as possible in one direction before lowing the signal to answer any request.

tryss
Posts: 91
Joined: Mon Oct 24, 2011 11:01 am

Re: UART Radio project

Post by tryss »

for information about 433 Mhz 3DR modules, the latency came from the FEC (Forward error Coding). it said that it can correct 25 pourcent of errors and for that you need to send redundancy.

tryss
Posts: 91
Joined: Mon Oct 24, 2011 11:01 am

Re: UART Radio project

Post by tryss »

it's also a good project to be done with an FPGA. i will think about it.

brm
Posts: 287
Joined: Mon Jun 25, 2012 12:00 pm

Re: UART Radio project

Post by brm »

Alexinparis wrote:
copterrichie wrote:Alex, how about using the Spektrum serial interface verse the MSP protocol to set the RX values?

It would have been a nonsense to support a close protocol with no ability to be UART mixed with other info.


nonsense is not defining a clean protocol.
- frame layer
- message layer

what i see is nonsense.
que ve dire en francais?

people turn away from the project if their favourite 'box' is not supported...

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

Re: UART Radio project

Post by copterrichie »

tryss wrote:for information about 433 Mhz 3DR modules, the latency came from the FEC (Forward error Coding). it said that it can correct 25 pourcent of errors and for that you need to send redundancy.


The 3DR Radio USB unit is part of the new telemetry system offered by 3D Robotics; it would work in conjunction with the "Air" module offering a 2-way half duplex wireless communication system. Its design is based off the HM-TRP modules from HopeRF along with a completely new firmware to optimize its performance, SiK.
https://store.diydrones.com/ProductDeta ... -3DRUSB915

Datasheet
FSK modulation, 2-way half –duplex communication, strong anti-interfere
http://www.hoperf.com/upload/rf_app/HM-TRP.pdf

The only way I am aware of to address this issue is, when the link is up in one direction, send as much data as possible before reversing the direction to answer.

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:may I ask, why are you using a 5V BEC ?
HK descriptions says: Voltage input: 3.7~15VDC.


At full TX power and 12.4V input, the DC reducer of HK modules get really warm, and I finally fry a module like this.
That's why I prefer to reduce DC via a BEC.
I don't think genuine OLRS modules have this problem.


Aha, understood.....
so seems like an undersized linear regulator on the HK orange OpenLRS.....
good to know.

Thanks !

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

Re: UART Radio project

Post by gompf-2 »

Hi,

Alexinparis wrote:It should work if you are a little bit arduino aware. You can see in the code PIN assignment.

Yes, done:

Code: Select all

//### PINOUTS OF Ulrich Radig RFM22 PCB
#define SDO_pin   12
#define SDI_pin   11       
#define SCLK_pin  13
#define IRQ_pin   2
#define nSel_pin  10
#define  nIRQ_1  (PIND & 0x04)==0x04     //D2-PD2
#define  nIRQ_0  (PIND & 0x04)==0x00   
#define  nSEL_on  PORTB |= (1<<2)        //D10-PB2
#define  nSEL_off PORTB &=~(1<<2)       
#define  SCK_on   PORTB |= (1<<5)        //D13-PB5
#define  SCK_off  PORTB &=~(1<<5)       
#define  SDI_on   PORTB |= (1<<3)        //D11-PB3
#define  SDI_off  PORTB &=~(1<<3)       
#define  SDO_1   (PINB & 0x10) == 0x10   //D12-PB4
#define  SDO_0   (PINB & 0x10) == 0x00   

#define GREEN_LED_pin   4                //D4-PD4 choose free pin
#define RED_LED_pin     8                //D8-PB0 blue LED
#define Red_LED_ON      PORTB |= (1<<0); //D8-PB0,
#define Red_LED_OFF     PORTB &=~(1<<0);
#define REDPINTOGGLE    PINB  |= (1<<0);
#define Green_LED_ON    PORTD |= (1<<4); //D4-PD4
#define Green_LED_OFF   PORTD &=~(1<<4);
#define GREENPINTOGGLE  PIND  |= (1<<4);


Alexinparis wrote:Until it is really well tested, I will focus only on HK or genuine OLRS modules with last rev.

OK, no problem. Just changing the defines to the above works fine for me. I tested on the desk with a 328p/MW2.2 as node on the RX-side, workes fine.
Maybe as you have a 9X you want to add some Jeti code to the TX side later ;)

Thanks and regards,
gompf

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

Re: UART Radio project

Post by wilco1967 »

Alexinparis wrote:Hi,
So some beta testers with a pair of RX OLRS modules are needed !


Thats why I ordered some... ;)

Ok.... here's the status:
received both OrangeLRS RX modules, and a 5V UBEC from HK.
first attempt was to flash them with OpenLRSng, with succes....
just completed a test flight with my old trusted tricopter... flew out approx 500-700 meters, and no failsafe (unless I shielded the antenna).
using stock antenna's (Frsky Tx still attached to my 9X, and transmitting... need to modify so can be removed/switched off).

Flashed UART radio project. flash ok.
Tx / RX seem to recognize each other. red led on Tx starts flashing quickly when PPM signal from 9X is sensed...
Also Rx led receives the data.... stops blinking rapidly when Tx / 9X is switched off

now the tricky bit...
when I connect a (3.3v) FTDI on the RX (powered only by the FTDI), and start teraterm program, at 56700 baud, I can see the data coming from the PPM stream coming in by a whole lot of funny characters... When the PPM signal is connected to the first pin of the TX (labeleled RSSI), i can see changing data on the RX serial monitor . When connected to any other pin (just providing power), there are just small messages !J !K (or something like that) visible on the RX side.

First question:
When connected to the multiwii serial port (same port as for programming), copter does not seem to respons.
Am I correct in assuming then current MW 2.2 release (latest dev) will take serial data instead of CPPM when available ?
if not, what must I do on MW side for it to accept serial commands ?.

2nd question:
I cannot seem to get ANY serial communication from the TX -> RX , or RX -> TX
when I connect my bluetooth to my FTDI cable, I can send data from one serial port to the other and back. So FTDI + bluetooth both work.
Also, I can see the ppm data through the bluetooth dongle when connected to the RX (same as using FTDI).
However, if I connect the BT to the TX serial port (used for FTDI programmer), and the FTDI to the RX (or the other way around), I get zero data from one to the other (either way). :?
Tried with FTDI only connected via RX,TX,GND (RX powered by 5V on one of the PPM rows). same result.
used baudrate of 57600, 8N1, and various other.... nothing.

Any Idea what I'm missing here ?

Even tried re-flashing the RX as TX and TX as RX, same result.

used the MSP_RX2.ino and MSP_TX2.ino files from the first post.... no changes made.

As mentioned before. the same modules work fine with openLRSng firmware (also still after the tests with UART radio firmware), so hardware failure is unlikely (althoug possible...)... Flashing is still working through the ports, so serial ports seems to be still healthy....

Post Reply