Two-communications on the trainer port

More
26 Oct 2015 13:16 #39204 by mwm
Moved from another thread:

Deal57 wrote:

mwm wrote: Ok, another trace request. The trainer port plug has connections labelled GND, DECT_RX, TX and NC. I assumed that the NC one wasn't connected, but if it's tied to a pin that would be effing awesome! As in, three rf modules without the MM awesome! I suspect not, but hey - it's worth checking for those of us playing with external boxes.


I traced the trainer port. DECT_RX is connected to the processor pin PA10 through a 100ohm resistor, just like on the 8, and Game_TX is connected to PA9 also through a 100ohm resistor. The problem is that when you put a plug into the jack, DECT_RX is SHORTED to the ground wire, presumably to allow Devo to see that another TX is plugged in. It's something inside the little black box. I tinkered with this on the 7e (same part number) and this behavior is useful for the Arduino add-on because it lets us know not to send PPM out when there is another jack that might be sending PPM In. However, if you wanted to use this port for bidirectional use, you would have to use the same wire for TX and RX.

Unless we change this box! There are two pins that connect to the "ring" of a stereo (TRS) plug, (two different pins connect to the TIP of the cable I usually see on this port) but these two aren't connected to any wiring. So maybe you've got an RX pin?

Let me know how that might be usable. It seems pretty simple to put the jumper in place. Solder the jumper from the little board to the NC white wire (#2, next to black). Then swap out the #2 and #3 wires on the Devo end of that cable. You would then have an RX wire available, right? I'll draw this up when I have a chance.

Ok, that's it, I'm out for the night. It's been a really good day.


I actually knew what the RX & TX pins were tied to, but didn't know about the short to ground. But you also didn't say what the NC pin was tied to, if anything.

We already use them for communications in two directions, but not at the same time. We either only send, or only receive. I have a use for real two-way communications. Not quite ready to talk about what yet. Ideally, I'd have a third line to trigger a reset, but it's not a requirement. I was hoping the NC line was tied to a pin so we could use that. And if it is, we could also use it for a third RF module.

So, what do I need to do to get proper two-way comms working? And can I get that reset line?

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

Please Log in or Create an account to join the conversation.

More
26 Oct 2015 17:31 #39215 by Deal57
Replied by Deal57 on topic Two-communications on the trainer port
I looked again, but I'm pretty sure there are only two lines that are connected from the processor to this connector. The pin marked N/C doesn't connect to any trace on the processor or on the jack assembly.

I'll draw up my findings as soon as I have a chance today. I posted photos of the jack and wiring on my googledrive .

Deviation Devo7e 3way switch mod, A7105, NRF24L01
Devo6s 2x2 switch mod, trim mod, haptic, multimodule, A7105, NRF24L01, CC2500
Devo12e 4-in-1 with voice mod -- it speaks!!

Please Log in or Create an account to join the conversation.

More
27 Oct 2015 00:03 #39223 by mwm
Replied by mwm on topic Two-communications on the trainer port
Oh well, I can live without the extra line. If I ever get away from the Devo 6 switches long enough to work on it :-(.

I'm working on a mod that will go in the Tx, but would be useful outside. So knowing how to mod the Tx to get a proper external serial connection would be nice, except that will apparently break PPM support in deviation :-(. Probably fixable, but will require a code change. This might explain why PPM is done via

You said you were using the shorting to detect when something was plugged in. Hmm. I can use that as well. But gaah, this is ugly.

Looking forward to seeing what you have to say about it!

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

Please Log in or Create an account to join the conversation.

More
27 Oct 2015 18:52 - 27 Oct 2015 18:55 #39257 by Deal57
Replied by Deal57 on topic Two-communications on the trainer port
I put together these drawings to illustrate how we might modify the current Trainer port to support 2-way (RX/TX) connections using a stereo cable. The first drawing is how the jack works today. There are three connectors that are in contact when there is no plug inserted and the connection is broken when a plug is inserted. The DECT_RX connection connects to ground when a plug is inserted.
Devo Trainer Port Connections

The second drawing is how you might wire it to support 2-way communications. All we're doing is jumping the "ring" connection (the second wire of the stereo cable) to the unused wire that connects to Devo (shown in yellow). Then we have to modify the connector at the other end by removing the DECT_RX wire from the male side, and putting the formerly NC, now "ring", wire in it's place. Of course the PA10 processor pin would have to be set up in the software differently too.
Devo Trainer Port 2-Way Mod Connections

Hope this is helpful! Let me know when or if you need me to do the mod and test some software.

Deviation Devo7e 3way switch mod, A7105, NRF24L01
Devo6s 2x2 switch mod, trim mod, haptic, multimodule, A7105, NRF24L01, CC2500
Devo12e 4-in-1 with voice mod -- it speaks!!
Last edit: 27 Oct 2015 18:55 by Deal57. Reason: Can't attach photos.

Please Log in or Create an account to join the conversation.

More
28 Oct 2015 00:01 #39272 by mwm
Replied by mwm on topic Two-communications on the trainer port
I'm stil checking, but I don't think PA10 is used in deviation. PPM input and PPM output and debugging prints all go through PA9. Those should all keep working as is after adding the jumper.

From your diagram, it looks like PA10 gets pulled low when a pin is inserted, which could be used to detect the presence of the pin. That would allow switching to PPM input/output for trainer mode when it was inserted, which is standard behavior. It's not clear that we'd break that, either. With nobody driving PA9, it'd still go to ground, right?

And we could then use this for two-way comms by building a custom cable, which is pretty much required anyway.

If that's all true, then this is ideal. I just need to get back to working on it and not beeping and switches....

Thanks!

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

Please Log in or Create an account to join the conversation.

More
28 Oct 2015 00:54 #39275 by Deal57
Replied by Deal57 on topic Two-communications on the trainer port
Yes. So you have alternatives. And if you use a mono 3/8" plug, then even with the custom internal changes, insert will bring PA10 to ground, since the "ring" connector is in contact with the shield. The custom cable mod doesn't break anything as long as the PPM plug is mono, which is pretty much the standard, I think. A stereo plug wouldn't go to ground if the other end is not grounded, but I'm not entirely sure that's a problem, and I'll poke around.

Lots to do! Let me know what else I can do.

Deviation Devo7e 3way switch mod, A7105, NRF24L01
Devo6s 2x2 switch mod, trim mod, haptic, multimodule, A7105, NRF24L01, CC2500
Devo12e 4-in-1 with voice mod -- it speaks!!

Please Log in or Create an account to join the conversation.

More
28 Nov 2015 12:03 #40462 by mwm
Replied by mwm on topic Two-communications on the trainer port
Just a heads up. I've now got the stuff I wanted this for working well enough to post a test build. See deviationtx.com/forum/builds/5089-voice-alerts-test-build for information on that.

The next step - well, after getting the dfplayer mini option working - is two-way communications with the audio player, so the user can pick from a list of available audio files for various sounds.

So if you're interested in working on that, the next thing to do would be to order an audiofx card or dfplayer mini. Details are in the VoiceAlerts.md files in pretty much every zip in the test builds.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

Please Log in or Create an account to join the conversation.

Time to create page: 0.045 seconds
Powered by Kunena Forum