Heltec Wifi LoRa V2 battery management

Hi there!

I have some doubts regarding battery management in Heltec Wifi LoRa V2. Please, would you answer them?
Here is the question: in electrical specs is clear that Heltec Wifi Lora V2 has battery (LiPo and Li-Ion) support / can work using battery as power source, however I couldn’t find information regarding battery charging. Is there LiPo and/or Li-Ion battery recharging feature in Heltec Wifi LoRa V2? If yes, does battery charges even when Heltec Wifi LoRa V2 is in deep sleep mode?

Thanks in advance.

Hi @phfbertoleti
Both of the answers to your problems is yes!

The battery management part already included charge and discharge management, battery full protection, etc. It is a separate part, and this function is done independently by the TP4054 chip, so ESP32 does not affect it when it sleeps.

Hi @hunter8801. Thank you very much for the answer!

I have one more doubt: when powered by LiPo or Li-ion battery, the module hasn’t 5V on 5V para n, does it? I mean, when powered by LiPo or Li-ion battery the module will only have 3.3V, right?

Thanks in advance

I don’t think so.

Only USB or +5V header as input can charging the battery. As far as I know, most of the lithium battery charging voltage is 4.2V, the full voltage is 3.7V, and then gradually reduced during use.

Thanks again @hunter8801.

Do you know where I can find a LiPo battery spec to use with this module? I searched around tech specs but I couldn’t find it.

Also, do you know if battery in the following link can be used in this module? https://produto.mercadolivre.com.br/MLB-1166773676-bateria-de-lipo-37v-1100mah-lithium-polimero-recarregavel-_JM?quantity=1#reco_item_pos=0&reco_backend=machinalis-seller-items&reco_backend_type=low_level&reco_client=vip-seller_items-above&reco_id=4098db9d-b2a2-4902-9b99-028516e2d49f

Best Regards,
Pedro Bertoleti

@phfbertoleti

Any battery with 3.7V output / 4.2V charging voltage can be used in this board. Such as the battery in your link, that’s OK.

Thanks @hunter8801.

Please, would you confirm the spec of module battery socket? Per my understanding, this is a JST 2P-1.25 (JST connector with 2 pins, separated each other by 1.25mm), however I’m not sure if I’m right.

Thanks in advance.

Yes, you are correct !!!

@hunter8801 thanks!

This weekend I’ve managed to use a li-ion battery and it worked fine. Thanks for your help!

Now I’m heading to a circuit to measure battery voltage (without wasting a lot of power power, what happens when using a simple voltage divider). Per my understanding, there is no “out-of-the-box” way to do this in this module (nothing inplemented yet). Am I correct? I ask you that because if there’s something like this lready inplemented on the module, it will save me some time.

Best regards,
Pedro Bertoleti

If you use V2 board, it’s have a battery voltage detect circuit. Also you can refer to here:

@hunter8801, per my understanding, the forum topic you said suggest a voltage divider using gpio 13 (an ADC channel). It doesn’t have mention to an already implemented circuit on v2 board, right?

That is just my advice. You can see this part on the schematic diagram we provide:

Oh, now I see it! Have you referred to “LiPo electtricity & Vext” part of the schematic, right?

Per my understanding, when GPIO 21 is set to ‘0’ (low logic level), GPIO 13 (ADC 2:4) reads battery voltage. Is this correct?

Also, assuming what I said above is right, when Q3 has no conduction between source and drain (when GPIO 21 is ‘1’ or configured as an input), Vbat (what can be any value from 0 to 4.7V) will be directly wired to GPIO 13 (ADC 2:4). Is this a real risk of burning / destroy ADC2 (as it can support, at its maximum, 3.3V only)?

  • when GPIO 21 is set to ‘0’ (low logic level), GPIO 13 (ADC 2:4) reads battery voltage. Is this correct?
    -Yes

  • Is this a real risk of burning / destroy ADC2 (as it can support, at its maximum, 3.3V only)?
    -Yeah, at this time, you need config the GPIO13 as a normal GPIO.

So, to sum up:

A- When GPIO 21 is set to ‘1’: adc2:4 (gpio 13) will read full vbat value (probaly something greater than 3.3V).
B-When GPIO is set to ‘0’: adc2:4 (gpio 13) will read vbat in voltage divider (certainly lower than 3.3V).

For “A” case, GPIO 13 must be configured as input? Is it tolerant to 4.7V working as input?

image

OPEN_DRAIN

Ok. In my case, I’m using Arduino IDE to program the module. Do you have an example on how I can set this GPIO as open drain in Arduino IDE sketch?

pinMode(13, OPEN_DRAIN);