I’d like to know whether or not the Tlora V1 firrmware would support device telemetry regarding battery level measurement and environment telemetry detected by BME280 sensor or alike. If the answer for the battery is yes, then I’d like to have some hint regarding the values of partition resistors to be used and which ADC input should be used on the Tlora V1.
Every device supports device telemetry, the tlora v1 is not super accurate with a battery, you don’t need any additional hardware.
Sorry to notice that the telemetry messages received show just chutil and AirUtilTx while the battery is steady 0% 0.00 V. That’s why I suspected a partition resistors should supply the measure voltage to one of Tlora’s ADC and asked for some detail.
I don’t think it has a adc pin LILYGO® TTGO Lora Devices | Meshtastic not recommended with a battery
Thanks for the reply, but the problem is that the battery level apparently is not sensed whatsoever by the firmware since it always shows 0% 0.00V. I would charge the battery with an external controller disregarding the one built into the Tlora V1 so the charging is safe, but the real problem is whether or not the firmware provides support for battery level reporting on Tlora V1. Apparently not, unless feeding a ADC with partition resistor is needed. Tlora V1 has got ADC’s as I see in the pinout.
You could use an ina219 it is supported by telemetry
I got a ina219 sensor to try battery telemetry on TloraV1.0 and also a BME280 for environment telemetry as well. Both of them worked nicely on TloraV2-1.1.6 firmware 2.1.3. Unfortunately none of them worked on TloraV1.0 since no indication of battery level / current consumption nor BME280 output came out from the device (firmware 2.1.9). It seems to me that the telemetry support for TloraV1 is not supplied at all. I know that the support for TloraV1 devices is going to be discontinued but I’d like to know if the battery level sensing is actually feasible on this device some way.
At last I found the reason why Tlora-V1 firmware apparently not supporting environment telemetry and current sensor ina219. I cloned the meshtastic git repository to look at the sources in search of some clue. Eventually I discovered that the variant.h for env:tlora-v1 has got SDA and SCL pins wrongly coded as actually on ttgo-lora32-v1 they are 21 and 22 respectively , NOT 4 and 15. I recompiled the sources with platformIO and with the 2.1.10 firmware I got the telemetry working well. There is a drawback though since the oled screen stays black all the time, all the rest works fine so that’s ok anyway for me since I do not need the screen. What’s the reason why the screen doesn’t work anymore?
Try connecting a Oled to the same I2c Bus as your Telemetrie.
I’m sure that would work well but since a headless device is sufficient for me I can rely on the device as it is now. The oled screen doesn’t work with sda / sdl defined as pin 21 - 22 since the tlora-V1.0 firmware assumes the oled’s sda / scl on pin 4 - 15 so the screen stays black. Actually there is no way to get both Oled and sensors on I2C bus work together since if I connect a sensor sda / scl on pin 4 - 15 with standard v1.0 firmware the screen becomes black either and the sensor doen’t work as well. So the final decision was sda / scl defined as 21 - 22 with oled screen off.
Great hint for a telemetry noob like myself, thanks.
Do you need to tell meshtastic in any way which sensor you connected? Or do you just activate your INA219 using
meshtastic --set telemetry.environment_measurement_enabled true and it will autodetect which sensor(s) is/are connected?
The detection of sensors is automatic, you just have to set environment metrics module enabled in Android app config or also via CLI as you wrote in your post.
Awesome! I ordered INA219s and will try at arrival.
The INA219 sensor works after turning on telemetry both on the sending and the receiving LoRa board. Hooray!
However, the resolution is a full 1 Volt?!?! A bit coarse, huh? Can it be switched to millivolts?
Actually the precision of the response given by device telemetry using INA219 is in 10^-1 mA and 10^-2 volt (0.01 V precision) as you can see in the attached screenshot from meshtastic Android App (IU2RPO_b68c), I do not understand where your remark comes from.
Thanks for the answer @vinloren I did not look in the app, but only at the LCD.
So true, in the Meshtastic app the Voltage is displayed as well and with better resolution! (0.01 V precision as You mentioned).
Thanks for the hint with the 2nd tab, instead of the leftmost message tab
FYI 2.1.15 has a new feature where the INA sensor can be used for the device battery level. Supports INA2xx devices.
It’s been added to the power config menu in the Android client and the python client.
Update: Info added to the docs. Power Configuration | Meshtastic
I am trying to get this going with a Tlora-v1 I had lying around. I am able to retrive the voltage and current
201 [PowerTelemetryModule] (Sending): ch1_voltage=0.000000, ch1_current=0.000000, ch2_voltage=0.000000, ch2_current=0.000000, ch3_voltage=4.116000, ch3_current=0.500000. But I am not able to set this for “device batter level”. I tried to set
64 with no luck. Currently, my Tlora-v1 reports 0.00V for battery and on the OLED that it’s charging via USB.