XR8 rx telemetary sensors

General Help and support for the Taranis Radio.
Stefan
Posts: 2
Joined: Sun Apr 06, 2014 11:39 pm
Country: -

Re: XR8 rx telemetary sensors

Post by Stefan » Sun Apr 06, 2014 11:52 pm

Hi everybody,

I am waiting for my Taranis TX/RX combo to arrive this week. Very interesting topic... curious... what else can be communicated via the Sport. Will one be able to send GPS data?

Thanks
Stefan


Stefan
Posts: 2
Joined: Sun Apr 06, 2014 11:39 pm
Country: -

Re: XR8 rx telemetary sensors

Post by Stefan » Mon Apr 07, 2014 12:01 am

MikeR wrote:I would appreciate any help/advice making an A2 Smart Port interface work for the X8R receiver. I have written code in assembler for a PIC. I can send data and pretend to be a vario ( I bought one to see how the Smart Port works) and show alt/V spd on the tx. However when I use the IDs for A2 nothing happens (correct data increases the frequency of the request for that data). I can see my string on the bus but the rx does not appear to respond to it (1B only requested in the sequence of all the other IDs). I send the string around 400us after seeing the 0x7E, 0x1B (as is the case for the vario after 0x83). An example string is: 0x10, 0x03, 0xF1, 0xA0, 0x00, 0x00, 0x00, 0x5B. A0 being a test value and 5B the checksum (so all adds to FF).

I have set up the A2 range in the tx and tried rebinding to the rx. Any other suggestions? Is the timing of sending the string important ( I did try sending immediately after the 0x1B)?

Do I have to do anything to tell the rx to look for A2?

Thank you

Mike
Hi Mike R... care to share the code?

Stefan

akkuschrauber
Posts: 57
Joined: Wed Sep 12, 2012 5:06 pm
Country: -
Location: Dortmund
Contact:

Re: XR8 rx telemetary sensors

Post by akkuschrauber » Sat Apr 19, 2014 2:27 pm

Hello

Is it possible to get the actual schematics to build this Sensor?

I build Mike's first version on breadboard and tested it, but with no A2 reading on my Taranis.
Then I've read that I need to update my X8R and my Taranis to use the X8R-2analog Sensor, but without FrSky USB (FUC-3) at hand I build that with some components I got here first and updated both, my Taranis and my X8R.
Now the Sensor sends the values for my 3S LiPo as A2, but the voltage showed on the Taranis "jumps" quickly between 12.4V (real voltage) and 11.x volts (sometimes 10.x volts).
My setup to test are only:
X8R with ESC and NO other things connected, a voltmeter to test real values and to "calibrate" the offset.
I also get much higher voltage readings than "normal" if I use the "high res" jumper ...
Tested with and without common ground and also with 1k resistor between Sensor ground and LiPo ground ...
So the voltage jumps must resulting in doing something wrong when building my Sensor, but reading and reading again this thread and Alan's RCG thread I get no clue about what I've done wrong,
so please help me ...
Ironie: read [Wikipedia.de] http://de.wikipedia.org/wiki/Sarkasmus

User avatar
MikeB
9x Developer
Posts: 16578
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: XR8 rx telemetary sensors

Post by MikeB » Sat Apr 19, 2014 3:59 pm

Not sure why it is jumping.
When using in 'normal' mode, you need to set the voltage range on the Taranis to 18.3V. In high res. mode, set it to 13.3V.
The original 'D' series receivers used an 8-bit A2D. On here we have a 10-bit A2D, so in high res. mode I use the extra resolution to allow better accuracy at lower voltages..

Which version of the code are you using?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

akkuschrauber
Posts: 57
Joined: Wed Sep 12, 2012 5:06 pm
Country: -
Location: Dortmund
Contact:

Re: XR8 rx telemetary sensors

Post by akkuschrauber » Sat Apr 19, 2014 4:24 pm

Thanks for quick reply :D

I only got an 3S to test so I set the voltage range in my Taranis to 13.3V with no chance to set the offset, because of the fast jumping.
If I set the jumper, I get the same readings as the settings for range, no real values ... strange ...
With range settings to 18.3V and no jumper I get a slow jumping readings from 15.xV to 18.xV
I tried the actual code from Alan's RCG thread ...
Ironie: read [Wikipedia.de] http://de.wikipedia.org/wiki/Sarkasmus


User avatar
MikeB
9x Developer
Posts: 16578
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: XR8 rx telemetary sensors

Post by MikeB » Sat Apr 19, 2014 4:30 pm

The code is open source here: http://code.google.com/p/x8r-analog/.
If you go to this page: http://code.google.com/p/x8r-analog/sou ... /Sport.hex, right click on "View Raw File" and select "save link target as", you will have the latest version for certain.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

akkuschrauber
Posts: 57
Joined: Wed Sep 12, 2012 5:06 pm
Country: -
Location: Dortmund
Contact:

Re: XR8 rx telemetary sensors

Post by akkuschrauber » Sat Apr 19, 2014 4:51 pm

Ok, I tried with r9 of your code (actual) from google, but also with no success ...
I programmed it with avrdude:

Code: Select all

avrdude -p t13 -c usbtiny -U flash:w:Sport.hex -U hfuse:w:0xFD:m -U lfuse:w:0x1A:m
Am I right with the fuses ? My actual Tiny13 has an "V" ...
Tried also another Tiny13 with "A" as extension, but that never worked (with 3.3V / 5.0V tested) ...

In your schematics, there are no resistors for voltage divider, so I used the informations within this whole thread and used the following:

Ain - 10k - ADC1
ADC1 - 3k3 - GND
ADC1 - 100n - GND
GND in - GND
Ironie: read [Wikipedia.de] http://de.wikipedia.org/wiki/Sarkasmus

User avatar
MikeB
9x Developer
Posts: 16578
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: XR8 rx telemetary sensors

Post by MikeB » Sat Apr 19, 2014 4:58 pm

OK, that explains 1 confusion. the Ain on the production boards is 15K.

What revision of firmware are you using on the Taranis?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

akkuschrauber
Posts: 57
Joined: Wed Sep 12, 2012 5:06 pm
Country: -
Location: Dortmund
Contact:

Re: XR8 rx telemetary sensors

Post by akkuschrauber » Sat Apr 19, 2014 5:20 pm

On Taranis: opentx-taranis-en-r2940.bin
On Taranis internal XJT: XJT_131105.frk
On X8R: X8R_131105.frk

So all actual I think ...

On more confusing, I added an 100n cap to Tiny13 pin4 - pin8, I thought I would not need it for testing so I left it ... and now the readings on telemetry screen makes only small jumpings within 11.1V - 12.2V ...
If you got a little I try adding an 4k7 resistor on Ain to get the (near) 15k value ...
Ironie: read [Wikipedia.de] http://de.wikipedia.org/wiki/Sarkasmus

akkuschrauber
Posts: 57
Joined: Wed Sep 12, 2012 5:06 pm
Country: -
Location: Dortmund
Contact:

Re: XR8 rx telemetary sensors

Post by akkuschrauber » Sat Apr 19, 2014 5:36 pm

Got added the 4k7 resistor ...

Range set to 13.3V
readings with low res mode - 8.50V - 8.60V - quickly jumping, real voltage: 11.60V
readings with high res mode - 11.62V - 11.97V - same as above

Range set to 18.3V
readings (low res) are - 11.63V - 11.98V - same jumping - real voltage: 11.60V
Ironie: read [Wikipedia.de] http://de.wikipedia.org/wiki/Sarkasmus

akkuschrauber
Posts: 57
Joined: Wed Sep 12, 2012 5:06 pm
Country: -
Location: Dortmund
Contact:

Re: XR8 rx telemetary sensors

Post by akkuschrauber » Sat Apr 19, 2014 6:12 pm

Is it sooo simple ?

Now I added an extra 2.2µF / 50V capacitor (need to resurect some better value ...), and all problems seems to be fixed ... wtf (I learned that back in the 80ties ...)
Now I got on the supply for the Tiny13 one 100n capacitor AND one 2.2µF / 50V capacitor in parallel ... no jumping at all, but measurements quite fast and accourate (need 0.20V offset) ...
That drives me crazy ... 3 days thinking, reading re-reading and now it works ...
I learned such basics back in the 80ties, but lost it with the use of "better" microtechnics from today ... sometimes old stuff works better ...

THANK YOU sooo much Mike for helping out here ...

Claus
Ironie: read [Wikipedia.de] http://de.wikipedia.org/wiki/Sarkasmus

User avatar
MikeB
9x Developer
Posts: 16578
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: XR8 rx telemetary sensors

Post by MikeB » Sat Apr 19, 2014 6:25 pm

No problem. We only have, effectively, an 8-bit A2D.
This means on normal resolution (18.3V) we have a resolution of 0.07V.
On high resolution we have 0.052V.

With this latest firmware, you can have a second analog input, by default it comes through as Temperature2.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

akkuschrauber
Posts: 57
Joined: Wed Sep 12, 2012 5:06 pm
Country: -
Location: Dortmund
Contact:

Re: XR8 rx telemetary sensors

Post by akkuschrauber » Sat Apr 19, 2014 6:27 pm

Tested now an Tiny13A with your code and the code Alan provides for updates ...
My Tiny13A seems to be defective ...
The Tiny13V works perfectly now ...

One question do I have now:

If I want to be shure for all setups that might arrive here (setup with external BEC, / with BEC fron ESC ...),
do I need to seperate the Tiny13 / S.Port GND from the measurement input ?
I've read such comments some posts before ...
Or do I use an extra resistor (47 ohms) within the measurement GND to "internal" GND ?
Ironie: read [Wikipedia.de] http://de.wikipedia.org/wiki/Sarkasmus

User avatar
MikeB
9x Developer
Posts: 16578
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: XR8 rx telemetary sensors

Post by MikeB » Sat Apr 19, 2014 6:31 pm

I use this circuit: viewtopic.php?f=96&t=4373&start=120#p63590.

That has now been incorporated into the production units.

Double check your fuse settings in the 13A. Make sure the clock /8 is not set.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

akkuschrauber
Posts: 57
Joined: Wed Sep 12, 2012 5:06 pm
Country: -
Location: Dortmund
Contact:

Re: XR8 rx telemetary sensors

Post by akkuschrauber » Sat Apr 19, 2014 6:34 pm

MikeB wrote:No problem. We only have, effectively, an 8-bit A2D.
This means on normal resolution (18.3V) we have a resolution of 0.07V.
On high resolution we have 0.052V.
I then set the Taranis range to 18.3V and set the alarms to a little higher value
MikeB wrote: With this latest firmware, you can have a second analog input, by default it comes through as Temperature2.

Mike.
What pin do I use for that second input and do I use the same voltage divider for that ?
With that I can measure some other things (converted to voltage before) ?

Are the fuses not the same for A tinys?
Ironie: read [Wikipedia.de] http://de.wikipedia.org/wiki/Sarkasmus

akkuschrauber
Posts: 57
Joined: Wed Sep 12, 2012 5:06 pm
Country: -
Location: Dortmund
Contact:

Re: XR8 rx telemetary sensors

Post by akkuschrauber » Sat Apr 19, 2014 6:38 pm

MikeB wrote:I use this circuit: viewtopic.php?f=96&t=4373&start=120#p63590.

That has now been incorporated into the production units.

Double check your fuse settings in the 13A. Make sure the clock /8 is not set.

Mike.
Ok I use that but with 15k resistor right ?
Do I need such high capacitor in parallel to Ain ?
Alan's upgrade docu sugests some "extra" 47 ohms resistor within measurement GND, I can leave it as I use an 1k resistor right ?
Ironie: read [Wikipedia.de] http://de.wikipedia.org/wiki/Sarkasmus

User avatar
MikeB
9x Developer
Posts: 16578
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: XR8 rx telemetary sensors

Post by MikeB » Sat Apr 19, 2014 6:53 pm

Pin 2 of the processor.
As it comes through as T2, T2 has a value from 0 to 255 for an input voltage of 0 to 3.3V. You may wish to choose a divisor that makes the resulting value meaningful.
On ersky9x (available for Taranis as well as the SKY board), I've added some SCALERS that take any telemetry value and scale it, with an offset if required, so you can make T2 anything you want. You can also name the result, and assign a unit for display and voice announcement.

Yes, the AtTinys have the same fuse settings.

Yes use 15K, unless you only need to measure up to 13.3V, then you could use a 10K, you just need to set the A2 range value to match your resistors.
The capacitor could probably be 0.1uF, the larger the value, the more stable the voltage reading is.
I thing the 47 ohms was for the early units that didn't have the 1K resistor on them.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

akkuschrauber
Posts: 57
Joined: Wed Sep 12, 2012 5:06 pm
Country: -
Location: Dortmund
Contact:

Re: XR8 rx telemetary sensors

Post by akkuschrauber » Sat Apr 19, 2014 7:15 pm

MikeB wrote:Pin 2 of the processor.
As it comes through as T2, T2 has a value from 0 to 255 for an input voltage of 0 to 3.3V. You may wish to choose a divisor that makes the resulting value meaningful.
That I've read before but thought this was'nt there with the new code ... I'll test that if I get a clou of what I whant to measure :D
MikeB wrote: On ersky9x (available for Taranis as well as the SKY board), I've added some SCALERS that take any telemetry value and scale it, with an offset if required, so you can make T2 anything you want. You can also name the result, and assign a unit for display and voice announcement.
Hmmm ... I think I test that also ... (but later ...)
Flashing works like on th9x with eePe right ?
But for now I test openTx ... have used er9x on my th9x, so something to learn for me ... :D
MikeB wrote: Yes, the AtTinys have the same fuse settings.
THEN my Tiny13A sucker is dead, I tried some other code on it without the need to A2D ...
Maybe I use it for an simple geocache later ...
MikeB wrote: Yes use 15K, unless you only need to measure up to 13.3V, then you could use a 10K, you just need to set the A2 range value to match your resistors.
Til now I used only 1S - 3S on my models so 10k will stay as resistor ... I can change it if I need it later
MikeB wrote: The capacitor could probably be 0.1uF, the larger the value, the more stable the voltage reading is.
I thing the 47 ohms was for the early units that didn't have the 1K resistor on them.

Mike.
Ah ok, so all I have to do now is wrap it with shrinking tube and remove the 4k7 resistor on Ain :D
Now my little Quad can fly as long as the LiPo gives power and no timer / measure stop is needed :D

Thank you so much for your work and your help, hope for the future you got some more "simple" adds in mind to use all the features we got possible with our Taranis :D

have a nice evening,
Claus
Ironie: read [Wikipedia.de] http://de.wikipedia.org/wiki/Sarkasmus

User avatar
MikeB
9x Developer
Posts: 16578
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: XR8 rx telemetary sensors

Post by MikeB » Fri May 02, 2014 5:33 pm

Just thought I'd provide some more detail on using the second analog input.
See here: viewtopic.php?f=96&t=4373&hilit=x8r2ana ... 210#p69331 for the connections.

The second analog input has an input range of 0 to 3.3V. By default, it is configured with an internal pull up resistor, so reads a maximum value. Internally it is a 10-bit A2D convertor, so it reads 1023. As long as it continues to read over 999, then it is ignored, and nothing will be sent over the SPort for it.
If the value is read as less than1000 then it is assumed to be a real analog input. The internal pull up resistor is turned off, and the read value, divided by 4 to give 0-255, is returned over the SPort.

If the pin labelled "Ground for 2nd ID option" is left unconnected, then this second input is returned with an ID of T2 (temperature 2). If this pin is connected to ground, then this second input is returned with an ID of A1.

On the Taranis with openTx, using A1 may conflict with the value the receiver returns for the receiver voltage, as the receiver voltage is mapped to A1, although it isn't sent with the ID for A1.

If you use this product with er9x/ersky9x (including ersky9x for Taranis), then the receiver voltage is mapped to A1 unless a real value for A1 is received. The receiver voltage is always available as the telemetry value "RxV", and has an entry on the TELEMETRY menu to set the range to get a correct reading.
Also available on er9x/ersky9x are Scalers. These can take any telemetry value (e.g. T2 from this unit) and convert it with an offset, multiplier and divider to be any other value. You may also assign a unit, for voice and display output, and a custom 4-character name.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

irun4fundotca
Posts: 7
Joined: Wed May 08, 2013 1:27 am
Country: -

Re: XR8 rx telemetary sensors

Post by irun4fundotca » Fri May 02, 2014 6:48 pm

so do you mean value "rxv" on the telemetry screen as in "Rx" or "RxBat" i'm not sure how this gets setup to display what I need displayed

User avatar
MikeB
9x Developer
Posts: 16578
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: XR8 rx telemetary sensors

Post by MikeB » Fri May 02, 2014 9:17 pm

This is using ersky9x, the receiver voltage has an entry as RxV, if using openTx I think you can only use A1.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

Lev
Posts: 1
Joined: Wed Aug 12, 2015 7:31 pm
Country: -

Re: XR8 rx telemetary sensors

Post by Lev » Wed Aug 12, 2015 7:42 pm

Hi Mike!

With the release of OpenTX 2.1 has the A1 been renamed to RxBt or the A1 is now empty so we can use it for our second voltage data?

User avatar
Kilrah
Posts: 10223
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: XR8 rx telemetary sensors

Post by Kilrah » Sun Aug 30, 2015 12:28 pm

A1 and RxBt are 2 separate items.

andrewju
Posts: 773
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: XR8 rx telemetary sensors

Post by andrewju » Tue Jan 31, 2017 1:07 pm

I understand this sensor is using an Sport ID 0x1B, which nowadays conflicts with the S6R Configuration script on Taranis. Is there any suggestion on which other ID can be used to avoid possible conflicts? I couldn't find an up-to-date list of IDs in use...

User avatar
MikeB
9x Developer
Posts: 16578
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: XR8 rx telemetary sensors

Post by MikeB » Tue Jan 31, 2017 1:42 pm

The ID value of 0x16 has been used in the S6R configuration script to allow working with the X8R2analog sensor.
If you have the facility to program the X8R2analog device, the ID it uses is stored in the first byte of EEPROM on the ATTINY13.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

andrewju
Posts: 773
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: XR8 rx telemetary sensors

Post by andrewju » Tue Jan 31, 2017 3:09 pm

Ah, I didn't know OpenTX's S6R scripts got updated with a new ID!

Ok, I'll try with the stock code then.

Thanks!!!

andrewju
Posts: 773
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: XR8 rx telemetary sensors

Post by andrewju » Tue Jan 31, 2017 3:15 pm

Oh! Two more questions, if I may...

1. Does the "high-resolution mode" work for both inputs?

2. Which ATtiny pin needs to be grounded to change the ID of the second input to A1?

User avatar
MikeB
9x Developer
Posts: 16578
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: XR8 rx telemetary sensors

Post by MikeB » Tue Jan 31, 2017 3:35 pm

I meant the script has changed by a user to use ID 0x16, not the script is supplied changed!

High resolution should be correct for both inputs.

The firmware is open source here: https://github.com/MikeBland/x8r-analog.

Check this thread from post #109: https://www.rcgroups.com/forums/showthr ... st36540019.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

andrewju
Posts: 773
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: XR8 rx telemetary sensors

Post by andrewju » Tue Jan 31, 2017 9:34 pm

Ah, yes, I remember that conversation on RCGroups about the conflicting Sport ID, resulting in the ID update in the LUA script itself. In my opinion, it's better to permanently change the ID in the LUA (if such a change is acceptable for OpenTX team). But I'm not an OpenTX guy, so maybe I'm missing something...

My question was more like "what ID is it better to use in order to make this voltage sensor compatible with S6R-related LUAs, without needing to change the scripts?"

The reason is that I built this voltage sensor myself (I wanted to have two battery inputs with proper resistors already on-board). It works with ersky9x (and your original sensor firmware) just great!!! Still, a perfectionist inside me pushes me to make it equally compatible with relevant OpenTX radios... Hence, I thought I would flash it with another ID that's not currently in use.

User avatar
MikeB
9x Developer
Posts: 16578
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: XR8 rx telemetary sensors

Post by MikeB » Tue Jan 31, 2017 10:13 pm

At this point ID from 0x0B to 0x16 are not defined.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!


Post Reply

Return to “General help (FrSky Taranis radio)”