HTCC-AB01 pinout in datasheet

hello all.
have bought 4 boards HTCC-AB01 from aliexpress - checking if I can use it instead Moteino in my project.

and I noticed that in datasheet tab on https://heltec.org/project/htcc-ab01/
there is some info that I cant understand…
look - there is diagramm with pinouts and two tables with pin descriptions - Header J2 and J3.

And on module diagram I can see only 11 pins on each side, but on tables stated 18 pin for each header… I dont understand this.
diagram show us thta there is 8 GPIO - from 0 to 7.
can I use every of this 8 pins for my needs, or some pins used by board (Lora module, etc)?
because for my project I need:

laser:
2 digital pins for RX and TX for SoftSerial
1 digital pin for powering laser (via powerswitch/mosfet)

thermo:
1 digital pin for 1-Wire data
1 digital pin for powering 1-Wire

photoresistor:
1 digital pin for powering
1 analog ping for reading data from photoresistor

checking battery status:
1 analog pin for reading data from voltage divider.
but I’ve read that on this CubeCell board thereis builded capability to read info from battery…
idk if I can use it if I power board from LiPo battery via Vin pin (5v)

so at least I need - 6 digital pins and 2 analog pins

So my question - is this possible to use this board HTCC-AB01 for my purposes?
thank you

I’m not sure you’re looking at the right table. There are only 11 pins on each side the Cubecell Dev-Board, and two more in the middle of the board. There are actually more than 8 GPIO pins, but some are used for on-board functions and so are not really available for general use.

You can use the I2C pins, SCL and SDA, for anything you’d normally use a GPIO pin for, if you don’t need the I2C bus.

I’m not sure what you mean by ‘powering’ but if you mean ‘supplying power’ then I think you could provide power to all [3.3V] devices from the Vext pin, which you can switch on and off. If you mean ‘activate’ then, yes, you’ll need separate pins.

You should be able to use the pins marked GPIO0, GPIO1, GPIO2, GPIO3, GPIO5, SCL and SDA for general digital functions (I’m sure someone will correct me if I’ve missed something there).

The CubeCell only has a single ADC (only one analog pin) so, provided you use the internal control (GPIO7) to switch between reading the battery and reading the ADC pin, you could manage with just the one (EDITED: You might want to read this post and this FAQ before trying to use the ADC for both battery voltage measurement and external input). My recollection, though, is that the battery that is read this way is the battery that is plugged into the onboard JST 1.25 connector, not one that might be connected to any of the ‘power’ pins. You may also need a voltage divider on the ADC input, as it is limited to 2.4V.

If you need more than one analog pin, you probably need the CubeCell Dev-Board Plus, which has three.

1 Like

thank you very much.
a lot of very useful advices.
if you dont mind - another questions:

  1. about tables with headers info - Im looking at the tables on pages 6 and 7 in datasheet on this address:
    https://heltec.org/project/htcc-ab01/

  2. You should be able to use the pins marked GPIO0, GPIO1, GPIO2, GPIO3, GPIO5, SCL and SDA

great news, thank you! so I suppose that I can’t use GPIO4 because it used by RGB led?

  1. but if you mean ‘supplying power’ then I think you could provide power to all [3.3V] devices from the Vext pin, which you can switch on and off.

in the first case I need provide power to my DS18B20 termosensor.
on my current device (arduino) I just connected it, for example, to GPIO5 and use the code:

    digitalWrite(GPIO5, HIGH);

and sensor start to work.
in second case I use another GPIO to enable-disable mosfet, which controls external power (from LiPo) to laser module. but it also works via similar code with digitalWrite…

so - can I use CubeCell GPIO’s like this or it would be better to use Vext and somehow switch it on and off?

  1. how to enter board into sleep mode? it is very important for my project… currently I have about ~10uA power consumption, but hope that with this board it would be less.

thank you in advance.

OK, I see that now. That’s an error on Heltec’s part. Those tables are for the WiFi LoRa 32 V2 board—a bit of poor cutting & pasting in document preparation I’d say. If someone from Heltec reads this, maybe they could see to getting the document corrected.

With respect to GPIO4, effectively, yes. I think (but I’m not sure) you could still use that pin, but the LED would flash or whatever while you were using it. This, at least, is what I’ve observed on other boards.

Well, I must confess that I’d never considered using a GPIO pin to power something like the DS18B20—I have always used Vext for this purpose. In the case of your MOSFET switch, yes, I think that needs to be done with a regular GPIO pin, although, if you can power a device through a GPIO pin, I don’t really see why you couldn’t control a MOSFET through a (switchable) power (Vext) pin. You will generally be turning Vext off before you go to sleep, so it would probably achieve the same end.

There are examples of how to control power supply to the Vext pin in the IDE example sketches.

Deep sleep is a little more tricky but, once again, examples are provided in the IDE example sketches for the CubeCell. This is sometimes not entirely straightforward though, so you might do well to check for other posts on this subject on this forum. For what it’s worth, there are also examples of how I do this on my project website.

1 Like