-
Signal Reception
04/29/2020 at 15:21 • 0 commentsOh my, it's been a while since I was able (or remembered?) to touch this project. There's definitely a lot less rain now, but it'll come back! So, before it does, I need to get it done. Or at least, try to get it done.
Yesterday, I was testing an importance assumption. The original assumption was that I'd be able to send telemetry over LoRa from my mailbox (perhaps about 100 meters away) to my house. Would it actually hold true?
So I wrote a simple program that regularly increments a counter and transmits it over LoRa and it will also receive LoRa packets with another device's counter and display it alongside the first counter on the OLED.
This way, the moment either device stops "hearing" the other one, the corresponding counter will stop.
So I kept one of the devices in my office in the basement and walked to the mailbox and put the other device into the slot. It was still receiving counter updates from the other device. Woohoo!
Side note -- guard working with the LoRa chip (SX127x) with a mutex if you have two tasks (sender & receiver) :)
-
Primitive early prototype works
01/06/2020 at 19:45 • 0 commentsThis is just an early beginning of project experimentation. I took two WiFi LoRa devkit by Heltec, soldered some pins on one of them and connected it to a GY-30 sensor (which had pins soldered on the wrong side long time ago! haha).
I then wrote some quick-and-dirty code that continuously reads luminosity from the sensor and sends it over low-level LoRa as a packet.
The other LoRa devkit, in absence of the sensor, just reads whatever it receives from the first devkit and displays it as well.
This is what you can see in a (somewhat blurry) video below. The secondary LoRa is on the left. Please excuse the cabling, it's a quick proof of concept!
After making this work, I decided to read a bit more about LoRaWAN, and, damn, that was a mistake to start doing this @ 10pm! While I kind of started understanding the highest-possible-level properties of it, I ended up trying to shop around for a gateway, joining TTN and figuring out if there are any gateways within a reasonable proximity (and it looks like there aren't; I am in Maple Ridge, BC, Canada and it looked like I am at least 18kms away from one in Port Coquitlam). So this got me thinking. Should a mailbox notifier rely on a presence of a LoRaWAN gateway? Those things aren't particularly cheap.
Would it make sense for the device to support both? If it can't join a network, simply assume there is none and broadcast the signal in the hope there's a receiving device nearby. What do you think?