太白金星

ESP32 LoRa Gateway

 
Overview

This project is modified based on the ESPLoRa single gateway for salt soda water.

 

It has been verified. The board verification was successful in early June, and it was not released until August, hahaha...

 

Differences from the original salt soda:

  1. Modify fuse F1 so that the fuse plays a protective role.
  2. Remove the Schottky diode D1 to prevent the circuit from not working properly due to insufficient USB input voltage.
  3. The capacitors before and after the LDO are changed to tantalum capacitors.
  4. The enable (reset) button of ESP32 adds a pull-up resistor and removes the BOOT button capacitor.
  5. Modify ESP32 packaging.
  6. LoRa antenna has new hollowing out.
  7. Increase the number of power supply pins.
  8. Add two WS2812.

 

describe:

Main control: Essence's ESP32-S or Espressif's ESP32-WROOM-32. According to actual testing, these two modules are interchangeable. Just choose according to your own needs.

Essence ESP32-S

 

Espressif ESP-32-WROOM-32

 

LoRa module: Anxinke Ra-01

Anxinke Ra-01

 

Corresponding pins of ESP32 and Ra-01:

ESP32 Pins Ra-01 Pins
D5 NSS
D23 MOSI
D19 MISO
D18 SCK
D14 RST
D2 DIO

 

Function:

  1. Developed with Arduino
  2. There is a self-restoring fuse ( necessary ), eliminating the trouble of replacing disposable fuses
  3. Reserve ESD device pads ( not necessary ) and use them as needed.
  4. The serial port chip uses CH340C, no crystal oscillator is needed, and it supports automatic download circuit. (CH340K can also be used, which is smaller in size. You can just change it according to your needs)
  5. Use a 4-pin OLED for display. Some OLEDs have different VCC and GND pin sequences. Modify them according to the OLED you have on hand.
  6. All available pins of ESP32 are pinned out.
  7. The capacitors and resistors are all packaged in 0603.

 

Precautions:

  • There are two designs of PCB antennas, SMA antenna and Ra-01’s included antenna (choose one of the two). The included antenna is soldered to this hole.

If you are using an SMA antenna, it is recommended to plug this hole with tin.

 

 

 

  • SMA antennas cannot be used indiscriminately. You must use an antenna with the same frequency as your LoRa (LoRa sets the communication frequency to 433MHz, so use a 433MHz antenna)

The capacitors NC1 and NC2 on the back of the PCB do not need to be soldered (they are used for impedance matching and adjusting the LoRa signal strength. You cannot choose them randomly!!! If you choose them correctly, you can enhance the signal. If you choose the wrong ones, they will weaken the signal. I don’t know how to calculate impedance, so I No soldering), but resistor R5 must be! (It plays a certain filtering role. Of course, if there is no 0Ω resistor, it can also be solved with a piece of tin)

 

  • Pay attention to the pin number of WS2812 and do not solder it upside down. The notch orientation of WS2812 is as shown below

 

  • It is recommended to use a 1uF capacitor for the ESP32 on the back of the PCB . The transient power consumption of the ESP32 in the transmitting and receiving state is particularly large. Insufficient power supply can easily cause the ESP32 to reset. The best solution is to design an independent LDO to power the ESP32. .

 

  • There are two versions of PCB, one with board verification and one without.

         45° routing version ( verified )

 

         Arc routing version ( not verified )

 

About the IO port of ESP32:

  1. Some IO ports are only for input : IO34, IO35, SENSOR_VP(IO36), SENSOR_VN(IO39)
  2. IO27~IO22 are used by the ESP32 module SPI Flash. My package is not leaded out, so don’t worry about it.
  3. IO12(MTDI), IO13(MTCK), IO14(MTMS), IO15(MTDO) are JTAG debugging interfaces and can be used as ordinary IO.

 

Libraries used by the example program:

  1. LoRa module: Arduino-LoRa
  2. OLED: U8g2_Arduino
  3. WS2812: Freenove_WS2812_Lib_for_ESP32

 

some documents:

  1. Arduino-LoRa: LoRa Notes Written by the Original Salt Soda
  2. u8g2 library: CSDN-hands-on party
  3. Freenove_WS2812_Lib_for_ESP32: I translated it based on the GitHub warehouse README.md

 

image display:

front

WROOM32S

 

reverse side

reverse side

 

Start interface

Take the mold according to the logo on the salt soda water PCB

start up

 

Test effect

 

Serial port:

Window collection

 

ESP LoRa:

 

 

appendix:

  1. Anxinko serial port tool
  2. iBom 

       The file name is PCB_ESP_LoRa_rev1.3.zip. Unzip it and use it. It cannot be uploaded without compressing the package...

 

Sample program:

gitee warehouse

Based on the modification of the original work, the LoRa library, u8g2 library, and WS2812 library have been added and can be used directly without adding them again. Requires PlatformIO platform!

The main program is main.cpp under src

 

The model of OLED display picture is in oled_font.h under include

 

I will write one using ESP-IDF when I have time (I guess it will take me a long time...)

schedule:

2021/09/26 The Zhongjingyuan oled program was successfully transplanted (using hardware I2C)

2021/10/08 The WS2812 program was successfully transplanted (based on Freenove_WS2812_Lib_for_ESP32 , using RMT)

 

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-25 02:50:17

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号