At Last ………

At last I have a LoRa tracker receiver that works well with very weak LoRa signals and is easy to put together. The receiver is based on Arduino and an ATMEGA 1284P with the entire board running on 3.3V and no interference  creating switching power supply in sight.

The receiver can be used as both a highly portable tracker receiver and a desktop terminal application with remote control of the tracker. There is logging of received packets to SD card, a Bluetooth uplink into an Android mapping application, audio uplink of high altitude balloon payloads into FLDIGI, plus a facility to program the receiver over the air to match (bind to) the transmitter settings. There are 3 display options, Nokia 5110, ST7735 TFT and SD1306 OLED. The last local GPS fix and remote fix for the tracker is saved and always available when the receiver is switched on. Thus you can be use the receiver to guide you (distance and direction) to the trackers last known location.

With a Low Drop-out voltage regulator fitted the receiver can run from 3 x AA Alkalines, 4 x AA NiMh or a single Lithium Ion battery.

The board is a modular design with two Mikrobus sockets so whilst I am using it here as a LoRa Tracker receiver, with a LoRa device in one socket and a GPS in the other, it can be used with other MikroElectronica Click modules, with the exception that in portable mode there is no 5V supply.

1284P_Receiver_NOKIA5110

My LoRa tracker software has had a thorough review and now all the routines for LoRa, GPS, Display etc. are common across the new receiver, HAB tracker, lost model locator and remote sensor applications.

To test the sensitivity of the receiver and compare the performance when it was powered with a battery and via a switching 5v supply as provided by a typical USB power bank, I used my link test software, the transmitter part of the link test (‘LoRaTracker Link Tester1’) is ideal for this purpose.

Link Tester on Mast

Link Tester InternalLink Tester External

The program was configured to transmit a short test packet descending in power from 17dBm to 2dBm. The packet contains the power level at which it was transmitted. The transmitter is put in a metal box, so that the only signals getting out are through the antenna, and a 20dB attenuator fitted in line with the ¼ wave wire. The transmitter then goes on the mast in my garden.Link_Test_CloseUp

 

I went to my favourite testing place in the North of Cardiff, it overlooks the city and is around 4km from my home.

At the testing place the LoRaTracker receiver software picks up the test packets and displays them on screen, you can readily tell the power with which the packet was transmitted.

 

Link_Test_Lipo

 

 

With the Lithium battery I was receiving some packets that were being sent at 2dBm, but remember the 20dB attenuator on the transmitter, so the ERP of the packet was  18dBm.

 

 

Link_Test_PowerBank

 

 

With the USB power bank powering the receiver, I just received some packets sent at -3dBm, but very little else. So the power bank (or presumably its switcher) was loosing me around 15dB in LoRa performance, which is a lot, the reception distance would be around 1/6th of the Lithium battery powered receiver.

 

 

There is a reasonable relationship between transmitted power and distance. So based on an assumption that I would have received the 3dBm transmitted (-17dBm ERP) packets, what would be the signal gain if no attenuator and the license exempt power maximum of 10dBm was used ? Also assume that in a typical base station receiving application you are likely to use an omni directional gain antenna of approximately 5dB gain.

So the full improvement would be (10-3) + 20 + 5 dBm = 32dBm.

That equates to around a 40 times distance improvement, so a range of 40 x 4km = 160km could be expected in this set-up.

Here are the links for the beta versions of the software. LoRaTracker_Receiver1   LoRaTracker_HAB1  LoRaTracker_Relay1  and LoRaTracker_Link_Test1.

I will shortly have a few PCBs and 1284P (programmed with boot loader) available for sale.

Update – Portable LoRaTracker Receivers

As I have commented on before, it’s a shame the Arduino DUE was not more suitable for a portable tracker receiver, cheap and powerful, but the loss in sensitivity due to local EMI getting into the LoRa antenna was too much. There was also similar a reduction noted with the GPS that have the integral ceramic antenna.

Its taken a while to go through all the testing and checking to be sure that the new receivers will work well, but I eventually finished and the initial PCB’s are due in a couple of weeks.

There are planned to be two receivers, both have the same layout as the previous DUE based one you will have seen and use Mikrobus sockets for the LoRa device and GPS.

The first receiver is a shield that plugs into a standard Arduino Mega 2560 (as low as £6.50 delivered!!) and uses 4 x 8way logic level converters to shift between the 5V logic of the Mega and 3.3V logic used by all the receiver components. It should be quick to put together and the only SMT components are an I2C FRAM, a regulator and micro SD card socket. Plug in a display, my low cost Mikrobus LoRa and GPS modules, a battery into the Mega base power input, and your good to go. It did take a while to confirm that all the bits would work through logic level converters.

The second receiver is a single PCB, same layout as before, based on the ATMEGA 1284P running at 8Mhz. This is laid out to allow it to run from a small battery pack and eventually I plan to get a simple case for it made so it can be packaged up as a complete portable receiver. Although the Atmega 1284P is supposedly compatible with both the 328P and 2560 Atmel processors it took a while to check out that all the bits of hardware would work correctly within the Arduino IDE.

If the PCB’s are OK, there will be a few for sale. The long term plan is to make the receivers available as a part kit, all the bits you need apart from the display, GPS, batteries and Mega 2560 base in the case of that receiver.

Mikrobus Modules

Whilst my boards are intended to be used as LoRa receivers with a GPS, the MikroBus sockets allow either board to be used for other purposes, there is a wide variety of modules available from Mikroelektronika;

https://www.mikroe.com/mikrobus/

The kits will contain the PCB’s to make your own (very low cost) Mikrobus modules for the receiver. I currently have PCB’s for Dorji DRF1278F and Hope RFM9x LoRa modules, two types of GPS, and one to take the low cost Bluetooth, ESP01 Wi-Fi and NRF24L01 Wireless modules.

 

The Perils of USB Power Banks

In the document Part 6 – Testing and Comparing I mentioned a simple method of testing the relative effectiveness of various transmitters, receivers and antennas, using a series of descending power transmissions, a summary of the technique is below;

Descending Power Tests

Software can be written so that the LoRa transmitter sends packets starting at one power, reduces the power by 1dBm then sends another packet.

The received packet has the dBm level used for transmit within it so the receiver can record, count and then display how many packets have been received that were sent at a particular power.

With a bit of imagination this simple method of testing can be very useful, we don’t all have easy access to a handy anechoic chamber and expensive signal analysers.

It’s not going to be practical to place the transmitter many kilometres away for testing, however it is possible to significantly attenuate what is emitted from the transmitter by fitting a 50ohm terminator to the antenna socket and putting it all in a tin box with lid on, see picture.

IMG_0653

For the tests described here the transmitter was sending packets at bandwidth 62.5Khz, code rate 4:5 and spreading factor 12. The limit of reception at this mode is -20dB below noise level, so a small level of electromagnetic interference (EMI) may disrupt the LoRa signals. With the transmitter in the tin box as shown and sending packets starting at 17dBm down to 2dBm a receiver fitted with a conventional 434Mhz antenna will pick up packets at 100M or so at an open field and a lot less in a built up area.

 

 

Initial Test results

For the initial tests the Arduino base was powered from an external 3S Lithium battery, approximately 12V. I had both an Arduino DUE base and a ATMEGA 2560 3.3V\5V switch-able base.

 

IMG_0661

IMG_0659

 

The transmitter was placed on the far side of my house and the receiver on my workshop bench around 20M away. The position of the receiver antenna was kept consistent throughout.

To show how the tests results can be read take two examples, its not important what the set-ups were. First set-up A and then set-up B, the summary line lists dBm and number of packets received;

Example Set-up A results

Summary 17,22 16,22 15,22 14,20 13,17 12,18 11,7 10,4 9,4 8,2 7,1

You can see that packets from 17dBm down to 12dBm were good then reception tailed off.

I then repeated the test with the same shield, LoRa module and antenna plugged into an Arduino DUE, the results were slightly worse, reception good down to 14dBm or 13dBm;

Example Set-up B results

Summary 17,17 16,17 15,17 14,13 13,12 12,7 11,4

The conclusion would be that Setup B has an effect on the reception of LoRa signals, reducing sensitivity by around 2dBm.

To get the printed console output show above I needed the PC USB terminal connected but I was really interested in the performance as a portable receiver. When the transmitter starts its test sequence (at 17dBm) it sends a control packet which causes the receiver to issue a long beep and LED flash. For each packet received it then sends a short beep and LED flash. Thus you only have to count the short beeps to find the limit of performance of a particular setup. Counting the beeps makes outdoor testing easy and this was the method I also used for a 40km hilltop to hilltop test.

Now, if you count the number of beeps for each 17dBm to 2dBm loop you know the limits of sensitivity of each setup. For instance if for subsequent loops of a setup (A) you count 4,5,5,6,5 beeps, the average is 5 so the limit of sensitivity is (17-5)+1 = 13dBm.

If you repeat the test with another setup (B) and the count is 10,9,9,10,10, the average is 9.6 so the limit of sensitivity is (17-9.6)+1 = 8.4dBM. Therefore in approximate terms setup B is 4.6dBm more sensitive than setup A.

Note the tests do not measure absolute sensitivity, but there are a quick and easy way of comparing different setups or hardware to within 1dB performance wise.

Comparing Different Setups

The purpose of this article was first to see if there was a difference in LoRa performance between the Arduino DUE and ATMEGA 2560 Shield bases and second to check if powering the receiver via an up or down converter affected performance.

Performance of Different Shield bases

The receiver test software will run on either the Arduino DUE or ATMEGA 2560 shield bases with RFM98 or DRF1278F LoRa modules. The same MikroBUS shield PCB, LoRa module and antenna were used for all tests.

The first test was with the shield bases powered from a 12.6V 3S Lithium Polymer battery plugged into the shield bases external power input. The results were;

Arduino DUE sensitivity 15dBm

ATMEGA 2560 sensitivity 10.4dBm

So the DUE looses around 4.6dBm when compared with the ATMEGA, and would have only around 60% of the range or distance, this is significant.

Putting the DUE receiver into a metal box reduces the difference between the DUE and ATMEGA receivers to around 1.5dBm, so it is reasonable to assume that most of the noise\EMI is coming in through the antenna.

Using USB Power banks

Initially these appear to be a very good option for powering a portable receiver. They are cheap, plug into the USB port on a shield base and have built in charging and battery protection.

IMG_0649

They are normally based on a single Lithium Ion battery so have a boost circuit to provide a 5V output.

I powered a ATMEAG2560 base from an external 12V battery as before then tried the same test with the power coming from a selection of 3 power banks

External 12V LiPo, sensitivity to 4dBm

Power bank 1, sensitivity to 12dBm

Power bank 2, no reception at 17dBm !

Power bank 3, no reception at 17dBm !

This is a surprising result, although the receiver could receive packets down to 4dBm when powered from an external Lithium battery, there was no reception at all with two of the power banks even for the most powerful 17dBm packets. The conclusion is clear, the 3 power banks tested are not suitable for powering a portable LoRa receiver.

Conclusions

Avoid power banks for powering portable LoRa receivers, unless poor performance is acceptable to you.

The Arduino DUE, whilst it is fast, has a worse performance to the slower ATMEGAs.

Next, some tests on up and down converters.

A Better Tracker Receiver

Simple ReceiverFor some time I have been aware that my LoRa Trackers would be a much better system if it was possible to quickly and simply build a portable receiver. A DIY design would be preferred; this keeps the build cost low.

The current tracker boards, or one of the small 50mm x 50mm shield PCBs can be used for a portable receiver which works well enough but it can take a while to build and you do end up with a PCB that has a lot of external stuff such as displays, switches, GPS and the like. The current receivers are based on the Arduino Pro Mini and though this has adequate resources for the tracker transmitters, there is a distinct lack of program space and memory for a full featured receiver where you may want to include logging to SD card for instance.

One particular problem with developing a receiver is that it is di fficult to accommodate all the variants of different LoRa modules, GPSs and other devices. A modular design would be preferable, whereby it would be possible to plug in a range of different modules. Mikrobus Modules

I chose to use the Mikrobus standard for the modules, there are other module types but there is already a wide range of Mikrobus (Click) modules available, so the shield base would not be restricted to just one purpose. I could not find a Mikrobus module for the Dorji DRF1278F and Hope RFM9x LoRa devices I use in my trackers so I designed my own module PCBs for those and one for a GPS as well, see pictures. One other advantage of using modules in this way is that if the actual device, LoRa or GPS, is assembled onto the module and is faulty, there is no risk of causing damage to the main PCB if it has to be replaced.

An Arduino DUE shield base is native 3.3V (which is needed for most of the receiver components) has plenty of program space, memory, input\output pins and it’s fast too. Using a pre built shield base has the distinct advantage that all the difficult SMT assembly is already done for you. The clone versions of DUE cost as little as £10.

The receiver then will be a shield PCB that plugs into an Arduino DUE. I planned for two versions of the shield, a small one to build a hand-held device intended for portable operation and a larger desktop shield that could take up to 5 Mikrobus modules.

A portable receiver is easy to assemble using the smaller two Mikrobus socket shield PCB. Fit the pin headers and a few other components and plug into an Arduino DUE base, see pictures below. If this is to be a development shield you should fit sockets for the Mikrobus modules and displays. For a compact low profile receiver just solder the Mikrobus modules and display direct to the shield PCB. 

Bare Shield Arduino DUEMikroBus Shield Underside

 

The portable shield has the following features; they don’t all have to be fitted;

Two Mikrobus sockets.

Choice of display, Nokia 5110 LCD (very good out of doors), ST7755 TFT display or a SD1306 OLED.

5 Way Navigation Switch.Shield V3_1

Micro SD card.

Pads for SPI or I2C FRAM memory.

Two LEDs and a Buzzer.

Header for HC06 Bluetooth module for link to Android mapping.

Audio output socket for AFSK uplink at 600 baud into FLDIGI.

Reset supervisor for DUE base.

Analogue voltage reference for DUE base.

The small shield has the option to fit a small power distribution PCB. This is to allow a cased unit with power switches to be built which will run from an internal USB power bank and charging from the USB programming connection. To facilitate a cased unit the PCB has connectors for an external SD card module, LEDs, displays, navigation switch and power switches.

There are two UART Serial headers on the underside of the small shield; one intended for a ESP01 WiFi device and another for a HC05\06 Bluetooth module, either of which could be used for an external GPS. There will shortly be a Mikrobus module that can take the popular BME280 and BMP280 pressure and environment sensors, the DS18B20 temperature sensor or the DHT11 sensor. So with LoRa and sensor Mikrobus modules fitted together with an external Ublox GPS (£10ish on eBay) the shield would then be a fully functional and low cost HAB tracker transmitter.

A completely new version of the tracker receiver software is nearing completion and this allows it to be used for high altitude balloon (HAB) tracking or as a lost model locator. Fitted with an optional local GPS the receiver will calculate and display distance and direction to the remote tracker. Received telemetry can be logged to an SD card and the last GPS co-ordinates permanently saved to FRAM. The software integrates a serial terminal interface to remote control the distant HAB tracker. The receivers LoRa and frequency settings can be programmed in an over the air bind process received from the tracker transmitter or the tracker transmitter can be remotely programmed from the receiver. Thus it’s no longer necessary to unpack the tracker from a payload or model to make last minute adjustments to LoRa or frequency settings. 

The receiver has an audio uplink for an Internet connected PC to upload tracking data into Spacenear as well as a Bluetooth link to a mapping application on an Android phone or tablet.

When it’s all fully tested and there has been a live flight test, I hope to make the Shield PCB and the PCB of Mikrobus modules available for sale. Further Mikrobus PCBs are in progress for ESP01 Wifi, HC06 Bluetooth, NRF2401 RF and the various Bosch environment sensors. Large Shield

 

This is the large version of the Mikrobus shield, it also plugs into an Arduino DUE base. It can take the Nokia 5110 display or ILI9341 2.4” and 2.8” displays with SD card. There are 5 Mikrobus sockets, 3 on top 2 on the underside. Shown on the left with two LoRa modules, GPS and 2.8” display.

 

 

Plus here is a sneak preview of a really small matchbox sized LoRa receiver, it really is complete with LoRa device, display, GPS, battery and charger. It’s all you need to track a LoRa equipped HAB or lost model..Matchbox Receiver

UBLOX MAX M8Q GPS Breakout Board

 

GPS Breakout Finished

For those that want to build their own GPS Breakout board, I sell a PCB that allows you to do just that. Primarily designed for my own HAB tracker boards it can be used for other trackers and has both the Serial and I2C interfaces on the 8 way pin header. A previous article described how to attach this GPS board to my tracker boards.

For HAB tracking you can miss out most of the components. You if you wish can fit a small Lithium battery with some DS sticky tape and the components to trickle charge it from the trackers supply or fit an LED for the time pulse pin. My own tracker boards can have the components fitted to turn off the power supply to the GPS, whereby the battery will backup the GPS and allow it to be used in hot fix mode.

 

On the rear of the PCB are the pads for a small inductor, this helps to protect the GPS antenna input against static damage, a problem to which the UBLOX GPS are very prone to. The inductor can be omitted but take great care when handling the assembled break out board. If your UBLOX GPS takes a long time to get a fix, or never does, a probable cause is static damage to the antenna pin. The GPS data sheet does mention this as an issue.

You can fit the JTI_ANTENNA-1575AT43A40 ceramic stick antenna, but the board can also be used used with a 1/4 wave or 3/4 wave wire antenna and 1/4 wave radials. This will significantly improve GPS reception over the ceramic antenna, which in turn can significantly reduce power consumption, especially if hot fix mode is in use. The fitting of the wire antennas is described here fitting wire antennas. For these latest GPS breakout boards you will need to use Ernie Ball Custom Gauge 9 wire. Inductor on PCB

 

Taking suitable antistatic precautions, fit the inductor to the rear of the PCB

 

 

Ceramic antenna on PCB

 

 

If your fitting the ceramic antenna add it now.

 

 

Now position the GPS carefully in place and solder all the pads. I added C1 for some extra on board decoupling.

Add the 0.1” pin headers as shown in the first picture or solder the breakout PCB direct to one of my tracker boards and your ready to go.

Reception distances at UHF – My 1000:1 rule.

I often get asked what range you can get in ‘typical conditions’ using LoRa. There is a simple answer;

“There is no such thing as typical conditions.”

On several occasions constructors have got in touch and said; “I am only getting 1KM, yet you are quoting hundreds of KM, what is wrong with my set-up?” The answer to that is also simple;

“There is probably nothing wrong”.

It is not commonly understood how much the range\distance of communications at UHF can vary. Of course most people expect a difference between an urban area and hilltop to hilltop, but the actual differences are often a surprise. Are the communications over flat or hilly terrain, in urban, rural or forest or perhaps ground to satellite or ground to high altitude balloon?

I was fortunate during the radio testing for the $50SAT project to be able to develop a real world rule of thumb. Whilst testing the Morse beacon (on 437Mhz) I wondered if cutting the transmit power between dits and dahs would make an audible difference, there was an advantage in doing so as it saved around 33% of the battery power.

So I set-up the $50SAT transmitter board running the Morse beacon in my garden and wandered away up the road with my Yaesu FT60 hand-held till the Morse beacon was only just audible above the background noise. This was at a distance of 1km. I live in an urban area and its relatively flat.

The very same $50SAT transmitter board was put into orbit in November 2013. Some months later I was walking into town (it was a nice day) and $50SAT passed at approx 1200km distance. I heard the Morse Beacon very clearly with my Yaesu FT60.

In an urban environment the limit of reception was 1km, yet with the exact same transmitter and receiver and clear line of sight, the reception distance was 1200km, probably more.

That is where my 1000:1 rule comes from.

Thus whilst you might get 400KM with LoRa from the ground to a high altitude balloon, do not be surprised if at ground level in a city you get 400M or less.

This difference is also why it is so difficult to compare reception at different locations. I might get 1KM in my locality, the same equipment might cover anywhere between 250M and 10KM+ elsewhere. The differences are a good reason to be clear about the conditions applying to a reception report, preferably with pictures of the area.

Small LoRa Receiver

LoRa Relay as Receiver

 

This is a Cute LoRa Receiver, at least I think its cute, for bench use that I built up to be sure I always had a LoRa receiver handy. This is one of the small relay boards built as a LoRa receiver. I added a serial connection for the PC and an audio uplink cable to allow payloads to be decoded by FLDIGI on the PC then heat shrinked it all up.

The receiver is small enough to attach direct to the N Type socket I have on my bench, its the feed from the antenna on the shed roof.

EMF Field 2016

EMF 2016 Badge

Had a great time at this event, lots of really interesting stuff and very well organised. We all had these badges, wonder if you could use it as a tracker ?

I was at EMF giving a talk on a previous project, $50SAT, you can see the presentation here on You Tube

$50SAT Presentation

EMF Field 2016

There is a small section on LoRa at the end. It would be very interesting to see someone try a LoRa device from low Earth orbit, and I have received some interest from a ‘Space Agency’. There might be issues at apogee with Doppler, but if not the digital communications ought to have far greater range than we had with the RFM22B on $50SAT. One day maybe.

Trees

LoRa Relay – Part 3

With the relay built and working we can turn our attention to getting it into an advantageous position, such as 60ft up a handy tree.  20

The relay is sized so that it fits with a battery neatly inside two rocket nose cones taped together. This is a neat streamlined package that we can pull up and down a tree with minimal risk of it getting caught. The beads are there so that when pulling the strings, there is no pressure on the relay itself. But how to get the relay up a tree ?

 

21

Tree climbers do use crossbows for firing lines, but I figured that if I went over the local park with a crossbow, there would likely be unwelcome attention from the men and women in blue.

Read More

Building the Relay Board

LoRa Relay – Part 2

A LoRa relay is a powerful tool in the search for a tracker. The concept is simple, the relay is put in an elevated position and listens for and re-transmits the LoRa packets.

Height above ground, particularly in relatively flat areas, can significantly improve signal reception and range. The relay PCB is small and light, taped to the end of a 10M telescopic pole it can improve signal reception by 6-10dB, this represents a double or more increase in range.

The relay board can be built to take a battery charger, so you can put the relay in a waterproof box and keep the battery charged with a small solar panel, current consumption of the relay is around 15mA average.1

 

Separate the PCB by scouring the line of small holes in the PCB centre with a sharp strong blade, and snap the PCB in two.

 

First solder the components that are fitted to the bottom side of the PCB, these will be out of sight underneath the Pro Mini when assembly is finished. These components are R1,R2,R3,R4,D1,D4, see picture below.

2

 

There are two 5pin angled headers to fit. The one on the top of the PCB (the side with the DRF1278F and the PCB lettering) fits in the row of holes nearest the non-antenna end of the PCB. This header is for the connection of the battery and another supply such as 5V from a RC receiver. See the picture right below with the top 5 pin header and the Polyfuse fitted.

  Read More