Heltec CubeCell - part 2

BTW. What’s the test instrument model? :wink:

I’m using a Rohde & Schwarz NGM202 power supply

This is updated on github. Thanks @hunter8801

Hi All,

I have been working on a CubeCell AB-01 for a couple of days to make it into a TTN node. I just want to get one of the example sketches on it to run. I started with the Cayenne LPP sketch and added the modifications suggested by bwooce but kept getting an error right at the end of the upload process. I just tried this sketch to see if it was an issue with the Cayenne sketch.

And am getting the same result.
The message is short

Sketch uses 78032 bytes (59%) of program storage space. Maximum is 131072 bytes. Initialising bootloader. Unhandled error: The data is not of the proper form . Just wondering if anyone else has encountered it. I know the trick to get the bootloader active at power up BTW.
Thanks in advance :slight_smile:

Update on my previous post. Turned out I caused a problem by connecting a Beitian 220 active GPS antenna to the Tx-Rx ports :neutral_face: This was causing the error when attempting an upload. Once I disconnected it, all was good. Heltec told me that the board only has one serial connection and that’s it. If I want to use the Beitian I will have to use the SoftSerial library.

1 Like

The ASR6501 based AB01 board unfortunately has its limitations like single UART.

The ASR6502 based AB02x boards have two UARTS.

For a brief comparison between ASR6501 and ASR6502 see: Heltec CubeCell - part 1 - #117 by Linar

1 Like

I’m currently testing the same 5V solar panel for my Cubecell AB01 based Sensor. Currently I use a 500mAh Lithium battery, but I want to switch to a 2500 mAh version (Samsung INR 18650).
Does anybody know, if the Cubecell board can work with LiFePO batteries? It’s very hot on my balcony in summer and I want to avoid problems with the battery.

imho the CubeCell AB01 can not be used with LiFePO-batteries. The charging circuit:

has a fixed switch off voltage of 4.2V which may be to much for a LiFePO (3.7V).

1 Like

That makes sense, thank you.

The Samsung battery you are proposing are LiPo and suited to the charging profile of the board

Hello all,
I’m just trying to understand Mosfets, but one thing I do not quite understand. I hope maybe someone here can help me. The ADC of the Dev Board, to measure the voltage, is connected to an AO7801 p-Mosfet. But the Lipo voltage could be 4.2V while the gate is switched with 3.3v. So the mosfet does not close at this point? Am I missing something? According to the data sheet of the AO7801 the VGS(th) is starting at -0.5v. So the GPIO must be able to output at least 3.7V.
025

That is Min. Typical is -0.6V and max is -0.9V.
But this is specified for Vds=Vgs and Id=250uA.

Vds is not equal to Vgs however and max Id = 4.2V -/ 20K = 210uA.
So reality will be more complex.

Also take into account that R16 (and R17) will play a role here.

I’m not an expert but this is my educated guess.

A P-channel MOSFET turns on when it’s gate is negative relative to the source. So it turns ON ie lets the currants flow when it is at 0V. So as long as the source voltage is greater than Vgs, it will turn on when the gate is 0V.

P-Channel’s are used as high side switches so that a known voltage is presented to the load.

With VBatt=4.2V and VDD=3.3V Vgs will be -0.9V (when the MOSFET is closed) which is more than the listed -0.6V (Typical) Vgs which gives the impression the MOSFET will be open while it should stay closed with gate voltage of 3.3V.

I did have a sentence about WTF the R16 10K resistor was all about - if someone can link to the entire schematic plus tell me what GPIO7 is documented as being used for, I might be able to comment further.

The right hand side looks like a standard switch on VDD to an ADC, pulled to ground but again, without a schematic, it’s a bit hard to know why you’d want to know the VDD.

From the CubeCell Pins_Arduino.h

#define Vext P3_2 //gpio6
#define VBAT_ADC_CTL P3_3 //gpio7

VBAT can be as high as 4.2V, R16 and R17 are a voltage divider so that only 1/2 VBAT is applied to the ADC input. Take gpio7 low to measure VBAT. Make it an input, so that it is pulled up to VDD, to disconnect the 20K path from VBAT to GND saving somewhere between 150 to 210 uA depending on the state of charge.

The gpio6 part of the circuit connects VDD to the VEXT pin on the CubeCell board. This can be used to power sensors (up to a limit which I can’t remember). Make gpio6 an input, before going to sleep so that the sensors are not powered. Take gpio6 low when you need to take sensor readings.

I’ve just seen my dyslexic moment - the pins aren’t left & right sided! Will look again after I’ve recharged my batteries!

1 Like

I suspect this battery measurement circuit is a potential cause of some of the reports of higher than expected sleep currents with Heltec dev boards.

A fully charged LiPo cell may create a high enough VGS to turn on the Mosfet and cause a 210 uA current to flow. The Mosfet will switch off when VBAT is sufficiently below VDD + VGS(th).

I am glad to hear that it is not so simple. Yesterday I did some research and found out that otherwise all circuits, to turn off the ADC voltage devider, consist of an N-channel and a P-channel mosfet. After seeing this circuit I thought Heltec might have done something clever here to save components. I had also sometimes measured 11ua deep sleep instead of my typical 3.2ua. I did not pay attention to the battery voltage. Perhaps it could also be caused by this.

What CubeCell board exactly is this about?

Where did you get the partial schematic diagram from? Is a fully complete diagram available?

Which boards exactly are you refering to here?