element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
RF Radio Frequency
  • Challenges & Projects
  • Project14
  • RF Radio Frequency
  • More
  • Cancel
RF Radio Frequency
Blog Lorra-Lorra-LoRa
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RF Radio Frequency to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: paj
  • Date Created: 15 Jan 2020 6:45 AM Date Created
  • Views 1425 views
  • Likes 6 likes
  • Comments 4 comments
  • rfradiofrequencych
Related
Recommended

Lorra-Lorra-LoRa

paj
paj
15 Jan 2020

I have it in mind that I would like to create two projects using point to point LoRa communication. The first and what this blog is about is to detect and report movement. The second is to report moisture content of the soil so I know when my allotment needs watering. Hopefully I will get around to this soon. The original idea was that I wanted to know when my elderly mum was up and about so I figured two pir’s in her house one in the kitchen and one in her hall would allow me to know if she was moving around. The problem is that she doesn’t have the internet nor does she want it. So hoping that LoRa will be the answer I ordered two  LORA SX1276/SX1278 433Mhz ESP32 WIFI NodeMcu Module 0.91/0.96OLED Display from eBay and with xmas postage they have only just arrived. I have two PIR’s that send data on 433mhz  and I have already recorded the code they each send when triggered. I also have a 433Mhz receiver which  I just need to hook up to the LoRa board and I will be able to respond to the signal from the PIR’s. The whole thing will look like this:

image

The boards arrived and I unboxed them and soldered the headers on. As usual there is nothing in the box to tell you anything about the way they operate and what I know about LoRa and RF in general would comfortably fit on a post-it note. So I searched the internet for the string in bold above and I landed on https://randomnerdtutorials.com/esp32-lora-rfm95-transceiver-arduino-ide/ which led me to https://randomnerdtutorials.com/ttgo-lora32-sx1276-arduino-ide/ . Both of these are excellent tutorials which I couldn’t hope to improve on so I won’t try. I copied Rui’s code for the sender and receiver sketches and set my Arduino IDE to program the ESP32 as per the tutorial and hey presto they are talking to each other. I often think of myself as Dr Frankenstein I take a bit from here and another bit from here add electricity and hope it comes to life. I had already played around with the 433Mhz rx and tx boards so I had the RCSwitch library in my IDE. So I added a few lines to Rui’s code and connected the rx board to the sender ESP32 uploaded the sketch and to my surprise My monster came to life!

With not much time left I started tweaking the sketch removing lines that weren’t required then when I uploaded the sketch everything stopped working. To start with I was misled because it looked like the triggers from  PIRs had stopped. Then I thought it must be my sketch changes so I reverted back to the original unmodified script (creating a new file first to save the original sketch into). It didn’t work still. It was as if only part of the code was being loaded in the ESP32. I have never encountered this before but I could see part of the sketch was working i.e the startup messages but nothing was being sent. I did some research on the web but didn’t find anything then I was reminded about holding down the rst button just before uploading which is really to solve a missing com port. It worked but I have no clue why (maybe voodoo). So I went back to my modified sketch only it wasn’t. Somehow both sketches were unmodified. How I had managed that I don’t know. Rushing probably. Anyway it was easy enough to add my few bits of code back into the sketch. I then uploaded whilst pressing the voodoo button

As you can see by the video below the PIR triggers and a message appears in the receiver ESP32 to say which PIR was triggered.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

I have attached a text file containing the sender sketch that I have generated so far but it’s not finished by a long chalk. The receiver sketch is unchanged from Rui’s sketch.

 

So what’s next? The LoRa boards are working on my bench but do they work when the distance is greater than a few feet? The PIR triggers are visible but unless I’m watching them all the while I couldn’t make any sense of the information. so I need a database recording the time of the triggers.

I was going to design a case but I found a really nice looking one on thingiverse https://www.thingiverse.com/thing:2670713   the author advises caution when fitting the module into the case as it is easy to break the screen. I was going to print a couple off this afternoon but with all the messing around......... update I printed one off but wasn’t pleased with the fit of the lid!

In the end this is not the project I was hoping to create. I will continue with the project firstly cos I want the final project outcome and secondly because I need the blogging practice.

 

footnote: for those none uk readers patient enough to have read this far Lorra is Liverpudlian for ‘a lot of’ made famous by Cilla Black a Liverpool singer who often said “Lorra Lorra laughs” meaning very funny.

Attachments:
Sketch .txt.zip
  • Sign in to reply

Top Comments

  • ralphjy
    ralphjy over 5 years ago +3
    Loved Cilla Black . I see that they are releasing "You're Sensational", a previously unheard track, on Valentines's Day.
  • paj
    paj over 5 years ago in reply to ralphjy +2
    Tthat’s interesting I’ll have to listen out for that.
  • shabaz
    shabaz over 5 years ago +2
    Hehe it feels unnatural having both transceivers on the same breadboard : ) Cilla was great.. Looking forward to reading about the moisture measuring solution!
  • paj
    paj over 5 years ago in reply to shabaz

    It was only to keep them still while I did the video. Need to test the distance next but I’m trying to do something for the acoustics competition at the moment.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 5 years ago

    Hehe it feels unnatural having both transceivers on the same breadboard : )

    Cilla was great.. Looking forward to reading about the moisture measuring solution!

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • paj
    paj over 5 years ago in reply to ralphjy

    Tthat’s interesting I’ll have to listen out for that.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • ralphjy
    ralphjy over 5 years ago

    Loved Cilla Black image.  I see that they are releasing "You're Sensational", a previously unheard track, on Valentines's Day.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube