Antenna for LoRaWAN project - Page 1
Forum section: electronics / rf-microwave

author: TomS_
author_rank: Frequent Contributor
timestamp: April 22, 2021, 06:31:24 pm
content: Hi all.Im really out of my comfort zone talking RF, so apologies in advance if I have everything totally ass backwards.Im working on a small project where I want to include something like LoRaWAN to transmit some telemetry from a solar charging system in my garage which is a short walk away from the house.Im looking at the Microchip RN2483 module as it has a nice plain text UART protocol to send and even receive messages via the WAN, and is readily available. Ive already been thinking about putting up a LoRa base station since there are none in my area yet.I believe this module might already have a matching network on board, as their datasheet seems to indicate only some short traces from the modules castellations to a connector where you could then attach an antenna (sample layout on page 12:https://docs.rs-online.com/f1c1/0900766b81699d55.pdf)Im looking to avoid needing to use a fancy connector and an antenna if I can, and I am wondering if I would be able to simply place a pad right at the output of the module and solder a suitable length of wire to act as an antenna instead?Does this sound like something that would work at all, or what kind of gotchyas would I be in for if I attempted it?Thanks!

author: ogden
author_rank: Super Contributor
timestamp: April 22, 2021, 07:21:51 pm
content: Quote from: TomS_ on April 22, 2021, 06:31:24 pmSure. Wire of proper length meaning properly tuned for frequency could be one of the best antennas one can wish. For short distance more practical choice is spring antenna because you can fit it inside enclosure. Good question - how you design and/or tune it.Then there is option of PCB antenna:https://www.ti.com/lit/an/swra416/swra416.pdf. Note this is example which most likely is matched for particular chip, not 50 Ohms.

author: TomS_
author_rank: Frequent Contributor
timestamp: April 23, 2021, 11:44:28 am
content: Thanks.The document you linked to also mentions another document, DN024, which they say is closer matched to 50ohm.But to be honest, my understanding of analogue and RF is weak - I can wire logic chips, CPUs, memory, use programmable logic, and write software all day long, but I dont really even know why 50 ohms in particular is so important...I suppose I am looking for what could be as close as possible to a "fool proof" solution and would be easy enough for me to understand with my current knowledge without having to learn an entirely new set of theory. But maybe "fool proof" and RF just dont go together in the same sentence...The spring antenna you mention seems like it could be a good match for that, if I understand anything at all about it - but it seems like I could just solder one of these as close as possible to the RN2483 module and "be done with it"?The distance from the garage to where my base station would be is quite short, less than 100 metres, although it does have to go through a house and maybe some trees. So presumably I wont need a huge amount of gain, and the spring antennas look like they are just a coulle of dB gain at best, but yeah, very small.I wont have the PCB in an enclosure as it is technically indoors. It will just be mounted to a piece of wood with some terminal blocks for external connections.

author: georges80
author_rank: Frequent Contributor
timestamp: April 23, 2021, 03:32:01 pm
content: You don't need lorawan, just lora is perfectly fine with your own simple packet protocol on top.Lora is quite impressive. With 62.5khz bandwidth and SF of 9, I can reach a couple of hundred metres reliably with NO antenna on the receiver side. Just the module, castellations and an SMA connector but nothing connected (i.e. no coax, no antenna).I'm using SX1262 modules and from aliexpress they come with a small spring antenna to solder direct if you want. I prefer a 'real' antenna. With the spring antenna I can easily reach 400-500 metres through a few houses.I'd suggest you spend some time with google and looking at various Lora projects on the web (there are plenty of them) and you can see how easy it is to deal with a basic antenna connection. You could solder coax direct to the module castellations (the RF and a GND are adjacent pins on the modules I use) and then take that to your antenna if you so desire. I use RG174, easy to deal with and very flexible and thin.The modules I'm using are the NiceRF modules and super easy to use.There's a package called Radiolib (github) that has drivers/interface to get from your C/C++ code to the module you are using.I made some STM32L052/53 based boards with the NiceRF modules.cheers,george.

author: ogden
author_rank: Super Contributor
timestamp: April 23, 2021, 04:35:27 pm
content: Quote from: TomS_ on April 23, 2021, 11:44:28 am50 Ohms impedance is like standard of whole RF industry. You don't need to worry much about that. Sorry if I misled you about antenna tuning. Even "out of tune" antenna will radiate or receive RF waves, in your case precision tuning is not necessary. My suggestion would be - buy some spring antennas for frequency band of interest, solder close to module and consider it done. It will work. Lora can reach more than few km using tuned springs of wire, but you don't need such range. You are advised to do open field tests for greater than needed, distance to find limits of your system. If it do not work as needed - come back here. Our community will definitely help the best we can.

author: TomS_
author_rank: Frequent Contributor
timestamp: April 23, 2021, 07:12:51 pm
content: Thanks for the info, george. That is crazy that it can work so far without any antenna at all...I suppose the reason I wanted to use LoRaWAN specifically was just for "easier integration on the application side". As I understand it, I could have a simple application running on a raspberry pi for example, and receive uplink messages via some kind of message broker, relieving me of coming up with my own protocol and message handling.But I will reconsider this. I did buy a sample module to play around with before I realised it didnt have an integrated WAN stack, maybe I can pick up another one and just run some of my own tests and see if maybe I do just prefer it that way afterall.I suppose the plus side is that I could probably get away with sending "more data" and bidirectionally if I dont use something like TTN, since they have some "rules" about how much airtime youre allowed to use.Can I ask about how you implemented your protocol - if you rolled your own?

author: georges80
author_rank: Frequent Contributor
timestamp: April 23, 2021, 07:39:57 pm
content: ^ I've used Digi radio modules in the past for a commerical product. I developed a protocol that sat on top of the Digi mesh protocol. So, I borrowed ideas from that to implement my own protocol, it really is quite easy though.The Semtech devices (the Lora radio chips) do all the hard work. For each 'packet' they will put out the preamble, etc and if you use explicit header it will insert the payload length info, then the payload and put a CRC on the 'packet'. So, you just have to decide on your payload structure and then send that to the radio via SPI from your processor.The radiolib stuff gives you all the basic stuff to program the module and send/receive data and much more (like CAD to listen to make sure that the airways are free before transmitting - collisions mean everyone likely loses...).Anyhow, it all depends on your comfort level to code stuff at a lower level. Lorawan is big chunk of code and then you have to do all your cloud 'stuff'. For my use since I'm only talking between modules and a 'base', there is no cloud stuff and it's basically all peer to peer.cheers,george.

author: TomS_
author_rank: Frequent Contributor
timestamp: April 23, 2021, 09:54:21 pm
content: I'm pretty confident at low level - I work directly with registers when I'm doing embedded stuff, not shy of assembly, etc.The module I bought is based on a Semtech chip, will look into it a bit more.

author: georges80
author_rank: Frequent Contributor
timestamp: April 24, 2021, 12:00:06 am
content: ^ well, your module would have to have a Semtech chip - since they 'own' the Lora spaceI suggest you look at Radiolib and familiarize with it. There's a lot of module support and protocol support. I extracted out the bits I needed, basically just the sx1262 stuff (in the module folder) and the physicalLayer support. So, even though it appears overwhelming it isn't much when you prune the weedsYou may have a different sx variant, just grab the write module code (essentially the low level driver).cheers,george.

author: TomS_
author_rank: Frequent Contributor
timestamp: April 24, 2021, 07:00:02 am
content: Quote from: ogden on April 23, 2021, 04:35:27 pmThanks ogden, that is certainly encouraging.Seems I've still got a little work ahead of me at least, just maybe not as much or quite as difficult as I thought. 🙂

author: TomS_
author_rank: Frequent Contributor
timestamp: April 24, 2021, 07:05:50 am
content: Quote from: georges80 on April 24, 2021, 12:00:06 amOh right, haha. It seems a little bit like Arduino at first glance, every man and his dog are making lora stuff so there could have been a few different manufacturers around.Will take a look into the code, but I wouldn't pass off the possibility that I try writing something myself too. I seem to have a habit "reinventing the wheel", mostly for the learning.

author: A.Z.
author_rank: Super Contributor
timestamp: April 25, 2021, 07:32:33 am
content: here are some ideashttps://www.thethingsnetwork.org/forum/t/diy-external-antenna-for-gateway/3011https://www.google.com/amp/s/bashtelorofscience.wordpress.com/2018/04/03/diy-lora-antenna/amp/just use some (relatively) short run of coax to connect the antenna to the module and, if possible, place the antenna outside to maximize performancealso seehttps://www.thingiverse.com/thing:4207315

author: cdev
author_rank: Super Contributor
timestamp: April 29, 2021, 01:42:16 pm
content: Frequency it seems is 915 or 868 MHz for LoRaWan.A monopole is just a quarter wave length of wire,( of 3.1 or 3.2 inches/(8 cm) for 915 or 868 MHz, respectively) but it will resonate at a wide range of frequencies depending on its relationship to whatever is used as a ground plane. But its likely to be perfect match only at one frequency, depending on its electrical length.3.15 inches would likely work okay for both. Especially if a ground plane (the chassis or grounded side of your device) is available. It would be best if you could get the antenna straight up and in the clear as much as possible.You could also make a broadband antenna which would make measurement much less critical. A balun would decouple the antenna from the radio and probably would improve reception. The wider the conductor used as the antenna the more broadband it will be. You could use a foil triangle with the apex of a triangle as the feed point. That is likely to be more broad band. But a wire would be simpler and probably just as good.

author: M0HZH
author_rank: Regular Contributor
timestamp: April 29, 2021, 02:27:23 pm
content: I used a RaspberryPi ZeroW with an external WiFi antenna for the exact same purpose - solar system in the shed sending telemetry to house network. More convenient as it has to do other stuff as well.

author: TheDefpom
author_rank: Frequent Contributor
timestamp: May 19, 2021, 12:38:05 am
content: Personally I have used the Ebyte E32 lora modules for projects, serial in and serial out, just set up a couple, choose the radio speeds and config settings (default settings work fine too) and off you go, they have different lora bands available, purchase the one appropriate to your country.There is a 100mW and a 1W version, for your purpose the 100mW version will be fine, you can also adjust the output power in a few steps to reduce the range and interference to others if down need all of the power:https://s.click.aliexpress.com/e/_Ak7K3FEbyte have PC software to program the config with a USB to serial adaptor, or you can do it through the Arduino IDE in your sketch (which is how I usually do it).

author: rfclown
author_rank: Frequent Contributor
timestamp: May 20, 2021, 05:25:27 am
content: Quote from: cdev on April 29, 2021, 01:42:16 pmcdev's advice is on target. A piece of wire about 3 inches will be fine. LoRa has a phenominal range because of the coding gain you get with the chirp modulation.I used the 915 MHz version of this device for a client because in the US the module was pre-certified if used with the PIFA PCB antenna shown in the datasheet:https://media.digikey.com/pdf/Data%20Sheets/Microchip%20PDFs/RN2903_Rev_Oct2017.pdfThis was for a comercial product, and the client wanted something where he didn't have to go through FCC certification. I suggested this module because of that: a cheap antenna (just a PCB trace), pre-certified (if using this antenna). Range, data rate, current drain and cost all fit his requirements.For hobby use, you can use whatever (don't have to worry about certification), and a wire is all you'll need. If you want something really good, I like the sleeve dipoles from Linx:https://linxtechnologies.com/wp/wp-content/uploads/ant-868-cw-hwr.pdfYou'd have to attach a SMA connector to the module for this antenna, but again, this is overkill for what you need (I suspect), and a 3 inch wire is fine. Just keep it away from metal (on the board, or housing).