allaboutmike
Posts: 2
Joined: Thu Oct 19, 2017 5:16 am

Single wire serial rxtx to RPI3 UART connection

Thu Oct 19, 2017 6:48 am

I have a Spektrum AR7700 receiver which apparently speaks SRXL over a serial bus at 115200. On another thread, aBUGSworstnightmare has commented that you can hook these up. I would love to ask directly about it, but I'm apparently too new to PM anyone :(.
It seems like this should be a fairly easy connect to the RPI3 UART given they are both at 3.3v levels. The issue is that there are only three wires on the receiver: VBus, Gnd, Signal (according to the Spektrum docs). The RPI3 has 3v3, Gnd, RX, TX. I assume this means that I need to combine the signals onto the one wire, but I don't know if there are any electronics involved to stop the uart from melting (or otherwise not working/failing/destroying something).
I have seen somewhere (can't find it right now) a simple circuit with a couple of resisters and a diode that seemed like it might work. Can anyone comment or hopefully provide a definitive answer. I'd really like to get bi-directional comms here to send telemetry back to the receiver.
Any help appreciated.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 4115
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Single wire serial rxtx to RPI3 UART connection

Thu Oct 19, 2017 3:49 pm

allaboutmike wrote: I have a Spektrum AR7700 receiver which apparently speaks SRXL over a serial bus at 115200. On another thread, aBUGSworstnightmare has commented that you can hook these up. I would love to ask directly about it, but I'm apparently too new to PM anyone :(.
It seems like this should be a fairly easy connect to the RPI3 UART given they are both at 3.3v levels. The issue is that there are only three wires on the receiver: VBus, Gnd, Signal (according to the Spektrum docs). The RPI3 has 3v3, Gnd, RX, TX. I assume this means that I need to combine the signals onto the one wire, but I don't know if there are any electronics involved to stop the uart from melting (or otherwise not working/failing/destroying something).
I have seen somewhere (can't find it right now) a simple circuit with a couple of resisters and a diode that seemed like it might work. Can anyone comment or hopefully provide a definitive answer. I'd really like to get bi-directional comms here to send telemetry back to the receiver.
Any help appreciated.
W.r.t. "The issue is that there are only three wires on the receiver: VBus, Gnd, Signal (according to the Spektrum docs)." I don't know whether this applies to the Spektrum device but some devices only communicate by serial methods one way (and thus only use two wires/connection for that ie. "Signal" & ground"). For example I have a RS232 serial enabled DMM that can only send data to a computer (continuously, when activated):
http://www.cpmspectrepi.uk/raspberry_pi ... 000zc.html
Trev.
Usually running Raspbian Jessie on up to 12 of 13 Pi's (an A, B1, 2xB2, 2xB+, A+, P2B, 3xP0, P0W) and Stretch on my P3B. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

allaboutmike
Posts: 2
Joined: Thu Oct 19, 2017 5:16 am

Re: Single wire serial rxtx to RPI3 UART connection

Fri Oct 20, 2017 8:07 am

Thanks for replying Trevor. My apologies for not being clear enough.

I know the Spektrum receiver can do two way comms because the documentation specifically talks about how to do it. The diagram here is from that document.
pinout.png
pinout.png (94.71 KiB) Viewed 352 times
My issue is just how to "duplex" the tx/rx lines onto one pin. The receiver comes from a world of three pin devices (servos etc) so I suppose that's why they went that way.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4544
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Single wire serial rxtx to RPI3 UART connection

Fri Oct 20, 2017 9:44 am

Based on aBUGSworstnightmare's post, he says:
Spektrum satellite receivers have a UART interface at 115kbaud --> connect them to the RPI UART-RX
so connect to RX only. Assuming the receiver is the bus master, the protocol appears not to require an ACK from the slave, so no apparent need to connect up transmit for the basic stuff.

Timing everything correctly to handle what appears to be a time division multiplexing scheme is likely to be tricky under Linux.
The spec also makes comments like
Signal is standard 3.3V logic with normal UART levels (3.3V = idle line), however the bus is generally in high-impedance state using the micro’s internal pull-up. This is necessary for idle line detection, although it could leave us open to noise
Seeing as you can't easily switch the tx line to high impedance you're going to need something external that can tri-state. (You may be able to do it by altering the pin muxing for the tx pin between uart and input but timing that is non-trivial). Hooking rx up via a similar gate off the inverse enable signal will mean you don't receive your own transmissions which makes life easier - this is how most 2-wire RS485 transceivers are configured (they're also half duplex, but a differential pair). Typically RS485 will use the RTS line for direction control.

https://www.rcgroups.com/forums/showthr ... nterfacing may be a useful reference for you, although it is talking about STM32 microcontrollers instead of the Pi.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Interfacing (DSI, CSI, I2C, etc.)”

Who is online

Users browsing this forum: shtrnzn and 10 guests