Semtech's LoRa (Long Range)

srnet

Senior Member
By chance my Picaxe mate Andrew lives near Mt. Taranaki & may be tempted to take a stroll up there for LoRa™ trials.

Is there such a thing as LOS envy ?

I don’t see 280km as a particular problem, but you would want to (at the chosen data rate) work out how many dBm is needed to complete the link.

This is not difficult, just have the transmitter send packets starting at 17dBm and drop 1dBm at a time all the way down to 2dBm. Have the receiver beep once for a packet RX and again for a CRC fail.

At the start of the sequence (17dBm) send out an FM tone at full power which you will hear on a UHF handheld then just count the single beeps, you could even log the RSSI on a PC.

LOS for a foil party baloon at 7000M is about 340km. As the humble RFM22B was good on my PICO balloon tracker up to 174km (using an LNA and gain vertical) 340km ought to be easy enough with a LoRa device.

The bigger latex balloon go up to around 30000M, LOS there would be around 700km.
 
Last edited:

manuka

Senior Member
Don't be envious, as although you're a tad sea level in Cardiff, ascending some of these high spots can be a real challenge, with survival an issue if the weather suddenly turns nasty...

THOUGHT: Before winter closes the line perhaps take the train to the top of Wale's ~1100m high Mt. Snowdon, which I recall has the best views in Britain! Viewfinder indicates Cumbrian Hills (~100 miles/160km away) should be "visible" ?

Extra: You're too late in the northern season I'd say, but check Hepburn's tropo ducting forecasts if any sea links are in mind. Note already the extreme tropo activity on Australia's NW coast - this extends almost to Indonesia at times.
 
Last edited:

srnet

Senior Member
The Winter would not bother me and I have been to the top of Snowdon quite a bit, maybe 20 or 30 times.

Snowdon does have some rather nice Snow and Ice climbing, in a good Winter. Never been on the train, perish the thought.

You can certainly see the mountains in Ireland from the summit on a good day (rare), they are probably further away.

A foil party balloon seems much easier, launch from the local park, retire to shed and test comms as it drifts towards the radio horizon over several hours.
 
Last edited:

manuka

Senior Member
A foil party balloon seems much easier, launch from the local park, retire to shed and test comms as it drifts towards the radio horizon over several hours.
Farewell lovely LoRa™ gear...
 

srnet

Senior Member
Farewell lovely LoRa™ gear...
So you operate the cutaway whilst its over friendly territory.

And set it to continuously report its position on the way down, so you should know reasonably accuratly where its landed.

Don't DHL do a collect service ?
 

srnet

Senior Member
I thought this forum may be appropriate because I'm using PIC microcontrollers as companions to my SX1272-based transceivers
Not really, this is a support forum for PICAXE Microcontrollers which run their own version of Basic, so not a lot to do with native PICs.

Your problem is almost certainly with the code, you need to search out a forum that can advise on the code you are using to program your PICs in.
 

manuka

Senior Member
Rivers: Welcome - we are indeed esentially PICAXE based here.

Just what is your application,duty cycle, data rate, terrain, RF environment,INTERFERENCE, TX power & frequency? Have you explored the RFM9x data sheets? A quick browse shows P.50 has insights into start up time.

Although I'm HopeRF friendly from some years hands on coverage, Dorji's fine LoRa offerings have taken my fancy this time.

One ponders that "just" 5km LOS & 1-way (simplex) could make LoRa an overkill in fact. There are good numbers of FSK/GFSK modules around that would handle such LOS links. Had you considered these ?

Stan. (in New Zealand)
 

MFB

Senior Member
Oh Dear. Not only is it a non-PICAXE question but you now want help developing a 'product'!
 

Goeytex

Senior Member
Hi Rivers,

My Pic micros are coded with PicBasicPro. The thought was that the syntax would close enough to make it understandable.
As has been indicated this is a support forum for Picaxe Microcontrollers, Picaxe Basic and Picaxe related projects. Have you tried the PicBasicPro support forum?

Your problem seems likely to be related to the receiver side and is possibly due to the receiver mode. It should be continuous and registers should be set so that the receiver device never enters sleep mode.

A Picaxe can control the RFM95 quite well using the Hardware SPI commands in Picaxe Basic. If you switch to a Picaxe, you will likely get some support here, but the bottom line is that you problem is not really with the Basic Code but is with setting up the registers in the RFM95.
 

manuka

Senior Member
For the record-and rather than discard his LoRa™ deletions- herewith "Rivers" PICBasicPro Forum posting
I'm working on a project similar to yours so perhaps we can learn something from each other. My radio is a KFR transceiver from D6 Labs, and is based the SX1272 chip from Semtech. It uses SPI communications. I've searched this Forum and found the following thread which discusses SPI issues among other things:

http://www.picbasic.co.uk/forum/show...ghlight=rfm22b

Forum member Paul has posted some code at post #5 which I have found useful as a guide. Based on this info I have put together some code to just test the send and receive function of the Pic to the KFR radio via SPI. Unfortunately, it is not working as yet ... I'm still trouble shooting. If you are interested I can post my code ... it is very simple.
 

Attachments

srnet

Senior Member
My experience would suggest that if you get intermittent response from a LoRa device, its most likley a software issue rather than a device configuration problem.

If you miss match the critical settings, bandwidth, spreading factor or coding rate, you wont get reception at all.

There are some settings that reduce performance (range) but they are mostly self configuring.

The RFM22B was a different beast alltogether, there were a fair few settings that if you did not get just right, would indeed lead to intermittent performance.
 

premelec

Senior Member
How to use HOPE RF92 units?

Stan those are interesting comments - tho dismissing low data rates is not appropriate for such uses as remote meter reading where a few numbers per minute are plenty! I have to admit my CW ham training put me in mind that narrow bandwidth is the way to go - DSP and fancy multiband high speed over twisted pair and other cleverness I don't comprehend seems to work...

I bought a couple of HOPERF92 units 915MHz [$20 pair Ebay] and am daunted by the 120+ page data sheet as to how to set them up and use them. For instance is there a way of having a DIO pin actuate when RSSI is above a certain value? Has someone got PICAXE code for these HOPERF92s ? I'd appreciate help with getting them going LoRa or FSK. I'm not a PIC programmer and HOPE's demo board seems to use C PIC programming examples.
 

srnet

Senior Member
Following the 40km\2mW result, Howie in the US (colleague on the $50SAT project), came up with a calculation spreadsheet that produced a link budget from first principles.

One result that caught my eye was the calculated signal strength of a 2mW TX at 40km, it was 114dBm.

Now 2mW was the limit of reception, so you can conclude that the RX needed at least -114dBm of signal to reliably operate. However the LoRa calculator claims the sensitivity at the bandwidth and spreading factor was -131dBm, so where has the missing 17dBm gone ?

The sensitivity quoted is in reality a figure that cannot be used, at least not on Earth, the background noise level is too high. I checked and a typical background noise level reported by the SX1278 RSSI was -100dBm, with noise at that level there is not much value in a conventional FSK receiver having a sensitivity of up to -148dBm.

Where the SX1278 device is getting its real world performance from is its ability to receive signals below the noise level. The acceptable signal to noise ratio for the spreading factor used (8) is quoted as -10dBm, so the receiver would work if the signal was 10dB below the noise level. 10db below a noise level of around -100dBm is -110dBm, close to the signal level that 40km\2mw would have produced.

I also tested the sensitivity at a spreading factor of 12, the data rate drops to circa 100bps, and signals are received at 10dBm lower (SNR at this point is -20dBm)

Putting that into figures would produce for a power of 10mW (UK max for licence exempt use) a range of;

1000bps – 90km
100bps – 280km

On simple ¼ wave wires.
 

srnet

Senior Member
I bought a couple of HOPERF92 units 915MHz [$20 pair Ebay] and am daunted by the 120+ page data sheet as to how to set them up and use them. For instance is there a way of having a DIO pin actuate when RSSI is above a certain value? Has someone got PICAXE code for these HOPERF92s ?.
I think you can do an RSSI interrupt for FSK use, checkout the manual.

I have a generic TX\RX program for LoRa mode on a PICAXE, I will post it later.

The basics of operating the device were not difficult to work out, as Dorji do publish some working code for Arduino.
 

Attachments

Last edited:

premelec

Senior Member
Thanks srnet... I'll take a look at Dorji for code also... I had the RSSI more in mind for initiation of receive though perhaps not necessary with the spread spectrum signal as various noise and other signals not likely to produce outputs...
 

manuka

Senior Member
By 2020, the number of web-connected devices is expected to reach 22 billion, with more than 50% of these applications predicted to be low power, wide-area-networks (LPWAN) requiring a long battery lifetime that can’t be served by existing technologies such as cellular M2M, WiFi, Bluetooth Low Energy (BTLE) or Zigbee.
Sourced from the Nov. 5th 2014 press release by FastNet - a South African LoRa™ adopter
 

srnet

Senior Member
Enclosed is the results of some tests I carried out over a 750M typical urban area link. The antennas were ¼ vertical wires with no ground plane, the transmitter antenna was on a short mast around 2.5M from the ground, the receiver on a short pole about 1.5M from the ground.

The tests were initially at a coding rate of 4:5, increasing coding rate to 4:8 increases transmit time by around 27%, and improves reception by between 1dBm and 1.5dBm, representing a potential range improvement of between and 12% and 18%.

In summary the use of the LoRa devices will get you, at the UK limit of 10mW, 800M at 22,000bps and 5.8km at 455bps in a typical urban environment.
 

Attachments

manuka

Senior Member
Impressive,especially since your UK "typical urban" is likely dense brick! These match well my own field tests here in urban NZ (with largely timber homes), although we're allowed a paint blistering 25mW TX power.

It's worth mentioning to LoRa™ newbies that the cheap 32 MHz crystals used may not match exactly on TX/RX modules (especially if temperature related drifts arise), & hence the narrowest bandwidths may fail to synch. For most setups 62.5 kHz (or even 41.7kHz) looked about the limit unless tedious xtall tweaking was employed.

These BW are still good for x10 the ranges of regular 433 MHz systems. Yes -compared with regular NBFM setups LoRa™ gives 100s of metres rather than 10s, several 1000m rather than mere 100s. Magic !

Extra: After much distraction with building projects I'm finally penning a PICAXE related LoRa™ account based around Dorji's SX1278 based DRF1278DM modules. Stuart & I are linking already, but other contributions, experiences & insights welcomed. Stan.
 

ledaero

New Member
Manuka and srnet, thankyou for a most informative set of posts.

I definitely want to build something SX127x-based!

It looks like, for the widest-possible application, the SX1276 is the one to go for, rather than the SX1278. Where I am, the radio frequency people haven't given anything in the 433MHz band for telemetry, but have said I can use 866MHz~869MHz or 923MHz~925MHz bands at up to 500mw!

And I need to apologise for foisting myself on the picaxe forum - I've never used one in my life - I'm more an Arduino/Cortex/Pi user - but your forum is so packed with info, I couldn't resist.

Maybe I need a crash-course in picaxe? :)
 

manuka

Senior Member
Ledaero: Welcome - & we'll soon put you right with PICAXEs! Check the attached pix of a breadboarded PICAXE driven Dorji LoRa™ GPS beacon.

As it seems you're a fellow Kiwi best inform just where you are in our fair land. NZ regs. on 433 MHz are very satisfactory & we're allowed 25mW TX power. For LoRa™ beacon use this is more than enough & is also battery friendly.

Most 433 MHz LoRa™ modules use the SX1278, although HopeRF have their own "7 a side" RF96. New Chinese modules are arriving with great rapidity, but in general allow US$10 for the SPI "single chippers" & US$20+ for "two chippers" which are TTL friendly.

Check my PM reply to you too. Regards- Stan (Eastbourne, Wellington)
 

Attachments

Goeytex

Senior Member
Maybe I need a crash-course in picaxe?
The best crash course is to get several Picaxe Chips and start programming.

If your PC has a serial port you won't need a programing cable with a built in USB/TTL adapter. Any serial DB9 cable can be made to work. Or get the AXE026 Cable.

If no serial port then I recommend getting an AXE027 programming cable. It is reliable and works very well. Alternatively you could use a cheap USB/TTL adapter, but in this case you will need to invert the data signals, either with a couple of NPN transistors or an Inverter IC such as 74HC14. IF the adapter is based upon an FTDI chip it can be programmed to invert the data lines.

Good Luck!
 

srnet

Senior Member
The LoRa Instructable, produced by Manaku, has a fair bit of background stuff on LoRa, and there is a link there to code for various platforms.

The transmitter I am still using for my LoRa experiments is based on the HABAXE2 PICAXE software.

Whilst some of the other platforms may appear to be easier to program, they don't seem to have the same reliabilty as the PICAXE platform.
 

srnet

Senior Member
There was a high altitude balloon launch on Saturday (not mine) which took 3 LoRa trackers up to 35km or so.

The LoRa telemetry was broadcast at approx 1000bps, 10mW only (the UK Limit).

The launch was from Ross-On-Wye and it was received when the balloon was on the way down at an altitude of 10,000m 460km away from near Roterdam.
 

manuka

Senior Member
Impressive, although I recall you'd earlier managed significantly better range = another victory for the Welsh! Stan.
 

manuka

Senior Member
LoRa news! Brief but persuasive & well written teaser on Glasgow wide LoRa™ coverage . There's a mention of several e-zines & a July 2016 Elektor LoRa™ article too. (The latter however is subscription only.)

Meanwhile in Asia even Korean manhole covers (ah -"personholes" ?) are being LoRa™'d

[Ponder mode] It's now 2 years since I began this thread & in that time significant commercial LoRa™ uptake has productively kicked in,although often at the $$($) level per module. LoRa™WAN has also taken wings- especially with MicroChip's RN2483 on 800-900 MHz

At the little guy level SRNET still endorses HopeRF's RFM98 $ level SPI single SX12xx product, but I favour UART capable serial friendly $$ "2 chipper" modules. My initial Instructable LoRa™ used Dorji's DRF1278DM, but cheaper bare bones UART offerings have since emerged- see below.

We both tend to favour 433MHz, if only for it's superior punch thru' obstructions.

Perhaps it's time for a PICAXE friendly Rev. Ed. Lora™ based offering ?

Stan.
 

Attachments

srnet

Senior Member
Rather than constantly reprogramming a microcontroller with different LoRa settings or (ASCII) packet structures when writing and debugging my various lost model tracker and HAB programs, I wrote a modem type front end to setup and drive a LoRa device from a serial terminal, it runs on an Arduino Pro Mini (i.e cheap), a PICAXE would just not be fast enough to parse the serial input.

With the program you can use a serial terminal to send and receive ASCII style LoRa packets and change the various LoRa parameters and frequencies.

The style came from the same type of structure that I used to control the serial display on the Nokia 5110, similar to the Digole style for controlling serial displays.

For example to configure a LoRa device from scratch, send the following serial text.

SF434400000<CR> //Set Frequency to 434.400Mhz

LB62500<CR> //LoRa Bandwidth 62.5Khz

LS8<CR> //LoRa Spreading factor 8

CS<CR> //Save (current setup) to EEPROM so it survives reset

PTHello World<CR> //Packet Text send Hello World as LoRa packet

And when the program is not actually sending packets the receiver is on and will print received packets to the terminal.

Although its primarily based around ASCII data packets, I would think you could make it send binary packets too, as long as knew the length in advance, say a 4 byte binary packet;

PB<0x04><byte0><byte1><byte2><byte3><CR>

I don&#8217;t know how much interest there would be in a such a device being generally avaialble, I wrote it as its so useful for tresting.


Stuart Robinson
 
Last edited:

MFB

Senior Member
I expect your setup code would generate a similar level of interest as Robert Rozee's excellent utility for the HC-12 FM transceiver. Although there are LoRa tranceiver modules available that use AT commands, they tend to be more expensive than your solution.
 

manuka

Senior Member
Yes - come in Robert Rozee -such a setup utility could indeed be well received!

Keep in mind that config. tools exist for UART fitted LoRa&#8482; modules course- see Dorji's (& a possibly useful Appcon ?) screen shot below. Felow Kiwi Andrew Hornblow has config. Dorji modules with embedded PICAXE commands to good effect too - this has been handy for on the fly setting tweaks during program run.

My slant is "can do", with particular aim to assist bright sparks & e-educators keen to use LoRa&#8482; benefits without working up an e-sweat.

Stan.
 

Attachments

MFB

Senior Member
Stan,

The last time I looked, the only LoRa modules supported by those config utilities you mention were relatively expensive but maybe you can recommend a competitive source?
 
Top