Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

Improve ADC input handling for TTGO LoRa32 V1 #40

Open
matthias-bs opened this issue Jan 22, 2023 · 8 comments
Open

Improve ADC input handling for TTGO LoRa32 V1 #40

matthias-bs opened this issue Jan 22, 2023 · 8 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@matthias-bs
Copy link
Owner

Actually VBAT is provided to the ADC and should be used as uplink data and for checking the supply voltage.
There is no separate supply voltage measurement by default.

@matthias-bs matthias-bs self-assigned this Jan 22, 2023
@matthias-bs matthias-bs added the enhancement New feature or request label Jan 22, 2023
@matthias-bs
Copy link
Owner Author

matthias-bs commented Jan 22, 2023

In https://github.com/LilyGO/TTGO-LORA32/blob/master/schematic1in6.pdf on sheet 4, there are two input dividers - R42/R43 and R44/R45 for VBAT connecting to IO35. Chances are that one of them has wrong labels and is actually connected to VBUS and a different ADC input (IO34 would be a good candidate).

Opened issue LilyGO/TTGO-LORA32#35

@matthias-bs
Copy link
Owner Author

@mczakk Is it possible to connect a power supply to the battery connector and check if you can get a plausible voltage reading from IO34?

@matthias-bs
Copy link
Owner Author

If IO34 is not connected:
Please try this circuit and report if the supply voltage (with and without connected battery ) can be measured

                    100k       100k
JP1 Pin2 - GND  o--/\/\/\-–|--/\/\/\------o +5V - JP1 - Pin 1
                           |
                           `--------------> IO34 (ADC in) - JP2 Pin 10 

@matthias-bs
Copy link
Owner Author

@franki29 Maybe you can help to figure this out?

@mczakk
Copy link

mczakk commented Jan 25, 2023

@mczakk Is it possible to connect a power supply to the battery connector and check if you can get a plausible voltage reading from IO34?

I'll be honest, I have no idea! Don't even know where the battery connector is. Or how I would get a power supply to it 😱

@franki29
Copy link

@franki29 Maybe you can help to figure this out?

Hi, took me some time to get the right parts to test.
Found https://github.com/anii1211/ESP32_ADC-Accuracy_improvement/tree/main/ESP32-ADC-Accuracy-Improvement-main
and https://esp32-server.de/adc/ for testing.

To test it I took a normal ESP 32 for testing and a voltage regulator bord.
As I can not use first example with the extrenal voltage regulator (no serial connection possible) I used the second one.
I used a 220 K Ohm resistor between +5 V and AC6 (pin 34) and a potentiometer between - and pin 34.
Than I messure the voltage with a voltage messure device between regulator output and adjust the potentiometer to get same result from ESP32 and my messure device. Changing now the voltage I could see it at my esp32.
Hope this helps.
grafik
grafik

@matthias-bs
Copy link
Owner Author

@franki29 Thanks for the quick answer, but my question was targeted to the TTGO LoRa32 specific power supply and ADC input circuit design.

In general, I know how to use the ADCs and how to get calibrated conversions.

@franki29
Copy link

Oh sorry, I did not read the full issue, sorry. I have a board like this one https://polluxlabs.net/arduino-tutorials/daten-per-lora-senden-und-empfangen-mit-dem-ttgo-lora32-board/ and I think it is a clone. There are no resistors between the Battery connector and the ADC, none of them. (Measured by a Ohm Meter) So basically to add two 100K like you proposed in this issue should work.

@matthias-bs matthias-bs added the help wanted Extra attention is needed label May 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants