Close
0%
0%

ESP32 LoRa Gateway

ESP32 with dual LoRa modules

Similar projects worth following
ESP32 with dual LoRa modules

Hardware test platform for SX1276 driver development with the specific focus of supporting multiple radios from a single MCU.

Firmware source code at: https://git.oit.cloud/morgan/esp32-lora

Design Files at: https://git.oit.cloud/morgan/esp32-dual-lora

loranet2.pdf

schematic

Adobe Portable Document Format - 66.73 kB - 07/13/2021 at 17:20

Preview
Download

  • Rev2 and Rev3

    morgan05/24/2023 at 21:27 0 comments

    I haven't written about this project in a while but have still been busily tweaking away. Revision 2 has been under testing for a while now and is generally looking ready for production.

    The only real major issue is the transistor on Q1 (middle, near the bottom) got it's footprint swapped by mistake but has been fixed and will be in the final upcoming revision.

    Other changes will be;

    * adding a 5V input to the header, this will allow external power to be used

    * changing the through-hole battery connector to PH2.0 like in the picture above

    * Indicator LEDs! I always think I don't need them until I do...

    * USB power status, beyond battery level, it's good to know if you've got power coming in

    I expect these boards to be available in about a month, and while I've got some mulling to do still, I think my price point is going to be around $100. I would love to hear other LoRa hackers thought's on pricing and the product overall. If you're interested in hearing when there available either watch here or email lorawhen@oit.cloud to get an email for the official announcement.

  • Relief and Revelations!

    morgan12/04/2021 at 04:05 11 comments

    Few things are worse than bugs that just don't make sense. I went over and over my schematic, I went over the CP2102N Errata, I went over my soldering and simply nothing was wrong. And after building up my second board (and most of a third) to get the same issue I was getting really frustrated.

    One thing I hadn't tried was..... another computer. So the phantom USB issue I've been battling for weeks was actually an issue with my desktop. Fuuuuuuuuun.

    The good news here is that I'm now not in a rush for a second revision. The only major changed planned was breaking out the few remaining pins. So as is, these will be acceptable for being deployed as relay nodes but until another revision is done additional sensors won't be possible. This is great!

    The last remaining test I have is the battery charge circuit. Though I'm not sure if this will get used as I'm likely going to power these early nodes from an OrangePi Zero USB port that will be powered from LiFePO4 batteries charged by a #LiFePO4wered/Solar1 module.

    Look at that! Three of them and they all work! Hopefully the next update will be these, in enclosures with antennas and everything! woot!

  • Driver Updates, Rev2 work, Node Installs

    morgan12/02/2021 at 02:13 0 comments

    Driver Update

    I've been getting some work in on the esp32-lora driver (in addition to moving to self-hosted git) and happy to report it can happily handle at least two devices! Basic testing of having one device send and the other receive works as expected, though this wouldn't be the expected operating mode. This turned out to be fairly straight forward, at least in part due to the esp-idf handling bus sharing, though it also required FreeRTOS Semaphore locking as suggested by the esp-idf development guide. With these changes I've also dropped all KConfig based defaults as they don't play well with multiple devices and even cause confusion when expectations are to 'just work' (looking at you Arduino). This means the driver will no longer abort (via assert) if the config is wrong and return an error code instead.

    Hardware Revision 2

    This has been started, so far it's mainly adding breakout header for the remaining GPIOs, all 4 of them! Some things have been rearranged in an effort to make assembly easier. I'm also intended to add #SOICbite Programming/Debug Connector Footprint to lower the cost/assembly time of non-development boards. Sadly I still don't have anymore insight into the reset issue but I will certainly assemble the last two boards before sending out Rev2.

    Node Installs

    With the growing confidence in the driver I'm getting ready to put some new nodes in place. The first node will be at my home, with the second being 12.5km away at a friends property. I've already achieved similar distance with my last test setup but these two have less than perfect Line-of-Sight, with a single hilltop dead center.
                         Google Earth accuracy is questionable at best but there's a solid chance this hill is in the way

    Thankfully bad LoS in this situation is an more a testing opportunity than a failure. For the third node I want to go 3.8km in the opposite direction to a higher hilltop that will have LoS to Node 2, at a distance of 16.2km. This will offer a great relaying test bed. With these in place (particularly Node 3) pretty much everywhere I go mountain biking regularly will be covered and I can start coverage mapping by carrying a portable unit around with me. The basic idea is every minute or so it will send out the GPS location and see which nodes receive it and attempt to relay back to my house for logging.

  • Bring-up part two: The Workening (mostly)

    morgan07/22/2021 at 05:15 3 comments

    I have got it reliably flashing now after  double checking some of the soldering. As mentioned in the last post, the CP2102N soldering has to be perfect or at best it won't work at worst it gets very hot and grumpy. From the outside the solder joints all looked good but when I hit it with hot air and pressed down I got a significant solder bubble that bridged two pads. I also swapped the transistors in the reset circuit because I wasn't confidant the bag was labeled correctly.  With those swapped and the cleaned up solder flashing worked right away, flashing at 2M baud, the fastest speed the ESP32 supports. While flashing did work the ESP isn't resetting correctly after flashing. There could still be something wrong with the reset circuit but this reminds me of a known hardware bug in older CP2102N chips. There is a chance I accidentally grabbed, it was a random single in a bag, quite annoyingly I'm missing a couple of reels from moving at the end of last year, including the newer CP2102N.

    Plugging along I verified the LoRa modules where wired up correctly and it appears to be in good shape. This is the first time I've implemented two devices on shared SPI lines and it seems to have worked out.  I'll be continuing to rewrite the esp32-lora driver to better handle multiple devices. This will mostly entail moving away from using sdkconfig to determine pin configuration and instead pass that onto the user or application to define.

  • Assembly and Bring-up

    morgan07/13/2021 at 17:19 0 comments


    Assembly went fine, the usual problems were problems. The CP2102N requires the *perfect* amount of solder paste else it'll bridge and bubble. I never can seems to get USB connectors on the first try... but otherwise nothing too surprising. USB enumerated fine but I cannot seem to get it to flash without manual intervention. With power on, checking the EN and IO0 pins they both have 3.3V and I can watch them wiggle when trying to flash with esptool. But flashing will always fail unless I use a jumper wire to pull IO0 down. I've gone over the reset circuit, resoldering each component but I cannot seem to find anything wrong. Going to mull this over for the day and either continue debugging this one or assemble another if nothing obvious sticks out.

View all 5 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates