Big ESP32 + SX127x topic part 3

Pycom LoPy and LoPy4 boards are now supported by arduino-espressif32 core:

Pull Request to add these boards to Platformio already opened.

1 Like

I have TTGO 2.1 V1.6 (T3_V1.6), I ask how I need to set parameters for LMIC.
Thanks for the reply

const lmic_pinmap lmic_pins = {
.nss = ??,
.rxtx = LMIC_UNUSED_PIN,
.rst = LMIC_UNUSED_PIN,

.dio = {/*dio0*/ ??, /*dio1*/ ??, /*dio2*/ LMIC_UNUSED_PIN} 
}

Pin mappings are described in the very first post of this topic.

Thanks for the reply.

Here :
https://www.aliexpress.com/item/TTGO-LoRa32-LoRa-V2-1-1-6-version-433-868-915Mhz-ESP32-OLED-0-96-Inch/32872517875.html?spm=a2g0s.9042311.0.0.140a4c4dqqyWMc

is set .rst = 23

Will the settings be all right?

const lmic_pinmap lmic_pins = {
.nss = 18,
.rxtx = LMIC_UNUSED_PIN,
.rst = 19,
.dio = {/dio0/ 26, /dio1/ 33, /dio2/ LMIC_UNUSED_PIN}
}

look in the first post of this topic.

Hello guys.
I have 2 Heltec ESP32 LoRa modules connected (no version is shown), so one is a node with one temperature sensor and the other is a gateway connected to the TTN. The problem is that itā€™s only working for spreading factor 7!
Any other SF that I configure, the Heltec display only shows ā€œREADYā€ and IP (which I am also not able to access as webserver). Weirdā€¦ :thinking:

Iā€™m using the matthijskooijman library for 915 MHz.
If I open the serial monitor and reset the gateway, it seems that the settings I make are not having any effect.

sfttn

The sensor node and gateway code Iā€™ve cloned from here: https://github.com/vpcola/ESP32SingleChannelGateway/tree/master/ESP-sc-gway
I made only the smallest adaptations to operate on 915 MHz.

In the node settings, I set it to LMIC_setDrTxpow (DR_SF8,14);

Would anyone know how to solve this problem? I imagine itā€™s some simple setup Iā€™m missing ā€¦

Ignore the above problem, guys ā€¦ hehe
I was having a problem in my network and therefore could not access the webserver, I figured this would not be an impediment to change the spreading factor, but apparently it is only possible to change it online.

I recently got a TTGO T-Beam, same version as quoted above. I was looking a the LDOs used and ā€¦ the Esp32 is powered by a 150mA LDO! Not good. The markings are 4A2D, which corresponds to a Torex XC6204A regulator. There are 300mA variants (still marginal IMHO) but this is not one of them. Note that there are two such LDO on the board, one for the LoRa module and the GPS, and another for the esp32.

I also noticed that power (whether 5V or LiPo) goes through a TP5400 charger / boost regulator. So on battery the LiPo voltage is boosted to 5v and then regulated down to 3.3v. Iā€™m not expecting decent deep sleep performance like thatā€¦

On a positive note, I noticed that the Heltec WiFi Lora V2 schematic shows that the CP2102 USB-serial chip is powered by the 5V bus and not (like all other boards with a CP2102 Iā€™ve seen) by the 3.3v bus. That should remove the dreaded 6.5mA consumption when on batteryā€¦ I donā€™t have one of these so I canā€™t verify.

Can anyone produce a decent esp32+sx1276 board???

@bluejedi here are the config that works for my TTGO Lora V2.1 pcb 1.6 (yep the not so good one)
i got it from paxcount which was the only test working on it at first, i use on platformIO with helftec 32 lora board type.
oled pins are not the same as V1 and V2 also the lora rst wich is 23 instead of 14

// Pins for I2C interface of OLED Display
#define MY_OLED_SDA (21)
#define MY_OLED_SCL (22)
#define MY_OLED_RST U8X8_PIN_NONE

// Pins for LORA chip SPI interface, reset line and interrupt lines
#define LORA_SCK (5)
#define LORA_CS (18)
#define LORA_MISO (19)
#define LORA_MOSI (27)
#define LORA_RST (23)
#define LORA_IO0 (26)
#define LORA_IO1 (33)
#define LORA_IO2 (32)

#define CFG_sx1276_radio 1 // HPD13A LoRa SoC
#define HAS_DISPLAY U8X8_SSD1306_128X64_NONAME_HW_I2C
#define HAS_LED (25) // green on board LED
#define HAS_BATTERY_PROBE ADC1_GPIO35_CHANNEL // uses GPIO7
#define BATT_FACTOR 2 // voltage divider 100k/100k on board

Hope this is the right place to post this?

I stumbled across this forum and this topic after picking up a pair of TTGO LoRa32 V2.0 modules. I have got them working with a USB power connection and also a 2000mAh LIPO battery. Battery life is good with OLED on but no WiFi or BT and receiving LoRa every 2 seconds. More than enough for this projects intended use.

Now I need to make up a PCB for them and the one thing that concerns me is the 5V connection appears to show the battery voltage when the battery is connected and the switch is in the ON position.

As there are no schematics for this board and virtually no documentation, I have no idea if there are any blocking devices on the board to protect the 5V input and the battery circuit? I need to know if I can power the board from the 5V connection or not. I could put an ideal diode between my external 5V and the 5V pin but this adds to the cost of parts.

Anyone powered the board from the 5V header pin with a battery connected at the same time?

VBUS (USB +5V) and VBAT (battery+) are connected each via their own B5819W Schottkey diode (and for the battery also the on/off switch in series) to the +5V board pin (which is connected to the input of the XC6504 or ME6211 3.3V voltage regulator on the bottom side).
So both the battery+ and USB +5V are protected from reverse current from the +5V pin. Therefore connecting both a battery and externally supplying +5V to the +5V pin is possible.

If the voltage supplied to the +5V pin is lower than ā€˜actual battery voltage + B5819Wā€™s forward voltageā€™ then that will drain the battery. Adding a Schottkey diode between the external power supply and the +5V pin will protect against that. The diode will increase the BOM with less than $0.01 which is not really an issue when the TTGO LoRa32 V2.0 board alone already costs $15.

Thanks (I think similar was available already somewhere higher up in the thread). I will add it to the topic start together with other updates when I update the topic start article.

New Heltec v2, running the Paxcounter software

IMG_20181208_112623

3 Likes

Can you confirm that you were able to connect to TTN and receive data without modifying the board to connect DIO1 and DIO2? I have not been able to get this to work. Thank you :slight_smile:

Yes. DIO lines of LoRa chip are wired as needed for LMIC.

1 Like

Thank you. It is strange then, I have tried running one of the T3_V1.6 modules as a gateway to my own LoRa server on a Pi for experimentation. However when trying to connect to the gateway with the other module it creates the link but never authenticates or sends any data.
When CAD is enabled on the gateway I receive nothing at all, even though the pins are configured correctly.
I am unable to connect to TTN either, as I started to think that perhaps my gateway was inadequate in some way, so I wanted to try starting simpler.

So to confirm, it has been possible to connect to TTN with the TTGO 2.1_V1.6 without any hardware modifications?

I used the following pins:

SCK (5)
CS (18)
MISO (19)
MOSI (27)
RST (23)
DIO0 (26)
DIO1 (33)
DIO2 (32)

Pins are correct for TTGO 2.1_V1.6

If you use the TTGO as single channel gateway, have in mind that other nodes do not know that it is a single channel gateway, as long they are not configured to use only one channel.

1 Like

TTGO have just released a new board (T-Fox) which achieves a deep sleep of 0.9mA; still not sufficient for battery operation in my view but they are working on reducing power consumption in deep sleep for newer and smaller boards.

I also mentioned something re green led on pin 25 on the TTGO V2.1 1.6 boards that is usable, when I saw that Psychotik2K3 had already mentioned it. Perhaps we can add it to the FAQ / pinout above.

I was working on my project today with the TTGO V2.1 1.6 which is almost finished from a coding perspective.

While I was trying to clean up some code I also tried loading the same sketch with only 40mhz (as opposed to 80mhz) and switching off Bluetooth ( btStop(); ) and Wifi (#include <wifi.h>, WiFi.mode(WIFI_OFF); ) I noticed that power consumption and deep sleep consumption dropped (measured via a cheap USB power meter) by a bit but not too much.

All of a sudden while reloading my sketch I saw power consumption go down to 0.001A. I noticed that if I close the arduino serial monitor power consumption would go down from 0.008 to 0.001 after a few seconds.
I have no full Lipoā€™s laying around but will test and try later if I can confirm these results when powered via a battery.

Somebody posted the following on my twitter feed:
https://twitter.com/embedded_iot/status/1079080669165305857

So we might eventually get an ESP32 with relatively low power sleepā€¦

1 Like