Skip to content

T-A7670 powered by battery does not power up #220

Description

@r3v1

Hi,

Like other comments and posts related to problems with starting the module via battery and after trying all the possible solutions discussed in the other issues, none of them worked.

I have read the documentation, analysed the schematic, set pin 12 high at startup but nothing is effective.

Background:

  • Lilygo version: LilyGO-T-A7670 v1.2 (2022-7-18)
  • IDE: ESP-IDF v5.3.2

Minimum working example (extracted from bigger project where everything works perfectly via USB power):

  • Connected via USB, modem status LEDs (red) and module LED (blue) light up correctly .
  • Connected via DC power supply (emulating battery) with 4V and max 2.5A: nothing lights up.
#include "freertos/FreeRTOS.h"
#include "esp_log.h"
#include "driver/gpio.h"
static const char *MAIN_TAG = "main";

#define MODEM_BAUDRATE 115200
#define MODEM_DTR_PIN 25
#define MODEM_TX_PIN 26
#define MODEM_RX_PIN 27
#define BOARD_PWRKEY_PIN 4
#define BOARD_ADC_PIN 35
#define BOARD_POWERON_PIN 12
#define MODEM_RESET_PIN 5
#define MODEM_RESET_LEVEL 1

void config_modem_gpios()
{
    // Turn on DC boost to power on the modem
    gpio_set_direction(BOARD_POWERON_PIN, GPIO_MODE_OUTPUT);
    gpio_set_level(BOARD_POWERON_PIN, 1);
}

void power_on_modem()
{
    ESP_LOGI(MAIN_TAG, "Power on the modem");

#ifdef MODEM_RESET_PIN
    // Set modem reset pin ,reset modem
    gpio_set_direction(MODEM_RESET_PIN, GPIO_MODE_OUTPUT);
    gpio_set_level(MODEM_RESET_PIN, !MODEM_RESET_LEVEL);
    vTaskDelay(pdMS_TO_TICKS(100));
    gpio_set_level(MODEM_RESET_PIN, MODEM_RESET_LEVEL);
    vTaskDelay(pdMS_TO_TICKS(2600));
    gpio_set_level(MODEM_RESET_PIN, !MODEM_RESET_LEVEL);
#endif
    gpio_set_direction(BOARD_PWRKEY_PIN, GPIO_MODE_OUTPUT);
    gpio_set_level(BOARD_PWRKEY_PIN, 0);
    vTaskDelay(pdMS_TO_TICKS(100));
    gpio_set_level(BOARD_PWRKEY_PIN, 1);
    vTaskDelay(pdMS_TO_TICKS(100));
    gpio_set_level(BOARD_PWRKEY_PIN, 0);
}

void app_main(void)
{
    config_modem_gpios();
    power_on_modem();
}

Other debug info:

  • VBAT pin voltage: ~4.2V when USB connected and ~4V with 4V DC power supply.
  • IO12 does not seem to be HIGH with any power supply despite the script.
  • PWRKEY pin voltage: ~3.7V when USB connected and ~0V with 4V DC power supply.
  • Blue LED does not light up with DC power supply.
  • ESP32 EN and 3V3 pins: ~3.3V with both supplies.
  • Modem's STATUS LED blinks for little miliseconds once when connected to DC power supply.

Any suggestion on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions