Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Board]: Is it possible to add the Lilygo T3 LoRa ESP 32 TCXO? #3080

Closed
Burny08 opened this issue Jan 11, 2024 · 7 comments · Fixed by #3124
Closed

[Board]: Is it possible to add the Lilygo T3 LoRa ESP 32 TCXO? #3080

Burny08 opened this issue Jan 11, 2024 · 7 comments · Fixed by #3124
Labels
enhancement New feature or request hardware-support Add hardware support for new devices or modules

Comments

@Burny08
Copy link

Burny08 commented Jan 11, 2024

SOC

ESP32

Lora IC

LILYGO 868/915Mhz Modell: LORA32 TCXO

Product Link

https://de.aliexpress.com/item/32872078587.html?spm=a2g0o.order_list.order_list_main.9.36e05c5fprjabY&gatewayAdapt=glo2deu

Description

I have been informed by the manufacturer that the TCXO variant is not supported.

The Modell is: T3 V1.6.1 with SX1276

Unfortunately I am not a programmer myself, but he told me that this board can probably be added.
Here is the message from the manufacturer:

Hello, the meshtastic firmware is not adapted to the TXCO version yet.
You can add the below sentences in the source code to make it work.
https://github.com/Xinyuan-LilyGO/LilyGo-LoRa-Series/blob/master/examples/RadioLibExamples/SX1276/SX1276_Receive_Interrupt/boards.h

Or to test hardware function, you can upload the below firmware to check :
https://github.com/Xinyuan-LilyGO/LilyGo-LoRa-Series/tree/master/firmware/hardware_test/T3_V1.6.1_TXCO
https://github.com/Xinyuan-LilyGO/LilyGo-LoRa-Series/tree/master/firmware#to-write-firmware-please-check-the-corresponding-link-below
Se2e11434816643559b22b149995f467cP png

@Burny08 Burny08 added the enhancement New feature or request label Jan 11, 2024
@thebentern thebentern added the hardware-support Add hardware support for new devices or modules label Jan 11, 2024
@marclura
Copy link

marclura commented Jan 13, 2024

Hi, I managed to make the LilyGo T3 V1.6.1 TXCO version work, by modifying the existing tlora_v2_1_16 variant (I couldn't figure out how to create a new variant and make it work as a separate board).

I had to modify the file variants/tlora_v2_1_16/variant.h like this:

/* TLORA V2.1.16 */

/*
#define BATTERY_PIN 35
#define ADC_CHANNEL ADC1_GPIO35_CHANNEL
#define BATTERY_SENSE_SAMPLES 30

// ratio of voltage divider = 2.0 (R42=100k, R43=100k)
#define ADC_MULTIPLIER 2

#define I2C_SDA 21 // I2C pins for this board
#define I2C_SCL 22

#define LED_PIN 25    // If defined we will blink this LED
#define BUTTON_PIN 12 // If defined, this will be used for user button presses,

#define BUTTON_NEED_PULLUP

#define USE_RF95
#define LORA_DIO0 26 // a No connect on the SX1262 module
#define LORA_RESET 23
#define LORA_DIO1 33 // https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436
#define LORA_DIO2 32 // Not really used
*/


/* Lilygo T3 v1.6.1 TCXO */

#define BATTERY_PIN 35
#define ADC_CHANNEL ADC1_GPIO35_CHANNEL
#define BATTERY_SENSE_SAMPLES 30

// ratio of voltage divider = 2.0 (R42=100k, R43=100k)
#define ADC_MULTIPLIER 2

#define I2C_SDA 21 // I2C pins for this board
#define I2C_SCL 22

#define LED_PIN 25    // If defined we will blink this LED
#define BUTTON_PIN 12 // If defined, this will be used for user button presses,

#define BUTTON_NEED_PULLUP

#define USE_RF95
#define LORA_DIO0 26 // a No connect on the SX1262 module
#define LORA_RESET 23
#define LILYGO_T3_1_6_1_TCXO 33 // In the T3 V1.6.1 TXCO version, Radio DIO1 is connected to Radio’s internal temperature-compensated crystal oscillator enable
#define LORA_DIO1 32    // just to make it work...
#define LORA_DIO2 32 // Not really used

and add this line to the src/main.cpp in the void setup() (around line 268):

#if defined(LILYGO_T3_1_6_1_TCXO)   // Lilygo T3 V1.6.1 TCXO version
    pinMode(LILYGO_T3_1_6_1_TCXO, OUTPUT);
    digitalWrite(LILYGO_T3_1_6_1_TCXO, HIGH);
#endif

I had to run those commands then (Shift+Ctrl+P):

  • Developer: Reload Window
  • PlatformIO: Pick Platform Environment and select env:tlora-v2-1-6-1
  • PlatformIO: Build
  • PlatformIO: Upload to upload it to the board

I followed the official documentation and some online research to make it work.

@Burny08
Copy link
Author

Burny08 commented Jan 13, 2024

Hi, I managed to make the LilyGo T3 V1.6.1 TXCO version work, by modifying the existing tlora_v2_1_16 variant (I couldn't figure out how to create a new variant and make it work as a separate board).

That sounds great! Can you tell me how I can get this version onto my board?
I can use the Espressif Flasher, but then my knowledge slowly stops :D

@marclura
Copy link

marclura commented Jan 13, 2024

Hi,
I managed to extract the .bin firmware that you can flash directly with the ESP Flash Tool; check the screenshot for the settings:

flash_download_tool_3 9 5_20240113_174857

Here is the firmware file (I uploaded it on one of the boards that I've, and it worked, but I can't give you any guarantee if it doesn't work or it does damage your board):
firmware_meshtastic_2.2.17_lilygo_T3_V1_6_1_TCXO.bin.zip

Let me know how it goes!

@geeksville
Copy link
Member

This issue has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/t3-v1-6-tcxo-variant/9240/2

@Burny08
Copy link
Author

Burny08 commented Jan 13, 2024

It works!
Thank you very much!

For everyone who wants to imitate it:

Go to this Site: https://espressif.github.io/esptool-js/

Choose the baud rate 115200
Now hold down the RST button on the board, plug in USB, click on Connect and then release the RST button.

(It may be advisable to first delete the entire memory using Erase)

Set the address to 0x0 and select the firmware from @marclura .

Then click on program.

I'm Happy :))

@mverch67
Copy link
Collaborator

In case the above works as expected I'd still like to propose a more generic name which improves re-usability and maintainability, because in theory there could be other devices using the same implementation, e.g.

#if defined(LORA_TCXO)
    pinMode(LORA_TCXO, OUTPUT);
    digitalWrite(LORA_TCXO, HIGH);
#endif 

rather than using device specific naming.

@Burny08
Copy link
Author

Burny08 commented Apr 22, 2024

Hello again,
I thought TCXO was now included in the official firmware?
I just wanted to update to the current version and unfortunately I get Fault #3 again :(
Can someone tell me something about this? I would like to have the latest firmware for my TTGO LoRa V2.1 1.6 TCXO
Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hardware-support Add hardware support for new devices or modules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants