Introducing: TelemetrEZ

All mods related to the frsky telemetry series of the firmware
User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: Introducing: TelemetrEZ

Post by gohsthb »

Update the latest stable version without adding the bt. And see if the page flipping goes away. The only way I could see the tez flipping pages would be if it thinks there is a rotary encoder. Make sure none of the contacts on the tez are touching and shorting.

Sent from my LG-D801 using Tapatalk

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

Re: Introducing: TelemetrEZ

Post by MikeB »

If the telemetry data is not 'proper' FrSky hub protocol it might be possible for it to be recognised as the 'private' data for the switches/encoder.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
FHoevi
Posts: 11
Joined: Mon Mar 17, 2014 8:53 pm
Country: -

Re: Introducing: TelemetrEZ

Post by FHoevi »

OK, one problem seems to be done (the second) the other still persists (the first). In the meantime I flashed TEZ with v86, as you suggested, and I flashed r810 of er9x-frsky-de.hex to the Tx as well. The erratic and error-prone page flipping seems to be done. It was definitely not linked to stick movements since it started without even touching the Tx, just by powering on the quadcopter.

But the lacking BT transmission of data is still present. Just to outline how my setup looks like:
1. Within the MW code the protocol gets filled according to the three differently timed data frames.
2. The frames are sent according to their respective frequencies over one of the four serial ports of an Arduino Mega 2560.
3. This signal passes a logic inverter and feeds into the Rx pin of the leftmost socket on the side of an D8R-II plus. GND is connected as well.
4. My Turnigy TX9 has a Smartieparts Board inside as well as a TelemetrEZ hooked on.
5. Floating data gets displayed properly after flipping to the FrSky telemetry page.

There's no rotary encoder or other fancy stuff, just the BT mod (connect pins 1 and 18 of the attiny with a 1k resistor, apply a 3V3 regulator, connected to +0V and +5V, bridge GND and the Rx line of the BT module with a 22k resistor, and finally connect F of the IO expansion port of TelemetrEZ via a 10k resistor with the BT module's Rx pin.

Any further hints?
User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: Introducing: TelemetrEZ

Post by gohsthb »

I was only asking about a rotary encoder because the Tez will auto detect if one is connected and start sending the frames for it to the 9x. All that the BT mod does is act as a gate. When a switch packet is sent to the 9x the gate gets closed and so those packets don't go to the BT module. The Frsky packets sent to the 9x are the same as get sent to the BT module. What are you using to view the Frsky data through the BT module? Maybe you can connect to it with a terminal program to see if any data gets through at all. Did you check that the baud rate is correct in the BT module? It needs to be set to 9600.
-Gohst
FHoevi
Posts: 11
Joined: Mon Mar 17, 2014 8:53 pm
Country: -

Re: Introducing: TelemetrEZ

Post by FHoevi »

Yep, before putting anything together I made sure that the module is sending at 9600 baud. My PC could connect to the module as well, the corresponding COM port is available but a PuTTY screen set up accordingly stays blank. On my smart phone I use MultiWii EZ-GUI app which could connect to two BT modules, one in the copter (two-way, to be able to update some parameters like PID values, just before departure, running at 115200 baud) and the other one connected to the TEZ (one-way, running at 9600 baud). I also tried with FrSky Dashboard app, no positive result either. The BT stuff within the copter (linked to another serial port) is working well.

FHoevi
Posts: 11
Joined: Mon Mar 17, 2014 8:53 pm
Country: -

Re: Introducing: TelemetrEZ

Post by FHoevi »

Just to add: With my multimeter I do see a varying voltage level between Rx and GND pins of the BT module (between 2.0 and 2.5 volts), unfortunately I do not have an oscilloscope available. The BT module itself works, I tested with another Arduino and my PC and was able to send over messages with 9600 baud.
User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: Introducing: TelemetrEZ

Post by gohsthb »

Maybe take a couple of pictures of the setup. From your description I don't see why it isn't working. Here are a couple of pictures of mine. The 10k resistor is covered by the yellow shrink wrap. (I know it looks like pin 18 and 19 are connected together, but that is just the angle of the picture. They have plenty of clearance)
-Gohst

P.S. what BT module do you have?
Attachments
20140318_173015.jpg
20140318_173126.jpg
FHoevi
Posts: 11
Joined: Mon Mar 17, 2014 8:53 pm
Country: -

Re: Introducing: TelemetrEZ

Post by FHoevi »

I will have to post pictures of my actual setup later today but my BT module is an HC-05 looking like this, pin layout (from the top in the picture below) VCC (3V3), GND, Tx, Rx, other, other.

Image

I'm pretty sure that the setup is ok and using 22k instead of 20k shouldn't be too important.

Yesterday I tested again this module being hooked to an Arduino, where the serial port was running at 9600 baud, forwarding anything to another serial port to be displayed on the PC screen, and being paired with my smart phone on which Sena BTerm was running. Ping-ponging simple text messages was not a problem at all.

I'll BRB later...
FHoevi
Posts: 11
Joined: Mon Mar 17, 2014 8:53 pm
Country: -

Re: Introducing: TelemetrEZ

Post by FHoevi »

Here are two pictures:

Image

Image

As you could see, the red cable is connected to GND and the black one to 5V. Yellow is the data signal. The three pin something is the 3V3 regulator with 5V at the leftmost pin in the picture, 3V3 in the middle, and GND at the rightmost one.

I'd be glad to receive any hints...
FHoevi
Posts: 11
Joined: Mon Mar 17, 2014 8:53 pm
Country: -

Re: Introducing: TelemetrEZ

Post by FHoevi »

Could it be something like a master/slave issue? There are some parameters which could be changed (and presumably have to be set properly) for an HC-05. Is anybody out there who already has some experience with this kind of module used in this setup?

Or perhaps the signal level at the Rx pin is too low due to the 10k resistor between TEZ's F and Rx? As far as I can see for a proper pairing with the module one only needs a proper voltage (3V3) which I have. I do not really know the specs of the BT pins and also not the specs of the TEZ's IO expansion port. Maybe s_mack could help here?

Cheers
User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: Introducing: TelemetrEZ

Post by gohsthb »

The 10k and 20k resistors form a voltage divider to bring the 5V level from the Tez down to 3V that the BT module uses. 5*(22k/(10k+1k+22k)) = 3.33V
I'm not familiar with all of the settings of the HC-05, I used an RN42. The radio is a device, so I think it should be a slave? You are able to pair with the module, you just get no data, correct?
When you connect the HC-05 with an arduino do you use any resistor divider? It looks like there might be a diode on the Rx input line that would further drop the voltage. Perhaps your module has 5V tolerant inputs?
-Gohst

Edit: The more I look at your module, I think it may even have an onboard regulator. All of the datasheets show only the surface mount <card>, while yours has pins for plugging in to a breadboard. You might have to find the data sheet that goes with your specific module. You might not even need the 3.3V regulator or resistor dividers, that might already be built in to yours.
s_mack
Posts: 882
Joined: Thu Dec 29, 2011 6:11 am
Country: -

Re: Introducing: TelemetrEZ

Post by s_mack »

FHoevi wrote:Maybe s_mack could help here?
No, you've got the right guy helping you. All this BT stuff is Greek to me.
FHoevi
Posts: 11
Joined: Mon Mar 17, 2014 8:53 pm
Country: -

Re: Introducing: TelemetrEZ

Post by FHoevi »

OK, I took my magnifying glass and had a look at the chicken feed parts. Indeed, the bigger black thing on the left edge is a 3V3 regulator of type 6206A. This could mean that I do not have to pull the level down since that seems to be done by those parts.
FHoevi
Posts: 11
Joined: Mon Mar 17, 2014 8:53 pm
Country: -

Re: Introducing: TelemetrEZ

Post by FHoevi »

Problem solved, connection established without any further elements, data transfer works well. Thanks to you all for your kind and immediate support.
User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: Introducing: TelemetrEZ

Post by gohsthb »

Glad we got it working!

Sent from my LG-D801 using Tapatalk
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Introducing: TelemetrEZ

Post by MikeB »

Test version of TEZ code with er9x-128.hex.
telemetrEZ_XJT_test.zip
19-Apr-2014 17:21
(78.87 KiB) Downloaded 229 times
diff1.txt
Source code changes 19-Apr-2014 17:21
(8 KiB) Downloaded 318 times
The er9x code has a small change to the baudrate for 57600 to match the TEZ.
The TEZ should adjust its clock speed based on the 9mS from PXX frame to frame timing.
The er9x code also sends a response (of 0x1B, 0x00, 0x1B) when it is receiving the switch frames, currently r86 TEZ should accept and ignore this. This test code also accepts and ignores the response. It is planned to use this for the TEZ to detect if it is at the wrong baudrate when it doesn't have a module present for it to find out.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
LTMNO
Posts: 1049
Joined: Fri Nov 30, 2012 9:31 pm
Country: Canada
Location: Toronto, Canada

Re: Introducing: TelemetrEZ

Post by LTMNO »

Hello Mike, just updated the TelemetrEZ and updated the ER9x-128 firmware as well.
Reloaded the EEPROM as it was wiped and not restored.
I figured that i would have to wait for 15sec or so for the AIL/THR to disappear... as sometimes that happens.

Not the case, they are still there. Switches are Disabled.

Thoughts?
Custom 9x with M64/Telemetry Mod
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Introducing: TelemetrEZ

Post by MikeB »

Settings? Do you have the XJT module installed? Is the protocol set to PXX?
If the protocol is not PXX, er9x will be using 9600, but with no module or a XJT, the TEZ will be using 57600.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
LTMNO
Posts: 1049
Joined: Fri Nov 30, 2012 9:31 pm
Country: Canada
Location: Toronto, Canada

Re: Introducing: TelemetrEZ

Post by LTMNO »

You know I just thought to check the settings. And I read this. :-).
Had to run the kids to swimming lessons. The nerve of family getting in the way of my hobbies, just like work. Will report back within the hour. Again thx. I am sure it's user error on my part. Also I rewired the Rx to straight thru for CH1-8 instead of cppm.


Sent from my iPhone using Tapatalk
Custom 9x with M64/Telemetry Mod
User avatar
LTMNO
Posts: 1049
Joined: Fri Nov 30, 2012 9:31 pm
Country: Canada
Location: Toronto, Canada

Re: Introducing: TelemetrEZ

Post by LTMNO »

Happy to report back that it is working.
After setting to PXX D8 and restarting.
15 seconds later the AIL/THR went away.
Fantastic Mike!
Thanks for saving my setup. Will try to setup the Telemetry to get some values shortly.

Edit: and the rotary encoder works again ;-)
Custom 9x with M64/Telemetry Mod
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Introducing: TelemetrEZ

Post by MikeB »

But took 15 secs for the switches to start working?
I did have mine work from the start.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
LTMNO
Posts: 1049
Joined: Fri Nov 30, 2012 9:31 pm
Country: Canada
Location: Toronto, Canada

Re: Introducing: TelemetrEZ

Post by LTMNO »

It did, but now it just works on radio turning on and off... don't get the AIL/THR switch error.
Perhaps it had to take? ;-)
Custom 9x with M64/Telemetry Mod
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Introducing: TelemetrEZ

Post by MikeB »

I'll see about adding processing of the acknowledgement.
Carry on with what you really need, but if at some point, and you have a DJT modified for telemetry, it would be useful if you could test the DJT, with the protocol set to PPM. I did test this, but another user doing a test would be good.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
s_mack
Posts: 882
Joined: Thu Dec 29, 2011 6:11 am
Country: -

Re: Introducing: TelemetrEZ

Post by s_mack »

Just an FYI: the bootup after flashing quite often, if not always, results in the 15 second wait... i think just the order that things are powered up in that case.
User avatar
LTMNO
Posts: 1049
Joined: Fri Nov 30, 2012 9:31 pm
Country: Canada
Location: Toronto, Canada

Re: Introducing: TelemetrEZ

Post by LTMNO »

That could explain it...
Custom 9x with M64/Telemetry Mod
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Introducing: TelemetrEZ

Post by MikeB »

I now have er9x sending a Acknowledge back.

I have the TEZ looking for this, but carefully and only at startup.

Look for a DJT/DHT module, if found, use 9600 else use 57600.
If the TEZ has seen an ACK at the current baud rate, then ignore ACKs and don't change the baudrate.
If one second has passed with no ACK, change to the 'other' baudrate.
If another second passes, still with no ACK, change back to the original baud rate.
Make no further changes.

If you use an 'old' version of er9x, without ACKs, you end with the baudrate depending just on the module detection (as in the test version posted).

Old er9x (no Acks):
Power on with DJT and PPM - OK 9600
Power on with DJT and PXX - Fail - TEZ 9600, er9x 57600
Power on with XJT(or no module) and PPM - Fail - TEZ 57600, er9x 9600
Power on with XJT(or no module) and PXX - OK 57600

Changing the protocol usually recovers operation if it wasn't working, but loses operation if it was.

New er9x (with Acks):
Power on with DJT and PPM - OK 9600
Power on with DJT and PXX - Fail for 1 second, then TEZ tries 57600, sees ACK - OK 57600
Power on with XJT(or no module) and PPM - Fail for 1 second, then TEZ tries 9600, sees ACK - OK 9600
Power on with XJT(or no module) and PXX - OK 57600

Changing the protocol loses operation, but recovers it if you change back.

This covers most situations.

I tried continuous monitoring for ACKs, but every so often it flipped the baudrate. I'm not sure it is needed. If you want to change modules, you should power off. If you are using a DJT, you shouldn't use PXX, if using a XJT, you shouldn't need PPM so use PXX.

The er9x-128 posted above does send ACKs. Here is the updated TEZ code the monitors ACKs. It still needs fully testing.
telemetrEZ.zip
19-Apr-2014 21:57
Ack monitoring
Diff file included
(7.73 KiB) Downloaded 149 times
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Introducing: TelemetrEZ

Post by MikeB »

BTW, the error in the header file I found earlier is in the header file supplied by Atmel with AVR Studio 6.0, so it's THEIR fault!

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Introducing: TelemetrEZ

Post by MikeB »

Thinking ahead to make this work even better.
Add an option to er9x to indicate TEZ revision xx or later fitted.
Change both the TEZ, and er9x to always use 57600 baud between them, indicated to er9x by the above option.
If the option is not set, then er9x will use 9600/57600 as needed (as now) in case of direct connection without the TEZ.
We could add a command, over the serial, to the TEZ to tell it what baudrate to use to the module.

Any holes in this idea?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
LTMNO
Posts: 1049
Joined: Fri Nov 30, 2012 9:31 pm
Country: Canada
Location: Toronto, Canada

Re: Introducing: TelemetrEZ

Post by LTMNO »

That sounds logical. I will test later tonight when I am back home.


Sent from my iPhone using Tapatalk

Edit: Testing and Working... Again Thanks!
Custom 9x with M64/Telemetry Mod
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Introducing: TelemetrEZ

Post by jhsa »

MikeB wrote:if using a XJT, you shouldn't need PPM so use PXX.
What about if you have a model with a D receiver? The protocol has to be set to PPM even if you are using the XJT, right?

Joao

Sent from my GT-I9195 using Tapatalk
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

Post Reply

Return to “FRSky Telemetry Mods”