DSMX 9645 Sattelite read data

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
User avatar
voskrresenskyi
Posts: 8
Joined: Sat Jan 18, 2020 7:15 pm
Location: Ukraine

DSMX 9645 Sattelite read data

Post by voskrresenskyi » Sat Jan 18, 2020 7:25 pm

Hello Guys. Really happy to be a part of a such Great community!

I'm trying to read data from Spektrum DSMX 9645 remote receiver .
Maybe I do something wrong? But I receive only "None", even I disabled REPL.
Here is a code:

Code: Select all

import machine
import uos
uos.dupterm(None, 1)  # Disables REPL(UART 0)

uart = UART(0, 115200)
uart.init(baudrate=115200, rx=machine.Pin(3), 
          bits=8, parity=None, stop=1, 
          timeout=100)
for i in range(100):
    with open('h.txt', 'a') as doc:
        doc.write(str(uart.read(16)) + '\n')
uos.dupterm(UART(0, 115200), 1)  # Enables REPL(UART 0)

On my ESP8266:
Orange -> VVC
Black -> GND
Gray -> connecter to RX(pin #3)


Thank you in advance!

User avatar
Roberthh
Posts: 1846
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: DSMX 9645 Sattelite read data

Post by Roberthh » Sat Jan 18, 2020 7:40 pm

The uart.read() may timeout fast. In the reading loop, you should first wait by calling uart.any(), until you receive some characters, and then call uart.read().
About the connection: I assume that you connect the orange wire to 3.3V Vcc, and that the idle state of the UART line is at a high level.
P.S.: 125000 Baud is odd. You may get errors when receiving with 115200 baud, which is 8% off.

User avatar
voskrresenskyi
Posts: 8
Joined: Sat Jan 18, 2020 7:15 pm
Location: Ukraine

Re: DSMX 9645 Sattelite read data

Post by voskrresenskyi » Sat Jan 18, 2020 8:00 pm

Thank you, Roberthh!

Yes, connected to 3.3V Vcc
Here is how it looks like:
Image1
Image1

User avatar
voskrresenskyi
Posts: 8
Joined: Sat Jan 18, 2020 7:15 pm
Location: Ukraine

Re: DSMX 9645 Sattelite read data

Post by voskrresenskyi » Sat Jan 18, 2020 8:15 pm

uart.any() doesn't help. I've added loops. It is always 0(zero)
Done, is better than perfect!

User avatar
Roberthh
Posts: 1846
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: DSMX 9645 Sattelite read data

Post by Roberthh » Sat Jan 18, 2020 8:34 pm

Do you have any tools like oscilloscope or logic analyzer to visualize the signal on the data line? Or at least an DMM to tell the static signal level on the data line.

User avatar
voskrresenskyi
Posts: 8
Joined: Sat Jan 18, 2020 7:15 pm
Location: Ukraine

Re: DSMX 9645 Sattelite read data

Post by voskrresenskyi » Sat Jan 18, 2020 8:38 pm

Unfortunately I don't:(

I've found these similar examples:
https://github.com/samfok/remote_receiv ... er/main.py
https://github.com/stnbu/satbot/blob/ma ... ot/main.py

And it supposed to work
Done, is better than perfect!

User avatar
voskrresenskyi
Posts: 8
Joined: Sat Jan 18, 2020 7:15 pm
Location: Ukraine

Re: DSMX 9645 Sattelite read data

Post by voskrresenskyi » Sat Jan 18, 2020 8:40 pm

Also this instruction
Done, is better than perfect!

User avatar
voskrresenskyi
Posts: 8
Joined: Sat Jan 18, 2020 7:15 pm
Location: Ukraine

Re: DSMX 9645 Sattelite read data

Post by voskrresenskyi » Sat Jan 18, 2020 8:45 pm

Another thing is that the receiver is bound to a spektrum dx6 transmitter.
If the light is on on the receiver it should receive anything.
Done, is better than perfect!

User avatar
voskrresenskyi
Posts: 8
Joined: Sat Jan 18, 2020 7:15 pm
Location: Ukraine

Re: DSMX 9645 Sattelite read data

Post by voskrresenskyi » Sat Jan 18, 2020 8:50 pm

Roberthh wrote:
Sat Jan 18, 2020 8:34 pm
Do you have any tools like oscilloscope or logic analyzer to visualize the signal on the data line? Or at least an DMM to tell the static signal level on the data line.
Found an example with an oscilloscope
Done, is better than perfect!

User avatar
Roberthh
Posts: 1846
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: DSMX 9645 Sattelite read data

Post by Roberthh » Sat Jan 18, 2020 9:10 pm

So at least I can see, that is is "normal" level, and the ESP8266 should be able to receive it. But you still do not know, whether any data is actually exchanged.

Post Reply