Meanwhile I got a working master and node. The master can send a package (one byte so far) to the node, the node responds and the master calculates the distance:
Keeping in mind that it is calibrated rather loosely the results are very good. The distance value is very stable and +-0.5cm accuracy should be archieveable.
What the data package looks like:
- two start bits (both high)
- four bits target address
- four bits command (The master transmits 1=DoEcho and the node responds 2=EchoReply)
- two parity bits
- one stop bit
I need to increase the number of parity bits, because two bits result in an easy 25% chance for the parity to be right anyways.