Heltec ESP32+OLED+Lora, hardware testing




you can easily find some good boards from china, but most of them lack of accurate document...
Hrere is an example;

https://hackaday.io/project/26991-esp32-board-wifi-lora-32

the board looks good with lora and a 128x64 OLED, but the IIC and reset connection is important, since pin can be muxing easily, so every board could be different.

pinMode(16,OUTPUT); 
digitalWrite(16, LOW); // set GPIO16 low to reset OLED 
delay(50); 
digitalWrite(16, HIGH); // while OLED is running, must set GPIO16 to high 

and, if needed, edit your Wire.begin() to Wire.begin(4,15); (4 = SDA 15 SCL) 

i tested it with the Adafruit SSD1306 and the Acrobotics SSD1306 Librarys 
both work. 

Display size is 128x64




There are discussions on these boards on TTN as a LORA node..or maybee single ch gateway?

Heltec has a git : https://github.com/Heltec-Aaron-Lee

And there is another copy call TTGO
https://de.aliexpress.com/item/TTGO-LORA32-868-915-Mhz-SX1276-ESP32-Oled-display-Bluetooth-WIFI-Lora/32840222847.html

Compare to the board I was using from wemos, heltec  seems to have a better pin out...

Topic WEMOS OLED with GPSHeltec OLED+Lora
Link https://github.com/Ldsrc2008/AIS-encode-arduino 
# PINS 18 
Pin Label Top X 
Pin Label Bottom   
EN Button X 
BOOT Button X 
Battery   
Breadboard friendly   
Battery Mgmt   
GPIO00bootmodeXX
GPIO01TXD0 touch1XX
GPIO02GPIO2 must also be either left unconnected/floating, or driven Low, in order to enter the serial bootloaderX 
GPIO03RXD0XX
GPIO04IIC SCL, touch0IIC SCL OLEDOLED_SDA
GPIO05IIC SDAIIC SDA OLEDLORA_SCK
GPIO06SCK/CLK*X 
GPIO07SDO/SD0*X 
GPIO08SDI/SD1*X 
GPIO09SHD/SD2*  
GPIO10SWP/SD3*  
GPIO11SCS/CMD*X 
GPIO12Internal flash stuff, touch5XX
GPIO13 RX1X
GPIO14touch6 LORA_RST
GPIO15boot message,touch3 OLED_SCL
GPIO16 TX1OLED_RST
GPIO17  X
GPIO18  LORA_CS
GPIO19  LORA_MISO
GPIO21  X
GPIO22  X
GPIO23  X
GPIO25 Rx2X
GPIO26 TX2LORA_IRQ
GPIO27touch7 LORA_MOSI
GPIO32touch9 X
GPIO33touch8 X
GPIO34  X
GPIO35  X
GPIO36SENSOR_VPXX
GPIO37  X
GPIO38  X
GPIO39SENSOR_VNXX
3.3v 2 
5v 2 
Vin/Vcc   
GND 3 
RST   
EN   
BATT   
NC   

The goods are finally here, I was thinking they were using module, but Heltec mount all the chips on one PCB....For cost down I guess....

 the little copper coil is for wifi or BT...
There is a PCB printed antenna on board, but they did not use it...
maybe there is some thing wrong with the PCB antenna
 there is a battery connector on it, need to find out if there is a charging IC??
you can see the lora chip is under the OLED










I read a test from here:



it leads to here https://www.alictronix.com/archives/860

the code use SSD1306 lib, but the code is on the web page, you need to check the "", since my arduino did not accept the word type, so need to change it. and you also need to have arduino lora lib.
 #include “SSD1306.h”<===check this and all other serial print...

there is another example:
https://robotzero.one/heltec-wifi-lora-32/
this one using u8x8 lib for OLED.....which I did not use...
but robotzone has more clear note on the code and pin out...


https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic/10247/40


this post give me a lot of information:
such as this board use MCP73831 lipo charger, and the battery connector is a micro JST 1.25mm.



For the internal connection with lora chip, according to this:

// GPIO5 -- SX1278's SCK // GPIO19 -- SX1278's MISO // GPIO27 -- SX1278's MOSI // GPIO18 -- SX1278's CS // GPIO14 -- SX1278's RESET // GPIO26 -- SX1278's IRQ(Interrupt Request) #define SS 18 #define RST 14 #define DI0 26


To get TTN work on this board:

 https://github.com/matthijskooijman/arduino-lmic
discussion:
https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic/10247/31

Single Channel Gateway part 2

it's actually using https://github.com/kersing/ESP-1ch-Gateway-v5.0 for ESP32 and 8266, but when compiling I got an error on wpa.h....no idea where should I find it.....





















































































































































































































留言

這個網誌中的熱門文章

micro SD card for ESP32, on lolin32 with OLED and heltec 32 lora oled

AIS0. understanding AIS NMEA 0183: How it's coded