Big ESP32 + SX127x topic part 3

This one is TTGO1 and bundled with impressive enclose, battery and extension PCB - does a great job as a single channel gateway or node :

This one is the latest almost anything that you can wish for inside :slight_smile: no box or battery , but the protective enclosure can do good a home project :slight_smile:

pins that works for me are

#define CS_PIN 18
#define RST_PIN 14
#define INT_PIN 26

#define DISPLAY_ADDR 0x3c
#define DISPLAY_SDA 4
#define DISPLAY_SCL 15
#define DISPLAY_GEOMETRY GEOMETRY_128_64
#define DISPLAY_RESET_PIN 16

pins that I work for me are

#define CS_PIN 18
#define RST_PIN 23
#define INT_PIN 26

#define DISPLAY_ADDR 0x3c
#define DISPLAY_SDA 4
#define DISPLAY_SCL 15
#define DISPLAY_GEOMETRY GEOMETRY_128_64
#define DISPLAY_RESET_PIN 16

some actual pics of the devices:

just for reference, a similar enclosure can also be 3D printed:

could you explain what is the “extension PCB”?

Thanks
Alex

inside the enclosure there is a small mounting pcb - that you can attached something small on it e.g. DHT22 for example - the whole things is really really miniature. I will take some pictures…

yes please :slight_smile:

I appreciate if could you also tell us the final price considering shipping costs, tax and so on? and the shipping time… :blush:

Alex

more pictures :

the box looks like printed on something - but is extremely well looking and durable and actually have a heavy feeling like metal…

I paid £32 for 2 - e.g. £16 each - I have a repeating order for this once as they fit perfectly to my needs ( I have 50+ ordered so far )

Re - 3D printed enclosure - yes that’s clear but to get quality enclosure is almost impossible for reasonable price - even with SLA printer in the end the enclose looks at best - acceptable - and also very expensive - with quality SLA 3D printing services I’ve pad about £12 only for the enclosure at it was still miles way from the one from aliexpress to be honest…

btw: my dream is someone to start producing enclosures that look great and do good job and reasonably priced with the proper openings :slight_smile: - usually the enclosures are always the non-solvable problems in my little projects :slight_smile:

1 Like

not only yours :slight_smile: but if compared to the expense to be incurred to start an injection print, perhaps there is no alternative for now

I have come to the following solutions so far :

  1. pre-build dev board + enclosure -as the one in the pictures ( that is why I like it so much) - buit works generally only for gateways

  2. print a 3D enclosure - usually looks awful or expensive and not durable …

  3. buy a ready enclosure

-option 1 - buy a closest available box and use a laser engraver/cutter to cut the rectangular openings

  • option 2 - if the power will be 12v then the following boxes from alliexpress are great ( I also have for them a PCB design - with 2 x voltmeters, 1 x 3 axis accelerometer, Heltec LoRA, GPS, GPRS Neoway m590 , D1 Relay, DC-DC 5-24 to 5v - if someone need a similar setup I can share the design)

correction of the pins for TTGO 2.1-1.6 proper one are :

// LORA
#define CS_PIN 18
#define RST_PIN 23
#define INT_PIN 26

#define LED_PIN 25

//.OLED

#define DISPLAY_ADDR 0x3c
#define DISPLAY_SDA 21
#define DISPLAY_SCL 22
#define DISPLAY_GEOMETRY GEOMETRY_128_64
#define DISPLAY_RESET_PIN 16

2 Likes

There appears to be a new Heltec ESP32 LoRa board:

Heltec Wireless Stick

heltec%20wireless%20stick

New features (based on below specs / source):

  • Apparently 800uA power consumption in sleep mode.
    (Disclaimer: this is my interpretation, formatting on page linked below is not clear about this.)
    A major improvement (while still 20+ times more than deep sleep current of ESP32)
  • 16 MB flash.
  • 0.49" OLED display. Yes that’s tiny!
    This will probably have 64x32 resolution.
  • New Wifi Antenna design (similar to TTGO Wifi LoRa32)
    (Finally an ESP32 LoRa board with a more properly placed Wifi antenna on top.)
  • ESP32, LoRa chip and display appear to be shielded with a metal cover (with cutout for display screen).

Source: https://www.aliexpress.com/item/Mini-ESP32-Wifi-Lora-Development-Board-with-0-49inch-oled-display-LoraBar/32960464571.html


Processor

Adopt Lexin’s ESP32 chip

  • 32-bit dual-core, 240MHz frequency
  • Integrated WiFi and Bluetooth
  • The main processor is completely free to run the user application.
  • An additional ULP coprocessor that monitors GPIOs, ADC channels,
    and controls most of the internal peripherals.

LoRa

Using Semtech’s SX1276 chip

  • Supports 433MHz, 470MHz, 868MHz, 915MHz quad-band optional
    Can be used as both a LoRa node and a micro gateway
  • Support LoRaWAN protocol
    Node transmission distance: up to 6KM in open space
  • Output power: up to +20dBm (±2dBm)

WiFi

  • 802.11 b/g/n/e/i
    802 802.11 n (2.4GHz), speed up to 150Mbps
    802 802.11 e: QoS mechanism to implement wireless multimedia technology
  • WMM-PS, UAPSD
  • MPDU and A-MSDU frame aggregation technology
    Block reply, fragmentation and reorganization
  • Beacon automatic monitoring / scanning
    802 802.11 i security features: pre-authentication and TSN
  • Support WPA / WPA2 / WPA2-Enterprise / WPS encryption
  • Infrastructure BSS Station Mode / SoftAP Mode
  • Wi-Fi Direct (P2P), P2P discovery, P2P GO mode and P2P power management
  • Support for IPv6

Bluetooth

Bluetooth v4.2 full standard, including traditional Bluetooth (BR/EDR)
and Bluetooth Low Energy (BLE)

  • Supports standard Class-1, Class-2 and Class-3 without external power amplifier
  • Enhanced precision power control
  • Output power up to +10 dBm
  • NZIF receiver with BLE reception sensitivity of -128 dBm
    Adaptive Frequency Hopping (AFH)Standard HCI based on SDIO / SPI / UART interface
    High speed UART HCI up to 4 Mbps
  • Support BT 4.2 controller and host protocol stack
  • Service Discovery Protocol (SDP)
    Universal Access Application (GAP)
  • Security Management Protocol (SMP)
  • Low power Bluetooth
    ATT ATT / GATT
  • HID
  • Supports all GATT-based Bluetooth low energy applications
  • SPP-Like Low-Power Bluetooth Data Transmission Protocol
    BLE BLE Beacon
  • A2DP / AVRCP / SPP, HSP / HFP, RFCOMM
  • CVSD and SBC audio codec algorithms
    Bluetooth piconet (Piconet) and scatternet (Scatternet)

Human interaction

  • 0.49 inch OLED screen
  • button (reset and program)

power supply

  • Input power: USB, lithium battery
  • Output power: +5V (only when USB is powered), +3.3V
    Integrated lithium battery charging circuit
  • External power supply controlled by IO port to facilitate development board to enter low power consumption

interface

  • UART UART, SPI, I2C, I2S, Mirco SD card
  • 12 - bits ADC, 8 - bits DAC
  • 29 general GPIO ports

storage

  • FLASH: 64Mb (16MB)

Power consumption

  • Sleep current: 800uA

Mechanical structure

  • Size: 60mmX23mmX8mm
2 Likes

I checked the pin wirings for the new TTGO T-Fox and found these:

#define HAS_LED NOT_A_PIN // green on board LED is useless, because it's wired to GPIO25 = LORA_RST

//#define LED_ACTIVE_LOW 1 // Onboard LED is active when pin is LOW
#define HAS_BATTERY_PROBE ADC1_GPIO35_CHANNEL
#define BATT_FACTOR 2 // voltage divider 100k/100k on board
#define HAS_BUTTON GPIO_NUM_36 // on board button (next to reset)

// 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 on board DS3231 RTC chip
#define HAS_RTC MY_OLED_SDA, MY_OLED_SCL // SDA, SCL

// 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 (25)
#define LORA_IRQ (26)
#define LORA_IO1 (33)
#define LORA_IO2 (32)

That means:

  1. Unfortunately the green on board LED is useless, because it seems wired to RESET line of LORA module.
  2. The description in https://nl.aliexpress.com/item/TTGO-T-Vos-LoRa32-V1-1-433-868-915-mhz-ESP32-LoRa-OLED-0-96-inch/32951759794.html seems to be erraneous, since it says LORA RESET is GPIO23, but on my module it is GPIO25.
1 Like

TTGO T-Fox running new paxcounter v1.7.12 which supports on board RTC chip Maxim DS3231 to keep time:

IMG_20190120_130752

2 Likes

I found some additional details on my TTGO T-Fox board:

  • Powerswitch: GPIO25 controls a MOS-FET which switches power supply for LoRa-Chip (HPD13) and display. So for low power applications these components can be powered off and on by software.

  • This does not apply to the USB-UART chip (CP2104), it’s always powered and the suspend inputs are not wired to the CPU

  • LoRa-chip for the “27dBm” version is a HPD13AP, powered with 5V.

  • There is a solder bridge on the board to select power of LoRa chip: 3,3V or 5V

  • RTC chip DS3231 interrupt output line is wired to GPIO34, so can be used to wake up ESP32 from deep sleep by an alarm generated by the RTC chip.

  • RTC is powered with 3,3V when board runs on USB or battery power, and is powered by backup battery when board power goes off.

  • Battery power can be measured via a voltage divider (100k/100k) wired to GPIO35

  • The on board LED is connected to the power switching line and has active low logic, so is more or less useless (light on = power off / light off = power on)

So the T-Fox brings some new features to implement low power applications.

1 Like

First, thank you all for those threads, they really help me out using those boards.

Can you check if the CP2104 is also powered (not suspended) when running on 3.3V from a LiPo?
I read somewhere, that the CP2104 in contrast to the CP2102 suspends when not being connected to D+/D-.
Ideally, could you check the power consumption in deep sleep?

A nice start but a missed opportunity if the UART and voltage divider cannot be switched off.
The UART chip and voltage divider probably draw (much) more current than the display in sleep and HPD13 in sleep/standby mode. The voltage divider alone at 3.7V draws 18.5 uA already.

Can you provide a sample code to run for deep sleep operation?

As far as i overlook it, the following components will contiously draw battery power, and cannot be controlled by software on ESP32:

  • RTC (DS3221)
  • Voltage Divider for battery monitoring (2x 100k)
  • 3,3V LDO (ME6211)
  • USB/UART (CP2104), if it does not suspend autonomous

Hello guys,

I made a small pcb to avoid the power consumption of my heltec v1. I used an attiny85 to control the power ON and OFF of my board, this way I achieved around 20uA in sleep mode (the deep sleep mode consumption from attiny).

Just using some transistor and the attiny85.

I hope it can helps someone =D

1 Like

Prototype code (for TTGO LoRa v1) is available on GitHub: https://github.com/Nature40/Satellite-BatCave