oXs with two simultaneous current sensors
Moderator: rainer
oXs with two simultaneous current sensors
I just built an oXs rpm and current temp thanks to kuroguy for providing inspiration on helifreak! And it is working really well. So now I want to make more oxs sensors for all my helis and planes.
Just wondering is it possible to have two simultaneous current sensors to the same Arduino and appear as two separate readings in my Taranis transmitter?
Is it possible to modify the sensor ID codes in the oxs code?
Sent from my iPhone using Tapatalk
Just wondering is it possible to have two simultaneous current sensors to the same Arduino and appear as two separate readings in my Taranis transmitter?
Is it possible to modify the sensor ID codes in the oxs code?
Sent from my iPhone using Tapatalk
Last edited by Trebb on Fri Aug 19, 2016 8:18 pm, edited 1 time in total.
Re: oXs with two simultaneous current sensors
Currently oXs support only one current sensor and one RPM on one arduino.
If you want several current sensors, the easiest is to build 2 oXs.
It is possible to assign different sensor ID code in oXs code (for SPORT protocol). In the latest (current) version, the sensor ID are defined in oXs_out_frsky.h in folowing lines :
#define DATA_ID_VARIO 0x00 // = sensor 0
#define DATA_ID_FLVSS 0xA1 // 1
#define DATA_ID_FAS 0x22 // 2
#define DATA_ID_GPS 0x83 // 3
#define DATA_ID_RPM 0xE4 // 4
#define DATA_ID_ACC 0x1B // ?
There is one Id per group of data being sent.
Current is sent using the ID defined in DATA_ID_FAS.
If you want several current sensors, the easiest is to build 2 oXs.
It is possible to assign different sensor ID code in oXs code (for SPORT protocol). In the latest (current) version, the sensor ID are defined in oXs_out_frsky.h in folowing lines :
#define DATA_ID_VARIO 0x00 // = sensor 0
#define DATA_ID_FLVSS 0xA1 // 1
#define DATA_ID_FAS 0x22 // 2
#define DATA_ID_GPS 0x83 // 3
#define DATA_ID_RPM 0xE4 // 4
#define DATA_ID_ACC 0x1B // ?
There is one Id per group of data being sent.
Current is sent using the ID defined in DATA_ID_FAS.
Re: oXs with two simultaneous current sensors
Ok, thanks! That's just the info I was after.
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
-
- Posts: 23
- Joined: Mon Apr 18, 2016 10:40 pm
- Country: -
Re: oXs with two simultaneous current sensors
Who is kalle123? I thought I was the inspirer.
By the way, current sensors output a voltage that is proportional to current measured. You can hook up 6 current sensors as voltage sensors. All you need to do is figure out the range and offset in opentx. Hint: the n2 minihub instructions have the range and offset for the 5, 20, and 30 amp sensors.
By the way, current sensors output a voltage that is proportional to current measured. You can hook up 6 current sensors as voltage sensors. All you need to do is figure out the range and offset in opentx. Hint: the n2 minihub instructions have the range and offset for the 5, 20, and 30 amp sensors.
oXs with two simultaneous current sensors
Thanks for the tip, yes that makes sense I'm sure you could duplicate the current reading code and point it to a different pin and change the Data ID, just wondering had anyone had already done it.
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
Last edited by Trebb on Sun Aug 21, 2016 5:21 pm, edited 1 time in total.
Re: oXs with two simultaneous current sensors
That is me. Any problem, wanna fightraleighcoter wrote:Who is kalle123?
-
- Posts: 23
- Joined: Mon Apr 18, 2016 10:40 pm
- Country: -
Re: oXs with two simultaneous current sensors
Glad i could help both of you. I enjoy spreading the hobby.
Re: oXs with two simultaneous current sensors
How did you help me? Must have forgotten ...raleighcoter wrote:Glad i could help both of you.
-
- Posts: 23
- Joined: Mon Apr 18, 2016 10:40 pm
- Country: -
Re: RE: Re: oXs with two simultaneous current sensors
viewtopic.php?t=8976kalle123 wrote:How did you help me? Must have forgotten ...raleighcoter wrote:Glad i could help both of you.
Re: oXs with two simultaneous current sensors
And I did not thank you for that useful information. My mistake
-
- Posts: 23
- Joined: Mon Apr 18, 2016 10:40 pm
- Country: -
Re: oXs with two simultaneous current sensors
My pleasure
Re: oXs with two simultaneous current sensors
Hi mstrens,mstrens wrote:Currently oXs support only one current sensor and one RPM on one arduino.
If you want several current sensors, the easiest is to build 2 oXs.
It is possible to assign different sensor ID code in oXs code (for SPORT protocol). In the latest (current) version, the sensor ID are defined in oXs_out_frsky.h in folowing lines :
#define DATA_ID_VARIO 0x00 // = sensor 0
#define DATA_ID_FLVSS 0xA1 // 1
#define DATA_ID_FAS 0x22 // 2
#define DATA_ID_GPS 0x83 // 3
#define DATA_ID_RPM 0xE4 // 4
#define DATA_ID_ACC 0x1B // ?
There is one Id per group of data being sent.
Current is sent using the ID defined in DATA_ID_FAS.
I've now tried this with a second arduino but I couldn't get my taranis to read two clear separate values for the current.
How do I "assign a different sensor ID"?
I tried changing 0x22 to 0x23 but then the current couldn't even be discovered... I'm not familiar with how these hex values work...
Thanks!
Sent from my iPhone using Tapatalk
Re: oXs with two simultaneous current sensors
there are only 28 valid values for a device ID.
Here are the valid values:
0x00, 0xA1, 0x22, 0x83, 0xE4, 0x45,
0xC6, 0x67, 0x48, 0xE9, 0x6A, 0xCB,
0xAC, 0x0D, 0x8E, 0x2F, 0xD0, 0x71,
0xF2, 0x53, 0x34, 0x95, 0x16, 0xB7,
0x98, 0x39, 0xBA, 0x1B
0x23 is not a valid ID and can't be used.
You can try replacing 0x22 by e.g. 0x45
Here are the valid values:
0x00, 0xA1, 0x22, 0x83, 0xE4, 0x45,
0xC6, 0x67, 0x48, 0xE9, 0x6A, 0xCB,
0xAC, 0x0D, 0x8E, 0x2F, 0xD0, 0x71,
0xF2, 0x53, 0x34, 0x95, 0x16, 0xB7,
0x98, 0x39, 0xBA, 0x1B
0x23 is not a valid ID and can't be used.
You can try replacing 0x22 by e.g. 0x45