XR8 rx telemetary sensors

General Help and support for the Taranis Radio.
andrewju
Posts: 733
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 10:30 pm

Ok, thanks!!!

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

Re: XR8 rx telemetary sensors

Post by Kilrah » Wed Feb 01, 2017 9:49 pm

Scripts updated to use ID 0x17 which is the ground node as per FrSky doc (smart dashboard or radio), was also mentioned in discussions back in 2013.

User avatar
bob195558
Posts: 1911
Joined: Sun Dec 16, 2012 7:24 pm
Country: United States
Location: New England, Vermont
Contact:

Re: X8R "XR8" rx telemetry sensors

Post by bob195558 » Wed Feb 01, 2017 10:39 pm

Should the title be X8R receiver telemetry sensors, the "XR8" looks to be a miss-print ? :?:
Not a big deal, but could be a help for someone searching for X8R help.

Bob B.
ErSky9x on Taranis, Sky9x, 9Xtreme, Er9x on 9x with Smartieparts Programmer with TelemetrEZ Board
3D Printing: (http://openrcforums.com/forum/viewforum.php?f=85)

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

Re: XR8 rx telemetary sensors

Post by andrewju » Tue Feb 28, 2017 10:09 am

Mike,

I'm sorry to raise this thread again. I think I found a small bug and I need some help...

As I understand, if there's a voltage on Pin 2 (i.e. coming from a battery through a voltage divider), corresponding telemetry value is transmitted as Temp2. Also, when Pin 3 of the Attiny is short to GND, the telemetry value is transmitted as A1 instead of Temp2.

BUT: when Pin 3 of the Attiny is short to GND, the A1 telemetry value gets "overwritten" by the voltage sensor even if there's no voltage on Pin 2.

Is there a way to fix this?

I made a few of these sensor PCBs with dual inputs (both dividers are already in place). On these PCBs, the Pin3 is always connected to GND (I thought I would never need that jumper!). As soon as this sensor is connected to a receiver, A1 disappears (even if there's no battery connected to the sensor at all). This is not a big deal in general (the receiver voltage is still there as RxBatt or something similar), but it changes the default behavior and could cause some confusion...

I looked into the source code trying to fix it myself, but unfortunately my coding knowledge is far from the level required...

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

Re: XR8 rx telemetary sensors

Post by MikeB » Tue Feb 28, 2017 10:25 am

I'm not sure I understand the problem, other than it is working as designed!
In the Tx, we receive the SPort telemetry. From a 'X' receiver, we receive the receiver battery voltage as "RxBt", this is not A1.
For backward compatibility to 'D' receivers, the Tx makes this available as the A1 value. If you receive a real A1 value, then this is used for A1 instead of the receiver battery value.
So it is not the A1 value being overwritten, rather the A1 is no longer a copy of RxBt.

Possibly, the fix would be to change the firmware in the sensor to ignore the link input, and so send the voltage as TEMP2 all the time.

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


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

Re: XR8 rx telemetary sensors

Post by andrewju » Tue Feb 28, 2017 10:40 am

Hmmm.... Let me rephrase my question.

Earlier you said the second analog input only works when the value is 999 or lower:
MikeB wrote:
Tue Dec 03, 2013 11:15 pm
The implementation is to read the 'second' ADC input (the debug pin closest to analog connector) as a 10-bit value (0-1023). The pin is configured with an internal pullup. If the value is over 999, it is ignored. If the value is less than 1000, then the pin is changed to analog input and the read value is then sent, currently as the second temperature, having been converted to 8 bits in the same way as the original analog input.
As far as I understand, it means that if the value on Pin2 is >999, neither Temp2 nor A1 should be transmitted by the sensor.
Am I wrong?

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

Re: XR8 rx telemetary sensors

Post by MikeB » Tue Feb 28, 2017 3:50 pm

Yes, but if you have fitted a voltage divider, you have added a pull-down resistor. This will cause the value read to be under 999. The internal pull-up is something like 20K to 50K.

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

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

Re: XR8 rx telemetary sensors

Post by andrewju » Tue Feb 28, 2017 10:42 pm

Ahhhhh... Shame on me!
I really don't know why I decided it should work the other way around... :-(
You're absolutely right! It works exactly as it is supposed to!

Sorry for bothering you with this... And thanks a lot for taking the time to clarify (now obvious) things! :)

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

Re: XR8 rx telemetary sensors

Post by MikeB » Thu Sep 06, 2018 9:20 pm

I've made a change to the firmware for the X8R2Analog device so it doesn't "hog" the SPort bus.
This update now only sends 1 or 2 frames every 200mS instead of sending every time it is polled, which could have been a frame every 24mS.
The updated firmware (which is open source) is here: https://github.com/MikeBland/x8r-analog.

I tested using a .BAS script in ersky9x (very similar to the LUA script) and it worked OK with the X8R2Analog device attached to a S8R.

You do need an Atmel AVR/Tiny programmer to update the device. I used my AVRISP-II, but a USBASP should also work.

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

Post Reply

Return to “General help (FrSky Taranis radio)”