11 July 2020

My current LoRA "DX" is 64 km

After few experiments with spread factor and the GP antenna, thanks to TTN Mapper service I can visualize which gateways have received my LoRA signal on 868 MHz.




On the South facing balcony the signal travels 64 km at SF7 BW125 and the RSSI is still respectable. The strongest link at SNR = 8 dB is "just" 48 km long. Both of these long distance paths are in line of sight or very close to it. A total of 5 gateways received my transmissions.

When I moved the transmitter on the North facing balcony I hit 3 new gateways, two of which are available on TTN Mapper. The maximum distance here is about 38 km, but there is absolutely no line of sight path between us.

That makes a total of 7 (8) TTN LoRAWAN gateways that can receive and relay to the cloud my LoRA messages

10 July 2020

How to calculate LoRa GP antenna

Say you want to try a GP antenna on your LoRa module. How long should it be? A Ground-Plane antenna consist of 1 radiator and a number of elements mimicking an elevated ground plane. All of these pieces of electrically conductive material (preferably copper wire) should be long one-quarter of wavelength.
Since the wavelength depends on frequency, you need to apply the formula:

element length [m] = 300 / 4 / frequency [MHz]

This means that each element will be:

 Lora Frequency Band [MHz]
GP element lenght [cm]
 433
 17,0
 868 8.6
 915 8,0

Don't be too picky about millimetric precision of your cuts.

How many elements should you use for the ground plane? In my experiments I used two, 180 degrees apart, because that's the amount of wire I had within hand's reach. If you can use 4, each spaced 90 degrees. With reference to the horizontal plane, ground plane elements should be bent 45 degrees downwards. Again, don't be picky with the angle, but try to be consistent with all elements.

09 July 2020

LoRA GP antenna

Now that I can map my LoRA signal, I can play with RF and try to get the most out of it. The most straightforward way is to use a better antenna, and probably the only chance to increase range/coverage.

SX1276 with a directly
attached GP antenna.

To keep things simple and straightforward I replaced the helically wound antenna with a ground-plane directly at the SX1276 board. While this is not a real-life situation, it works well for side-by-side comparison. Also I should have tuned the GP to resonance, which requires a connector and/or some coax.

The signal strength as measured by far away TTN gateways is some 7 dB better. If I understand correctly LoRA terms, 7 dB means you can reduce the spread factor by two and achieve the same signal quality. Or quadruple the bandwidth.  And you LoRA experts know the role of SF and BW on airtime vs bps vs whatever_LoRA.

The expert eye should note that the helical antenna was used without an explicit ground plane, so this experiment is probably not meaningful at all. I need to go back to the bench and re-install the coil with the same ground plane.

 

07 July 2020

Simulating a LoRA node GPS position on TTN

A simple way to see your LoRAWAN node or gateway coverage is to use the TTN Mapper service.

In order to get my node visible on TTN Mapper I had to enable the Mapper Integration within my Application and output notes's position. TTN Mapper documentation says that either the node sends its position in the payload or you can "pair" it with a smartphone app and keep both close to each other (ie the same vehicle, the same bag, ...).

OTOH if the node sends its position it must be decoded into a JSON through some code written in the web console, Decoder section under Payload Formats. So, why not write a static Decoder function that returns the required variables?

You need to produce latitude and longitude. Optionally altitude and hdop. If a node isn't moving, that's quite easy! Recover the coordinates in your preferred way (smartphone GPS app, GPS tracker, a web mapping service, ...) and fill in your code like this:

function Decoder(bytes, port) {

  var decoded = {};


  // your node's actual coordinates
  decoded.latitude = X;  // a value like 10.456 (this is North-South or equator)
  decoded.longitude = Y; // a value like 80.123 (this is East-West of Greenwich)
  // your node's height above ground (or is it m.a.s.l.?)
  decoded.altitude = Z;
  // your position accuracy, 5 is fine
  decoded.hdop = 5;

  return decoded;
}

Once the Decoder function is saved, all further transmissions within your TTN Application will carry those variables (added cloud-side once the data is received through a gateway).

Can you see a cheating danger in here? I do. But fortunately there isn't a LoRA distance competition, yet.

Let's get my signal as far away as possible, as strong as possible!

03 July 2020

RaspberryPI and LoRAWAN with SX1276

I had laying around a SX1276 LoRA module for some months and following an IoT discussion at work I thought it would be the right time to play with it.

Instead of wiring an Arduino board with level converters (or use a 3v3 Arduino Nano, which I have), I opted to use an old, single-core, 512 MB RAM, Raspberry Pi B+: wiring is straightforward and I can debug+control it remotely over SSH.

Not that I have meaningful data to transmit. I am interested in the RF part of the whole thing since 868 MHz lies between 70 and 23 cm HAM bands and everyone writes wonders about the LoRA modulation scheme. Because of that I chose the software that offered the fastest way to get a signal on the air with the support of TTN. I used arduino-lmic-rpi with bcm2835-1.64 driver. The RPi distro is based on Debian 8 with kernel 4.9.35, don't ask me its name.

The TTN part is well documented: you need to create an Application and register your device on their portal. Then get Device EUI, Application EUI and App Key which have to be inserted into the .cpp file. Pay attention that DEUI and AEUI need to be reversed, so LSB first. Compile and run.

If everything is correct and your LoRA node can reach a gateway nearby, your transmissions will begin to appear on the web console. You need a TTN gateway in your area and it must be able to receive your transmission!!

Performance? My signal is being received by 4 gateways and a couple of them seem to be quite far away (but in line of sight).

Nothing new so far, I have only replicated someone else's work.

30 June 2020

Update on iWatRoad scooter

Once I replaced the melted XT60 battery connector in the R9 iWatRoad scooter, the user interface powered up. While the battery measured full 42V, the display said it was empty. So I wired it up to a lab PSU that could provide no more than 400 mA at 42V. It did take current for some 10 minutes and then stopped, still showing empty battery. When we plugged the original charger the LED stayed green, meaning "it's charged".
I think the culprit now lies inside the heatsink box that holds the control board. It is glued to the chassis and it will be removed sooner or later, to have a look inside or to look for a replacement.
Wired-up for charging.


18 June 2020

Dentaku, a Japanese calculator museum (online)

I was looking for info on a quite old Toshiba calculator and Serge Devidts's CalcMuseum had no information about it. Instead I found some data and much more at Dentaku Museum.

The website is in Japanese and you will need the help of Google Translate to go past pictures, dates and prices in the text. There is a whole new world behind the language barrier.

I do not own enough calculators to open a whatsoever museum (23 items at the moment). I had planned to show them at work on my desk, but with the 2020 pandemic that idea has been put on hold.