ER9X and OpenXSensor - Problems sending VOLT1 to FasV (fixed

Development & General Chat for the superb openxvario project.

Moderator: rainer

Post Reply
User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

ER9X and OpenXSensor - Problems sending VOLT1 to FasV (fixed

Post by KAL »

Hi folks,

built an OpenXSensor, added MS5611 sensor and a current sensor (bidirectional ACS758).
  • transmitting altitude (Alt) and vertical speed (Vspd) works.
  • transmitting current (Amps) works
  • transmitting FUEL works
  • rpm i don't know, 'cause lack of sensor
  • transmitting VOLT1 to ACCX works
but how t** f*** :oops: can I transmit voltage (VOLT1) to FasV and therefore calculate power (wattage)?
FasV and therefore Fwat on the TX always show 0.

Can someone please point me to my thinking error?

Here an excerpt of my oxs_config.h (no calibration values, 'cause only bench testing):

Code: Select all

#define PIN_Voltage1 0    //  Pin for measuring Voltage 1 ( Analog In Pin! )
#define PIN_Voltage2 8    //  Pin for measuring Voltage 2 ( Analog In Pin! )
#define PIN_Voltage3 8    //  Pin for measuring Voltage 3 ( Analog In Pin! )
#define PIN_Voltage4 8    //  Pin for measuring Voltage 4 ( Analog In Pin! )
#define PIN_Voltage5 8    //  Pin for measuring Voltage 5 ( Analog In Pin! )
#define PIN_Voltage6 8    //  Pin for measuring Voltage 6 ( Analog In Pin! )

#define offset_1             0   
#define mVoltPerStep_1       4.89 // = 5000 / 1023 (if Vcc =5 volt)     

#define NUMBEROFCELLS 1   // keep this line but set value to 0 (zero) if you do not want to transmit cell voltage.

#define SETUP_DATA_TO_SEND \
	DEFAULTFIELD             , ALTIMETER      , 1 , 1 , 0 , \
	DEFAULTFIELD             , VERTICAL_SPEED , 1 , 1 , 0 , \
	DEFAULTFIELD             , RPM            , 1 , 1 , 0 , \
	DEFAULTFIELD             , CURRENTMA      , 1 , 1 , 0 , \
   FRSKY_USERDATA_VFAS_NEW  , VOLT1          , 1 , 1 , 0 , \
	FRSKY_USERDATA_ACC_X     , VOLT1          , 1 , 1 , 0 , \
	FRSKY_USERDATA_FUEL      , MILLIAH        , 1 , 1 , 0
(TH9X 2561 with latest test firmware and D8R-IIplus)

Thanks
Klaus
Last edited by KAL on Sat Aug 16, 2014 8:50 am, edited 1 time in total.
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )

davx
Posts: 210
Joined: Sun Sep 15, 2013 7:01 am
Country: -

Re: ER9X and OpenXSensor - Problems sending VOLT1 to FasV

Post by davx »

Hi,

I think "FRSKY_USERDATA_VFAS_NEW" is not recognized by ER9X, this is not an official FrSky ID, it has been added to simplify data sending and is implemented in OpenTX.

Mike could probably provide support for it.

Bye.

PS: You can stay with NUMBEROFCELLS = 0 if you don't use "CELLS" data.
Last edited by davx on Wed Aug 13, 2014 6:55 pm, edited 2 times in total.
User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: ER9X and OpenXSensor - Problems sending VOLT1 to FasV

Post by KAL »

I suspected that this is just implemented because in ER9X there are "FasV" and "Fwat" selectable to be displayed.

Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ER9X and OpenXSensor - Problems sending VOLT1 to FasV

Post by jhsa »

I use ersky9x which is the same as er9x and I have voltage displayed :)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: ER9X and OpenXSensor - Problems sending VOLT1 to FasV

Post by KAL »

Hi João,

do you then think my oxs_config.h is OK?

I would test it on my PRO, but since 16th of Juli my eagerly awaited dht is loitering at the german customs :(
and I don't want to rip apart one of my 9Xs :)

Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )

User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: ER9X and OpenXSensor - Problems sending VOLT1 to FasV

Post by jhsa »

Here is my config file for one of my planes. it uses a pack voltage sensor and a ACS758-50U as current sensor (50A Unidirectional). What values are you using for the voltage divider resistors? To which arduino pin are you connecting it?
Have a look at my config file

João
Attachments
oxs_config.h
(44.12 KiB) Downloaded 279 times
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: ER9X and OpenXSensor - Problems sending VOLT1 to FasV

Post by KAL »

Here my config:
oxs_config.h
(44.99 KiB) Downloaded 262 times
  • Voltage: A0
  • Current: A6
  • RPM: D8
  • Clear switch: D10
I don't have explicit resistors, 'cause it's only working on the bench.
To simulate the voltage sensor I connected a 10k poti between Vcc and GND. The slider pin goes to A0.

In this config NUMBEROFCELLS is set to 1 but also with 0 it didn't work.
In principle we have a similar config but maybe I don't see the forest because of too much trees around ;)

Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ER9X and OpenXSensor - Problems sending VOLT1 to FasV

Post by MikeB »

ersky9x and er9x are supposed to be the same, but I've got an error in er9x. I think the openXsensor voltage is being mapped to ACC_Z.
Try displaying that value, an see if it is the voltage. If so, a temporary workaround may be to use a Scaler to take that value and convert it to the required voltage value.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: ER9X and OpenXSensor - Problems sending VOLT1 to FasV

Post by mstrens »

@Kal,
Do you use the latest version of OXS.
In a previous version , you had to avoid sending the same OXS measurement twice.
So, one of the 2 lines in your config has to be canceled:
FRSKY_USERDATA_VFAS_NEW , VOLT1 , 1 , 1 , 0 , \
FRSKY_USERDATA_ACC_X , VOLT1 , 1 , 1 , 0 , \

Still , in the latest version and when using a D serie receiver, this should not be an issue anymore.

Note: when you load the firmware and do not need to debug, it is better to put this line
#define DEBUG
as comment (adding // as first characters).

In openTX, I think that there is a special formatting for VFAS. The measurement is transmitted in millivolt but displayed in volt with only 1 decimal.
In OXs you can apply a multiplier (and divider , offset) if you want. This is similar to a scaler.
User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: ER9X and OpenXSensor - Problems sending VOLT1 to FasV

Post by KAL »

@Mike:
I have done as you suggested and what should I say? Value is indeed mapped to ACCZ.
It's not a real problem, but I tended to doubt myself ;)

@mstrens:
sending twice was/is not the problem. In my despair i sent VOLT1 to 5 different telemetry fields
at one time and all showed the right value.
Now that I know the cause for my problem I can indeed leave DEBUG as comment.

Klaus
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ER9X and OpenXSensor - Problems sending VOLT1 to FasV

Post by MikeB »

I'll try to get this fixed and a new test version posted.
I really must get a formal release out as well!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
KAL
Posts: 552
Joined: Thu Oct 10, 2013 4:36 pm
Country: Germany
Location: somewhere near Rothenburg ob der Tauber

Re: ER9X and OpenXSensor - Problems sending VOLT1 to FasV

Post by KAL »

Hi folks,

just want to give a short response and thank you all for your inputs ...

With the new FW release ev'rything works fine.
  • voltage sensor is calibrated
  • current sensor will shortly be calibrated
  • baro sensor works flawlessly
  • used scaler to display ALT with one decimal behind then comma
  • reset button of arduino tied to pin 10 (memory button)
  • VR has still to be attached to use more than 3 lipo cells ...
  • is a little bulky, but doesn't matter in my FMS BF-109F ;) ...
  • ...
... still searching for a (simple) way to connect RPM input to a motor wire :roll: ...

... and a shrinking tube that fits ...

... and ...

Klaus
Attachments
IMG_1849 (Groß).JPG
IMG_1850 (Groß).JPG
( TH9X / 9XTreme / FrSky DHT / Spektrum / Multi / RotEnc )
( 9XR PRO / erSKY9x  / FrSky DHT / Spektrum / Multi / RotEnc / P3 as Slider )

Post Reply

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