Read 4 raw voltages and display them separately in OpenTX

Development & General Chat for the superb openxvario project.

Moderator: rainer

Post Reply
User avatar
iter
Posts: 14
Joined: Fri Dec 12, 2014 10:31 pm
Country: -

Read 4 raw voltages and display them separately in OpenTX

Post by iter »

I have 4 separate voltages I want to read and display on my TX. I use an FrSky RX with OpenTx on TX16S.

For testing, I have one potentiometer between VCC and GND with the wiper connected to A0, A1, A2 and A3 (all 4 are tired together for the test). My goal for this test is for my TX to display 4 identical voltage readings that change as I rotate the pot.

Code: Select all

#define PIN_VOLTAGE         0 , 1 , 2 , 3  , 8 , 8
#define RESISTOR_TO_GROUND  0 , 0 , 0 , 0  , 0 , 0
#define RESISTOR_TO_VOLTAGE 0 , 0 , 0 , 0  , 0 , 0

I have tried the following approaches:

1. VFAS:

Code: Select all

#define VFAS_SOURCE  VOLT_1
This works as expected. This gives me one voltage in OpenTx that displays correctly.

2. FLVSS:

Code: Select all

#define NUMBEROFCELLS 4
OpenTX discovers a Cels sensor. BattCheck widget shows a single voltage and displays "1S". I understand that openXsensor expects these voltages to stack, e.g, 4,2 8.4 12.6, and then subtracts the sum of preceding voltages from the each successive cell. My voltages are independent. In the testing setup, all 4 voltages are equal, so the difference is 0V for each cell except the first. Is there a way to send these voltages raw, without doing this arithmetic?

3. A3, A4, T1, T2:

Code: Select all

#define A3_SOURCE     VOLT_3 
#define A4_SOURCE     VOLT_4
#define T1_SOURCE     VOLT_1 
#define T2_SOURCE     VOLT_2
OpenTx discovers A3, A4, and Temp2 (not T1 for some reason). A3 and A4 read 10 times higher, e.g., if VFAS reads 2.3V, A3 and A4 read 23V. I cannot immediately see a #define that controls this factor. Tepm2 reads 1000 times higher, 2300C in this example.

I would appreciate suggestions on how I can configure openXsensor to transmit and display 4 individual voltages.

Post Reply

Return to “OpenXVario - an open source vario supported by the open source firmwares!!”