OpenXSensor Jeti, flow sensor and reset through button / PPM
Moderator: rainer
OpenXSensor Jeti, flow sensor and reset through button / PPM
Hi,
Thanks for this great project for DIY sensors. I made quite a few and I am really happy although the Jeti protocol is quite new.
I have one issue with a flow sensor. I am using the flowSensor together with a simple BMP280 sensor for height measurement in a tow up plane.
Everything works fine but I can only reset the fuel leven by doing it through the Jetibox emulation in my DC16/24.
Neither the PPM signal nor the pushbutton works to reset the values. The PPM signal itself works ina different sensor together with the sequencer so I am a bit confused why the reset is not working.
Best regards and thanks for your help.
Onki
Thanks for this great project for DIY sensors. I made quite a few and I am really happy although the Jeti protocol is quite new.
I have one issue with a flow sensor. I am using the flowSensor together with a simple BMP280 sensor for height measurement in a tow up plane.
Everything works fine but I can only reset the fuel leven by doing it through the Jetibox emulation in my DC16/24.
Neither the PPM signal nor the pushbutton works to reset the values. The PPM signal itself works ina different sensor together with the sequencer so I am a bit confused why the reset is not working.
Best regards and thanks for your help.
Onki
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
I did not implemented a reset of flowsensor with the pushbutton.
If you want this option, you could try with a minor change in the ino file.
Currently there is:
void Reset3SecButtonPress()
{
#ifdef DEBUG
Serial.println(F(" Reset 3-5 sec"));
#endif
#if defined(ARDUINO_MEASURES_A_CURRENT) && (ARDUINO_MEASURES_A_CURRENT == YES)
oXs_Current.resetValues();
#elif defined(AN_ADS1115_IS_CONNECTED) && (AN_ADS1115_IS_CONNECTED == YES ) && defined (ADS_MEASURE) && defined (ADS_CURRENT_BASED_ON)
oXs_ads1115.floatConsumedMilliAmps = 0 ;
oXs_ads1115.adsCurrentData.consumedMilliAmps.value = 0 ;
#endif
}
it should become
void Reset3SecButtonPress()
{
#ifdef DEBUG
Serial.println(F(" Reset 3-5 sec"));
#endif
#if defined(ARDUINO_MEASURES_A_CURRENT) && (ARDUINO_MEASURES_A_CURRENT == YES)
oXs_Current.resetValues();
#elif defined(AN_ADS1115_IS_CONNECTED) && (AN_ADS1115_IS_CONNECTED == YES ) && defined (ADS_MEASURE) && defined (ADS_CURRENT_BASED_ON)
oXs_ads1115.floatConsumedMilliAmps = 0 ;
oXs_ads1115.adsCurrentData.consumedMilliAmps.value = 0 ;
#endif
#if defined ( A_FLOW_SENSOR_IS_CONNECTED ) && ( A_FLOW_SENSOR_IS_CONNECTED == YES)
consumedML = 0 ;
#endif
}
About resetting the flow based on ppm, I checked the code and I expect it should work.
Please note that PPM signal must be equal (with a tolerance +/- 4) to the value defined by the parameter #define FLOW_SENSOR_RESET_AT_PPM
So with a value 95, PPM must be between 91 and 99.
If you want this option, you could try with a minor change in the ino file.
Currently there is:
void Reset3SecButtonPress()
{
#ifdef DEBUG
Serial.println(F(" Reset 3-5 sec"));
#endif
#if defined(ARDUINO_MEASURES_A_CURRENT) && (ARDUINO_MEASURES_A_CURRENT == YES)
oXs_Current.resetValues();
#elif defined(AN_ADS1115_IS_CONNECTED) && (AN_ADS1115_IS_CONNECTED == YES ) && defined (ADS_MEASURE) && defined (ADS_CURRENT_BASED_ON)
oXs_ads1115.floatConsumedMilliAmps = 0 ;
oXs_ads1115.adsCurrentData.consumedMilliAmps.value = 0 ;
#endif
}
it should become
void Reset3SecButtonPress()
{
#ifdef DEBUG
Serial.println(F(" Reset 3-5 sec"));
#endif
#if defined(ARDUINO_MEASURES_A_CURRENT) && (ARDUINO_MEASURES_A_CURRENT == YES)
oXs_Current.resetValues();
#elif defined(AN_ADS1115_IS_CONNECTED) && (AN_ADS1115_IS_CONNECTED == YES ) && defined (ADS_MEASURE) && defined (ADS_CURRENT_BASED_ON)
oXs_ads1115.floatConsumedMilliAmps = 0 ;
oXs_ads1115.adsCurrentData.consumedMilliAmps.value = 0 ;
#endif
#if defined ( A_FLOW_SENSOR_IS_CONNECTED ) && ( A_FLOW_SENSOR_IS_CONNECTED == YES)
consumedML = 0 ;
#endif
}
About resetting the flow based on ppm, I checked the code and I expect it should work.
Please note that PPM signal must be equal (with a tolerance +/- 4) to the value defined by the parameter #define FLOW_SENSOR_RESET_AT_PPM
So with a value 95, PPM must be between 91 and 99.
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Question, if using FrskyX protocol, would it be possible to reset it over S.PORT?mstrens wrote: ↑Mon Nov 20, 2017 4:21 pm
About resetting the flow based on ppm, I checked the code and I expect it should work.
Please note that PPM signal must be equal (with a tolerance +/- 4) to the value defined by the parameter #define FLOW_SENSOR_RESET_AT_PPM
So with a value 95, PPM must be between 91 and 99.
If not, what would be needed?
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
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
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
When you use SPORT, you can manage all flow parameters (tank capacity, reset of consumption, calibration) using lua script on openTx.
Example of lua script are available on github.
Example of lua script are available on github.
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
I do not use openTX,. I use Ersky9x, and even though I can do that with a script I would prefer to do it with the radio menus Also ersky9x uses another script language, so the Lua Scripts won't work. With the Ersky9x script language we have scripts on all radios, except the original 9x mainboard. OpenTX only supports scripts on the frsky radios as far as I know.
So, what do I need to send from the radio to the oXs? to reset the flow sensor? What is the oXs expecting?
Thanks
João
So, what do I need to send from the radio to the oXs? to reset the flow sensor? What is the oXs expecting?
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
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
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
on Ersky9x you can write scripts in a kind of basic language.
I expect that Mike could write a script to send some parameters (reset, tank capacity and calibration) to oxs.
Here an extract of the oxs documentation written for Lua script.
Basic script should send the same values.
Note: Mike already explained me that the values should be filled in another way to match the Frsky specifications but I had not yet time to change it.
So, in the mean time, please use the values below.
* OpenTx 2.2 alllows to run LUA scripts that will send a value from TX to oXs over the SPORT connection
* To activate this option, you have to :
* - uncomment the line #define PPM_VIA_SPORT
* - let you Tx run a LUA script that will send over SPORT the same digital value that, otherwise, would be sent over a Rx channel. (so a value between -100 and 100)
* This lua script must use a command like
* local ret = sportTelemetryPush( 0x0D , 0x10 , 0x0010 , -52 )
* where
* - 0xOD : is the device ID being used (defined in oXs_config_advanced.h)
* - 0x10 : is a dummy value (not used)
* - 0x0010 : is the code id being used to identify that it concerns a "ppm" value
* - -52 : is the value of the ppm to transmit (-52 is just an example; it must be adapt with the value to transmit)
* You can find an example of lua script to be used in this package (in folder "lua scripts"). Name is oxsppm.lua and it must be installed in the folder SCRIPTS/FUNCTIONS of the SD card.
I expect that Mike could write a script to send some parameters (reset, tank capacity and calibration) to oxs.
Here an extract of the oxs documentation written for Lua script.
Basic script should send the same values.
Note: Mike already explained me that the values should be filled in another way to match the Frsky specifications but I had not yet time to change it.
So, in the mean time, please use the values below.
* OpenTx 2.2 alllows to run LUA scripts that will send a value from TX to oXs over the SPORT connection
* To activate this option, you have to :
* - uncomment the line #define PPM_VIA_SPORT
* - let you Tx run a LUA script that will send over SPORT the same digital value that, otherwise, would be sent over a Rx channel. (so a value between -100 and 100)
* This lua script must use a command like
* local ret = sportTelemetryPush( 0x0D , 0x10 , 0x0010 , -52 )
* where
* - 0xOD : is the device ID being used (defined in oXs_config_advanced.h)
* - 0x10 : is a dummy value (not used)
* - 0x0010 : is the code id being used to identify that it concerns a "ppm" value
* - -52 : is the value of the ppm to transmit (-52 is just an example; it must be adapt with the value to transmit)
* You can find an example of lua script to be used in this package (in folder "lua scripts"). Name is oxsppm.lua and it must be installed in the folder SCRIPTS/FUNCTIONS of the SD card.
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Thanks for the explanation.
But can I do the same without using a script? If so what?
Using a channel, PPM, whatever??
Thanks
João
But can I do the same without using a script? If so what?
Using a channel, PPM, whatever??
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
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
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Using a channel (or a push button with a minor change in the ino file) can be used to force a reset of flow consumption.
Still then you have to upload a new sketch if you want to modify the tank capacity or the calibration parameters.
Still then you have to upload a new sketch if you want to modify the tank capacity or the calibration parameters.
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Thanks.
Ok, if I understood, to reset using the radio I can just use a channel (PWM)
To modify tank capacity (not needed unless you install a new tank in the model) or calibrate the sensor, I need a script?
Couldn't it be possible to calibrate on the oXs itself with a calibration routine as used for example for the ACC??
This would allow users with radios that do not support scripts (Many openTX users and some using stock 9x boards) to use this feature.
Also, if I use the oXs with D8 HUB protocol, how can I calibrate it?
Sorry about the questions. I am using a capacitive proportional sensor at the moment, but would like to try the flow sensor as well if I can find one that is not expensive.. I still didn't find it so if someone could point me to it, it would be very much appreciated..
Thank you
João
Ok, if I understood, to reset using the radio I can just use a channel (PWM)
To modify tank capacity (not needed unless you install a new tank in the model) or calibrate the sensor, I need a script?
Couldn't it be possible to calibrate on the oXs itself with a calibration routine as used for example for the ACC??
This would allow users with radios that do not support scripts (Many openTX users and some using stock 9x boards) to use this feature.
Also, if I use the oXs with D8 HUB protocol, how can I calibrate it?
Sorry about the questions. I am using a capacitive proportional sensor at the moment, but would like to try the flow sensor as well if I can find one that is not expensive.. I still didn't find it so if someone could point me to it, it would be very much appreciated..
Thank you
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
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
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Calibrating the flow sensor is quite simple.
It only require to upload a first sketch with 4 parameters set to zero, to compare the consumptions given by oXs with the real one for different engine speeds and reload the sketch with the parameters that will compensate the errors.
This works for all RF protocols.
Here an extract of the doc.
* - specify 8 values used to calibrate your sensor in INIT_FLOW_PARAM
* Those parameters are used in order to take care that the number of pulses generated by the sensor when 1 milli liter of liquid flows trough it varies with the flow it self.
* For 4 flow values (the first 4 parameters) , oXs allows you to define a correction (in %) in the last 4 parameters.
* The process to calibrate the sensor should be as follow :
* Set last 4 parameters to 0 (so 0% correction)
* Run you engine at 4 different speeds (from very low, to some medium and finally to high speed) for a few minutes.
* For each run,
* - note the remaining fuel (in ml) reported by oXs at start (e.g. 1200) and at end (e.g. 1090)of the run
* - measure the real remaining fuel (in ml) in the tank at start (e.g. 1500) and at end (e.g. 1380)of the run
* - note the enlapsed time (in min) between start and end of the run (e.g. 2 min).
* - compare the consumed ml (difference between remaining fuel at start and at end) reported by oXs and in the reality (e.g. reported = 1200 - 1090 = 110ml; real = 1500 - 1380= 120ml)
* - calculate the correction factor to apply (e.g. (120 - 110) / 110 = 9%) ; note correction could be negative)
* - calculate the flow where this correction applies (= consumed ml reported by oXs / enlapsed time = 110 ml / 2 min = 55 ml/min)
* Fill the first 4 parameters with the calculated flows (e.g. 55) and the last 4 parameters with the correction percentage (e.g. 9).
* Take care that the first 4 parameters have to be in ascending order (so from low speed to high speed).
* Note: when oXs calculates the consumption, it will apply linear interpolation for the related range of values.
It only require to upload a first sketch with 4 parameters set to zero, to compare the consumptions given by oXs with the real one for different engine speeds and reload the sketch with the parameters that will compensate the errors.
This works for all RF protocols.
Here an extract of the doc.
* - specify 8 values used to calibrate your sensor in INIT_FLOW_PARAM
* Those parameters are used in order to take care that the number of pulses generated by the sensor when 1 milli liter of liquid flows trough it varies with the flow it self.
* For 4 flow values (the first 4 parameters) , oXs allows you to define a correction (in %) in the last 4 parameters.
* The process to calibrate the sensor should be as follow :
* Set last 4 parameters to 0 (so 0% correction)
* Run you engine at 4 different speeds (from very low, to some medium and finally to high speed) for a few minutes.
* For each run,
* - note the remaining fuel (in ml) reported by oXs at start (e.g. 1200) and at end (e.g. 1090)of the run
* - measure the real remaining fuel (in ml) in the tank at start (e.g. 1500) and at end (e.g. 1380)of the run
* - note the enlapsed time (in min) between start and end of the run (e.g. 2 min).
* - compare the consumed ml (difference between remaining fuel at start and at end) reported by oXs and in the reality (e.g. reported = 1200 - 1090 = 110ml; real = 1500 - 1380= 120ml)
* - calculate the correction factor to apply (e.g. (120 - 110) / 110 = 9%) ; note correction could be negative)
* - calculate the flow where this correction applies (= consumed ml reported by oXs / enlapsed time = 110 ml / 2 min = 55 ml/min)
* Fill the first 4 parameters with the calculated flows (e.g. 55) and the last 4 parameters with the correction percentage (e.g. 9).
* Take care that the first 4 parameters have to be in ascending order (so from low speed to high speed).
* Note: when oXs calculates the consumption, it will apply linear interpolation for the related range of values.
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Thanks.. Will save this.. Or perhaps it is on the config, description??
João
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
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
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Hi,
I modified the ino file as suggested in order to get a pushbutton reset (I am using port 2).
After compiling and transfering the new version to my sensor there is no change. Even if i press the button (connects to GND as the ports are working with a pullup) for 5s there is no reset of the fuel values.
I will double check this evening the PPM reset as well.
I have another question regarding the sequencer.
I managed to define a ACL/Beacon function on pin 10/11
In addition I want to use pin 12/13 to enable position lights and landing lights.
As far as I understood the mentioned PPM position is only this position.
How do I define a sequence if the position light should turn on at -100% and higher, the ACL/Beacon at 0% and higher and landing lights at +100% and higher (when using 125% PPM range)?
Do I just need to copy the previous line to the next PPM position until the next function starts?
Best regards
Onki
I modified the ino file as suggested in order to get a pushbutton reset (I am using port 2).
After compiling and transfering the new version to my sensor there is no change. Even if i press the button (connects to GND as the ports are working with a pullup) for 5s there is no reset of the fuel values.
I will double check this evening the PPM reset as well.
I have another question regarding the sequencer.
I managed to define a ACL/Beacon function on pin 10/11
In addition I want to use pin 12/13 to enable position lights and landing lights.
As far as I understood the mentioned PPM position is only this position.
How do I define a sequence if the position light should turn on at -100% and higher, the ACL/Beacon at 0% and higher and landing lights at +100% and higher (when using 125% PPM range)?
Do I just need to copy the previous line to the next PPM position until the next function starts?
Best regards
Onki
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Normally the flow consumption should be reset when the button is pressed between 3 and 5 sec.
I could change the range of pulse duration to make it easier.
For sequencer I have to check the code
I could change the range of pulse duration to make it easier.
For sequencer I have to check the code
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Hi again,
I did some testing on the modified code but I still could not reset the flow parameters.
Neither using the PPM activated nor through the pushbutton reset.
I tried id many times with different times but nothing happened. Same with PPM. I double checked the pulse lenght with my DC16 display.
Only reset through Jetibox works without any problem.
Best regards and have a nice weekend
Onki
I did some testing on the modified code but I still could not reset the flow parameters.
Neither using the PPM activated nor through the pushbutton reset.
I tried id many times with different times but nothing happened. Same with PPM. I double checked the pulse lenght with my DC16 display.
Only reset through Jetibox works without any problem.
Best regards and have a nice weekend
Onki
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
When you use the pushbutton, do you see the arduino led blinking?
Depending on the duration of pushing down the button, there should be some blinking bettween
1000 and 1200 msec
3000 and 3200 msec
3300 and 3400 msec
10000 and 10200 msec
10300 and 10400 msec
10500 and 10600 msec
If you do not have led blinking I expect you have a mistake in the config.
Perhaps can you also upload the sketch in the arduino with the option DEBUG activated. It means that in oxs_config_advanced.h you have to remove the "//" in front of line //#define DEBUG.
When arduino is connected to pc (via usb and FTDI), you should get a message on the pc terminal (opened by pressing CTRL + SHIFT + M in arduino IDE).
The message should be " Reset 3-5 sec" when the push button is pressed more than 3 sec and released before 5 sec.
This would at least demonstrate that arduino detects or not the reset request.
If it is dectected, I would have to check further why the flow is not reset.
Depending on the duration of pushing down the button, there should be some blinking bettween
1000 and 1200 msec
3000 and 3200 msec
3300 and 3400 msec
10000 and 10200 msec
10300 and 10400 msec
10500 and 10600 msec
If you do not have led blinking I expect you have a mistake in the config.
Perhaps can you also upload the sketch in the arduino with the option DEBUG activated. It means that in oxs_config_advanced.h you have to remove the "//" in front of line //#define DEBUG.
When arduino is connected to pc (via usb and FTDI), you should get a message on the pc terminal (opened by pressing CTRL + SHIFT + M in arduino IDE).
The message should be " Reset 3-5 sec" when the push button is pressed more than 3 sec and released before 5 sec.
This would at least demonstrate that arduino detects or not the reset request.
If it is dectected, I would have to check further why the flow is not reset.
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
if I understand it right, you would like to have 4 casesonki wrote: ↑Wed Nov 22, 2017 10:44 am I have another question regarding the sequencer.
I managed to define a ACL/Beacon function on pin 10/11
In addition I want to use pin 12/13 to enable position lights and landing lights.
As far as I understood the mentioned PPM position is only this position.
How do I define a sequence if the position light should turn on at -100% and higher, the ACL/Beacon at 0% and higher and landing lights at +100% and higher (when using 125% PPM range)?
Do I just need to copy the previous line to the next PPM position until the next function starts?
1- all light off
2- ACL/Beacon on pin 10/11 blinking, position lights on pin 12 OFF and landing lights on pin 13 OFF
3 -ACL/Beacon on pin 10/11 blinking, position lights on pin 12 ON and landing lights on pin 13 OFF
4 -ACL/Beacon on pin 10/11 blinking, position lights on pin 12 ON and landing lights on pin 13 OFF
you should try this setup (assuming that HIGH = light ON)
//#define SEQUENCE_OUTPUTS 0b111100 // says that pins 10 up to 13 have to be controled
#define SEQUENCE_UNIT 25 // says that a value 1 in sequence is good for 250 msec
#define SEQUENCE_m100 1 , 0b000100 , 1 , 0b000000 , 1 , 0b001000 , 1 , 0b000000 // this will set pin 10 high for 0,25 sec, then all led off for 0,25 sec, then pin 11 high for 0,25 sec , then all led off for 0,25 sec, this sequence will repeat as long as ppm signal is about -100
//#define SEQUENCE_m75 1 , 0b100000 , 1 , 0b000000 , 2 , 0b100000 , 2 , 0b000000 // not used
//#define SEQUENCE_m50 5 , 0b100000 , 5 , 0b000000 // not used
//#define SEQUENCE_m25 5 , 0b100000 , 5 , 0b000000 , 0 , 0b100000 // not used
#define SEQUENCE_0 1 , 0b010100 , 1 , 0b010000 , 1 , 0b011000 , 1 , 0b010000 // this do the same as -100 except that pin 12 is always HIGH
//#define SEQUENCE_25 2 , 0b100000 , 2 , 0b000000 // not used
//#define SEQUENCE_50 5 , 0b100000 , 5 , 0b000000 // not used
//#define SEQUENCE_75 7 , 0b100000 , 7 , 0b000000 // not used
#define SEQUENCE_100 1 , 0b110100 , 1 , 0b110000 , 1 , 0b111000 , 1 , 0b110000 // this do the same as -100 except that pin 12 and 13 are always HIGH 0b000000
Note: when Tx send PPM signal for a sequence that is not defined (e.g. -75, -50, ...) oXs will let all pins LOW
So, on TX side,
- when you want all lights off, you should use mixers that force the PPM signal to e.g. -50
- to get case 2, send a PPM signal = -100
- to get case 3, send a PPM signal = 0
- to get case 4, send a PPM signal = 100
I presume you can easily achieve this with some switch combinations
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Thanks so much for your help.
Since the weather forecast for the weekend is quite bad I will find some time to give that a try.
Another general question to all.
How do you handle different OxS configurations (with/without GPS; with/without Flowsensor etc.) using the Arduino IDE?
At the moment I put both config files in a subdirectory of the project directory.
Any hint to handle this in a better way (with regards to updates etc.) is very welcome.
Best regards and thanks again
Onki
Since the weather forecast for the weekend is quite bad I will find some time to give that a try.
Another general question to all.
How do you handle different OxS configurations (with/without GPS; with/without Flowsensor etc.) using the Arduino IDE?
At the moment I put both config files in a subdirectory of the project directory.
Any hint to handle this in a better way (with regards to updates etc.) is very welcome.
Best regards and thanks again
Onki
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Hi all,
I am having a serious problem with the sequencer.
Please check my config files (attached).
I am pretty sure that this code used to work before but now the sequencer is not working at all.
Of course I am using the latest OXS code.
Any ideas?
Best regards
Onki
I am having a serious problem with the sequencer.
Please check my config files (attached).
I am pretty sure that this code used to work before but now the sequencer is not working at all.
Of course I am using the latest OXS code.
Any ideas?
Best regards
Onki
- Attachments
-
- oXs_config_basic.h
- current basic config
- (11.17 KiB) Downloaded 373 times
-
- oXs_config_advanced.h
- current advanced config
- (18.92 KiB) Downloaded 379 times
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
I do not see an error in the config files.
Your unit is 2. It means that a value 1 in your sequence should generate a pulse of 10 msec. Is this not quite short?
Does your sensor send the altitude, vpseed and GPS data?
Can you try your oXs with a config where you disable the baro and the GPS (to check if there is some incompatibilities)?
Are you sure that the PPM pulses sent by your TX have the right values.
For a JETI, It could be that you have to adjust the values in the 2 lines .
#define PPM_MIN_100 988 // default 1500 - 512 ; // pulse width (usec) when TX sends a channel = -100
#define PPM_PLUS_100 2012 // default 1500 + 512 ; // pulse width (usec) when TX sends a channel = +100
You can try using a potar (instead of a switch) to change the value of the ppm pulses. In this case, you have to rotate the potar very slowly to let oXs get several identical value in order to react.
If you have time, you can also try an oldier version of oXs (not the one in the master branch on github).
Let me know the result of your test.
It could be that there is really an issue in oXs because another user reports me a few days ago that he had issues with PPM too (but it was to change vario seensitivity; he was not using the sequencer). Up to now I did not had time to look at this.
Your unit is 2. It means that a value 1 in your sequence should generate a pulse of 10 msec. Is this not quite short?
Does your sensor send the altitude, vpseed and GPS data?
Can you try your oXs with a config where you disable the baro and the GPS (to check if there is some incompatibilities)?
Are you sure that the PPM pulses sent by your TX have the right values.
For a JETI, It could be that you have to adjust the values in the 2 lines .
#define PPM_MIN_100 988 // default 1500 - 512 ; // pulse width (usec) when TX sends a channel = -100
#define PPM_PLUS_100 2012 // default 1500 + 512 ; // pulse width (usec) when TX sends a channel = +100
You can try using a potar (instead of a switch) to change the value of the ppm pulses. In this case, you have to rotate the potar very slowly to let oXs get several identical value in order to react.
If you have time, you can also try an oldier version of oXs (not the one in the master branch on github).
Let me know the result of your test.
It could be that there is really an issue in oXs because another user reports me a few days ago that he had issues with PPM too (but it was to change vario seensitivity; he was not using the sequencer). Up to now I did not had time to look at this.
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Hi,
I tried it with one board in the complete setup using the transmitter to generate the PPM pulses and with a raw board (without baro and GPS) by just using a servo tester to generate the PPm pulses.
To make sure I try to use an older version with the same code. You are right. the pulse might be a bit too short. I need a 50ms pulse for the ACL flash so using 5 as sequence value should make more sense.
Using older versions I needed to corrct the following error in openxsensor.ino
But the problem remains also with older OXS versions.
Best regards
Onki
I tried it with one board in the complete setup using the transmitter to generate the PPM pulses and with a raw board (without baro and GPS) by just using a servo tester to generate the PPm pulses.
To make sure I try to use an older version with the same code. You are right. the pulse might be a bit too short. I need a 50ms pulse for the ACL flash so using 5 as sequence value should make more sense.
Using older versions I needed to corrct the following error in openxsensor.ino
Code: Select all
#if (defined( SEQUENCE_MIN_VOLT_6) || defined ( SEQUENCE_MIN_CELL )
to
#if defined( SEQUENCE_MIN_VOLT_6) || defined ( SEQUENCE_MIN_CELL )
Best regards
Onki
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Hi Onki.
I use a sub folder and put all working config files with altered names there for having a base ...
That is oXs ver 7.0
br KH
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Hi all,
Thanks Kalle for this advise. I am using a separate subfolder for every sensor configuration and one master directory with the code.
I think it would be perfect (also for not that experienced users) to get the configurator tool back so different configs could be handled by the tool. But this is of course a lot of work which has to be done and resources are rare.
I have done some further testing on the latest code.
The error mentioned in my last post is still there. I hope my fix is correct so far.
It seems that enabling the Vario function will stop the sequencer to work.
The sensor I wish to use is for my FunCub XL using a BMP280 (for height only) and a GPS together with the sequencer to control the lights (sequencer outputs will trigger DIM-Input of my LED constant current drivers).
As soon as the vario is active ( anything else than #define FIRST_BARO_SENSOR_USE NO_BARO) the sequencer is no longer working.
GPS active or inactive has no impact on the sequencer with PPM control even if the GPS is not connected at all.
Best regards
Onki
Thanks Kalle for this advise. I am using a separate subfolder for every sensor configuration and one master directory with the code.
I think it would be perfect (also for not that experienced users) to get the configurator tool back so different configs could be handled by the tool. But this is of course a lot of work which has to be done and resources are rare.
I have done some further testing on the latest code.
The error mentioned in my last post is still there. I hope my fix is correct so far.
It seems that enabling the Vario function will stop the sequencer to work.
The sensor I wish to use is for my FunCub XL using a BMP280 (for height only) and a GPS together with the sequencer to control the lights (sequencer outputs will trigger DIM-Input of my LED constant current drivers).
As soon as the vario is active ( anything else than #define FIRST_BARO_SENSOR_USE NO_BARO) the sequencer is no longer working.
GPS active or inactive has no impact on the sequencer with PPM control even if the GPS is not connected at all.
Best regards
Onki
Last edited by onki on Wed Dec 27, 2017 2:11 pm, edited 1 time in total.
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Hi Onki.
Here you are in good hands (mstrens!)
br KH
Here you are in good hands (mstrens!)
br KH
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Good to know that sequencer still works when there is no baro sensor.
The baro uses ppm too (for sensitivity, to select between several baro, ...) but in theory when a sequencer is used, ppm should be used for ther sequencer.
I will try to debug the issue in the coming days.
The baro uses ppm too (for sensitivity, to select between several baro, ...) but in theory when a sequencer is used, ppm should be used for ther sequencer.
I will try to debug the issue in the coming days.
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Thanks a lot for your efforts.
Best regards
Onki
Best regards
Onki
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
@Onki,
Just 2 questions before I start debugging:
- did you let #define DEBUG as comment (so with // in front); I expect that if DEBUG mode is activated, then oXs will not handle sequencer correctly
- did you connect the BMP280 to arduino when you activated the baro in the config; If it is activaded when there is no baro connected, the oXs wait for a long time for signals from baro sensor and it can be that it does not work properly.
Just 2 questions before I start debugging:
- did you let #define DEBUG as comment (so with // in front); I expect that if DEBUG mode is activated, then oXs will not handle sequencer correctly
- did you connect the BMP280 to arduino when you activated the baro in the config; If it is activaded when there is no baro connected, the oXs wait for a long time for signals from baro sensor and it can be that it does not work properly.
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Hi,
With my setup it makes no difference if debug is enabled or not. The sequencer works in both configurations.
Only if I set the first baro to "BMP280" the sequencer is no longer working (with debug on or off). With "NO_BARO" it works well.
On all these tests I was using a board with BMP280 soldered on (GPS was disconnected but no difference with connected GPS). It was giving valid height and VSpeed values.
Hope this helps
Onki
With my setup it makes no difference if debug is enabled or not. The sequencer works in both configurations.
Only if I set the first baro to "BMP280" the sequencer is no longer working (with debug on or off). With "NO_BARO" it works well.
On all these tests I was using a board with BMP280 soldered on (GPS was disconnected but no difference with connected GPS). It was giving valid height and VSpeed values.
Hope this helps
Onki
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
It is strange.
I made some tests this morning with and without a MS5611 (and a GPS configured but not connected).
It worked in all cases.
I do not have a BMP280 to test with but I do not expect it could have an impact.
In order to further investigate, could you make some more tests with #define DEBUG active.
I propose to activate the line //#define DEBUGPPMVALUE (about line 150 in the .ino file).
The PC terminal (CTRL + SHIFT + M) should then display the PPM value decoded by oXs.
The values should match your setting on Tx side (e.g. about -100, 0, +100).
Can you test this with and without activating the BMP280.
-
I made some tests this morning with and without a MS5611 (and a GPS configured but not connected).
It worked in all cases.
I do not have a BMP280 to test with but I do not expect it could have an impact.
In order to further investigate, could you make some more tests with #define DEBUG active.
I propose to activate the line //#define DEBUGPPMVALUE (about line 150 in the .ino file).
The PC terminal (CTRL + SHIFT + M) should then display the PPM value decoded by oXs.
The values should match your setting on Tx side (e.g. about -100, 0, +100).
Can you test this with and without activating the BMP280.
-
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
Hi,
This is the debug output I get with BMP280 activated:
With NO_BARO I can see the current PPM output value but sequencer is very slow.
I will try to do the same on a MS5611.
Best regards
Onki
This is the debug output I get with BMP280 activated:
Code: Select all
⸮rio Sensor:BMP280 I2C Addr=76
openXsensor starting..
milli=0
freeRam=877
vario setting up..
Vario Sensor:BMP280
milli=1000
calibration data #1 = 28048 error= 0
calibration data #2 = 25912 error= 0
calibration data #3 = 50 error= 0
calibration data #4 = 36546 error= 0
calibration data #5 = 54946 error= 0
calibration data #6 = 3024 error= 0
calibration data #7 = 8190 error= 0
calibration data #8 = 65463 error= 0
calibration data #9 = 65529 error= 0
calibration data #10 = 15500 error= 0
calibration data #11 = 50936 error= 0
calibration data #12 = 6000 error= 0
setup vario done.
vario is up..
End of GPS setup
Jeti Output Module: TX Pin=4
milli=4125
Jeti Output Module: Setup!
Number of fields to send = 10
SeqRef=284
SeqMax=2
Sequence_m100=1 , 32 ,
End of general set up
Code: Select all
openXsensor starting..
milli=0
freeRam=1238
End of GPS setup
Jeti Output Module: TX Pin=4
milli=2104
Jeti Output Module: Setup!
Number of fields to send = 7
SeqRef=284
SeqMax=2
Sequence_m100=1 , 32 ,
End of general set up
2298429 ppm=-2
2298956 ppm=-2
2299482 ppm=-2
2300009 ppm=-2
2300524 ppm=-2
2302664 ppm=-2
2302728 ppm=-2
2302799 ppm=-2
2302856 ppm=-2
2302922 ppm=-2
2302991 ppm=-2
2303048 ppm=-2
2303112 ppm=-2
Best regards
Onki
Re: OpenXSensor Jeti, flow sensor and reset through button / PPM
So, this test shows that the ppm signal is not recognise when BMP280 is configured.
I still do not understand why.
I do not see why oXs reacts in a different way for the BMP280 compared to the MS5611.
I will look further.
I am interrested to know if it works on your side with MS5611.
I still do not understand why.
I do not see why oXs reacts in a different way for the BMP280 compared to the MS5611.
I will look further.
I am interrested to know if it works on your side with MS5611.