LoRa - Long-Range R...
 
Notifications
Clear all

LoRa - Long-Range Radio for IoT | Arduino, ESP32, RPI Pico

82 Posts
5 Users
34 Likes
4,212 Views
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7083
 

@inq It has been many decades since I last designed an antenna. There is actually no such thing as a full wave as they are impossible to impedance match. The half wave is good, but only 3db better than a quarter. Either the 1/2 or 1/4 is the goto depending on what length is comfortable.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

I'm working on the first one now and cut a 1/4 wave.  I was sure it wasn't as simple as just measure and cut and get twice the range.  That'd be too easy.

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7083
 

@inq If any coax is involved, it is NOT part of the length. Only measure the non coax wire and precision is paramount. There are meters that will help, maybe a new project Bill?

@dronebot-workshop 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

I was not able to find the library described in the documentation for the video:  LoRa by Sandeep Mistry.  Even using the keyword Sandeep, the only entry that came up was for a supplemental library that uses LoRa by Sandeep Mistry.  I prefer to use older Arduino IDE 1.8.19.  I loaded up the Arduino IDE 2.2.1 and sure enough it was exactly where Bill's document said it would be.  It loaded into 2.2.1 just fine. 

Back in 1.8.19, I was able to download and install the library from the Github location.  Making a couple of pin changes in Bill's Receive Sketch, I was able to compile and upload to an ESP8266.  

The sound made by one hand clapping

It doesn't squeak, light up, print diagnostics or do anything interesting (without a sender).  🤣  

VBR,

Inq

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7083
 

@inq Both IDE's use the same library directories, so if it's there for one it's there for the other.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7083
 

@inq I just tried both IDE's, see attached Pics. The first is 1.x, the second is 2.x

Screenshot 2023 11 15 at 20.04.29
Screenshot 2023 11 15 at 20.01.37

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

@zander,

Did you load it in the 2.2.1 IDE?  I only mention the issue for those that might only have the 1.8.19 IDE.  Also, I don't use a common library location for both instances, so your technique didn't work for me.  But... that's just my way of doing things a little differently.

VBR,

Inq

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7083
 

@inq What do you mean by

I don't use a common library location for both instances,

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

I did not mean for this to blow-up.  I was clear... this only applies to people using the Arduino IDE 1.8.19.  It does not show up in the Library Manager.  

Posted by: @zander

@inq What do you mean by

I don't use a common library location for both instances,

 

There are many ways to setup the old IDE.  It is called a Portable install.  If you're curious, there may still be documentation of how and why one would want to use it.  Since I make a library that is published on the Library Manager, and I support it on both IDE versions, I keep a pristine install of 1.8.19 and 2.2.1.  I also keep a third install of 1.8.19 for all my projects that I do... most of which are somewhere on this forum.  All three installs have completely different library locations.  If I install a library in one... it is not visible in the others.

 

 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7083
 

@inq Ok, now I remember.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1710
 

Hi @inq,

  Re: Antenna length, Ron @zander is right in saying it is normally quarter wave or half wave, but that doesn't explain one important detail.

Rememeber the signal must be conducted to the feed point of the antenna by a matched feeder, typically a coax cable. The 'quarter wave' is a single piece of 'wire', connected to the core of the coax. The shield is unconnected at the aerial end.

There is also an abstract point, that the whole system must have matched impedances. To feed a 'simple' quarter wave, you would normally use 50 Ohm cable. Without going into to detail, the 50 Ohm is an 'AC only' property, related to the cylindrical geometry and materials the cable is made from. Any length of coax that is otherwise unconnected should always shows 'infinite' resistance between the core and the screen when measured with a general purpose multimeter.

------------

 The half-wave dipole arrangement is not a single wire, but a pair of 'wires', each one being quarter wave in length, and pointing in opposite directions, so that thtotal width is half-wavelength. In this case, one would normally connect to the core of the coax and the other the screen.

However, life is not that simple, as the impedance match is now poor. In many cases, the two 'wires' of the dipole are extended and the ends joined to form a flattened loop, the total width of which is half wavelength. This is the common arrangement with UHF TV. You may note TV uses 75 Ohm coax....note the 50 Ohm commonly used elsewhere, The cables look similar, but should not be mixed up.

---------------

In practice, the actual aerial dimensions are a little less (say 5% less) than the wavelengths of the wave to be transmitted or received, although any self-respecting aerial design 'calculator' would include this provision.

---------------

For higher gain and efficiency, there is a whole science and folklore, whereby the elements get increasingly changed from the simple wire starting point.

However, there are a few basic tenets:

  • To minimise 'unnecessary' loss of signal, the whole chain involving cables, connectors, aerial design must be impedance matched.
  • Some aerials are described as 'omni-directional', but that is only in one plane. E.g. the vertical quarter wave 'wire' is omnidirectional in a North-East-West-South plane, but the signal will become progressively weaker if the other aerial is higher or lower ... simplistically the maximum signal is in the horizontal plane.
  • 'Higher gain' aerials deliberately restrict the angle range they transmit or receive signals. If they transmit, then it is possible to 'focus' the signal in particular directions. This does not increase the total power of the signal, but it can extend the strength of signal in the favoured direction.
  • Sometimes, aerials will be larger than quarter or half wavelength, in which case the 'favoured direction' patterns, as well as impedance matching, becomes increasingly complex.
  • The transmitted signal is 'polarised' (similar to optical polarisers, including Polaroid sunglasses). Typically, the transmitting aerial will be horizontal or vertical, and the receiving aerial should be similarly aligned. As elsewhere, some aerials do their best to break some of the rules, but they are only sharing the same total amount of energy in other distributon patterns.

Best wishes, Dave

PS a warning with transmitters .. including the one-chip ones like ESP32, nRF24 etc., as well the high power commercial ones. The power output stages are designed to be permanently connected to a 'well-matched' aerial system, that will efficiently take the signal and launch it into free space. If the aerial is not well matched, some of that energy can bounce back into the output stage electronics. This can result in excessive heat and excessive voltages, which inevitably can turn into magic smoke. Unless you know what you are doing, stick to well-trodden paths and products.

Receivers can lose signal just as easily, for the same reasons. However, as the power levels are many orders of magnitude less, magic smoke is unlikely.


   
Inq reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7083
 

@davee @inq I did mention the part about the coax. Keep in mind this is a tiny piece of wire directly attached to the ANT pin of the LORA board. Orienting the antenna so it has max gain in the general direction of the receiver is of course wise.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

Maybe you don't want to get this deep into teaching.  I'd understand.

Posted by: @davee
it is normally quarter wave or half wave

In structures, I'm well versed with fundamental / modal frequencies and the Math associated with it.  Hitting a natural frequency can be a very powerful thing - Tacoma Narrows Bridge.  I don't know if that model in my head is relevant to tuning of antenna's.  In that engineering, a full wave is far more powerful.  I thought the reduction to 1/4 was merely because of practical length of certain frequencies.  I remember doing a crystal set with my Dad and I remember us running it out the window and to a far tree (5 year old's perspective).

Posted by: @davee

Rememeber the signal must be conducted to the feed point of the antenna by a matched feeder, typically a coax cable. The 'quarter wave' is a single piece of 'wire', connected to the core of the coax. The shield is unconnected at the aerial end.

I now understand from the previous posts about the coax shielding the actual core (and length is not counted).  The shield being connected to a ground pin on the radio unit.  The core wire can then extend beyond (to the proper frequency length) or attached to some yet to understand monstrosity that looks like an old TV antenna.

Posted by: @davee

Without going into to detail, the 50 Ohm is an 'AC only' property

Although the detail may not be relevant or practical to my level of understanding, this has always stumped me.  Cables are advertised as "50 ohm Low Loss".  This always stumped me as if I wired it correctly, I could never measure a resistance.  It was always infinite and should be as they don't make a loop.  And my simplistic model said 50 ohms could not be a function of distance as resistance in wire is always a function of distance.  Your 'AC only' just snapped the proper perspective... so its impedance, not resistance that 50 ohms is about.  Impedance is a mystery to me.  I understand there is impedance in a coil as the voltage changes.  Beyond that concept, it's black magic.  Must have been in EE-102. 😉

Posted by: @davee

The half-wave dipole arrangement is not a single wire, but a pair of 'wires', each one being quarter wave in length, and pointing in opposite directions, so that thtotal width is half-wavelength. In this case, one would normally connect to the core of the coax and the other the screen.

I wrote the following before reading, "the impedance match is now poor" but wanted confirmation that the benefit of this simple H.W.Dipole would not outweigh this impedance matching aspect?

From an earlier post, you mentioned that it didn't have to be coax.  It could simply be two wires next to each other.  So a half-wave dipole could be as simple as:

Half wave dipole

 ???

Which brings up why do some antenna's come in pairs and they are 90° to each other instead of 180°?

Posted by: @davee

You may note TV uses 75 Ohm coax....note the 50 Ohm commonly used elsewhere, The cables look similar, but should not be mixed up.

And this 75/50 ohm helps Impedance Matching in some way for TV's?

Posted by: @davee

whole science and folklore

Well... that's clear as mud! 🤣 

Posted by: @davee

This can result in excessive heat and excessive voltages, which inevitably can turn into magic smoke. Unless you know what you are doing, stick to well-trodden paths and products.

Well!  That's all I need is one more smoke producing aspect. 😆 

So... no DIY H.W.Dipole!  Got it.

VBR,

Inq

P.S.  The gorilla in the room is this impedance matching.  I can appreciate it is a subject that can't be adequately explained in a forum.  Can you recommend a link/book that might be a primer geared to non-EE, non-Radio engineers or mathematicians?  

It seems like there are quite a few ham radio operators on the forum, maybe I can put a question in that section and they might see it.  I can't imagine all of them are formally trained in such complex EE theory, yet might have a solid practical/technicians level understanding that would be real-world.  Might even include some of that folklore. 🙂 

 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

@davee,

Posted by: @inq

Impedance is a mystery to me.  I understand there is impedance in a coil as the voltage changes.  Beyond that concept, it's black magic.  Must have been in EE-102.

Did need to elaborate... I also understand from Physics that the field around the wire  (right-hand rule) is opposite the field of the returning wire.  These fight each other with AC currents and causes the resistance (impedance).  I am not seeing how this applies to the coax-antenna... the current isn't returning down the shield (it's not connected).  

... or are we going to get into an even deeper subject like inductance... inducing a current in the other direction.  But since the core (antenna on the end) isn't going TO anything, how is current flowing to cause all this impedance / inductance aspects?

 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7083
 

@inq With regards to your query re 90 vs 180. If you have a modern router, it will have from 2 to 6 antennas that swivel. If you only have 2 then rotate them so that are at 90. The reason is one antenna will broadcast on one plane and the other on a perpendicular plane. That gives the maximum coverage. Of course adding even more in between will now increase the signal strength in all directions.

It's all more than you need to know; however, point the tiny wire at the sky no kinks. I will leave it to @davee to confirm that a real earth (copper rod in the earth 4' deep) will make for a better signal. 

I think you are in a lightning-prone area, so adding a rooftop lightning arrestor is cheap insurance.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Page 4 / 6