Tuesday, 21 October 2025

Testing LoRA transmitters and receivers

I've wanted to have a play with 868MHz LoRA transmitters for some time now but never got around to it until,  a while ago, I did an hardware design and PCB for someone wanting a prototype remote sensor as part of a security system to monitor inclination levels and transmit them over longer distances than WiFi can reasonably achieve.

I chose the Seedstudio Wio-E5 for the prototype connected to an ESP32 S3 and it was succesful as a testbed for further development. 

I know some of you reading this will be saying that you can just buy the HELTEC modules and similar modules but, as usual, I want to learn myself and also use up some of the modules I've bought in the past and never got around to using.

For my own design I wanted a simpler solution that I could use for outbuildings (shed) to monitor the status of the door and also the ambient temperature, the requirements were: -
  • Cheap to build
  • Last a very long time on a battery
  • Have a good range, relative to WiFi
  • Not using Meshtastic just sending a datapacket when triggered
  • Use a DS18B20 Temp sensor
  • Have an I2C connection for other sensors or a screen
For the power control I used the same trigger logic  circuitry I used on my WiFi window/Door sensor  which means that the LDO is enabled when the reed switch opens or closes and when the code is finished sending the datapacket it shuts off the power to itself using a GPIO.

I have made three different variants of the PCB to use different processors: -
  • An adapter PCB to connect an Xiao ESP32-C3 or S3 (or other Xiao module?)


  • A transmitter using an ATMEGA328p

  • An adapter to connect the Wio-E5 to a Waveshare 1.47" Display module based on an ESP32-C6






The other thing I'm testing out for these projects is AI, I've tried ChatGPT for writing Arduino code for ESP32s etc. without much success but I thought I'd try out the new Google Gemini Canvas AI and I was blown away with the code it generated, it's not 100% perfect but unlike ChatGPT it remembers it's mistakes and doesn't make them twice.  It's not a cheap option at £18.99 ($25) per month but you also get 2TB of storage.

Within a couple of hours (total prompt writing time)  I had working code for all three options, the AI sometimes needed help with the different pins used on the different ESPs for serial connections and there were a couple of inconsistencies between the transimitter and receiver code when I switched on encryption of the data packets but by pasting the debug serial code from the PC into the prompt window the AI was able to track down it's mistake and fix it.

One of the biggest time saving things about using the AI to generate the code is that once the screen setup is complete it lays out all the text for you, no more counting pixels to determine where everything goes and when the screen refreshes it creates the code to draw a rectangle over the existing code to clear out any left over bits of text if the newer text is shorter in length.

I also added a web page option to the receiver by just asking the AI to include a web page with the same information that's displayed on the screen.

I will post the code and the PCB details on my GitHub page in the next few days, I'm making some corrections to the ATMEGA 328p version before I publish it to GitHub.







Testing LoRA transmitters and receivers

I've wanted to have a play with 868MHz LoRA transmitters for some time now but never got around to it until,  a while ago, I did an hard...

Popular Posts