Building a 50A sensor module for openXvario

Development & General Chat for the superb openxvario project.

Moderator: rainer

User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Building a 50A sensor module for openXvario

Post by kaos »

previously there is a question why FUEL% is not matching mAh display on the radio.
This is what happened I think because i can reproduce this:
If you start fresh (mAh and FUELZ% both 0) ran the motor for a while, so there is some mAh and <100% FUEL at this time the mAh matches the FUEL%, then turned the radio off, but NOT ]the oXs.
then you turn the radio back on, the mAh on radio will reset to 0 but FUEL% is still kept as <100% where it was before it was turned off, so somehow the FUEL% is actually correct for overall consumption but mAh only shows what was consumed after the radio is turned back on.
This caused the FUEL% is less than what is displayed for the mAh.
It looks like the mAh is accumulated by the radio while the FUEL% is accumulated by oXs. I wonder why the FUEL% is calculated and remembered by oXs while the oXs is powered (I did not turn on the 'write to eeprom' in oXs) but the mAh is not?
Also in ersky9x the 'EXIT' button can reset mAh to zero but not the FUEL%, so power off radio would do the same thing. I don't understand why ersky9x /oXs are done this way? This runs a risk of accidentally reset mAh and loose the benefit of battery warning via mAh.

mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Building a 50A sensor module for openXvario

Post by mstrens »

kaos wrote:mstrens:
yes, I am using V5
here is my oxs_config.h file:
oXs_config.h
jhsa:
I only used copy and paste then change variables.
You have an error in the config file.
You currently have

Code: Select all

#define SETUP_FRSKY_DATA_TO_SEND    \
                        DEFAULTFIELD , ALTIMETER , 1 , 1 , 0 ,\
                        DEFAULTFIELD , VERTICAL_SPEED , 1 , 1 , 0 ,\ 
                        DEFAULTFIELD , CURRENTMA , 1, 1, 0 ,\
                        DEFAULTFIELD , MILLIAH, 1, 1, 0 ,\
                        Fuel, MILLIAH , -100, 2200, 100\
                        Vfas , VOLT1 , 1 , 1 ,0 
it should be:

Code: Select all

#define SETUP_FRSKY_DATA_TO_SEND    \
                        DEFAULTFIELD , ALTIMETER , 1 , 1 , 0 ,\
                        DEFAULTFIELD , VERTICAL_SPEED , 1 , 1 , 0 ,\ 
                        DEFAULTFIELD , CURRENTMA , 1, 1, 0 ,\
                        DEFAULTFIELD , MILLIAH, 1, 1, 0 ,\
                        Fuel, MILLIAH , -100, 2200, 100 ,\
                        Vfas , VOLT1 , 1 , 1 ,0 
So, on line Fuel, add a comma between 100 and \ in order to let the list be continued on next line.
In this section, each line with parameters must end with ",\" (except the last line).
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Building a 50A sensor module for openXvario

Post by mstrens »

kaos wrote:previously there is a question why FUEL% is not matching mAh display on the radio.
This is what happened I think because i can reproduce this:
If you start fresh (mAh and FUELZ% both 0) ran the motor for a while, so there is some mAh and <100% FUEL at this time the mAh matches the FUEL%, then turned the radio off, but NOT ]the oXs.
then you turn the radio back on, the mAh on radio will reset to 0 but FUEL% is still kept as <100% where it was before it was turned off, so somehow the FUEL% is actually correct for overall consumption but mAh only shows what was consumed after the radio is turned back on.
This caused the FUEL% is less than what is displayed for the mAh.
It looks like the mAh is accumulated by the radio while the FUEL% is accumulated by oXs. I wonder why the FUEL% is calculated and remembered by oXs while the oXs is powered (I did not turn on the 'write to eeprom' in oXs) but the mAh is not?
Also in ersky9x the 'EXIT' button can reset mAh to zero but not the FUEL%, so power off radio would do the same thing. I don't understand why ersky9x /oXs are done this way? This runs a risk of accidentally reset mAh and loose the benefit of battery warning via mAh.
Best would be that millah and Fuel are both calculated only on tx side.
When there are calculated and sent by oXs there can be a conflict between the values calulated by oXs and the value calculated by Tx. It could also be that Tx display a mix of both what is inconsistent.
I suggest that you just avoid that oXs sent those 2 data. So please remove folowing lines in config file:
DEFAULTFIELD , MILLIAH, 1, 1, 0 ,\
Fuel, MILLIAH , -100, 2200, 100 ,\
Keep the line DEFAULTFIELD , CURRENTMA , 1, 1, 0 ,\ and try to find a way to configure your Tx in order to let him calculate the consumption and the fuel.
As Mike said in a previous post, it could be that you have to setup the capacity of the battery and an alarm.
I presume that jsha could help about this set up.
I am using openTx on Tx side and so I can't really help on this topic.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Building a 50A sensor module for openXvario

Post by jhsa »

I would help but I didn't look at the newest oXs code yet. I will when I start upgrading my oXs sensors.
I use FUEL to count the mAh. Never seen it showing percentage, and I wouldn't do it that way anyway, as the way LiPos discharge is not the same all the time. They offer less power with colder weather for example. If I try to use the same capacity from it as in the summer, I might damage it.
I use the FUEL to count the mAh up and I've learnt that in winter the amount of charge I can take from the battery before the low voltage alarm sounds is much less than in the summer.
I believe that if using percentage the radio would show a charge of 40 or 50% when the battery is already under 20% for example. If I continue to fly based on this information, I will destroy the battery.
There is one thing worse than having no telemetry information, and that is having BAD telemetry information..
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
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Building a 50A sensor module for openXvario

Post by mstrens »

jhsa wrote:I would help but I didn't look at the newest oXs code yet. I will when I start upgrading my oXs sensors.
I use FUEL to count the mAh. Never seen it showing percentage, and I wouldn't do it that way anyway, as the way LiPos discharge is not the same all the time. They offer less power with colder weather for example. If I try to use the same capacity from it as in the summer, I might damage it.
I use the FUEL to count the mAh up and I've learnt that in winter the amount of charge I can take from the battery before the low voltage alarm sounds is much less than in the summer.
I believe that if using percentage the radio would show a charge of 40 or 50% when the battery is already under 20% for example. If I continue to fly based on this information, I will destroy the battery.
There is one thing worse than having no telemetry information, and that is having BAD telemetry information..
João
In fact you are displaying the curent consumption (what I call milliAh) on the field named "fuel" (on display).
I presume that you have also a field (on the named) consumption (or something similar). Why not using this field because this is exactly his purpose (and just discard fuel if you do not want a %).
I presume too that the Tx firmware is able to calculate him self this consumption field if the telemetry sent only the current. The Tx has just to sum (current X enlapsed time).
So, even with the oldiest version of openXsensor (or openXvario) it should be possible to send only the current.

I presume that in some way the Tx will calculate the consumption.
Mike could for sure confirm if it can work so.

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

Re: Building a 50A sensor module for openXvario

Post by jhsa »

That's what I do. As I said, my tx display the mAh starting from zero on the FUEL field. I never seen percentage before.
There was an option on the version of oXs I'm using that stated something like:

"Send mAh as FUEL"

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
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Building a 50A sensor module for openXvario

Post by MikeB »

If you set the "Current Source", then the Tx will calculate the mAh used.
You can also set an alarm for the mAh value, and this is used to work out when 100% is used for the Fuel display.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Building a 50A sensor module for openXvario

Post by kaos »

mstrens: Thank you.
sorry about the darn "," , that used to be the last sine, when I add the vfas line, just forgot to add the ",".
That brought up the 40+ yr old memory when I was doing programming. Every time something went wrong would took me hrs to debug then when the problem was found, it is always a stupid mistake like that. :) I will run it again later today. I am out right now.
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Building a 50A sensor module for openXvario

Post by kaos »

mstrens wrote:
Best would be that millah and Fuel are both calculated only on tx side.
When there are calculated and sent by oXs there can be a conflict between the values calulated by oXs and the value calculated by Tx. It could also be that Tx display a mix of both what is inconsistent.
I suggest that you just avoid that oXs sent those 2 data. So please remove folowing lines in config file:
DEFAULTFIELD , MILLIAH, 1, 1, 0 ,\
Fuel, MILLIAH , -100, 2200, 100 ,\
Keep the line DEFAULTFIELD , CURRENTMA , 1, 1, 0 ,\ and try to find a way to configure your Tx in order to let him calculate the consumption and the fuel.
As Mike said in a previous post, it could be that you have to setup the capacity of the battery and an alarm.
I presume that jsha could help about this set up.
I am using openTx on Tx side and so I can't really help on this topic.
I think -> Defalt, miilam.... is the only way ersky9x will show mAh and in all 3 display items: mAh, mAh1, mAh2 or none of them show any thing, if I don't have that line.
The ->Fuel, mlliah,... is the only way that erksy9x will display mah data in the 'FUEL' field, otherwise it won't have any data displayed.
But I wll check again when I get home today. I don't trust my memory much nowadays. ;)
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Building a 50A sensor module for openXvario

Post by MikeB »

I've just tested how ersky9x handles the FUEL.
First, in the Telemetry menu, set the Current Source.
Second, also in the telemetry menu, set the mAh Alarm to the required capacity for 100%.
With these set, the FUEL value should start at 100%, and reduce while current is being measured, reaching 0% when the mAh value reaches the value set for the mAh alarm.
Currently, the mAh value is only updated while telemetry is being receiver (TmOK = 1 or 2). On one of the telemetry screens, there is a "Fuel Bar", this only appears if "user telemetry" (hub or SPort) is being received (TmOK = 2).

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Building a 50A sensor module for openXvario

Post by kaos »

yeh, happy to report everything is working using the oXs V5. (except my dum mistake missed a comma ;))
I also found out why my Amp display is jumping when the sensor is moved. it is not the connector. Again, a stupid mistake, the connector for gnd on promini had a bad solder joint, so when things moves the Amp fluctuates. Can't see it with naked eye. foun that out by sokdering all the wire then waggle the connnector pin to find out. :(

mstrens:
Thank you for your patience working with me. :)
question 1:
I see in there are actual two places you can scale the voltage, one is at section 91. Fry sky data and the other area is at 6.2 voltage parameter. My understanding is correct?
I think I have a much better understanding how oXs is set up now.
Now I need to have better understand how these data can be manipulated by ersky9x (eg, alarm, reset certain data...). As of now, every thing works: Amp, mah, Fuel, Vspd/vario, fly pakc total voltage.:)

question 2: will this work with oXs sensor (designed to plug in the Frysky hub for D series)
viewtopic.php?f=95&t=4334&hilit=rpm+sen ... =30#p61505
looks like it is operated between 4.2-6V, so with my Vcc 5V as reference, I should be able to connect to oXs directly and use the pro mini Vcc as power source.

question 3:
Does any of Frysky hub sensor for D series rx work directly with oXs. I have a full set of this D series Frysky sensors. Would be nice to use a few of them when I have the oXs on without the hub.

mike:
I tried to set up the mAh alarm in telemetry, however, the "warn-1" voice responded "receiver voltage low" and "warn-2" voice responded "receiver voltage". I traced the voice files and they corresponds to system voice file 0059 and 0049 (this is also the same as Jhsa's voice/sound pack, I did not change any voice file in 'system voice section'). These are not mAh warning. Is there a place you can change the voice file for 'warn-1' and 'warn-2' for mAh warning?
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Building a 50A sensor module for openXvario

Post by mstrens »

Question1 :
You are rigth: there are 2 places where you can put scale and offset.
The one has an inpact on the internal calculation (6.2) and the other on the transmission of the data.
There are cases where the one is needed, and cases where the other is needed.
E.G. if you want that individual cell voltages are correct, you have to get correct "internal" voltage measurement in order to calculate differences before they are put in a very special FRSKY format. So you need to use voltages parameters.
On the other side, if you want that oXs transmit consumption and Fuel (in a 100-0 range) then you can just send twice the internal milliah (once as milliah and once as Fuel) using multiplier, divider, offset special values just for fuel (that is wat you did in previous config).

Question 2 : in order to measure/transmit rpm, oXs has to get a pulsed signal. It seems (based on Mike experience) that this device can generate it. So it should work.
For safety, it is perhaps best to have a resistor between the output of the sensor and the Arduino pin. A value between 1k and 10k should be ok I presume. Not sure that it is really required because the device has probably an resistor on output signal.

Question 3:
oXs can currently not read the data generated by Frsky hub sensor.
I think you can use a SPORT Frsky vario as bridge to convert the Hub data into Sport. The low precision model would be enough.
I think too that someone plans to develop such a bridge with an arduino (perhaps Mike) but I am not sure if it exists already.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Building a 50A sensor module for openXvario

Post by MikeB »

I got something like "Battery Capacity Warning" voice message. I'll have a look.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Building a 50A sensor module for openXvario

Post by jhsa »

So, now I'm a bit lost here. On one of my acro planes I have oXs sending me the real mAh spent (NOT PERCENTAGE ) as FUEL. If I update to the latest firmware will I be able to do the same?
Thanks

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
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Building a 50A sensor module for openXvario

Post by mstrens »

jhsa wrote:So, now I'm a bit lost here. On one of my acro planes I have oXs sending me the real mAh spent (NOT PERCENTAGE ) as FUEL. If I update to the latest firmware will I be able to do the same?
Thanks

João
Yes: there is no change about this; latest version of oXs still allows you to send any measurement you want (so e.g. real mAh) as FUEL.
I presume that on TX side, if current source is not set up (an perhaps the alarm too), then TX display as fuel the value it gets from the telemetry and does not try to calculate it on Tx side.

So I expect you can still get what you want (even if this is not the foreseen way using the telemetry).
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Building a 50A sensor module for openXvario

Post by jhsa »

Yes, I think my current is calculated by the oXs as i remember calibrating the sensor in the oXs code. But I think it has to be done there anyway? :o :)
Thanks for your answer, the problem is that you build a sensor, it works, you move on and don't really follow the development. Only when you need to build another one, but then you forgot what you did before :)
That is one of the reasons I really like the configurator..
I have the current sensor on my plane since at least 2 years, and it works well, so I never had the need to mess with it.. But as i said before I will be converting all my voltage sensors to read cells, as I still have a lot of old batteries (5 years +) that still provide good power but some cells start dropping a little faster than others..

Thanks

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
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Building a 50A sensor module for openXvario

Post by MikeB »

kaos wrote:I tried to set up the mAh alarm in telemetry, however, the "warn-1" voice responded "receiver voltage low" and "warn-2" voice responded "receiver voltage". I traced the voice files and they corresponds to system voice file 0059 and 0049 (this is also the same as Jhsa's voice/sound pack, I did not change any voice file in 'system voice section'). These are not mAh warning. Is there a place you can change the voice file for 'warn-1' and 'warn-2' for mAh warning?
I'm (slowly) moving over from numbered voice files to named voice files. The firmware looks for a named file, but if it doesn't find it, it tries a numbered file.

For the fuel warning, it looks for "CAP_WARN.wav", in the voice/system directory. Ideally you want a file called this, with the message you want announced. I thought it was available in one of the voice packs Jhsa has produced.

Looking at the code, I don't think the warn-1 and warn-2 options do anything anymore. They are left over from er9x for use when you don't have a voice module added.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Building a 50A sensor module for openXvario

Post by kaos »

mstrens:
Thx for the explanation of voltage scaler in section 6 and 9, now it makes sense to me now. :)
As for the rpm sensor, because it was made for connecting to Frysky D Hub, so I thought if this sensor can be used/connected to oXs, may be other Frysky D sensor can be used to connect directly to oXs without the hub as well. You are saying other D sensor will need a Sport converter to connect to oXs directly?

Mike:
==>please keep the warn1, warn2 in there. it is right at the telemetry menu very easy to configure the warning. All we have to do is change the voice wav file. I have not done that because I don't know if these 2 files are used somewhere else in the system.
where is this /voice/system thing? I downloaded the er9x sound pack as you pointed out to me by jhsa, and check/modified with mine. it still only has /voice directory with numbered voice files. only in the text file explanation 1-79 was highlight read as system voice like before and all my previously programmed voice are responding correctly including the system voice. Is there a separate ersky9x sound pack some where now?

==>The Fuel % thing. I will reprogram the oXs and check the way you described. It is the best way to deal with FUEL%. the way I am doing now, when using different capacity battery I have to go back arduino to modify the capacity. If the ersky9x can do this, it is great, just change the mAh warning. Before, I could not get the FUEL% to show unless I set it up in oXs the way I am doing now.
edit: just reprogram oXs by removing : Fuel, MILLIAH , -100, 2200, 100 ,\ and use your method for Fuel%, it works beautifully. we can just specify the capacity of 'fuel' and the FUEL% will count down to 0. Great! so for a 2200mah lipo, probably want to keep 30% left in, the mAh warning will be set at 1540 then ready to go. when changing a different capacity battery just change the mAh. :)

==> on telemetry custom display "FasV" which I use for flypack total voltage sensor, there is a unit 'V' above, if I don't use scaler in oXs, it will show in mV (1109.0 for 11.09V), but if I use the scaler in oXs, it will show 11.0). Since the unit displayed is 'V' and that is most people used to read for battery voltage in 2 decimal point. Is it better to have 2 decimal point so it will display as 11.09 v?

==> the vario tone sensitivity. I figure out a way to use vSpd as source (so save one SC, since vSpd is already a choice for vario source). if we add a multiplier in oxs for Vertical_spd of 40 (same as the multiplier in your suggested SC) then just select vSpd as source and the sensitivity adjustment will react exactly the same as using the SC. What I don't understand is, when I do this, I expect to see the vSpd display would change 40 times, but it did not. So I know it works for the tone, but don't know why it did not change the vSpd display.
Last edited by kaos on Thu Oct 15, 2015 6:18 pm, edited 1 time in total.
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: Building a 50A sensor module for openXvario

Post by mstrens »

kaos wrote:mstrens:
Thx for the explanation of voltage scaler in section 6 and 9, now it makes sense to me now. :)
As for the rpm sensor, because it was made for connecting to Frysky D Hub, so I thought if this sensor can be used/connected to oXs, may be other Frysky D sensor can be used to connect directly to oXs without the hub as well. You are saying other D sensor will need a Sport converter to connect to oXs directly?
I expect that all Frsky sensors (except probably RPM sensor) make some conversion/calculation and generate the result in a digital form (serial stream).
oXs can not read this serial stream.
Please note that if you use a converter to convert hub data into Sport data, then the pin (from the converter) which output the SPORT data has to be connected directly to the Rx.
In fact the SPORT protocol is a BUS protocol. It means that several SPORT sensors are connected in // to the same receiver pin.
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Building a 50A sensor module for openXvario

Post by kaos »

mstrens:
so once these D series sensor data (without the hub) is converted we have to connect to a X series rx to use it?
I was hoping I still can use some of these D sensors with oXs on my D series Rx without the hub. :cry:
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Building a 50A sensor module for openXvario

Post by jhsa »

kaos wrote: where is this /voice/system thing? I downloaded the er9x sound pack as you pointed out to me by jhsa, and check/modified with mine. it still only has /voice directory with numbered voice files. only in the text file explanation 1-79 was highlight read as system voice like before and all my previously programmed voice are responding correctly including the system voice. Is there a separate ersky9x sound pack some where now?
Which voice pack did you download?

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
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Building a 50A sensor module for openXvario

Post by kaos »

from here: viewtopic.php?f=122&t=5680
the Voice Pack 9XR-Pro 16Khz.zip
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Building a 50A sensor module for openXvario

Post by jhsa »

Sorry, but that pack has all files and folders inside the zip file. The folders are:
modelNames
system
User

You said you modified it with your files.. make sure you didn't forget other folders and files..
The document inside the zip file includes all the named files and numbers.
I have just downloaded it to make sure all is there, and it is.

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
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Building a 50A sensor module for openXvario

Post by kaos »

Ah, I misunderstood the way it is set up. since the main folder has all those numbered file names. I just use the main folder (which is the same as before except 2 wav files).
so how the r217 is using those /modelnames, /system, /users?
my guess is since I don't have /system in there r217 just picked 0049 and 0059 for warn1, warn2.
Ok what I would do then just change the 059, 049 wav file to something like 'fuel is 0' or 'fuel is low'.
I assume the r217 now for system specific thing is calling the wav file in /system? I will add /modelnames, /system, /users in the SD. I guess when r217 has a 'safety' check if /system is not there , it uses the old numerical files in the main directory as before. because mine without the subfolder still works.
But for model names, on radio you still select a number not alphabatic name. so how this /modelnames and /user files work?
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Building a 50A sensor module for openXvario

Post by jhsa »

DO NOT change anything on the system folder. These are files the radio expects to find there. Just make your own files, give it a name (Max 8 characters) and put them in the "user" folder.. This is the folder for all the new files you want to create. When you select a file in the Voice Alarms menu, this is the folder the radio will get the files from..
But for model names, on radio you still select a number not alphabatic name. so how this /modelnames and /user files work?
Negative.. You can select model names with text. Not only numbers. Just highlight the number and press menu long. this will open the modeNames folder with all your model names listed.. press menu short to listen to the highlighted file, or press menu long to select the file as the name for the current model..
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
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Building a 50A sensor module for openXvario

Post by kaos »

Sigh...... that is a lot of change since r178 :) I see we can select file name for model name OR use the old number system now, wow, huge difference/improvement :)
don't understand why some numbers are repeated eg: 000 and 0400,......... in /system.
I see /system does not have 0059,0049 yet and warn1, warn2 seems to default to 0059,0049. why not put these two in /system so mike does not need to do any code change!
I will get on with this and come back with you if I have any question.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Building a 50A sensor module for openXvario

Post by jhsa »

They are in the "User" folder, but have a name instead of a number..

"RX_VOLT.wav" and "RX_V_LOW.wav"


As soon as Mike finishes the implementation of the names in the code, I will clean everything. Now some files are repeated (numbers and names) because I don't know what has been done and what hasn't.
If you open the document provided with the voice pack (Sound List-Names.doc) you will see how the numbers relate to the names, and what they say..

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
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Building a 50A sensor module for openXvario

Post by kaos »

I see. Thx Jhsa. For me jumping from r178 to r218 test version with such a huge change and some work underway, no wonder I am confused as hell. :mrgreen:
kaos wrote: ==> the vario tone sensitivity. I figure out a way to use vSpd as source (so save one SC, since vSpd is already a choice for vario source). if we add a multiplier in oxs for Vertical_spd of 40 (same as the multiplier in your suggested SC) then just select vSpd as source and the sensitivity adjustment will react exactly the same as using the SC. What I don't understand is, when I do this, I expect to see the vSpd display would change 40 times, but it did not. So I know it works for the tone, but don't know why it did not change the vSpd display.
Got this figured out. There IS a change in vSpd but due the spd is measured m/s which makes the display read out change very small, so I hardly noticed any changes in vSpd display. The best way is put a 100 as multiplier in oXs than the read out would be exactly equivalent to cm/s and the sensitivity can be adjusted very easy around 20 or whatever you prefer.
Again this is because of my inexperience/lack of knowledge in this whole thing. I am getting there. :)
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Building a 50A sensor module for openXvario

Post by kaos »

mstrens:
Now I have the oXs all worked out beautifully :) Thank again for your help.
I found I have one extra brushless rpm senor in my box. Gee, got a lot of 'junks' in my drawer from a while ago. That sensor from Hobbywing is pretty cheap as I remember so I bought one extra. :P so I am going to work on the brushless rpm sensor for oXs.
mstrens wrote: Question 2 : in order to measure/transmit rpm, oXs has to get a pulsed signal. It seems (based on Mike experience) that this device can generate it. So it should work.
For safety, it is perhaps best to have a resistor between the output of the sensor and the Arduino pin. A value between 1k and 10k should be ok I presume. Not sure that it is really required because the device has probably an resistor on output signal.
The inline 1K~10K resistor of the signal wire is in addition to the 5.6K resistor between the signal and gnd of the sensor, right?
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: Building a 50A sensor module for openXvario

Post by kaos »

Very strange. I have set up oXs and everthing is doing fine. Changed some parameter and added a little note of my own. But I recompiled and tested everything is fine. the sensor is still working fine. Made the hardware for rpm sensor ready and made a pin out from "8" pin for rpm sensing input.
All I have to do is uncomment 'measure RPM' line to make a new compilation. but error message returned. so I comment the 'measure RPM' and recompile (should be the one I have been using successfully) but still there are error message only less. Don't know what happened. I compared my file with the original oXs v5 config.h file. I could not find any difference in syntex beside those parameter I have used. Probably touched the key board at some point and changed something without knowing it. Tried to read line by line could not find out what went wrong.
I think I need to bother mstrens to debug for me one more time. Here is the .ino file without uncomment 'measure RPM':
oXs_config.h
(9.54 KiB) Downloaded 215 times

Post Reply

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